|
69 | 69 |
|
70 | 70 | function! s:query_path(root) |
71 | 71 | let code = "print $:.join %q{,}" |
72 | | - if &shell =~# 'sh' && $PATH !~# '\s' |
73 | | - let prefix = 'env PATH='.$PATH.' ' |
| 72 | + if &shell =~# 'sh' |
| 73 | + let prefix = 'env PATH='.shellescape($PATH).' ' |
74 | 74 | else |
75 | 75 | let prefix = '' |
76 | 76 | endif |
@@ -190,15 +190,16 @@ if !exists("g:no_plugin_maps") && !exists("g:no_ruby_maps") |
190 | 190 | endif |
191 | 191 |
|
192 | 192 | if maparg("\<C-]>",'n') == '' |
193 | | - nnoremap <silent> <buffer> <C-]> :<C-U>exe v:count1."tag <C-R>=RubyCursorIdentifier()<CR>"<CR> |
194 | | - nnoremap <silent> <buffer> g<C-]> :<C-U>exe "tjump <C-R>=RubyCursorIdentifier()<CR>"<CR> |
195 | | - nnoremap <silent> <buffer> g] :<C-U>exe "tselect <C-R>=RubyCursorIdentifier()<CR>"<CR> |
196 | | - nnoremap <silent> <buffer> <C-W>] :<C-U>exe v:count1."stag <C-R>=RubyCursorIdentifier()<CR>"<CR> |
197 | | - nnoremap <silent> <buffer> <C-W><C-]> :<C-U>exe v:count1."stag <C-R>=RubyCursorIdentifier()<CR>"<CR> |
198 | | - nnoremap <silent> <buffer> <C-W>g<C-]> :<C-U>exe "stjump <C-R>=RubyCursorIdentifier()<CR>"<CR> |
199 | | - nnoremap <silent> <buffer> <C-W>g] :<C-U>exe "stselect <C-R>=RubyCursorIdentifier()<CR>"<CR> |
200 | | - nnoremap <silent> <buffer> <C-W>} :<C-U>exe "ptag <C-R>=RubyCursorIdentifier()<CR>"<CR> |
201 | | - nnoremap <silent> <buffer> <C-W>g} :<C-U>exe "ptjump <C-R>=RubyCursorIdentifier()<CR>"<CR> |
| 193 | + cnoremap <SID>foldopen <Bar>if &foldopen =~# 'tag'<Bar>foldopen<Bar>endif |
| 194 | + nnoremap <silent> <script> <buffer> <C-]> :<C-U>exe v:count1."tag <C-R>=RubyCursorIdentifier()<CR>"<SID>foldopen<CR> |
| 195 | + nnoremap <silent> <script> <buffer> g<C-]> :<C-U>exe "tjump <C-R>=RubyCursorIdentifier()<CR>"<SID>foldopen<CR> |
| 196 | + nnoremap <silent> <script> <buffer> g] :<C-U>exe "tselect <C-R>=RubyCursorIdentifier()<CR>"<SID>foldopen<CR> |
| 197 | + nnoremap <silent> <script> <buffer> <C-W>] :<C-U>exe v:count1."stag <C-R>=RubyCursorIdentifier()<CR>"<SID>foldopen<CR> |
| 198 | + nnoremap <silent> <script> <buffer> <C-W><C-]> :<C-U>exe v:count1."stag <C-R>=RubyCursorIdentifier()<CR>"<SID>foldopen<CR> |
| 199 | + nnoremap <silent> <script> <buffer> <C-W>g<C-]> :<C-U>exe "stjump <C-R>=RubyCursorIdentifier()<CR>"<SID>foldopen<CR> |
| 200 | + nnoremap <silent> <script> <buffer> <C-W>g] :<C-U>exe "stselect <C-R>=RubyCursorIdentifier()<CR>"<SID>foldopen<CR> |
| 201 | + nnoremap <silent> <script> <buffer> <C-W>} :<C-U>exe "ptag <C-R>=RubyCursorIdentifier()<CR>"<SID>foldopen<CR> |
| 202 | + nnoremap <silent> <script> <buffer> <C-W>g} :<C-U>exe "ptjump <C-R>=RubyCursorIdentifier()<CR>"<SID>foldopen<CR> |
202 | 203 | let b:undo_ftplugin = b:undo_ftplugin |
203 | 204 | \."| sil! exe 'nunmap <buffer> <C-]>'| sil! exe 'nunmap <buffer> g<C-]>'| sil! exe 'nunmap <buffer> g]'" |
204 | 205 | \."| sil! exe 'nunmap <buffer> <C-W>]'| sil! exe 'nunmap <buffer> <C-W><C-]>'" |
|
0 commit comments