Over on the VSCodeVim chatroom a bloke called Chris pointed me to the ‘Whichwrap’ setting for Vim mode in VSCode. In VSCode click File -> Preferences -> Settings; then in the Extensions / Vim settings search for ‘Whichwrap’ and enter: l,h
Today I stumbled upon A Vim Guide for Advanced Users. Learned a trick or two, but it’s still a long road ahead for me.
This looks pretty kickass: Vim as IDE.
Today I ran into A Vim Guide for Intermediate Users which looked really great but I didn’t have time to take it all in.
So I was getting a baffling “unexpected remote arg” error from rsync today. Eventually I figured out the problem was that my argument “–executability” had become “– executablility”, I think due to a copy and paste problem where I copied some shell script code from Vim in a Konsole terminal into another Vim in another Konsole terminal. Traps for young players! If you get baffled by this error try putting an ‘echo’ in front of the command and then resize your terminal window to see if that affects things…
If you press Ctrl+S in Vim (i.e. because that’s hard-wired for ‘save’) your terminal may lockup, depending on how it’s configured.
If you want to know why, have a read here. If you just want to get on with life, press Ctrl+Q!
Everything is easy when you know how.
In vim, to search for next ‘>’ use: f>
To delete until next ‘”‘ use: df”
To delete an *ML attribute, e.g. use: df”.
So I configured Terminal.app to use Option (Alt) as Meta key: Terminal => Preferences => Profiles => Keyboard => Use Option as Meta key
nmap <M-j> mz:m+<cr>`z nmap <M-k> mz:m-2<cr>`z
So I found this article: Fix meta-keys that break out of Insert mode and ended up with the following snippet for my .vimrc which fixed my Meta-key problem:
let c='a' while c <= 'z' exec "set <M-".tolower(c).">=\e".c exec "imap \e".c." <M-".tolower(c).">" let c = nr2char(1+char2nr(c)) endw
Everything is easy when you know how!