如何使用 vimproc 和 quick运行 - VIM 异步地 运行 Ag?
How to run Ag asynchronously with vimproc and quickrun - VIM?
我可以 运行 .php
在我的 .vimrc
中使用此设置异步
nnoremap <leader>r :QuickRun<CR>
let g:quickrun_config = get(g:, 'quickrun_config', {})
let g:quickrun_config = {
\ "_" : {
\ 'runner': 'vimproc',
\ 'runner/vimproc/updatetime': 60,
\ 'outputter/quickfix': ':quickrun-module-outputter/quickfix',
\ 'outputter/buffer/split': ':rightbelow 8sp',
\ },
\}
有谁知道我如何 运行 ag
异步?
Ag
中的设置 .vimrc
if executable("ag")
let g:ctrlp_user_command = 'ag %s -i --nocolor --nogroup --hidden
\ --ignore .git
\ --ignore .svn
\ --ignore .hg
\ --ignore .DS_Store
\ --ignore "**/*.pyc"
\ -g ""'
endif
nnoremap <leader>a :Ag!<Space>
nnoremap <leader>aa :Ag! <C-r>=expand('<cword>')<CR>
nnoremap <leader>aaa :Ag! <C-r>=expand('<cword>')<CR><CR>
通过 Vim 使用异步命令的通用解决方案是使用名为 vim-dispatch 的插件,您可以使用 :Start!
在后台启动命令
或者,这也是 vim 的一个分支,名为 neovim,它试图解决该问题。在这个post的时候,还不一定够成熟,但这也是以后要考虑的事情。
我可以 运行 .php
在我的 .vimrc
nnoremap <leader>r :QuickRun<CR>
let g:quickrun_config = get(g:, 'quickrun_config', {})
let g:quickrun_config = {
\ "_" : {
\ 'runner': 'vimproc',
\ 'runner/vimproc/updatetime': 60,
\ 'outputter/quickfix': ':quickrun-module-outputter/quickfix',
\ 'outputter/buffer/split': ':rightbelow 8sp',
\ },
\}
有谁知道我如何 运行 ag
异步?
Ag
中的设置 .vimrc
if executable("ag")
let g:ctrlp_user_command = 'ag %s -i --nocolor --nogroup --hidden
\ --ignore .git
\ --ignore .svn
\ --ignore .hg
\ --ignore .DS_Store
\ --ignore "**/*.pyc"
\ -g ""'
endif
nnoremap <leader>a :Ag!<Space>
nnoremap <leader>aa :Ag! <C-r>=expand('<cword>')<CR>
nnoremap <leader>aaa :Ag! <C-r>=expand('<cword>')<CR><CR>
通过 Vim 使用异步命令的通用解决方案是使用名为 vim-dispatch 的插件,您可以使用 :Start!
或者,这也是 vim 的一个分支,名为 neovim,它试图解决该问题。在这个post的时候,还不一定够成熟,但这也是以后要考虑的事情。