mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:47:35 +00:00
Vim: Added a Basic Implementation of Visual Mode
This commit is contained in:
parent
4981b30ea5
commit
dfa3f5fbc8
2 changed files with 175 additions and 1 deletions
|
@ -41,18 +41,25 @@ private:
|
|||
enum VimMode {
|
||||
Normal,
|
||||
Insert,
|
||||
Visual
|
||||
};
|
||||
|
||||
VimMode m_vim_mode { VimMode::Normal };
|
||||
|
||||
TextPosition m_selection_start_position {};
|
||||
void update_selection_on_cursor_move();
|
||||
void clear_visual_mode_data();
|
||||
|
||||
KeyCode m_previous_key {};
|
||||
void switch_to_normal_mode();
|
||||
void switch_to_insert_mode();
|
||||
void switch_to_visual_mode();
|
||||
void move_half_page_up(const KeyEvent& event);
|
||||
void move_half_page_down(const KeyEvent& event);
|
||||
|
||||
bool on_key_in_insert_mode(const KeyEvent& event);
|
||||
bool on_key_in_normal_mode(const KeyEvent& event);
|
||||
bool on_key_in_visual_mode(const KeyEvent& event);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue