Live data from Hacker News

Efficient Editing With vim

jmcpherson.org

1–10 of 125 posts

Re: Efficient Editing With vim

#2
Cool feature I discovered today, for multi-file project navigation:

  :tag yourMethodNameHere
Tab-completion works, so typing ":tag yourM", and pressing tab repeatedly cycles through all the tags with that prefix (you need to have created the tags file with ctags first).

Re: Efficient Editing With vim

#3
post #2

Cool feature I discovered today, for multi-file project navigation: :tag yourMethodNameHere Tab-completion works, so typing ":tag yourM", and pressing tab repeatedly cycles through all the tags with that prefix (you need to have created the tags file with ctags first).

Tag jumping is also cool: Ctrl-] will jump to the tag under the cursor and pushes the current location on the tag. Ctrl-T pops the tag stack and moves you back to your previous location. Good for checking the definition of a function and jumping back.

Re: Efficient Editing With vim

#4
See, this is one of the things I love about Vim: there's always something new to learn! Somehow I had overlooked "K" to go to man pages. The other thing I love about Vim is the excellent documentation! I wanted to know more about "K" so I typed ":help K" and learned that, for example, if you're editing Ruby and would rather use 'ri' in place of 'man', all you have to do is add ":set keywordprg=ri" to your .vimrc (and if you have the ruby.vim files, it's already done for you).

Re: Efficient Editing With vim

#5
I think it's the first time that I want to install vim to try it. As a Windows user, I always found NotePad++ and other text editor an easier choice but I can now see some powerfull utilities to vim now. Very clear article.

Re: Efficient Editing With vim

#6
I feel silly for only recently discovering tabs in vim.

  :tabnew file
Opens up a new tab,

  :tabn
Goes to the next tab, and

  :tabp
Goes to the previous tab. Works great in both gui and non-gui mode.

Re: Efficient Editing With vim

#9
post #6

I feel silly for only recently discovering tabs in vim. :tabnew file Opens up a new tab, :tabn Goes to the next tab, and :tabp Goes to the previous tab. Works great in both gui and non-gui mode.

gt and gT in command mode also do next tab and previous tab
Post reply on HN