Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby-on-rails-4/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Janus Vim:Remap Command-Shift-F到git grep_Vim_Grep_Janus - Fatal编程技术网

Janus Vim:Remap Command-Shift-F到git grep

Janus Vim:Remap Command-Shift-F到git grep,vim,grep,janus,Vim,Grep,Janus,我找到了这个git-grep-vim插件,但是我不知道如何映射我的命令-Shift-F来调用它。我已经禁用了默认的Ack插件 您只需要创建一个调用GitGrep命令的自定义映射: nnoremap <D-S-f> :GitGrep<Space> nnoremap:GitGrep 之后,点击将 :GitGrep | <-- cursor here :GitGrep |Janus已经包含了绝对令人敬畏的功能,它还提供了:Ggrep命令 所以,我们可以随便走 首先禁

我找到了这个git-grep-vim插件,但是我不知道如何映射我的命令-Shift-F来调用它。我已经禁用了默认的Ack插件


您只需要创建一个调用
GitGrep
命令的自定义映射:

nnoremap <D-S-f> :GitGrep<Space>
nnoremap:GitGrep
之后,点击

:GitGrep | <-- cursor here

:GitGrep |Janus已经包含了绝对令人敬畏的功能,它还提供了
:Ggrep
命令

所以,我们可以随便走

首先禁用
~/.vimrc中的
Ack
插件,然后像这样:

呼叫janus#禁用插件('ack')

然后在
~/.vimrc.后面添加以下代码:

if has("gui_macvim") && has("gui_running") " Command-Shift-F on OSX call janus#add_mapping('ggrep', 'map', '', ':Ggrep') else " Define to a dummy value to see if it would set as well. map :dummy if maparg("") == ":dummy" " f on systems where == call janus#add_mapping('ggrep', 'map', 'f', ':Ggrep') else " if we can still map to call janus#add_mapping('ggrep', 'map', '', ':Ggrep') endif map endif if has(“gui_macvim”)和&has(“gui_运行”) “OSX上的Command-Shift-F 调用janus#add_mapping('ggrep','map','','':ggrep') 其他的 “定义一个伪值,看看它是否也会被设置。 地图:假人 如果maparg(“”==“:dummy” “f在其中== 调用janus#add_映射('ggrep','map','f',':ggrep')) 其他的 “如果我们仍然可以映射到 调用janus#add_mapping('ggrep','map','','':ggrep') 恩迪夫 地图 恩迪夫 享受吧