paste from register in command

Occasionally I’d like to use some portion of contents from a buffer/ file in a vim command. Copying and pasting with a mouse/ touchpad is is a flow killer for me. There’s a way to paste the contents of a vim register in the vim command window. Using <C-r> in command mode will interpret the next character(s) as a register and insert the contents of the register into the vim command!

Continue reading »

grep current word

While pairing a coworker remarked that I’m able to jump around in vim quite quickly. While I use a number of techniques to jump around, including gf, rails-vim A, R and their family. I came up with a variation on the ever handy *. Using the star will jump to the next occurrence of the word under the cursor. This jump jump is limited to the current file. I thought it might be handy to have a leader command to quickly be able to Ggrep for <cword> (the word under the cursor).

Continue reading »

Project local vimrc

I recently began freelancing again, which means working on many different projects. Diverse projects bring diverse needs with respect to vim configuration. For example commands to fire off tests can vary based on testing framework or file system layout.

Continue reading »