Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit c7efed4f0c50466c94bcf3f077972662aa4f9617 1 parent d836af8
@croaky croaky authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 vimrc
View
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 Admin

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

let g:rails_ctags_arguments = "`gem env gemdir`/gems"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+" Index ctags from any project, including those outside Rails
+map <Leader>ct :!ctags -R .<CR>
@mike-burns Admin

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

@joshuaclayton Admin

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

@croaky Admin
croaky added a note

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 Admin

Good idea.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+
" 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
@mike-burns
Admin

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

@mike-burns
Admin

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

let g:rails_ctags_arguments = "`gem env gemdir`/gems"
@joshuaclayton

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

@croaky
Admin

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
Admin

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.