diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2013-10-02 18:48:50 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2013-10-02 18:49:06 +0100 |
| commit | 6331fb5a61a7631fa217edde277e6e091762ec3f (patch) | |
| tree | 8d238ebebd84349f5efa885854170f4fe60d8574 /src/normal.cc | |
| parent | 307fc228d2f702e94dbb94dcb74330eeee037bc1 (diff) | |
Add <c-s> for saving current selection in the jump list
Diffstat (limited to 'src/normal.cc')
| -rw-r--r-- | src/normal.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/normal.cc b/src/normal.cc index 5cb99648..768801c4 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -746,6 +746,13 @@ void jump(Context& context) context.editor().select(SelectionList{ jump }); } +void save_selections(Context& context) +{ + context.push_jump(); + context.print_status({ "saved " + to_string(context.editor().selections().size()) + + " selections", get_color("Information") }); +} + template<bool insert_at_begin> void align(Context& context) { @@ -941,6 +948,7 @@ KeyMap keymap = { { Key::Modifiers::Control, 'i' }, jump<Forward> }, { { Key::Modifiers::Control, 'o' }, jump<Backward> }, + { { Key::Modifiers::Control, 's' }, save_selections }, { { Key::Modifiers::Alt, 'r' }, rotate_selections }, |
