Commit 5fceadf0 authored by Christian Hergert's avatar Christian Hergert
Browse files

vim: implement p and P in visual and visual line modes

Fixes #1172
parent 4f1e4172
......@@ -2225,6 +2225,21 @@
bind "k" { "movement" (previous-line, 1, 1, 1) };
bind "j" { "movement" (next-line, 1, 1, 1) };
bind "p" { "begin-macro" ()
"delete-selection" ()
"paste-clipboard-extended" (1, 0, 0)
"movement" (previous-char, 0, 1, 0)
"clear-count" ()
"end-macro" ()
"set-mode" ("vim-normal", permanent) };
bind "<shift>p" { "begin-macro" ()
"delete-selection" ()
"paste-clipboard-extended" (1, 0, 0)
"movement" (previous-char, 0, 1, 0)
"clear-count" ()
"end-macro" ()
"set-mode" ("vim-normal", permanent) };
bind "Left" { "movement" (previous-char, 1, 1, 1) };
bind "Right" { "movement" (next-char, 1, 1, 1) };
bind "Up" { "movement" (previous-line, 1, 1, 1) };
......@@ -2576,6 +2591,21 @@ bind "KP_Multiply" { "save-insert-mark" ()
"clear-selection" ()
"set-mode" ("vim-normal", permanent) };
bind "p" { "begin-macro" ()
"delete-selection" ()
"paste-clipboard-extended" (1, 0, 0)
"movement" (previous-char, 0, 1, 0)
"clear-count" ()
"end-macro" ()
"set-mode" ("vim-normal", permanent) };
bind "<shift>p" { "begin-macro" ()
"delete-selection" ()
"paste-clipboard-extended" (1, 0, 0)
"movement" (previous-char, 0, 1, 0)
"clear-count" ()
"end-macro" ()
"set-mode" ("vim-normal", permanent) };
bind "Up" { "movement" (previous-line, 1, 0, 1) };
bind "Down" { "movement" (next-line, 1, 0, 1) };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment