Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update tags for just the file saved

  • Loading branch information...
commit 8ae502cbb18db97327f8c2d9ed4f3b3291e9c250 1 parent 3c6cdf2
Frank Schumacher authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  home/.vim/config/filetypes/ruby.vim
2  home/.vim/config/filetypes/ruby.vim
View
@@ -14,7 +14,7 @@ augroup vim_config
" On enter update/create tags
autocmd VimEnter * call UpdateOrCreateTagsFile()
" On write just update tags of this file
- autocmd BufWrite *.rb silent! execute ":UpdateTags!"
+ autocmd BufWritePost *.rb call writefile(split(system("sort -u <(touch tags && grep -v " . expand('%:%') . " tags) <(ctags --languages=ruby -u -f - " . shellescape(expand('%:%')) . " | grep " . expand('%:r') . ")"),"\n"),"tags")
" Specs can be named _scene.rb
autocmd BufRead,BufNewFile *_scene.rb syn keyword rubyRspec describe context it specify it_should_behave_like before after setup subjectits shared_examples_for shared_context let | highlight def link rubyRspec Function
Please sign in to comment.
Something went wrong with that request. Please try again.