summaryrefslogtreecommitdiff
path: root/src/main.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2012-05-29 11:15:43 +0000
committerMaxime Coste <frrrwww@gmail.com>2012-05-29 11:15:43 +0000
commit2c4bc5582acccae9b41f8ff441ffac82f3731aed (patch)
tree2da351a11061046e94d8a12770f276ecb3d2579e /src/main.cc
parent3bfd774f4912c2397734076ec70d298dae1fe51e (diff)
Alt-Space permits to remove a selection by index
Diffstat (limited to 'src/main.cc')
-rw-r--r--src/main.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.cc b/src/main.cc
index 41e4595d..74d39d9b 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -388,6 +388,8 @@ std::unordered_map<Key, std::function<void (Editor& editor, int count)>> keymap
{ { Key::Modifiers::None, '|' }, do_pipe },
{ { Key::Modifiers::None, ' ' }, [](Editor& editor, int count) { if (count == 0) editor.clear_selections();
else editor.keep_selection(count-1); } },
+ { { Key::Modifiers::Alt, ' ' }, [](Editor& editor, int count) { if (count == 0) editor.clear_selections();
+ else editor.remove_selection(count-1); } },
{ { Key::Modifiers::None, 'w' }, [](Editor& editor, int count) { do { editor.select(select_to_next_word<false>); } while(--count > 0); } },
{ { Key::Modifiers::None, 'e' }, [](Editor& editor, int count) { do { editor.select(select_to_next_word_end<false>); } while(--count > 0); } },
{ { Key::Modifiers::None, 'b' }, [](Editor& editor, int count) { do { editor.select(select_to_previous_word<false>); } while(--count > 0); } },