Browse files

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...
1 parent d836af8 commit c7efed4f0c50466c94bcf3f077972662aa4f9617 @croaky croaky committed Oct 21, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 vimrc
8 vimrc
@@ -61,13 +61,17 @@ set numberwidth=5
" Snippets are activated by Shift+Tab
let g:snippetsEmu_key = "<S-Tab>"
-" Tab completion options
+" Tab completion
set wildmode=list:longest,list:full
set complete=.,w,t
+imap <Tab> <C-P>
-" Tags
+" Exclude Javascript files in :Rtags via rails.vim due to warnings when parsing
let g:Tlist_Ctags_Cmd="ctags --exclude='*.js'"
mike-burns Oct 25, 2012

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

let g:rails_ctags_arguments = "`gem env gemdir`/gems"
+" Index ctags from any project, including those outside Rails
+map <Leader>ct :!ctags -R .<CR>
mike-burns Oct 25, 2012

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

joshuaclayton Oct 25, 2012

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

croaky Oct 25, 2012

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 Oct 26, 2012

Good idea.

On a whim I found this, which seems fun but potentially slow:

" Cucumber navigation commands
autocmd User Rails Rnavcommand step features/step_definitions -glob=**/* -suffix=_steps.rb
autocmd User Rails Rnavcommand config config -glob=**/* -suffix=.rb -default=routes

0 comments on commit c7efed4

Please sign in to comment.