VIM & Source-code Navigating

  • set iskeyword+=- to allow hyphens in function/variables names (as used by ctrl+]). Handy for working with Makefiles and shell-scripts

Exuberant ctags

  1. Install ctags
  2. ctags -R
  3. vim
  4. Press ctrl+] to jump to the definition of the item under the cursor

Taglist

  1. Install ctags
  2. Install TagList plugin for VIM
  3. vim
  4. :TlistToggle to open the taglist side-bar
  5. Browse / edit files as usual and watch the side-bar populate

Cscope

  1. Install cscope
  2. Optionally, create a cscope.files text-file containing the files you want to index
  3. cscope -b -q to generate DB (from cscope.files if present)
  4. vim
  5. :cscope show to check DB loaded successfully
  6. :cscope find global <cWORD>
    • Mapped to “ctrl+<space>, g” by default
 
coding/vim/source_nav.txt · Last modified: 2009/06/17 16:59 by robm
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki