r/programming • u/variance_explained • May 23 '17
Stack Overflow: Helping One Million Developers Exit Vim
https://stackoverflow.blog/2017/05/23/stack-overflow-helping-one-million-developers-exit-vim/
9.2k
Upvotes
View all comments
Show parent comment
1
u/creynolds722 May 24 '17
Nope, that's the beauty of vim, and probably why it hangs on as long as it has. You can do anything you want. A job specific one I have is:
I visually highlight a variable and type 'wow' in visual mode, it yanks(yy) the selection into the z buffer("z), escapes from visual mode, does 'o' to create a new line below the line I'm on and goes into insert mode, types 'warn "\n".Data::Dumper::Dumper(' then <C-R>z to type what I put in the z buffer earlier, then finishes my dumper statement with ')."\n";' and escapes.
That saves me a ton of typing every time I want to warn out the contents of a variable. Very useful.