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
Tag Archives: vim
A Vim Guide for Advanced Users
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.
DevOnDuty: Vim as IDE
This looks pretty kickass: Vim as IDE.
A Vim Guide for Intermediate Users
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.
5 lines I put in a blank .vimrc
See 5 lines I put in a blank .vimrc for some sensible defaults… my .vimrc is rather a bit longer…
rsync: unexpected remote arg
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…
What to do if you accidentally press Ctrl+S in Vim
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.
Delete until next character occurrence in Vim
In vim, to search for next ‘>’ use: f>
To delete until next ‘”‘ use: df”
To delete an *ML attribute, e.g. use: df”.
Fixing meta-keys in Vim via Mac OS X Terminal.app
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!
Seven habits of effective text editing
Got to read Seven habits of effective text editing…
…and Wholly Unbalanced Parentheses: My Vimrc…
…and slightly related OS X: Keyboard shortcuts…