[ prog / sol / mona ]

sol


I may have to learn vim

13 2021-07-26 12:23

Here are the main useful things to know in vim:
1) c-f in command mode(:) opens history in a separate buffer
2) "<x> before a command where <x> is a letter uses x as the yank buffer for that command instead of the default.
3) You already know about v for visual selection and V for block selection, gn will re-select the old selection after running a command
4) search (/) and substitute (:%s) is far more important than most of the motions.
5) turn on listchars so you don't commit whitespace by accident.
6) Use ctags (it supports other languages like python) jump is c-] and auto complete is (I think) c-p (I only use jump)
7) If you configure the make function then the output will go into the quickfix buffer which lets you jump to errors like in big IDEs.
8) Don't install piles of extensions, vim isn't good at it and you should use emacs instead at that point.
If anyone knows emacs-style s-expr motion commands for vim I'd love to hear about it.

15


VIP:

do not edit these