6
字我要地图<Leader>a
与ag
字光标Vim的搜索与股份公司下光标
我写了这个搜索下:不幸的是
noremap <Leader>a :Ag!<C-u><C-r>=Escape(expand('<cword>'))<CR>
function! Escape(stuff)
return substitute(escape(a:stuff, '\/.*$^~[]'), "\n", '\\n', "g")
endfunction
当我上的字foo
打<Leader>a
我得到这个:
:foo
的Ag!
消失和后<CR>
不è xecuted。
我的错误在哪里?
好,谢谢。然后我会用'noremap a:Ag! -Q = expand('')'。为什么''不被考虑在内? –
nowox
@coin查看已更新的答案 – Kent