diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-08-24 11:03:34 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-08-24 11:13:02 +0200 |
| commit | 010dcd60ffda37027908f2a0b20c751b83ca975e (patch) | |
| tree | 65e0b4f0fd55d5f6d5dc817b39d6c74bebab705f /config.def.h | |
| parent | 1cc8afb756839d4e336c1151caecc400ac8d730a (diff) | |
| download | vis-010dcd60ffda37027908f2a0b20c751b83ca975e.tar.gz vis-010dcd60ffda37027908f2a0b20c751b83ca975e.tar.xz | |
vis: implement gJ like behavior
The behavior is not exactly the same because vim preserves any
existing white spaces wihle we remove existing ones but do
not insert additional ones.
The vim behavior (essentially only deleating new lines) can be
achived using something like:
:x/\n/d
Close #374
Diffstat (limited to 'config.def.h')
| -rw-r--r-- | config.def.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/config.def.h b/config.def.h index af5d8e3..150551b 100644 --- a/config.def.h +++ b/config.def.h @@ -234,7 +234,8 @@ static const KeyBinding bindings_normal[] = { { "gv", ACTION(SELECTION_RESTORE) }, { "I", ACTION(INSERT_LINE_START) }, { "i", ACTION(MODE_INSERT) }, - { "J", ACTION(JOIN_LINE_BELOW) }, + { "J", ACTION(JOIN_LINES) }, + { "gJ", ACTION(JOIN_LINES_TRIM) }, { "m", ACTION(MARK_SET) }, { "<M-C-j>", ACTION(CURSORS_NEW_LINE_BELOW_LAST) }, { "<M-C-k>", ACTION(CURSORS_NEW_LINE_ABOVE_FIRST) }, @@ -285,6 +286,7 @@ static const KeyBinding bindings_visual[] = { { "<Escape>", ACTION(MODE_NORMAL) }, { "I", ACTION(CURSORS_NEW_LINES_BEGIN) }, { "J", ACTION(JOIN_LINES) }, + { "gJ", ACTION(JOIN_LINES_TRIM) }, { "o", ACTION(SELECTION_FLIP) }, { "r", ALIAS("c") }, { "s", ALIAS("c") }, |
