Mercurial > vim-gutentags
comparison autoload/gutentags.vim @ 121:8310e4602de9
minor: fix typos / unbalanced quotes
author | Daniel Hahler <git@thequod.de> |
---|---|
date | Wed, 06 Apr 2016 19:08:18 +0200 |
parents | 7db339a3961f |
children | 3763e9f412e7 |
comparison
equal
deleted
inserted
replaced
117:df3b0ca48013 | 121:8310e4602de9 |
---|---|
117 " Generate a path for a given filename in the cache directory. | 117 " Generate a path for a given filename in the cache directory. |
118 function! gutentags#get_cachefile(root_dir, filename) abort | 118 function! gutentags#get_cachefile(root_dir, filename) abort |
119 let l:tag_path = gutentags#stripslash(a:root_dir) . '/' . a:filename | 119 let l:tag_path = gutentags#stripslash(a:root_dir) . '/' . a:filename |
120 if g:gutentags_cache_dir != "" | 120 if g:gutentags_cache_dir != "" |
121 " Put the tag file in the cache dir instead of inside the | 121 " Put the tag file in the cache dir instead of inside the |
122 " projet root. | 122 " project root. |
123 let l:tag_path = g:gutentags_cache_dir . '/' . | 123 let l:tag_path = g:gutentags_cache_dir . '/' . |
124 \tr(l:tag_path, '\/: ', '---_') | 124 \tr(l:tag_path, '\/: ', '---_') |
125 let l:tag_path = substitute(l:tag_path, '/\-', '/', '') | 125 let l:tag_path = substitute(l:tag_path, '/\-', '/', '') |
126 endif | 126 endif |
127 let l:tag_path = gutentags#normalizepath(l:tag_path) | 127 let l:tag_path = gutentags#normalizepath(l:tag_path) |
157 if g:gutentags_resolve_symlinks | 157 if g:gutentags_resolve_symlinks |
158 let l:buf_dir = fnamemodify(resolve(expand('%:p', 1)), ':p:h') | 158 let l:buf_dir = fnamemodify(resolve(expand('%:p', 1)), ':p:h') |
159 endif | 159 endif |
160 let b:gutentags_root = gutentags#get_project_root(l:buf_dir) | 160 let b:gutentags_root = gutentags#get_project_root(l:buf_dir) |
161 if filereadable(b:gutentags_root . '/.notags') | 161 if filereadable(b:gutentags_root . '/.notags') |
162 call gutentags#trace("'notags' file found... no gutentags support.") | 162 call gutentags#trace("'.notags' file found... no gutentags support.") |
163 return | 163 return |
164 endif | 164 endif |
165 | 165 |
166 if !has_key(s:known_projects, b:gutentags_root) | 166 if !has_key(s:known_projects, b:gutentags_root) |
167 call s:cache_project_root(b:gutentags_root) | 167 call s:cache_project_root(b:gutentags_root) |
183 call gutentags#trace("Can't figure out what tag file to use... no gutentags support.") | 183 call gutentags#trace("Can't figure out what tag file to use... no gutentags support.") |
184 return | 184 return |
185 endtry | 185 endtry |
186 | 186 |
187 " We know what tags file to manage! Now set things up. | 187 " We know what tags file to manage! Now set things up. |
188 call gutentags#trace("Setting gutentags for buffer '" . bufname('%')) | 188 call gutentags#trace("Setting gutentags for buffer '".bufname('%')."'") |
189 | 189 |
190 " Autocommands for updating the tags on save. | 190 " Autocommands for updating the tags on save. |
191 let l:bn = bufnr('%') | 191 let l:bn = bufnr('%') |
192 execute 'augroup gutentags_buffer_' . l:bn | 192 execute 'augroup gutentags_buffer_' . l:bn |
193 execute ' autocmd!' | 193 execute ' autocmd!' |