Commit 6371d283 authored by Adrien Bustany's avatar Adrien Bustany Committed by Oswald Buddenhagen
Browse files

FakeVim: Allow ctrl+left/right to move word-wise in insert mode



Merge-request: 185
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@nokia.com>
parent e3a5ff16
......@@ -2678,6 +2678,10 @@ EventResult FakeVimHandler::Private::handleInsertMode(const Input &input)
moveLeft(count());
setTargetColumn();
m_lastInsertion.clear();
} else if (input.isControl(Key_Left)) {
moveToWordBoundary(false, false);
setTargetColumn();
m_lastInsertion.clear();
} else if (input.isKey(Key_Down)) {
//removeAutomaticIndentation();
m_submode = NoSubMode;
......@@ -2692,6 +2696,11 @@ EventResult FakeVimHandler::Private::handleInsertMode(const Input &input)
moveRight(count());
setTargetColumn();
m_lastInsertion.clear();
} else if (input.isControl(Key_Right)) {
moveToWordBoundary(false, true);
moveRight(); // we need one more move since we are in insert mode
setTargetColumn();
m_lastInsertion.clear();
} else if (input.isKey(Key_Home)) {
moveToStartOfLine();
setTargetColumn();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment