Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix tab completion

* Add mapping for tab completion so Ctrl+P isn't necessary.
* Add a mapping to re-index ctags quickly from vim.
* Add explaining comment to Tlist.
  • Loading branch information...
commit c7efed4f0c50466c94bcf3f077972662aa4f9617 1 parent d836af8
Dan Croak authored October 20, 2012

Showing 1 changed file with 6 additions and 2 deletions. Show diff stats Hide diff stats

  1. 8  vimrc
8  vimrc
@@ -61,13 +61,17 @@ set numberwidth=5
61 61
 " Snippets are activated by Shift+Tab
62 62
 let g:snippetsEmu_key = "<S-Tab>"
63 63
 
64  
-" Tab completion options
  64
+" Tab completion
65 65
 set wildmode=list:longest,list:full
66 66
 set complete=.,w,t
  67
+imap <Tab> <C-P>
67 68
 
68  
-" Tags
  69
+" Exclude Javascript files in :Rtags via rails.vim due to warnings when parsing
69 70
 let g:Tlist_Ctags_Cmd="ctags --exclude='*.js'"
70 71
 
  72
+" Index ctags from any project, including those outside Rails
  73
+map <Leader>ct :!ctags -R .<CR>
  74
+
71 75
 " Cucumber navigation commands
72 76
 autocmd User Rails Rnavcommand step features/step_definitions -glob=**/* -suffix=_steps.rb
73 77
 autocmd User Rails Rnavcommand config config -glob=**/* -suffix=.rb -default=routes

0 notes on commit c7efed4

Mike Burns

This is different from :Rtags because it works without rails.vim?

Mike Burns

I find this to be useful, if slow at first:

let g:rails_ctags_arguments = "`gem env gemdir`/gems"
Joshua Clayton

:Rtags definitely works within Ruby gems too (just ran it in factory_girl and capybara-webkit without a hitch).

Dan Croak

This is different from :Rtags because it works without rails.vim?

Yeah, should work in shell scripts, Go programs, and for Haskell and the other Ewok programming languages.

Mike Burns

Good idea.

On a whim I found this, which seems fun but potentially slow: http://stackoverflow.com/questions/155449/vim-auto-generate-ctags

Please sign in to comment.
Something went wrong with that request. Please try again.