Commit b983e137 authored by Christian Hergert's avatar Christian Hergert

vim: add minimal ctrl+t/ctrl+d in insert mode

This isn't perfect, because we don't place the cursor on the exact
location due to how cursor saving is done. We might be able to fix that
by using a new mark, but we need to see if that messes anything else up
in the process.

Fixes #1019
parent c2cfc621
......@@ -2112,6 +2112,21 @@
bind "<ctrl>w" { "movement" (previous-word-start, 1, 1, 0)
"delete-selection" () };
bind "<ctrl>d" { "save-insert-mark" ()
"movement" (first-nonspace-char, 0, 1, 0)
"movement" (line-end, 1, 1, 0)
"begin-user-action" ()
"indent-selection" (-1)
"end-user-action" ()
"restore-insert-mark" () };
bind "<ctrl>t" { "save-insert-mark" ()
"movement" (first-nonspace-char, 0, 1, 0)
"movement" (line-end, 1, 1, 0)
"begin-user-action" ()
"indent-selection" (1)
"end-user-action" ()
"restore-insert-mark" () };
bind "<ctrl>e" { "movement" (screen-up, 0, 0, 1) };
bind "<ctrl>y" { "movement" (screen-down, 0, 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