Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the best thing you've done with vim that helped your programming?

Tags:

vim

While surfing, I came to know that somebody has done Tower of Hanoi using vim. WOW!!!

Can you people share what all cool things you have been doing in vim.

Edit: Not sure about the Tower of Hanoi solution using vim being all that useful. But I think this question should be re-opened to allow people to comment on any useful things that they've done using vim. For me? See my answer below. (-:

like image 808
Aman Jain Avatar asked Oct 28 '08 05:10

Aman Jain


1 Answers

vim has a set of commands that integrate with development tools such as make, gcc, and ctags. You can build your project, navigate to warnings and errors, and jump to function/variable definitions without leaving the editor:

  • :make builds the project.
  • :cl lists warnings and errors.
  • :cc takes you to the to line in the source code that generated the current error.
  • :cn navigates to the next error.
  • :cp navigates to the previous error.
  • :tag name navigates to the definition of the token name. (See man ctags to generate an index of tokens; sometimes make tags will do this automatically.)
  • Pressing Ctrl+] navigates to the definition of the token under the cursor.
like image 130
Adam Liss Avatar answered Dec 09 '22 03:12

Adam Liss