xolox / vim-easytags

Automated tag file generation and syntax highlighting of tags in Vim
http://peterodding.com/code/vim/easytags/
1.01k stars 109 forks source link

Any workaround for r/o tags file after sudo-ed edits? #73

Closed itonohito closed 10 years ago

itonohito commented 10 years ago

It isn't a issue, definitely. I'm just asking for help. I use vim not only for coding, but for system files editing also. With sudo, of course. In case I use global tags file, every time after sudo-ed edit, my global tags file is owned by root (I have to preserve environment on sudo, especially, $HOME value). If I use dynamic tags options with value of 2, I get pile of tags files scattered on filesystem. Is there any way to work around that? For example, to add user id to tags file name (best option for me)? Or define list of directories, where tags file should be created only (I usually need it only for subdirectories of my home directory)? Or do not re-create global tags file everytime, and truncate it instead, so original tags file owner stays preserved? Or some other option? Thanks for any help.

itonohito commented 10 years ago

Solved by adding into .vimrc: let g:easytags_file = '~/.vim/tags-$USER'