Mercurial > vim-gutentags
comparison plugin/gutentags.vim @ 40:8b3c611a4d3b
Support project directories with spaces in them.
Note that ctags seems to not like spaces in the output tags file, so it's
a good idea to put tags somewhere else with `g:gutentags_cache_dir`.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sat, 10 Jan 2015 20:45:49 -0800 |
parents | 186b65facdb1 |
children | 99328cb71e75 |
comparison
equal
deleted
inserted
replaced
39:448c128e2952 | 40:8b3c611a4d3b |
---|---|
188 " We know what tags file to manage! Now set things up. | 188 " We know what tags file to manage! Now set things up. |
189 call s:trace("Setting gutentags for buffer '" . bufname('%') . "' with tagfile: " . b:gutentags_file) | 189 call s:trace("Setting gutentags for buffer '" . bufname('%') . "' with tagfile: " . b:gutentags_file) |
190 | 190 |
191 " Set the tags file for Vim to use. | 191 " Set the tags file for Vim to use. |
192 if g:gutentags_auto_set_tags | 192 if g:gutentags_auto_set_tags |
193 execute 'setlocal tags^=' . b:gutentags_file | 193 execute 'setlocal tags^=' . fnameescape(b:gutentags_file) |
194 endif | 194 endif |
195 | 195 |
196 " Autocommands for updating the tags on save. | 196 " Autocommands for updating the tags on save. |
197 let l:bn = bufnr('%') | 197 let l:bn = bufnr('%') |
198 execute 'augroup gutentags_buffer_' . l:bn | 198 execute 'augroup gutentags_buffer_' . l:bn |
368 call s:trace("(fake... not actually running)") | 368 call s:trace("(fake... not actually running)") |
369 endif | 369 endif |
370 call s:trace("") | 370 call s:trace("") |
371 finally | 371 finally |
372 " Restore the current directory... | 372 " Restore the current directory... |
373 execute "chdir " . l:prev_cwd | 373 execute "chdir " . fnameescape(l:prev_cwd) |
374 endtry | 374 endtry |
375 endfunction | 375 endfunction |
376 | 376 |
377 " }}} | 377 " }}} |
378 | 378 |