9#ifndef KATEVI_INSERT_VI_MODE_H
10#define KATEVI_INSERT_VI_MODE_H
12#include <vimode/modes/modebase.h>
18class KateViewInternal;
36class InsertViMode :
public ModeBase
39 explicit InsertViMode(InputModeManager *viInputModeManager, KTextEditor::ViewPrivate *view, KateViewInternal *viewInternal);
40 ~InsertViMode()
override;
42 bool handleKeypress(
const QKeyEvent *e)
override;
44 bool commandInsertFromAbove();
45 bool commandInsertFromBelow();
47 bool commandDeleteWord();
48 bool commandDeleteLine();
49 bool commandNewLine();
50 bool commandDeleteCharBackward();
53 bool commandUnindent();
55 bool commandToFirstCharacterInFile();
56 bool commandToLastCharacterInFile();
58 bool commandMoveOneWordLeft();
59 bool commandMoveOneWordRight();
61 bool commandCompleteNext();
62 bool commandCompletePrevious();
64 bool commandInsertContentOfRegister();
65 bool commandSwitchToNormalModeForJustOneCommand();
67 void setBlockPrependMode(Range blockRange);
68 void setBlockAppendMode(Range blockRange, BlockInsert b);
70 void setCount(
int count)
74 void setCountedRepeatsBeginOnNewLine(
bool countedRepeatsBeginOnNewLine)
76 m_countedRepeatsBeginOnNewLine = countedRepeatsBeginOnNewLine;
80 void leaveInsertMode(
bool force =
false);
81 void completionFinished();
84 BlockInsert m_blockInsert;
85 unsigned int m_eolPos;
89 bool m_waitingRegister;
92 bool m_countedRepeatsBeginOnNewLine;
94 bool m_isExecutingCompletion;
95 QString m_textInsertedByCompletion;
96 KTextEditor::Cursor m_textInsertedByCompletionEndPos;
100 void textInserted(KTextEditor::Document *document, KTextEditor::Range range);
combined class for motions and text objects.
The KTextEditor namespace contains all the public API that is required to use the KTextEditor compone...