Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/vim/5.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
Editor VIM:在我们/他们的冲突块之间选择_Editor_Vim - Fatal编程技术网

Editor VIM:在我们/他们的冲突块之间选择

Editor VIM:在我们/他们的冲突块之间选择,editor,vim,Editor,Vim,这个问题是关于如何在冲突块上为我们或他们选择有用的映射,如 <<<<<<< HEAD ours code ======= theirs code >>>>>>> branch >分支 只需将以下代码粘贴到~/.vimrc中,并使用、fc、、so和、st。 (完成。vimrc at) “代码” “找到最近的 “资料来源:http://vim.1045645.n5.nabble.com/find-closest-o

这个问题是关于如何在冲突块上为我们或他们选择有用的映射,如

<<<<<<< HEAD
ours code
=======
theirs code
>>>>>>> branch
>分支

只需将以下代码粘贴到~/.vimrc中,并使用
、fc
、so
、st
。 (完成。vimrc at)

“代码”
“找到最近的
“资料来源:http://vim.1045645.n5.nabble.com/find-closest-occurrence-in-both-directions-td1183340.html
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""                                                        
功能!FindNearest(模式)
设@/=a:模式
设b:prev=search(a:pattern'bncW')
如果b:上一个
设b:next=search(a:pattern'ncW')
如果b:下一个
设b:cur=line('.'))
如果b:cur-b:prev==b:next-b:cur
“在比赛中
elseif b:cur-b:prevnmap fc/我为此编写了一个插件:。它提供以下映射:

    ]x     Go to [count] next start of a conflict.
    ]X     Go to [count] next end of a conflict.
    [x     Go to [count] previous start of a conflict.
    [X     Go to [count] previous end of a conflict.
    ]z     Go to [count] next conflict marker.
    [z     Go to [count] previous conflict marker.

    ax     "a conflict" text object, select [count] conflicts,
           including the conflict markers.
    az     "a conflict section" text object, select [count]
           sections (i.e. either ours, theirs, or base) including
           the conflict marker above, and in the case of "theirs"
           changes, also the ending conflict marker below.
    iz     "inner conflict section" text object, select current
           section (i.e. either ours, theirs, or base) without
           the surrounding conflict markers.

你需要用一个恰当的答案来分解它。看。我会留给你一些时间自己来做:)你可以回答你自己的问题,也可以接受它。完成了,谢谢你的建议:)
    ]x     Go to [count] next start of a conflict.
    ]X     Go to [count] next end of a conflict.
    [x     Go to [count] previous start of a conflict.
    [X     Go to [count] previous end of a conflict.
    ]z     Go to [count] next conflict marker.
    [z     Go to [count] previous conflict marker.

    ax     "a conflict" text object, select [count] conflicts,
           including the conflict markers.
    az     "a conflict section" text object, select [count]
           sections (i.e. either ours, theirs, or base) including
           the conflict marker above, and in the case of "theirs"
           changes, also the ending conflict marker below.
    iz     "inner conflict section" text object, select current
           section (i.e. either ours, theirs, or base) without
           the surrounding conflict markers.