forked from qt-creator/qt-creator
FakeVim: Allow ctrl+left/right to move word-wise in insert mode
Merge-request: 185 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
committed by
Oswald Buddenhagen
parent
e3a5ff16f7
commit
6371d2835d
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user