From 90db43a802f572fb1da5184242ddbe24bd4c2c05 Mon Sep 17 00:00:00 2001 From: t9md Date: Sun, 24 Dec 2017 18:17:06 +0900 Subject: [PATCH 1/2] :gift: resolve-git-conflict operator --- lib/json/command-table-pretty.json | 1 + lib/json/command-table.json | 2 +- lib/json/file-table-pretty.json | 3 +- lib/json/file-table.json | 2 +- lib/operator.js | 52 ++++++++++++++++++++++++++++++ spec/operator-general-spec.coffee | 51 +++++++++++++++++++++++++++++ 6 files changed, 108 insertions(+), 3 deletions(-) diff --git a/lib/json/command-table-pretty.json b/lib/json/command-table-pretty.json index c6aea3790..b0e52c7c0 100644 --- a/lib/json/command-table-pretty.json +++ b/lib/json/command-table-pretty.json @@ -28,6 +28,7 @@ "vim-mode-plus:put-after-with-auto-indent", "vim-mode-plus:add-blank-line-below", "vim-mode-plus:add-blank-line-above", + "vim-mode-plus:resolve-git-conflict", "vim-mode-plus:activate-insert-mode", "vim-mode-plus:activate-replace-mode", "vim-mode-plus:insert-after", diff --git a/lib/json/command-table.json b/lib/json/command-table.json index 2e66418b2..812e7fe14 100644 --- a/lib/json/command-table.json +++ b/lib/json/command-table.json @@ -1 +1 @@ -["vim-mode-plus:select","vim-mode-plus:select-latest-change","vim-mode-plus:select-previous-selection","vim-mode-plus:select-persistent-selection","vim-mode-plus:select-occurrence","vim-mode-plus:create-persistent-selection","vim-mode-plus:toggle-persistent-selection","vim-mode-plus:toggle-preset-occurrence","vim-mode-plus:toggle-preset-subword-occurrence","vim-mode-plus:add-preset-occurrence-from-last-occurrence-pattern","vim-mode-plus:delete","vim-mode-plus:delete-right","vim-mode-plus:delete-left","vim-mode-plus:delete-to-last-character-of-line","vim-mode-plus:delete-line","vim-mode-plus:yank","vim-mode-plus:yank-line","vim-mode-plus:yank-to-last-character-of-line","vim-mode-plus:yank-diff-hunk","vim-mode-plus:increase","vim-mode-plus:decrease","vim-mode-plus:increment-number","vim-mode-plus:decrement-number","vim-mode-plus:put-before","vim-mode-plus:put-after","vim-mode-plus:put-before-with-auto-indent","vim-mode-plus:put-after-with-auto-indent","vim-mode-plus:add-blank-line-below","vim-mode-plus:add-blank-line-above","vim-mode-plus:activate-insert-mode","vim-mode-plus:activate-replace-mode","vim-mode-plus:insert-after","vim-mode-plus:insert-at-beginning-of-line","vim-mode-plus:insert-after-end-of-line","vim-mode-plus:insert-at-first-character-of-line","vim-mode-plus:insert-at-last-insert","vim-mode-plus:insert-above-with-newline","vim-mode-plus:insert-below-with-newline","vim-mode-plus:insert-at-start-of-target","vim-mode-plus:insert-at-end-of-target","vim-mode-plus:insert-at-head-of-target","vim-mode-plus:insert-at-start-of-occurrence","vim-mode-plus:insert-at-end-of-occurrence","vim-mode-plus:insert-at-head-of-occurrence","vim-mode-plus:insert-at-start-of-subword-occurrence","vim-mode-plus:insert-at-end-of-subword-occurrence","vim-mode-plus:insert-at-head-of-subword-occurrence","vim-mode-plus:insert-at-start-of-smart-word","vim-mode-plus:insert-at-end-of-smart-word","vim-mode-plus:insert-at-previous-fold-start","vim-mode-plus:insert-at-next-fold-start","vim-mode-plus:change","vim-mode-plus:change-occurrence","vim-mode-plus:substitute","vim-mode-plus:substitute-line","vim-mode-plus:change-line","vim-mode-plus:change-to-last-character-of-line","vim-mode-plus:no-case","vim-mode-plus:dot-case","vim-mode-plus:swap-case","vim-mode-plus:path-case","vim-mode-plus:upper-case","vim-mode-plus:lower-case","vim-mode-plus:camel-case","vim-mode-plus:snake-case","vim-mode-plus:title-case","vim-mode-plus:param-case","vim-mode-plus:header-case","vim-mode-plus:pascal-case","vim-mode-plus:constant-case","vim-mode-plus:sentence-case","vim-mode-plus:upper-case-first","vim-mode-plus:lower-case-first","vim-mode-plus:dash-case","vim-mode-plus:toggle-case","vim-mode-plus:toggle-case-and-move-right","vim-mode-plus:replace","vim-mode-plus:replace-character","vim-mode-plus:split-by-character","vim-mode-plus:encode-uri-component","vim-mode-plus:decode-uri-component","vim-mode-plus:trim-string","vim-mode-plus:compact-spaces","vim-mode-plus:align-occurrence","vim-mode-plus:align-occurrence-by-pad-left","vim-mode-plus:align-occurrence-by-pad-right","vim-mode-plus:remove-leading-white-spaces","vim-mode-plus:convert-to-soft-tab","vim-mode-plus:convert-to-hard-tab","vim-mode-plus:transform-string-by-select-list","vim-mode-plus:transform-word-by-select-list","vim-mode-plus:transform-smart-word-by-select-list","vim-mode-plus:replace-with-register","vim-mode-plus:replace-occurrence-with-register","vim-mode-plus:swap-with-register","vim-mode-plus:indent","vim-mode-plus:outdent","vim-mode-plus:auto-indent","vim-mode-plus:toggle-line-comments","vim-mode-plus:reflow","vim-mode-plus:reflow-with-stay","vim-mode-plus:surround","vim-mode-plus:surround-word","vim-mode-plus:surround-smart-word","vim-mode-plus:map-surround","vim-mode-plus:delete-surround","vim-mode-plus:delete-surround-any-pair","vim-mode-plus:delete-surround-any-pair-allow-forwarding","vim-mode-plus:change-surround","vim-mode-plus:change-surround-any-pair","vim-mode-plus:change-surround-any-pair-allow-forwarding","vim-mode-plus:join-target","vim-mode-plus:join","vim-mode-plus:join-with-keeping-space","vim-mode-plus:join-by-input","vim-mode-plus:join-by-input-with-keeping-space","vim-mode-plus:split-string","vim-mode-plus:split-string-with-keeping-splitter","vim-mode-plus:split-arguments","vim-mode-plus:split-arguments-with-remove-separator","vim-mode-plus:split-arguments-of-inner-any-pair","vim-mode-plus:reverse","vim-mode-plus:reverse-inner-any-pair","vim-mode-plus:rotate","vim-mode-plus:rotate-backwards","vim-mode-plus:rotate-arguments-of-inner-pair","vim-mode-plus:rotate-arguments-backwards-of-inner-pair","vim-mode-plus:sort","vim-mode-plus:sort-case-insensitively","vim-mode-plus:sort-by-number","vim-mode-plus:numbering-lines","vim-mode-plus:duplicate-with-comment-out-original","vim-mode-plus:move-left","vim-mode-plus:move-right","vim-mode-plus:move-up","vim-mode-plus:move-up-wrap","vim-mode-plus:move-down","vim-mode-plus:move-down-wrap","vim-mode-plus:move-up-screen","vim-mode-plus:move-down-screen","vim-mode-plus:move-up-to-edge","vim-mode-plus:move-down-to-edge","vim-mode-plus:move-to-next-word","vim-mode-plus:move-to-next-whole-word","vim-mode-plus:move-to-next-alphanumeric-word","vim-mode-plus:move-to-next-smart-word","vim-mode-plus:move-to-next-subword","vim-mode-plus:move-to-previous-word","vim-mode-plus:move-to-previous-whole-word","vim-mode-plus:move-to-previous-alphanumeric-word","vim-mode-plus:move-to-previous-smart-word","vim-mode-plus:move-to-previous-subword","vim-mode-plus:move-to-end-of-word","vim-mode-plus:move-to-end-of-whole-word","vim-mode-plus:move-to-end-of-alphanumeric-word","vim-mode-plus:move-to-end-of-smart-word","vim-mode-plus:move-to-end-of-subword","vim-mode-plus:move-to-previous-end-of-word","vim-mode-plus:move-to-previous-end-of-whole-word","vim-mode-plus:move-to-next-sentence","vim-mode-plus:move-to-previous-sentence","vim-mode-plus:move-to-next-sentence-skip-blank-row","vim-mode-plus:move-to-previous-sentence-skip-blank-row","vim-mode-plus:move-to-next-paragraph","vim-mode-plus:move-to-previous-paragraph","vim-mode-plus:move-to-next-diff-hunk","vim-mode-plus:move-to-previous-diff-hunk","vim-mode-plus:move-to-beginning-of-line","vim-mode-plus:move-to-column","vim-mode-plus:move-to-last-character-of-line","vim-mode-plus:move-to-last-nonblank-character-of-line-and-down","vim-mode-plus:move-to-first-character-of-line","vim-mode-plus:move-to-first-character-of-line-up","vim-mode-plus:move-to-first-character-of-line-down","vim-mode-plus:move-to-first-character-of-line-and-down","vim-mode-plus:move-to-beginning-of-screen-line","vim-mode-plus:move-to-first-character-of-screen-line","vim-mode-plus:move-to-last-character-of-screen-line","vim-mode-plus:move-to-first-line","vim-mode-plus:move-to-last-line","vim-mode-plus:move-to-line-by-percent","vim-mode-plus:move-to-top-of-screen","vim-mode-plus:move-to-middle-of-screen","vim-mode-plus:move-to-bottom-of-screen","vim-mode-plus:scroll-full-screen-down","vim-mode-plus:scroll-full-screen-up","vim-mode-plus:scroll-half-screen-down","vim-mode-plus:scroll-half-screen-up","vim-mode-plus:scroll-quarter-screen-down","vim-mode-plus:scroll-quarter-screen-up","vim-mode-plus:find","vim-mode-plus:find-backwards","vim-mode-plus:till","vim-mode-plus:till-backwards","vim-mode-plus:move-to-mark","vim-mode-plus:move-to-mark-line","vim-mode-plus:move-to-previous-fold-start","vim-mode-plus:move-to-next-fold-start","vim-mode-plus:move-to-previous-fold-start-with-same-indent","vim-mode-plus:move-to-next-fold-start-with-same-indent","vim-mode-plus:move-to-previous-fold-end","vim-mode-plus:move-to-next-fold-end","vim-mode-plus:move-to-previous-function","vim-mode-plus:move-to-next-function","vim-mode-plus:move-to-previous-function-and-redraw-cursor-line-at-upper-middle","vim-mode-plus:move-to-next-function-and-redraw-cursor-line-at-upper-middle","vim-mode-plus:move-to-previous-string","vim-mode-plus:move-to-next-string","vim-mode-plus:move-to-previous-number","vim-mode-plus:move-to-next-number","vim-mode-plus:move-to-next-occurrence","vim-mode-plus:move-to-previous-occurrence","vim-mode-plus:move-to-pair","vim-mode-plus:search","vim-mode-plus:search-backwards","vim-mode-plus:search-current-word","vim-mode-plus:search-current-word-backwards","vim-mode-plus:search-match-forward","vim-mode-plus:search-match-backward","vim-mode-plus:previous-selection","vim-mode-plus:a-word","vim-mode-plus:inner-word","vim-mode-plus:a-whole-word","vim-mode-plus:inner-whole-word","vim-mode-plus:a-smart-word","vim-mode-plus:inner-smart-word","vim-mode-plus:a-subword","vim-mode-plus:inner-subword","vim-mode-plus:a-any-pair","vim-mode-plus:inner-any-pair","vim-mode-plus:a-any-pair-allow-forwarding","vim-mode-plus:inner-any-pair-allow-forwarding","vim-mode-plus:a-any-quote","vim-mode-plus:inner-any-quote","vim-mode-plus:a-double-quote","vim-mode-plus:inner-double-quote","vim-mode-plus:a-single-quote","vim-mode-plus:inner-single-quote","vim-mode-plus:a-back-tick","vim-mode-plus:inner-back-tick","vim-mode-plus:a-curly-bracket","vim-mode-plus:inner-curly-bracket","vim-mode-plus:a-curly-bracket-allow-forwarding","vim-mode-plus:inner-curly-bracket-allow-forwarding","vim-mode-plus:a-square-bracket","vim-mode-plus:inner-square-bracket","vim-mode-plus:a-square-bracket-allow-forwarding","vim-mode-plus:inner-square-bracket-allow-forwarding","vim-mode-plus:a-parenthesis","vim-mode-plus:inner-parenthesis","vim-mode-plus:a-parenthesis-allow-forwarding","vim-mode-plus:inner-parenthesis-allow-forwarding","vim-mode-plus:a-angle-bracket","vim-mode-plus:inner-angle-bracket","vim-mode-plus:a-angle-bracket-allow-forwarding","vim-mode-plus:inner-angle-bracket-allow-forwarding","vim-mode-plus:a-tag","vim-mode-plus:inner-tag","vim-mode-plus:a-paragraph","vim-mode-plus:inner-paragraph","vim-mode-plus:a-indentation","vim-mode-plus:inner-indentation","vim-mode-plus:a-comment","vim-mode-plus:inner-comment","vim-mode-plus:a-comment-or-paragraph","vim-mode-plus:inner-comment-or-paragraph","vim-mode-plus:a-fold","vim-mode-plus:inner-fold","vim-mode-plus:a-function","vim-mode-plus:inner-function","vim-mode-plus:a-arguments","vim-mode-plus:inner-arguments","vim-mode-plus:a-current-line","vim-mode-plus:inner-current-line","vim-mode-plus:a-entire","vim-mode-plus:inner-entire","vim-mode-plus:a-latest-change","vim-mode-plus:inner-latest-change","vim-mode-plus:a-persistent-selection","vim-mode-plus:inner-persistent-selection","vim-mode-plus:a-visible-area","vim-mode-plus:inner-visible-area","vim-mode-plus:a-diff-hunk","vim-mode-plus:inner-diff-hunk","vim-mode-plus:mark","vim-mode-plus:reverse-selections","vim-mode-plus:blockwise-other-end","vim-mode-plus:undo","vim-mode-plus:redo","vim-mode-plus:fold-current-row","vim-mode-plus:unfold-current-row","vim-mode-plus:toggle-fold","vim-mode-plus:fold-current-row-recursively","vim-mode-plus:unfold-current-row-recursively","vim-mode-plus:toggle-fold-recursively","vim-mode-plus:unfold-all","vim-mode-plus:fold-all","vim-mode-plus:unfold-next-indent-level","vim-mode-plus:fold-next-indent-level","vim-mode-plus:mini-scroll-down","vim-mode-plus:mini-scroll-up","vim-mode-plus:redraw-cursor-line-at-top","vim-mode-plus:redraw-cursor-line-at-top-and-move-to-first-character-of-line","vim-mode-plus:redraw-cursor-line-at-upper-middle","vim-mode-plus:redraw-cursor-line-at-upper-middle-and-move-to-first-character-of-line","vim-mode-plus:redraw-cursor-line-at-middle","vim-mode-plus:redraw-cursor-line-at-middle-and-move-to-first-character-of-line","vim-mode-plus:redraw-cursor-line-at-bottom","vim-mode-plus:redraw-cursor-line-at-bottom-and-move-to-first-character-of-line","vim-mode-plus:scroll-cursor-to-left","vim-mode-plus:scroll-cursor-to-right","vim-mode-plus:activate-normal-mode-once","vim-mode-plus:insert-register","vim-mode-plus:insert-last-inserted","vim-mode-plus:copy-from-line-above","vim-mode-plus:copy-from-line-below","vim-mode-plus:next-tab","vim-mode-plus:previous-tab"] +["vim-mode-plus:select","vim-mode-plus:select-latest-change","vim-mode-plus:select-previous-selection","vim-mode-plus:select-persistent-selection","vim-mode-plus:select-occurrence","vim-mode-plus:create-persistent-selection","vim-mode-plus:toggle-persistent-selection","vim-mode-plus:toggle-preset-occurrence","vim-mode-plus:toggle-preset-subword-occurrence","vim-mode-plus:add-preset-occurrence-from-last-occurrence-pattern","vim-mode-plus:delete","vim-mode-plus:delete-right","vim-mode-plus:delete-left","vim-mode-plus:delete-to-last-character-of-line","vim-mode-plus:delete-line","vim-mode-plus:yank","vim-mode-plus:yank-line","vim-mode-plus:yank-to-last-character-of-line","vim-mode-plus:yank-diff-hunk","vim-mode-plus:increase","vim-mode-plus:decrease","vim-mode-plus:increment-number","vim-mode-plus:decrement-number","vim-mode-plus:put-before","vim-mode-plus:put-after","vim-mode-plus:put-before-with-auto-indent","vim-mode-plus:put-after-with-auto-indent","vim-mode-plus:add-blank-line-below","vim-mode-plus:add-blank-line-above","vim-mode-plus:resolve-git-conflict","vim-mode-plus:activate-insert-mode","vim-mode-plus:activate-replace-mode","vim-mode-plus:insert-after","vim-mode-plus:insert-at-beginning-of-line","vim-mode-plus:insert-after-end-of-line","vim-mode-plus:insert-at-first-character-of-line","vim-mode-plus:insert-at-last-insert","vim-mode-plus:insert-above-with-newline","vim-mode-plus:insert-below-with-newline","vim-mode-plus:insert-at-start-of-target","vim-mode-plus:insert-at-end-of-target","vim-mode-plus:insert-at-head-of-target","vim-mode-plus:insert-at-start-of-occurrence","vim-mode-plus:insert-at-end-of-occurrence","vim-mode-plus:insert-at-head-of-occurrence","vim-mode-plus:insert-at-start-of-subword-occurrence","vim-mode-plus:insert-at-end-of-subword-occurrence","vim-mode-plus:insert-at-head-of-subword-occurrence","vim-mode-plus:insert-at-start-of-smart-word","vim-mode-plus:insert-at-end-of-smart-word","vim-mode-plus:insert-at-previous-fold-start","vim-mode-plus:insert-at-next-fold-start","vim-mode-plus:change","vim-mode-plus:change-occurrence","vim-mode-plus:substitute","vim-mode-plus:substitute-line","vim-mode-plus:change-line","vim-mode-plus:change-to-last-character-of-line","vim-mode-plus:no-case","vim-mode-plus:dot-case","vim-mode-plus:swap-case","vim-mode-plus:path-case","vim-mode-plus:upper-case","vim-mode-plus:lower-case","vim-mode-plus:camel-case","vim-mode-plus:snake-case","vim-mode-plus:title-case","vim-mode-plus:param-case","vim-mode-plus:header-case","vim-mode-plus:pascal-case","vim-mode-plus:constant-case","vim-mode-plus:sentence-case","vim-mode-plus:upper-case-first","vim-mode-plus:lower-case-first","vim-mode-plus:dash-case","vim-mode-plus:toggle-case","vim-mode-plus:toggle-case-and-move-right","vim-mode-plus:replace","vim-mode-plus:replace-character","vim-mode-plus:split-by-character","vim-mode-plus:encode-uri-component","vim-mode-plus:decode-uri-component","vim-mode-plus:trim-string","vim-mode-plus:compact-spaces","vim-mode-plus:align-occurrence","vim-mode-plus:align-occurrence-by-pad-left","vim-mode-plus:align-occurrence-by-pad-right","vim-mode-plus:remove-leading-white-spaces","vim-mode-plus:convert-to-soft-tab","vim-mode-plus:convert-to-hard-tab","vim-mode-plus:transform-string-by-select-list","vim-mode-plus:transform-word-by-select-list","vim-mode-plus:transform-smart-word-by-select-list","vim-mode-plus:replace-with-register","vim-mode-plus:replace-occurrence-with-register","vim-mode-plus:swap-with-register","vim-mode-plus:indent","vim-mode-plus:outdent","vim-mode-plus:auto-indent","vim-mode-plus:toggle-line-comments","vim-mode-plus:reflow","vim-mode-plus:reflow-with-stay","vim-mode-plus:surround","vim-mode-plus:surround-word","vim-mode-plus:surround-smart-word","vim-mode-plus:map-surround","vim-mode-plus:delete-surround","vim-mode-plus:delete-surround-any-pair","vim-mode-plus:delete-surround-any-pair-allow-forwarding","vim-mode-plus:change-surround","vim-mode-plus:change-surround-any-pair","vim-mode-plus:change-surround-any-pair-allow-forwarding","vim-mode-plus:join-target","vim-mode-plus:join","vim-mode-plus:join-with-keeping-space","vim-mode-plus:join-by-input","vim-mode-plus:join-by-input-with-keeping-space","vim-mode-plus:split-string","vim-mode-plus:split-string-with-keeping-splitter","vim-mode-plus:split-arguments","vim-mode-plus:split-arguments-with-remove-separator","vim-mode-plus:split-arguments-of-inner-any-pair","vim-mode-plus:reverse","vim-mode-plus:reverse-inner-any-pair","vim-mode-plus:rotate","vim-mode-plus:rotate-backwards","vim-mode-plus:rotate-arguments-of-inner-pair","vim-mode-plus:rotate-arguments-backwards-of-inner-pair","vim-mode-plus:sort","vim-mode-plus:sort-case-insensitively","vim-mode-plus:sort-by-number","vim-mode-plus:numbering-lines","vim-mode-plus:duplicate-with-comment-out-original","vim-mode-plus:move-left","vim-mode-plus:move-right","vim-mode-plus:move-up","vim-mode-plus:move-up-wrap","vim-mode-plus:move-down","vim-mode-plus:move-down-wrap","vim-mode-plus:move-up-screen","vim-mode-plus:move-down-screen","vim-mode-plus:move-up-to-edge","vim-mode-plus:move-down-to-edge","vim-mode-plus:move-to-next-word","vim-mode-plus:move-to-next-whole-word","vim-mode-plus:move-to-next-alphanumeric-word","vim-mode-plus:move-to-next-smart-word","vim-mode-plus:move-to-next-subword","vim-mode-plus:move-to-previous-word","vim-mode-plus:move-to-previous-whole-word","vim-mode-plus:move-to-previous-alphanumeric-word","vim-mode-plus:move-to-previous-smart-word","vim-mode-plus:move-to-previous-subword","vim-mode-plus:move-to-end-of-word","vim-mode-plus:move-to-end-of-whole-word","vim-mode-plus:move-to-end-of-alphanumeric-word","vim-mode-plus:move-to-end-of-smart-word","vim-mode-plus:move-to-end-of-subword","vim-mode-plus:move-to-previous-end-of-word","vim-mode-plus:move-to-previous-end-of-whole-word","vim-mode-plus:move-to-next-sentence","vim-mode-plus:move-to-previous-sentence","vim-mode-plus:move-to-next-sentence-skip-blank-row","vim-mode-plus:move-to-previous-sentence-skip-blank-row","vim-mode-plus:move-to-next-paragraph","vim-mode-plus:move-to-previous-paragraph","vim-mode-plus:move-to-next-diff-hunk","vim-mode-plus:move-to-previous-diff-hunk","vim-mode-plus:move-to-beginning-of-line","vim-mode-plus:move-to-column","vim-mode-plus:move-to-last-character-of-line","vim-mode-plus:move-to-last-nonblank-character-of-line-and-down","vim-mode-plus:move-to-first-character-of-line","vim-mode-plus:move-to-first-character-of-line-up","vim-mode-plus:move-to-first-character-of-line-down","vim-mode-plus:move-to-first-character-of-line-and-down","vim-mode-plus:move-to-beginning-of-screen-line","vim-mode-plus:move-to-first-character-of-screen-line","vim-mode-plus:move-to-last-character-of-screen-line","vim-mode-plus:move-to-first-line","vim-mode-plus:move-to-last-line","vim-mode-plus:move-to-line-by-percent","vim-mode-plus:move-to-top-of-screen","vim-mode-plus:move-to-middle-of-screen","vim-mode-plus:move-to-bottom-of-screen","vim-mode-plus:scroll-full-screen-down","vim-mode-plus:scroll-full-screen-up","vim-mode-plus:scroll-half-screen-down","vim-mode-plus:scroll-half-screen-up","vim-mode-plus:scroll-quarter-screen-down","vim-mode-plus:scroll-quarter-screen-up","vim-mode-plus:find","vim-mode-plus:find-backwards","vim-mode-plus:till","vim-mode-plus:till-backwards","vim-mode-plus:move-to-mark","vim-mode-plus:move-to-mark-line","vim-mode-plus:move-to-previous-fold-start","vim-mode-plus:move-to-next-fold-start","vim-mode-plus:move-to-previous-fold-start-with-same-indent","vim-mode-plus:move-to-next-fold-start-with-same-indent","vim-mode-plus:move-to-previous-fold-end","vim-mode-plus:move-to-next-fold-end","vim-mode-plus:move-to-previous-function","vim-mode-plus:move-to-next-function","vim-mode-plus:move-to-previous-function-and-redraw-cursor-line-at-upper-middle","vim-mode-plus:move-to-next-function-and-redraw-cursor-line-at-upper-middle","vim-mode-plus:move-to-previous-string","vim-mode-plus:move-to-next-string","vim-mode-plus:move-to-previous-number","vim-mode-plus:move-to-next-number","vim-mode-plus:move-to-next-occurrence","vim-mode-plus:move-to-previous-occurrence","vim-mode-plus:move-to-pair","vim-mode-plus:search","vim-mode-plus:search-backwards","vim-mode-plus:search-current-word","vim-mode-plus:search-current-word-backwards","vim-mode-plus:search-match-forward","vim-mode-plus:search-match-backward","vim-mode-plus:previous-selection","vim-mode-plus:a-word","vim-mode-plus:inner-word","vim-mode-plus:a-whole-word","vim-mode-plus:inner-whole-word","vim-mode-plus:a-smart-word","vim-mode-plus:inner-smart-word","vim-mode-plus:a-subword","vim-mode-plus:inner-subword","vim-mode-plus:a-any-pair","vim-mode-plus:inner-any-pair","vim-mode-plus:a-any-pair-allow-forwarding","vim-mode-plus:inner-any-pair-allow-forwarding","vim-mode-plus:a-any-quote","vim-mode-plus:inner-any-quote","vim-mode-plus:a-double-quote","vim-mode-plus:inner-double-quote","vim-mode-plus:a-single-quote","vim-mode-plus:inner-single-quote","vim-mode-plus:a-back-tick","vim-mode-plus:inner-back-tick","vim-mode-plus:a-curly-bracket","vim-mode-plus:inner-curly-bracket","vim-mode-plus:a-curly-bracket-allow-forwarding","vim-mode-plus:inner-curly-bracket-allow-forwarding","vim-mode-plus:a-square-bracket","vim-mode-plus:inner-square-bracket","vim-mode-plus:a-square-bracket-allow-forwarding","vim-mode-plus:inner-square-bracket-allow-forwarding","vim-mode-plus:a-parenthesis","vim-mode-plus:inner-parenthesis","vim-mode-plus:a-parenthesis-allow-forwarding","vim-mode-plus:inner-parenthesis-allow-forwarding","vim-mode-plus:a-angle-bracket","vim-mode-plus:inner-angle-bracket","vim-mode-plus:a-angle-bracket-allow-forwarding","vim-mode-plus:inner-angle-bracket-allow-forwarding","vim-mode-plus:a-tag","vim-mode-plus:inner-tag","vim-mode-plus:a-paragraph","vim-mode-plus:inner-paragraph","vim-mode-plus:a-indentation","vim-mode-plus:inner-indentation","vim-mode-plus:a-comment","vim-mode-plus:inner-comment","vim-mode-plus:a-comment-or-paragraph","vim-mode-plus:inner-comment-or-paragraph","vim-mode-plus:a-fold","vim-mode-plus:inner-fold","vim-mode-plus:a-function","vim-mode-plus:inner-function","vim-mode-plus:a-arguments","vim-mode-plus:inner-arguments","vim-mode-plus:a-current-line","vim-mode-plus:inner-current-line","vim-mode-plus:a-entire","vim-mode-plus:inner-entire","vim-mode-plus:a-latest-change","vim-mode-plus:inner-latest-change","vim-mode-plus:a-persistent-selection","vim-mode-plus:inner-persistent-selection","vim-mode-plus:a-visible-area","vim-mode-plus:inner-visible-area","vim-mode-plus:a-diff-hunk","vim-mode-plus:inner-diff-hunk","vim-mode-plus:mark","vim-mode-plus:reverse-selections","vim-mode-plus:blockwise-other-end","vim-mode-plus:undo","vim-mode-plus:redo","vim-mode-plus:fold-current-row","vim-mode-plus:unfold-current-row","vim-mode-plus:toggle-fold","vim-mode-plus:fold-current-row-recursively","vim-mode-plus:unfold-current-row-recursively","vim-mode-plus:toggle-fold-recursively","vim-mode-plus:unfold-all","vim-mode-plus:fold-all","vim-mode-plus:unfold-next-indent-level","vim-mode-plus:fold-next-indent-level","vim-mode-plus:mini-scroll-down","vim-mode-plus:mini-scroll-up","vim-mode-plus:redraw-cursor-line-at-top","vim-mode-plus:redraw-cursor-line-at-top-and-move-to-first-character-of-line","vim-mode-plus:redraw-cursor-line-at-upper-middle","vim-mode-plus:redraw-cursor-line-at-upper-middle-and-move-to-first-character-of-line","vim-mode-plus:redraw-cursor-line-at-middle","vim-mode-plus:redraw-cursor-line-at-middle-and-move-to-first-character-of-line","vim-mode-plus:redraw-cursor-line-at-bottom","vim-mode-plus:redraw-cursor-line-at-bottom-and-move-to-first-character-of-line","vim-mode-plus:scroll-cursor-to-left","vim-mode-plus:scroll-cursor-to-right","vim-mode-plus:activate-normal-mode-once","vim-mode-plus:insert-register","vim-mode-plus:insert-last-inserted","vim-mode-plus:copy-from-line-above","vim-mode-plus:copy-from-line-below","vim-mode-plus:next-tab","vim-mode-plus:previous-tab"] diff --git a/lib/json/file-table-pretty.json b/lib/json/file-table-pretty.json index 39df63911..c4c9c989d 100644 --- a/lib/json/file-table-pretty.json +++ b/lib/json/file-table-pretty.json @@ -31,7 +31,8 @@ "PutBeforeWithAutoIndent", "PutAfterWithAutoIndent", "AddBlankLineBelow", - "AddBlankLineAbove" + "AddBlankLineAbove", + "ResolveGitConflict" ], "./operator-insert": [ "ActivateInsertModeBase", diff --git a/lib/json/file-table.json b/lib/json/file-table.json index 40745547d..53bcfb709 100644 --- a/lib/json/file-table.json +++ b/lib/json/file-table.json @@ -1 +1 @@ -{"./operator":["Operator","SelectBase","Select","SelectLatestChange","SelectPreviousSelection","SelectPersistentSelection","SelectOccurrence","VisualModeSelect","CreatePersistentSelection","TogglePersistentSelection","TogglePresetOccurrence","TogglePresetSubwordOccurrence","AddPresetOccurrenceFromLastOccurrencePattern","Delete","DeleteRight","DeleteLeft","DeleteToLastCharacterOfLine","DeleteLine","Yank","YankLine","YankToLastCharacterOfLine","YankDiffHunk","Increase","Decrease","IncrementNumber","DecrementNumber","PutBefore","PutAfter","PutBeforeWithAutoIndent","PutAfterWithAutoIndent","AddBlankLineBelow","AddBlankLineAbove"],"./operator-insert":["ActivateInsertModeBase","ActivateInsertMode","ActivateReplaceMode","InsertAfter","InsertAtBeginningOfLine","InsertAfterEndOfLine","InsertAtFirstCharacterOfLine","InsertAtLastInsert","InsertAboveWithNewline","InsertBelowWithNewline","InsertByTarget","InsertAtStartOfTarget","InsertAtEndOfTarget","InsertAtHeadOfTarget","InsertAtStartOfOccurrence","InsertAtEndOfOccurrence","InsertAtHeadOfOccurrence","InsertAtStartOfSubwordOccurrence","InsertAtEndOfSubwordOccurrence","InsertAtHeadOfSubwordOccurrence","InsertAtStartOfSmartWord","InsertAtEndOfSmartWord","InsertAtPreviousFoldStart","InsertAtNextFoldStart","Change","ChangeOccurrence","Substitute","SubstituteLine","ChangeLine","ChangeToLastCharacterOfLine"],"./operator-transform-string":["TransformString","NoCase","DotCase","SwapCase","PathCase","UpperCase","LowerCase","CamelCase","SnakeCase","TitleCase","ParamCase","HeaderCase","PascalCase","ConstantCase","SentenceCase","UpperCaseFirst","LowerCaseFirst","DashCase","ToggleCase","ToggleCaseAndMoveRight","Replace","ReplaceCharacter","SplitByCharacter","EncodeUriComponent","DecodeUriComponent","TrimString","CompactSpaces","AlignOccurrence","AlignOccurrenceByPadLeft","AlignOccurrenceByPadRight","RemoveLeadingWhiteSpaces","ConvertToSoftTab","ConvertToHardTab","TransformStringByExternalCommand","TransformStringBySelectList","TransformWordBySelectList","TransformSmartWordBySelectList","ReplaceWithRegister","ReplaceOccurrenceWithRegister","SwapWithRegister","Indent","Outdent","AutoIndent","ToggleLineComments","Reflow","ReflowWithStay","SurroundBase","Surround","SurroundWord","SurroundSmartWord","MapSurround","DeleteSurround","DeleteSurroundAnyPair","DeleteSurroundAnyPairAllowForwarding","ChangeSurround","ChangeSurroundAnyPair","ChangeSurroundAnyPairAllowForwarding","JoinTarget","Join","JoinBase","JoinWithKeepingSpace","JoinByInput","JoinByInputWithKeepingSpace","SplitString","SplitStringWithKeepingSplitter","SplitArguments","SplitArgumentsWithRemoveSeparator","SplitArgumentsOfInnerAnyPair","ChangeOrder","Reverse","ReverseInnerAnyPair","Rotate","RotateBackwards","RotateArgumentsOfInnerPair","RotateArgumentsBackwardsOfInnerPair","Sort","SortCaseInsensitively","SortByNumber","NumberingLines","DuplicateWithCommentOutOriginal"],"./motion":["Motion","CurrentSelection","MoveLeft","MoveRight","MoveRightBufferColumn","MoveUp","MoveUpWrap","MoveDown","MoveDownWrap","MoveUpScreen","MoveDownScreen","MoveUpToEdge","MoveDownToEdge","WordMotion","MoveToNextWord","MoveToNextWholeWord","MoveToNextAlphanumericWord","MoveToNextSmartWord","MoveToNextSubword","MoveToPreviousWord","MoveToPreviousWholeWord","MoveToPreviousAlphanumericWord","MoveToPreviousSmartWord","MoveToPreviousSubword","MoveToEndOfWord","MoveToEndOfWholeWord","MoveToEndOfAlphanumericWord","MoveToEndOfSmartWord","MoveToEndOfSubword","MoveToPreviousEndOfWord","MoveToPreviousEndOfWholeWord","MoveToNextSentence","MoveToPreviousSentence","MoveToNextSentenceSkipBlankRow","MoveToPreviousSentenceSkipBlankRow","MoveToNextParagraph","MoveToPreviousParagraph","MoveToNextDiffHunk","MoveToPreviousDiffHunk","MoveToBeginningOfLine","MoveToColumn","MoveToLastCharacterOfLine","MoveToLastNonblankCharacterOfLineAndDown","MoveToFirstCharacterOfLine","MoveToFirstCharacterOfLineUp","MoveToFirstCharacterOfLineDown","MoveToFirstCharacterOfLineAndDown","MoveToScreenColumn","MoveToBeginningOfScreenLine","MoveToFirstCharacterOfScreenLine","MoveToLastCharacterOfScreenLine","MoveToFirstLine","MoveToLastLine","MoveToLineByPercent","MoveToRelativeLine","MoveToRelativeLineMinimumTwo","MoveToTopOfScreen","MoveToMiddleOfScreen","MoveToBottomOfScreen","Scroll","ScrollFullScreenDown","ScrollFullScreenUp","ScrollHalfScreenDown","ScrollHalfScreenUp","ScrollQuarterScreenDown","ScrollQuarterScreenUp","Find","FindBackwards","Till","TillBackwards","MoveToMark","MoveToMarkLine","MoveToPreviousFoldStart","MoveToNextFoldStart","MoveToPreviousFoldStartWithSameIndent","MoveToNextFoldStartWithSameIndent","MoveToPreviousFoldEnd","MoveToNextFoldEnd","MoveToPreviousFunction","MoveToNextFunction","MoveToPreviousFunctionAndRedrawCursorLineAtUpperMiddle","MoveToNextFunctionAndRedrawCursorLineAtUpperMiddle","MoveToPositionByScope","MoveToPreviousString","MoveToNextString","MoveToPreviousNumber","MoveToNextNumber","MoveToNextOccurrence","MoveToPreviousOccurrence","MoveToPair"],"./motion-search":["SearchBase","Search","SearchBackwards","SearchCurrentWord","SearchCurrentWordBackwards"],"./text-object":["TextObject","Word","WholeWord","SmartWord","Subword","Pair","APair","AnyPair","AnyPairAllowForwarding","AnyQuote","Quote","DoubleQuote","SingleQuote","BackTick","CurlyBracket","SquareBracket","Parenthesis","AngleBracket","Tag","Paragraph","Indentation","Comment","CommentOrParagraph","Fold","Function","Arguments","CurrentLine","Entire","Empty","LatestChange","SearchMatchForward","SearchMatchBackward","PreviousSelection","PersistentSelection","LastPastedRange","VisibleArea","AWord","InnerWord","AWholeWord","InnerWholeWord","ASmartWord","InnerSmartWord","ASubword","InnerSubword","AAnyPair","InnerAnyPair","AAnyPairAllowForwarding","InnerAnyPairAllowForwarding","AAnyQuote","InnerAnyQuote","ADoubleQuote","InnerDoubleQuote","ASingleQuote","InnerSingleQuote","ABackTick","InnerBackTick","ACurlyBracket","InnerCurlyBracket","ACurlyBracketAllowForwarding","InnerCurlyBracketAllowForwarding","ASquareBracket","InnerSquareBracket","ASquareBracketAllowForwarding","InnerSquareBracketAllowForwarding","AParenthesis","InnerParenthesis","AParenthesisAllowForwarding","InnerParenthesisAllowForwarding","AAngleBracket","InnerAngleBracket","AAngleBracketAllowForwarding","InnerAngleBracketAllowForwarding","ATag","InnerTag","AParagraph","InnerParagraph","AIndentation","InnerIndentation","AComment","InnerComment","ACommentOrParagraph","InnerCommentOrParagraph","AFold","InnerFold","AFunction","InnerFunction","AArguments","InnerArguments","ACurrentLine","InnerCurrentLine","AEntire","InnerEntire","ALatestChange","InnerLatestChange","APersistentSelection","InnerPersistentSelection","AVisibleArea","InnerVisibleArea","ADiffHunk","InnerDiffHunk"],"./misc-command":["MiscCommand","Mark","ReverseSelections","BlockwiseOtherEnd","Undo","Redo","FoldCurrentRow","UnfoldCurrentRow","ToggleFold","FoldCurrentRowRecursivelyBase","FoldCurrentRowRecursively","UnfoldCurrentRowRecursively","ToggleFoldRecursively","UnfoldAll","FoldAll","UnfoldNextIndentLevel","FoldNextIndentLevel","MiniScrollDown","MiniScrollUp","RedrawCursorLine","RedrawCursorLineAtTop","RedrawCursorLineAtTopAndMoveToFirstCharacterOfLine","RedrawCursorLineAtUpperMiddle","RedrawCursorLineAtUpperMiddleAndMoveToFirstCharacterOfLine","RedrawCursorLineAtMiddle","RedrawCursorLineAtMiddleAndMoveToFirstCharacterOfLine","RedrawCursorLineAtBottom","RedrawCursorLineAtBottomAndMoveToFirstCharacterOfLine","ScrollCursorToLeft","ScrollCursorToRight","ActivateNormalModeOnce","InsertRegister","InsertLastInserted","CopyFromLineAbove","CopyFromLineBelow","NextTab","PreviousTab"]} +{"./operator":["Operator","SelectBase","Select","SelectLatestChange","SelectPreviousSelection","SelectPersistentSelection","SelectOccurrence","VisualModeSelect","CreatePersistentSelection","TogglePersistentSelection","TogglePresetOccurrence","TogglePresetSubwordOccurrence","AddPresetOccurrenceFromLastOccurrencePattern","Delete","DeleteRight","DeleteLeft","DeleteToLastCharacterOfLine","DeleteLine","Yank","YankLine","YankToLastCharacterOfLine","YankDiffHunk","Increase","Decrease","IncrementNumber","DecrementNumber","PutBefore","PutAfter","PutBeforeWithAutoIndent","PutAfterWithAutoIndent","AddBlankLineBelow","AddBlankLineAbove","ResolveGitConflict"],"./operator-insert":["ActivateInsertModeBase","ActivateInsertMode","ActivateReplaceMode","InsertAfter","InsertAtBeginningOfLine","InsertAfterEndOfLine","InsertAtFirstCharacterOfLine","InsertAtLastInsert","InsertAboveWithNewline","InsertBelowWithNewline","InsertByTarget","InsertAtStartOfTarget","InsertAtEndOfTarget","InsertAtHeadOfTarget","InsertAtStartOfOccurrence","InsertAtEndOfOccurrence","InsertAtHeadOfOccurrence","InsertAtStartOfSubwordOccurrence","InsertAtEndOfSubwordOccurrence","InsertAtHeadOfSubwordOccurrence","InsertAtStartOfSmartWord","InsertAtEndOfSmartWord","InsertAtPreviousFoldStart","InsertAtNextFoldStart","Change","ChangeOccurrence","Substitute","SubstituteLine","ChangeLine","ChangeToLastCharacterOfLine"],"./operator-transform-string":["TransformString","NoCase","DotCase","SwapCase","PathCase","UpperCase","LowerCase","CamelCase","SnakeCase","TitleCase","ParamCase","HeaderCase","PascalCase","ConstantCase","SentenceCase","UpperCaseFirst","LowerCaseFirst","DashCase","ToggleCase","ToggleCaseAndMoveRight","Replace","ReplaceCharacter","SplitByCharacter","EncodeUriComponent","DecodeUriComponent","TrimString","CompactSpaces","AlignOccurrence","AlignOccurrenceByPadLeft","AlignOccurrenceByPadRight","RemoveLeadingWhiteSpaces","ConvertToSoftTab","ConvertToHardTab","TransformStringByExternalCommand","TransformStringBySelectList","TransformWordBySelectList","TransformSmartWordBySelectList","ReplaceWithRegister","ReplaceOccurrenceWithRegister","SwapWithRegister","Indent","Outdent","AutoIndent","ToggleLineComments","Reflow","ReflowWithStay","SurroundBase","Surround","SurroundWord","SurroundSmartWord","MapSurround","DeleteSurround","DeleteSurroundAnyPair","DeleteSurroundAnyPairAllowForwarding","ChangeSurround","ChangeSurroundAnyPair","ChangeSurroundAnyPairAllowForwarding","JoinTarget","Join","JoinBase","JoinWithKeepingSpace","JoinByInput","JoinByInputWithKeepingSpace","SplitString","SplitStringWithKeepingSplitter","SplitArguments","SplitArgumentsWithRemoveSeparator","SplitArgumentsOfInnerAnyPair","ChangeOrder","Reverse","ReverseInnerAnyPair","Rotate","RotateBackwards","RotateArgumentsOfInnerPair","RotateArgumentsBackwardsOfInnerPair","Sort","SortCaseInsensitively","SortByNumber","NumberingLines","DuplicateWithCommentOutOriginal"],"./motion":["Motion","CurrentSelection","MoveLeft","MoveRight","MoveRightBufferColumn","MoveUp","MoveUpWrap","MoveDown","MoveDownWrap","MoveUpScreen","MoveDownScreen","MoveUpToEdge","MoveDownToEdge","WordMotion","MoveToNextWord","MoveToNextWholeWord","MoveToNextAlphanumericWord","MoveToNextSmartWord","MoveToNextSubword","MoveToPreviousWord","MoveToPreviousWholeWord","MoveToPreviousAlphanumericWord","MoveToPreviousSmartWord","MoveToPreviousSubword","MoveToEndOfWord","MoveToEndOfWholeWord","MoveToEndOfAlphanumericWord","MoveToEndOfSmartWord","MoveToEndOfSubword","MoveToPreviousEndOfWord","MoveToPreviousEndOfWholeWord","MoveToNextSentence","MoveToPreviousSentence","MoveToNextSentenceSkipBlankRow","MoveToPreviousSentenceSkipBlankRow","MoveToNextParagraph","MoveToPreviousParagraph","MoveToNextDiffHunk","MoveToPreviousDiffHunk","MoveToBeginningOfLine","MoveToColumn","MoveToLastCharacterOfLine","MoveToLastNonblankCharacterOfLineAndDown","MoveToFirstCharacterOfLine","MoveToFirstCharacterOfLineUp","MoveToFirstCharacterOfLineDown","MoveToFirstCharacterOfLineAndDown","MoveToScreenColumn","MoveToBeginningOfScreenLine","MoveToFirstCharacterOfScreenLine","MoveToLastCharacterOfScreenLine","MoveToFirstLine","MoveToLastLine","MoveToLineByPercent","MoveToRelativeLine","MoveToRelativeLineMinimumTwo","MoveToTopOfScreen","MoveToMiddleOfScreen","MoveToBottomOfScreen","Scroll","ScrollFullScreenDown","ScrollFullScreenUp","ScrollHalfScreenDown","ScrollHalfScreenUp","ScrollQuarterScreenDown","ScrollQuarterScreenUp","Find","FindBackwards","Till","TillBackwards","MoveToMark","MoveToMarkLine","MoveToPreviousFoldStart","MoveToNextFoldStart","MoveToPreviousFoldStartWithSameIndent","MoveToNextFoldStartWithSameIndent","MoveToPreviousFoldEnd","MoveToNextFoldEnd","MoveToPreviousFunction","MoveToNextFunction","MoveToPreviousFunctionAndRedrawCursorLineAtUpperMiddle","MoveToNextFunctionAndRedrawCursorLineAtUpperMiddle","MoveToPositionByScope","MoveToPreviousString","MoveToNextString","MoveToPreviousNumber","MoveToNextNumber","MoveToNextOccurrence","MoveToPreviousOccurrence","MoveToPair"],"./motion-search":["SearchBase","Search","SearchBackwards","SearchCurrentWord","SearchCurrentWordBackwards"],"./text-object":["TextObject","Word","WholeWord","SmartWord","Subword","Pair","APair","AnyPair","AnyPairAllowForwarding","AnyQuote","Quote","DoubleQuote","SingleQuote","BackTick","CurlyBracket","SquareBracket","Parenthesis","AngleBracket","Tag","Paragraph","Indentation","Comment","CommentOrParagraph","Fold","Function","Arguments","CurrentLine","Entire","Empty","LatestChange","SearchMatchForward","SearchMatchBackward","PreviousSelection","PersistentSelection","LastPastedRange","VisibleArea","AWord","InnerWord","AWholeWord","InnerWholeWord","ASmartWord","InnerSmartWord","ASubword","InnerSubword","AAnyPair","InnerAnyPair","AAnyPairAllowForwarding","InnerAnyPairAllowForwarding","AAnyQuote","InnerAnyQuote","ADoubleQuote","InnerDoubleQuote","ASingleQuote","InnerSingleQuote","ABackTick","InnerBackTick","ACurlyBracket","InnerCurlyBracket","ACurlyBracketAllowForwarding","InnerCurlyBracketAllowForwarding","ASquareBracket","InnerSquareBracket","ASquareBracketAllowForwarding","InnerSquareBracketAllowForwarding","AParenthesis","InnerParenthesis","AParenthesisAllowForwarding","InnerParenthesisAllowForwarding","AAngleBracket","InnerAngleBracket","AAngleBracketAllowForwarding","InnerAngleBracketAllowForwarding","ATag","InnerTag","AParagraph","InnerParagraph","AIndentation","InnerIndentation","AComment","InnerComment","ACommentOrParagraph","InnerCommentOrParagraph","AFold","InnerFold","AFunction","InnerFunction","AArguments","InnerArguments","ACurrentLine","InnerCurrentLine","AEntire","InnerEntire","ALatestChange","InnerLatestChange","APersistentSelection","InnerPersistentSelection","AVisibleArea","InnerVisibleArea","ADiffHunk","InnerDiffHunk"],"./misc-command":["MiscCommand","Mark","ReverseSelections","BlockwiseOtherEnd","Undo","Redo","FoldCurrentRow","UnfoldCurrentRow","ToggleFold","FoldCurrentRowRecursivelyBase","FoldCurrentRowRecursively","UnfoldCurrentRowRecursively","ToggleFoldRecursively","UnfoldAll","FoldAll","UnfoldNextIndentLevel","FoldNextIndentLevel","MiniScrollDown","MiniScrollUp","RedrawCursorLine","RedrawCursorLineAtTop","RedrawCursorLineAtTopAndMoveToFirstCharacterOfLine","RedrawCursorLineAtUpperMiddle","RedrawCursorLineAtUpperMiddleAndMoveToFirstCharacterOfLine","RedrawCursorLineAtMiddle","RedrawCursorLineAtMiddleAndMoveToFirstCharacterOfLine","RedrawCursorLineAtBottom","RedrawCursorLineAtBottomAndMoveToFirstCharacterOfLine","ScrollCursorToLeft","ScrollCursorToRight","ActivateNormalModeOnce","InsertRegister","InsertLastInserted","CopyFromLineAbove","CopyFromLineBelow","NextTab","PreviousTab"]} diff --git a/lib/operator.js b/lib/operator.js index aecc5bc04..98aa5ffdb 100644 --- a/lib/operator.js +++ b/lib/operator.js @@ -1,5 +1,6 @@ "use babel" +const {Range} = require("atom") const Base = require("./base") class Operator extends Base { @@ -831,6 +832,56 @@ class AddBlankLineAbove extends AddBlankLineBelow { where = "above" } +class ResolveGitConflict extends Operator { + target = "Empty" + stayAtSamePosition = true + + mutateSelection(selection) { + const point = this.getCursorPositionForSelection(selection) + const rangeInfo = this.getConflictingRangeInfo(point.row) + + if (rangeInfo) { + const moveText = (srcRange, dstRange) => { + this.editor.setTextInBufferRange(dstRange, this.editor.getTextInBufferRange(srcRange)) + } + const {whole, sectionOurs, sectionTheirs, bodyOurs, bodyTheirs} = rangeInfo + // NOTE: When cursor is at separator row '=======', no replace happens because it's ambiguous. + if (sectionOurs.containsPoint(point)) { + moveText(bodyOurs, whole) + } else if (sectionTheirs.containsPoint(point)) { + moveText(bodyTheirs, whole) + } + } + } + + getConflictingRangeInfo(row) { + const options = {from: [row, Infinity]} + const conflictStart = this.findInEditor("backward", /^<<<<<<< .+$/, options, event => event.range.start) + + if (conflictStart) { + let startRow, separatorRow, endRow + const regex = /(^<<<<<<< .+$)|(^=======$)|(^>>>>>>> .+$)/g + this.scanEditor("forward", regex, {from: conflictStart}, ({match, range, stop}) => { + if (match[1]) { + startRow = range.start.row + } else if (match[2]) { + separatorRow = range.start.row + } else if (match[3]) { + endRow = range.start.row + stop() + return + } + }) + const whole = new Range([startRow, 0], [endRow, Infinity]) + const sectionOurs = new Range(whole.start, [(separatorRow || endRow) - 1, Infinity]) + const sectionTheirs = new Range([(separatorRow || startRow) + 1, 0], whole.end) + const bodyOurs = sectionOurs.translate([1, 0], [0, 0]) + const bodyTheirs = sectionTheirs.translate([0, 0], [-1, 0]) + return {whole, sectionOurs, bodyOurs, sectionTheirs, bodyTheirs} + } + } +} + module.exports = { Operator, SelectBase, @@ -864,4 +915,5 @@ module.exports = { PutAfterWithAutoIndent, AddBlankLineBelow, AddBlankLineAbove, + ResolveGitConflict, } diff --git a/spec/operator-general-spec.coffee b/spec/operator-general-spec.coffee index 3fd552b34..da948147f 100644 --- a/spec/operator-general-spec.coffee +++ b/spec/operator-general-spec.coffee @@ -1714,3 +1714,54 @@ describe "Operator general", -> result.push(member2, member3) }\n """ + + describe 'ResolveGitConflict', -> + resolveConflictAtRowThenEnsure = (row, text) -> + set cursor: [row, 0] + dispatch(editor.element, 'vim-mode-plus:resolve-git-conflict') + ensure null, {text} + + texts = + original: """ + + <<<<<<< HEAD + ours 1 + ours 2 + ours 3 + ======= + theirs 1 + theirs 2 + theirs 3 + >>>>>>> bob + \n + """ + ours: """ + + ours 1 + ours 2 + ours 3 + \n + """ + theirs: """ + + theirs 1 + theirs 2 + theirs 3 + \n + """ + + + beforeEach -> + set text: texts.original + + it "row 0", -> resolveConflictAtRowThenEnsure 0, texts.original + it "row 1", -> resolveConflictAtRowThenEnsure 1, texts.ours + it "row 2", -> resolveConflictAtRowThenEnsure 2, texts.ours + it "row 3", -> resolveConflictAtRowThenEnsure 3, texts.ours + it "row 4", -> resolveConflictAtRowThenEnsure 4, texts.ours + it "row 5", -> resolveConflictAtRowThenEnsure 5, texts.original + it "row 6", -> resolveConflictAtRowThenEnsure 6, texts.theirs + it "row 7", -> resolveConflictAtRowThenEnsure 7, texts.theirs + it "row 8", -> resolveConflictAtRowThenEnsure 8, texts.theirs + it "row 9", -> resolveConflictAtRowThenEnsure 9, texts.theirs + it "row 10", -> resolveConflictAtRowThenEnsure 10, texts.original From 9981d95ecfafd90d71b820b53ebd17e269a820b7 Mon Sep 17 00:00:00 2001 From: t9md Date: Mon, 25 Dec 2017 01:54:23 +0900 Subject: [PATCH 2/2] Improve test coverage and also how it resolve empty section --- lib/operator.js | 45 ++++++--- spec/operator-general-spec.coffee | 155 ++++++++++++++++++++++++------ 2 files changed, 153 insertions(+), 47 deletions(-) diff --git a/lib/operator.js b/lib/operator.js index 98aa5ffdb..19df9587c 100644 --- a/lib/operator.js +++ b/lib/operator.js @@ -834,50 +834,65 @@ class AddBlankLineAbove extends AddBlankLineBelow { class ResolveGitConflict extends Operator { target = "Empty" - stayAtSamePosition = true + restorePositions = false // do manually mutateSelection(selection) { const point = this.getCursorPositionForSelection(selection) const rangeInfo = this.getConflictingRangeInfo(point.row) if (rangeInfo) { - const moveText = (srcRange, dstRange) => { - this.editor.setTextInBufferRange(dstRange, this.editor.getTextInBufferRange(srcRange)) - } const {whole, sectionOurs, sectionTheirs, bodyOurs, bodyTheirs} = rangeInfo + const resolveConflict = range => { + const text = this.editor.getTextInBufferRange(range) + const dstRange = this.getBufferRangeForRowRange([whole.start.row, whole.end.row]) + const newRange = this.editor.setTextInBufferRange(dstRange, text ? text + "\n" : "") + selection.cursor.setBufferPosition(newRange.start) + } // NOTE: When cursor is at separator row '=======', no replace happens because it's ambiguous. if (sectionOurs.containsPoint(point)) { - moveText(bodyOurs, whole) + resolveConflict(bodyOurs) } else if (sectionTheirs.containsPoint(point)) { - moveText(bodyTheirs, whole) + resolveConflict(bodyTheirs) } } } getConflictingRangeInfo(row) { - const options = {from: [row, Infinity]} - const conflictStart = this.findInEditor("backward", /^<<<<<<< .+$/, options, event => event.range.start) + const from = [row, Infinity] + const conflictStart = this.findInEditor("backward", /^<<<<<<< .+$/, {from}, event => event.range.start) if (conflictStart) { - let startRow, separatorRow, endRow + const startRow = conflictStart.row + let separatorRow, endRow + const from = [startRow + 1, 0] const regex = /(^<<<<<<< .+$)|(^=======$)|(^>>>>>>> .+$)/g - this.scanEditor("forward", regex, {from: conflictStart}, ({match, range, stop}) => { + this.scanEditor("forward", regex, {from}, ({match, range, stop}) => { if (match[1]) { - startRow = range.start.row + // incomplete conflict hunk, we saw next conflict startRow wihout seeing endRow + stop() } else if (match[2]) { separatorRow = range.start.row } else if (match[3]) { endRow = range.start.row stop() - return } }) + if (!endRow) return const whole = new Range([startRow, 0], [endRow, Infinity]) const sectionOurs = new Range(whole.start, [(separatorRow || endRow) - 1, Infinity]) const sectionTheirs = new Range([(separatorRow || startRow) + 1, 0], whole.end) - const bodyOurs = sectionOurs.translate([1, 0], [0, 0]) - const bodyTheirs = sectionTheirs.translate([0, 0], [-1, 0]) - return {whole, sectionOurs, bodyOurs, sectionTheirs, bodyTheirs} + + const bodyOursStart = sectionOurs.start.translate([1, 0]) + const bodyOurs = + sectionOurs.getRowCount() === 1 + ? new Range(bodyOursStart, bodyOursStart) + : new Range(bodyOursStart, sectionOurs.end) + + const bodyTheirs = + sectionTheirs.getRowCount() === 1 + ? new Range(sectionTheirs.start, sectionTheirs.start) + : sectionTheirs.translate([0, 0], [-1, 0]) + return {whole, sectionOurs, sectionTheirs, bodyOurs, bodyTheirs} } } } diff --git a/spec/operator-general-spec.coffee b/spec/operator-general-spec.coffee index da948147f..189febb5e 100644 --- a/spec/operator-general-spec.coffee +++ b/spec/operator-general-spec.coffee @@ -1716,52 +1716,143 @@ describe "Operator general", -> """ describe 'ResolveGitConflict', -> - resolveConflictAtRowThenEnsure = (row, text) -> + resolveConflictAtRowThenEnsure = (row, options) -> set cursor: [row, 0] dispatch(editor.element, 'vim-mode-plus:resolve-git-conflict') - ensure null, {text} - - texts = - original: """ + ensure null, options + describe "normal conflict section", -> + original = """ + ------start <<<<<<< HEAD ours 1 ours 2 - ours 3 ======= theirs 1 theirs 2 - theirs 3 - >>>>>>> bob - \n + >>>>>>> branch-a + ------end """ - ours: """ - - ours 1 + ours = """ + ------start + |ours 1 ours 2 - ours 3 - \n + ------end + """ + theirs = """ + ------start + |theirs 1 + theirs 2 + ------end """ - theirs: """ + beforeEach -> set text: original + + it "row 0", -> resolveConflictAtRowThenEnsure 0, text: original + it "row 1", -> resolveConflictAtRowThenEnsure 1, textC: ours # <<<<<<< HEAD + it "row 2", -> resolveConflictAtRowThenEnsure 2, textC: ours + it "row 3", -> resolveConflictAtRowThenEnsure 3, textC: ours + it "row 4", -> resolveConflictAtRowThenEnsure 4, text: original # ======= + it "row 5", -> resolveConflictAtRowThenEnsure 5, textC: theirs + it "row 6", -> resolveConflictAtRowThenEnsure 6, textC: theirs + it "row 7", -> resolveConflictAtRowThenEnsure 7, textC: theirs # >>>>>>> branch-a + it "row 8", -> resolveConflictAtRowThenEnsure 8, text: original + + describe "ours section is empty", -> + original = """ + ------start + <<<<<<< HEAD + ======= theirs 1 - theirs 2 - theirs 3 - \n + >>>>>>> branch-a + ------end + """ + ours = """ + ------start + |------end + """ + theirs = """ + ------start + |theirs 1 + ------end """ + beforeEach -> set text: original - beforeEach -> - set text: texts.original - - it "row 0", -> resolveConflictAtRowThenEnsure 0, texts.original - it "row 1", -> resolveConflictAtRowThenEnsure 1, texts.ours - it "row 2", -> resolveConflictAtRowThenEnsure 2, texts.ours - it "row 3", -> resolveConflictAtRowThenEnsure 3, texts.ours - it "row 4", -> resolveConflictAtRowThenEnsure 4, texts.ours - it "row 5", -> resolveConflictAtRowThenEnsure 5, texts.original - it "row 6", -> resolveConflictAtRowThenEnsure 6, texts.theirs - it "row 7", -> resolveConflictAtRowThenEnsure 7, texts.theirs - it "row 8", -> resolveConflictAtRowThenEnsure 8, texts.theirs - it "row 9", -> resolveConflictAtRowThenEnsure 9, texts.theirs - it "row 10", -> resolveConflictAtRowThenEnsure 10, texts.original + it "row 0", -> resolveConflictAtRowThenEnsure 0, text: original + it "row 1", -> resolveConflictAtRowThenEnsure 1, textC: ours # <<<<<<< HEAD + it "row 2", -> resolveConflictAtRowThenEnsure 2, text: original # ======= + it "row 3", -> resolveConflictAtRowThenEnsure 3, textC: theirs + it "row 4", -> resolveConflictAtRowThenEnsure 4, textC: theirs # >>>>>>> branch-a + it "row 5", -> resolveConflictAtRowThenEnsure 5, text: original + + describe "theirs section is empty", -> + original = """ + ------start + <<<<<<< HEAD + ours 1 + ======= + >>>>>>> branch-a + ------end + """ + ours = """ + ------start + |ours 1 + ------end + """ + theirs = """ + ------start + |------end + """ + + beforeEach -> set text: original + + it "row 0", -> resolveConflictAtRowThenEnsure 0, text: original + it "row 1", -> resolveConflictAtRowThenEnsure 1, textC: ours # <<<<<<< HEAD + it "row 2", -> resolveConflictAtRowThenEnsure 2, textC: ours + it "row 3", -> resolveConflictAtRowThenEnsure 3, text: original # ======= + it "row 4", -> resolveConflictAtRowThenEnsure 4, textC: theirs # >>>>>>> branch-a + it "row 5", -> resolveConflictAtRowThenEnsure 5, text: original + + describe "both ours and theirs section is empty", -> + original = """ + ------start + <<<<<<< HEAD + ======= + >>>>>>> branch-a + ------end + """ + ours = """ + ------start + |------end + """ + + beforeEach -> set text: original + + it "row 0", -> resolveConflictAtRowThenEnsure 0, text: original + it "row 1", -> resolveConflictAtRowThenEnsure 1, textC: ours # <<<<<<< HEAD + it "row 2", -> resolveConflictAtRowThenEnsure 2, text: original # ======= + it "row 3", -> resolveConflictAtRowThenEnsure 3, textC: ours # >>>>>>> branch-a + it "row 4", -> resolveConflictAtRowThenEnsure 4, text: original + + describe "no separator section", -> + original = """ + ------start + <<<<<<< HEAD + ours 1 + >>>>>>> branch-a + ------end + """ + ours = """ + ------start + |ours 1 + ------end + """ + + beforeEach -> set text: original + + it "row 0", -> resolveConflictAtRowThenEnsure 0, text: original + it "row 1", -> resolveConflictAtRowThenEnsure 1, textC: ours # <<<<<<< HEAD + it "row 2", -> resolveConflictAtRowThenEnsure 2, textC: ours + it "row 3", -> resolveConflictAtRowThenEnsure 3, textC: ours # >>>>>>> branch-a + it "row 4", -> resolveConflictAtRowThenEnsure 4, text: original