From 010dcd60ffda37027908f2a0b20c751b83ca975e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Wed, 24 Aug 2016 11:03:34 +0200 Subject: 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 --- config.def.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'config.def.h') 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) }, { "", ACTION(CURSORS_NEW_LINE_BELOW_LAST) }, { "", ACTION(CURSORS_NEW_LINE_ABOVE_FIRST) }, @@ -285,6 +286,7 @@ static const KeyBinding bindings_visual[] = { { "", 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") }, -- cgit v1.2.3