Skip to content
Browse files

Ctags generation for Rails 3

  • Loading branch information...
1 parent c032278 commit d9a6d201f4c6c36be39c25904ceae3629e504983 @edsinclair committed Jan 13, 2014
Showing with 5 additions and 4 deletions.
  1. +5 −4 .vimrc.after
View
9 .vimrc.after
@@ -1,6 +1,7 @@
:set gcr=n-v-c:blinkon0
:set autowrite
:set history=100
+set tags=./tags,tags;
:au FocusLost * silent! wa
" Keybindings
@@ -40,12 +41,12 @@ map <D-z> :earlier 1<CR>
map <D-Z> :later 1<CR>
" ctags with rails 2 load path
-map <leader>c :!script/runner 'puts $LOAD_PATH.join(" ")' \| xargs /usr/local/bin/ctags -R public/javascripts -f tags<CR>
-map <leader>C :!script/runner 'puts $LOAD_PATH.join(" ")' \| xargs rdoc -f tags<CR>
+"map <leader>c :!script/runner 'puts $LOAD_PATH.join(" ")' \| xargs /usr/local/bin/ctags -R public/javascripts -f tags<CR>
+"map <leader>C :!script/runner 'puts $LOAD_PATH.join(" ")' \| xargs rdoc -f tags<CR>
" ctags with rails 3 load path
-" map <leader>c :!rails runner 'puts $LOAD_PATH.join(" ")' \| xargs /usr/local/bin/ctags -R public/javascripts -f tags<CR>
-" map <leader>C :!rails runner 'puts $LOAD_PATH.join(" ")' \| xargs rdoc -f tags<CR>
+map <leader>c :!rails runner 'puts $LOAD_PATH.reject { \|p\| p.include?("gems/2.0.0/gems/json") \|\| p.include?("2.0.0/gems/rails-3.2.16") }.join(" ")' \| xargs /usr/local/bin/ctags -R public/javascripts -f tags<CR>
+map <leader>C :!rails runner 'puts $LOAD_PATH.reject { \|p\| p.include?("gems/2.0.0/gems/json") \|\| p.include?("2.0.0/gems/rails-3.2.16") }.join(" ")' \| xargs rdoc -f tags<CR>
" Ag current word
map <leader>a :Ag<CR>

0 comments on commit d9a6d20

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