Kate
katevinormalmode.cpp
Go to the documentation of this file.
120 if ( keyCode == Qt::Key_Escape || (keyCode == Qt::Key_C && e->modifiers() == Qt::ControlModifier) || (keyCode == Qt::Key_BracketLeft && e->modifiers() == Qt::ControlModifier)) {
123 // Vim in weird as if we e.g. i<ctrl-o><ctrl-c> it claims (in the status bar) to still be in insert mode,
124 // but behaves as if it's in normal mode. I'm treating the status bar thing as a bug and just exiting
145 && (!waitingForRegisterOrCharToSearch) // Not in the middle of "find char" motions or replacing char.
200 const Cursor endOfWordOrWORD = (isWORD ? findWORDEnd(currentPosition.line(), currentPosition.column()-1, true) :
242 //kDebug( 13070 ) << "removing " << m_commands.at( m_matchingCommands.at( i ) )->pattern() << ", size before remove is " << m_matchingCommands.size();
266 if ( m_commands.at( i )->needsMotion() && m_commands.at( i )->pattern().length() == m_keys.size() ) {
274 int checkFrom = ( m_awaitingMotionOrTextObject.isEmpty() ? 0 : m_awaitingMotionOrTextObject.top() );
292 //kDebug( 13070 ) << "\tchecking " << m_keys.mid( checkFrom ) << " against " << m_motions.at( i )->pattern();
306 m_motionCanChangeWholeVisualModeSelection = m_motions.at( i )->canChangeWholeVisualModeSelection();
312 r.endLine = m_view->textFolding().visibleLineToLine( qMax (vline+delta, 0) /* ensure we have a valid line */ );
415 //kDebug( 13070 ) << "'" << m_keys << "' AWAITING MOTION OR TO (INDEX): " << ( m_awaitingMotionOrTextObject.isEmpty() ? 0 : m_awaitingMotionOrTextObject.top() );
531 // when we transition to visual mode, remember the command in the keys history (V, v, ctrl-v, ...)
532 // this will later result in buffer filled with something like this "Vjj>" which we can use later with repeat "."
533 const bool commandSwitchedToVisualMode = ((originalViMode == NormalMode) && m_viInputModeManager->isAnyVisualMode());
991 Range range = Range(m_commandRange.startLine, m_commandRange.startColumn, m_commandRange.endLine, m_commandRange.endColumn);
1123 // Position cursor just before first non-whitesspace character of what was the last line joined.
1263 KateViRange yankRange(linenum, 0, linenum + getCount() - 1, getLine(linenum + getCount() - 1).length(), ViMotion::InclusiveMotion);
1334 // If linewise, cursor will be at the beginning of the line *after* the last line of pasted text,
1335 // unless that line is the last line of the document; then it will be placed at the beginning of the
1342 // As with commandgPaste, except that it pastes *at* the current cursor position or, if linewise,
1362 KateViRange r( c.line(), c.column(), c.line(), c.column()+getCount(), ViMotion::ExclusiveMotion );
1388 KateViRange r( c.line(), c.column()-getCount(), c.line(), c.column(), ViMotion::ExclusiveMotion );
1609 doc()->indent( KTextEditor::Range( line1, 0, line2, doc()->lineLength( line2 ) ), -getCount() );
2107 // Special case: If we're already on the very last character in the document, the motion should be
2529 const bool placeCursorAtEndOfMatch = m_viInputModeManager->lastSearchPlacesCursorAtEndOfMatch();
2531 KateViRange match = findPatternForMotion( pattern, !backwards, caseSensitive, m_view->cursorPosition(), getCount() );
2548 const bool placeCursorAtEndOfMatch = m_viInputModeManager->lastSearchPlacesCursorAtEndOfMatch();
2550 KateViRange match = findPatternForMotion( pattern, backwards, caseSensitive, m_view->cursorPosition(), getCount() );
2892 const KateViRange match = findPatternForMotion( word, false, false, getWordRangeUnderCursor().start(), getCount() );
2907 // Search from the beginning of the word under the cursor, so that the current word isn't found
2909 const KateViRange match = findPatternForMotion( word, true, false, getWordRangeUnderCursor().start(), getCount() );
2916 lines_to_go = m_viewInternal->endLine() - linesDisplayed()- m_view->cursorPosition().line() + 1;
2929 lines_to_go = m_viewInternal->endLine() - linesDisplayed()/2 - m_view->cursorPosition().line();
3144 const bool swallowPrecedingSpaces = (c2.column() == doc()->lineLength(c2.line()) - 1 && !doc()->character(c2).isSpace() ) || startedOnSpace || swallowCarriageReturnAtEndOfLine;
3161 KateViRange r( c.line(), c.column(), !swallowCarriageReturnAtEndOfLine ? ViMotion::InclusiveMotion : ViMotion::ExclusiveMotion );
3256 const bool swallowPrecedingSpaces = (c2.column() == doc()->lineLength(c2.line()) - 1 && !doc()->character(c2).isSpace() ) || startedOnSpace || swallowCarriageReturnAtEndOfLine;
3273 KateViRange r( c.line(), c.column(), !swallowCarriageReturnAtEndOfLine ? ViMotion::InclusiveMotion : ViMotion::ExclusiveMotion );
3596 const KateViRange allBetweenCurlyBrackets = findSurroundingBrackets( '{', '}', true, '{', '}' );
3603 const bool openingBraceIsLastCharOnLine = innerCurlyBracket.startColumn == doc()->line(innerCurlyBracket.startLine).length();
3606 const QString textLeadingClosingBracket = doc()->line(innerCurlyBracket.endLine).mid(0, innerCurlyBracket.endColumn + 1);
3607 const bool closingBracketHasLeadingNonWhitespace = !textLeadingClosingBracket.trimmed().isEmpty();
3631 // The line containing the end bracket is left alone if the end bracket is preceded by just whitespace,
3900 // returns the operation mode that should be used. this is decided by using the following heuristic:
3904 // 4. there are some motion that makes all operator charwise, if we have one of them mode will be CharWise
3955 const QString leadingWhiteSpaceOnCurrentLine = doc()->line(pasteAt.line()).mid(0, doc()->line(pasteAt.line()).indexOf(QRegExp("[^\\s]")));
3956 const QString leadingWhiteSpaceOnFirstPastedLine = textToInsert.mid(0, textToInsert.indexOf(QRegExp("[^\\s]")));
3966 textToInsert.replace(QString('\n') + leadingWhiteSpaceOnFirstPastedLine, QString('\n') + leadingWhiteSpaceOnCurrentLine);
3972 pasteAt.setColumn( doc()->lineLength( pasteAt.line() ) ); // paste after the current line and ...
4020 Cursor KateViNormalMode::cursorPosAtEndOfPaste(const Cursor& pasteLocation, const QString& pastedText)
4070 void KateViNormalMode::shrinkRangeAroundCursor(KateViRange& toShrink, const KateViRange& rangeToShrinkTo)
4139 KateViRange r(0, 0, m_view->doc()->lines(), m_view->doc()->line(m_view->doc()->lastLine()).length(), ViMotion::InclusiveMotion);
4163 m_highlightYankAttribute->setDynamicAttribute (KTextEditor::Attribute::ActivateMouseIn, mouseInAttribute);
4164 m_highlightYankAttribute->dynamicAttribute (KTextEditor::Attribute::ActivateMouseIn)->setBackground(yankedColor);
4184 KTextEditor::MovingRange *highlightedYank = m_view->doc()->newMovingRange(yankRange, Kate::TextRange::DoNotExpand);
4210 // Work around the fact that both Normal and Visual mode will have their own m_highlightedYank -
4222 return (lastChar == 'f' || lastChar == 't' || lastChar == 'F' || lastChar == 'T' || lastChar == 'r' || lastChar == 'q' || lastChar == '@');
4229 const bool continuesInsertion = range.start().line() == m_currentChangeEndMarker.line() && range.start().column() == m_currentChangeEndMarker.column();
4252 m_viInputModeManager->addMark(doc(), '[', Cursor(m_viInputModeManager->getMarkPosition('[').line(), 0));
4255 m_viInputModeManager->addMark(doc(), ']', Cursor(m_viInputModeManager->getMarkPosition(']').line() + 1, 0));
4256 m_viInputModeManager->addMark(doc(), '.', Cursor(m_viInputModeManager->getMarkPosition('.').line() + 1, 0));
4260 m_viInputModeManager->addMark(doc(), ']', Cursor(m_viInputModeManager->getMarkPosition(']').line(), 0));
4261 m_viInputModeManager->addMark(doc(), '.', Cursor(m_viInputModeManager->getMarkPosition('.').line(), 0));
4284 // Slavishly follow Vim's weird rules: if an undo removes several lines, then all markers should
4285 // be at the beginning of the line after the last line removed, else they should at the beginning
4288 m_viInputModeManager->addMark(doc(), '[', Cursor(m_viInputModeManager->getMarkPosition('[').line() + markerLineAdjustment, 0));
4289 m_viInputModeManager->addMark(doc(), ']', Cursor(m_viInputModeManager->getMarkPosition(']').line() + markerLineAdjustment, 0));
4290 m_viInputModeManager->addMark(doc(), '.', Cursor(m_viInputModeManager->getMarkPosition('.').line() + markerLineAdjustment, 0));
KateViRange motionToLineLast()
Definition: katevinormalmode.cpp:2576
void align(KateView *view, const KTextEditor::Range &range)
Definition: katedocument.cpp:2909
virtual bool insertLine(int line, const QString &s)
Definition: katedocument.cpp:701
Definition: kateviinputmodemanager.h:50
KateViRange textObjectInnerSentence()
Definition: katevinormalmode.cpp:3439
void replayMacro(QChar macroRegister)
Definition: kateviinputmodemanager.cpp:346
void finishRecordingMacro()
Definition: kateviinputmodemanager.cpp:334
int indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
bool commandEnterInsertModeAppendEOL()
start insert mode after the last character of the line
Definition: katevinormalmode.cpp:603
bool commandEnterInsertModeAppend()
enter insert mode after the current character
Definition: katevinormalmode.cpp:577
bool paste(KateViNormalMode::PasteLocation pasteLocation, bool isgPaste, bool isIndentedPaste)
Definition: katevinormalmode.cpp:3926
Cursor findWORDEnd(int fromLine, int fromColumn, bool onlyCurrentLine=false) const
Definition: katevimodebase.cpp:645
Qt::KeyboardModifiers modifiers() const
QString & append(QChar ch)
QScriptValue i18n(QScriptContext *context, QScriptEngine *engine)
i18n("text", arguments [optional])
Definition: katescripthelpers.cpp:186
bool getTemporaryNormalMode()
Definition: kateviinputmodemanager.h:239
Cursor findPrevWORDStart(int fromLine, int fromColumn, bool onlyCurrentLine=false) const
Definition: katevimodebase.cpp:557
Definition: katerenderer.h:71
bool commandTopViewOnCursor()
Definition: katevinormalmode.cpp:1696
QString toUpper() const
void addHighlightYank(const Range &range)
Definition: katevinormalmode.cpp:4182
OperationMode getRegisterFlag(const QChar ®) const
Definition: katevimodebase.cpp:958
virtual KTextEditor::MovingRange * newMovingRange(const KTextEditor::Range &range, KTextEditor::MovingRange::InsertBehaviors insertBehaviors=KTextEditor::MovingRange::DoNotExpand, KTextEditor::MovingRange::EmptyBehavior emptyBehavior=KTextEditor::MovingRange::AllowEmpty)
Create a new moving range for this document.
Definition: katedocument.cpp:4741
void reformatLines(unsigned int from, unsigned int to) const
Definition: katevinormalmode.cpp:4049
Definition: katevimodebase.h:50
KateViRange findSurroundingQuotes(const QChar &c, bool inner=false) const
Definition: katevimodebase.cpp:697
bool m_commandShouldKeepSelection
Definition: katevinormalmode.h:353
bool commandPrintCharacterCode()
Definition: katevinormalmode.cpp:1732
KateViRange motionToEndOfWORD()
Definition: katevinormalmode.cpp:2218
KateViRange motionToNextBraceBlockEnd()
Definition: katevinormalmode.cpp:2826
const QString getWordUnderCursor() const
Definition: katevimodebase.cpp:141
KateViRange motionToIncrementalSearchMatch()
Definition: katevinormalmode.cpp:3083
bool commandCenterViewOnNonBlank()
Definition: katevinormalmode.cpp:1667
int length() const
const QChar getCharUnderCursor() const
Definition: katevimodebase.cpp:128
KateViRange motionToNextBraceBlockStart()
Definition: katevinormalmode.cpp:2770
void addMark(KateDocument *doc, const QChar &mark, const KTextEditor::Cursor &pos, const bool moveoninsert=true, const bool showmark=true)
Add a mark to the document.
Definition: kateviinputmodemanager.cpp:737
Cursor m_positionWhenIncrementalSearchBegan
Definition: katevinormalmode.h:383
bool commandMakeUppercase()
Definition: katevinormalmode.cpp:864
bool m_currentMotionWasVisualLineUpOrDown
Definition: katevimodebase.h:170
QStringList split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const
QVector< int > m_matchingCommands
Definition: katevinormalmode.h:338
bool commandEnterVisualLineMode()
Definition: katevinormalmode.cpp:641
void setCaretStyle(KateRenderer::caretStyles style, bool repaint=false)
Set the caret's style.
Definition: kateview.cpp:2413
QString & prepend(QChar ch)
bool commandScrollHalfPageDown()
Definition: katevinormalmode.cpp:1644
bool commandEnterVisualMode()
Definition: katevinormalmode.cpp:696
void setText(const QString &text, bool selected=true)
Definition: kateviewhelpers.cpp:839
void push(const T &t)
bool waitingForRegisterOrCharToSearch()
Definition: katevinormalmode.cpp:4215
KateViRange motionWORDForward()
Definition: katevinormalmode.cpp:2157
QRegExp generateMatchingItemRegex()
Definition: katevinormalmode.cpp:3873
int visibleLineToLine(int visibleLine) const
Convert a visible line number to a line number in the text buffer.
Definition: katetextfolding.cpp:422
KateViRange motionToMarkLine()
Definition: katevinormalmode.cpp:2636
Definition: katevimodebase.h:64
Definition: kateviinputmodemanager.h:51
void setLastSearchBackwards(bool b)
set search direction of last search.
Definition: kateviinputmodemanager.h:229
int size() const
void pageUp(bool sel=false, bool half=false)
Definition: kateviewinternal.cpp:1544
KateViRange textObjectAParagraph()
Definition: katevinormalmode.cpp:3496
void executeCommand(const KateViCommand *cmd)
Definition: katevinormalmode.cpp:511
KateViRange motionToBeforeParagraph()
Definition: katevinormalmode.cpp:3024
void showViModeEmulatedCommandBar()
Definition: kateview.cpp:1560
bool commandEnterReplaceMode()
Definition: katevinormalmode.cpp:716
bool commandBottomView(bool onFirst)
Definition: katevinormalmode.cpp:1701
KateViRange textObjectAComma()
Definition: katevinormalmode.cpp:3659
void startRecordingMacro(QChar macroRegister)
Definition: kateviinputmodemanager.cpp:323
KateViRange textObjectInnerWORD()
Definition: katevinormalmode.cpp:3283
void setDoNotMapNextKeypress()
Definition: katevikeymapper.cpp:130
int getFirstNonBlank(int line=-1) const
Get the index of the first non-blank character from the given line.
Definition: katevinormalmode.cpp:4055
bool m_pendingResetIsDueToExit
Definition: katevinormalmode.h:370
Definition: kateviinputmodemanager.h:49
const_iterator insert(const T &value)
QString & remove(int position, int n)
const QChar KeyEventToQChar(const QKeyEvent &keyEvent)
Definition: katevikeyparser.cpp:674
bool setCursorPosition(KTextEditor::Cursor position)
Definition: kateview.cpp:2418
KateViRange motionToLineFirst()
Definition: katevinormalmode.cpp:2563
void chop(int n)
bool commandgPasteBefore()
Definition: katevinormalmode.cpp:1344
KateViRange motionToPrevVisualLine()
Definition: katevinormalmode.cpp:2955
Kate::TextLine plainKateTextLine(uint i)
Definition: katedocument.cpp:4712
void indent(KTextEditor::Range range, int change)
Definition: katedocument.cpp:2899
const QString getRange(KateViRange &r, OperationMode mode=LineWise) const
Definition: katevimodebase.cpp:95
KateViRange motionToFirstCharacterOfLine()
Definition: katevinormalmode.cpp:2318
bool commandReplaceCharacter()
Definition: katevinormalmode.cpp:1410
KateViRange textObjectInnerParagraph()
Definition: katevinormalmode.cpp:3482
KateViInputModeManager * getViInputModeManager()
Definition: kateview.cpp:1587
int size() const
bool commandOpenNewLineOver()
Definition: katevinormalmode.cpp:1052
bool commandCollapseLocal()
Definition: katevinormalmode.cpp:1974
Cursor cursorPosAtEndOfPaste(const Cursor &pasteLocation, const QString &pastedText)
Definition: katevinormalmode.cpp:4020
KateViRange textObjectAInequalitySign()
Definition: katevinormalmode.cpp:3647
void clear()
Definition: kateviinsertmode.h:42
KateViRange goLineUpDown(int lines)
method for moving up or down one or more lines note: the sticky column is always a virtual column ...
Definition: katevimodebase.cpp:998
virtual const KTextEditor::Range & selectionRange() const
Definition: kateview.cpp:2815
bool commandChangeCaseRange()
Definition: katevinormalmode.cpp:985
void addJump(KTextEditor::Cursor cursor)
Definition: kateviinputmodemanager.cpp:668
int indexIn(const QString &str, int offset, CaretMode caretMode) const
KateViRange goVisualLineUpDown(int lines)
Definition: katevimodebase.cpp:1052
bool commandIndentedPaste()
Definition: katevinormalmode.cpp:1349
void setBlockPrependMode(KateViRange blockRange)
Definition: kateviinsertmode.cpp:585
virtual bool replaceText(const KTextEditor::Range &range, const QString &s, bool block=false)
Definition: katedocument.cpp:4686
Cursor findPrevWORDEnd(int fromLine, int fromColumn, bool onlyCurrentLine=false) const
Definition: katevimodebase.cpp:456
void clear()
virtual bool insertText(const KTextEditor::Cursor &position, const QString &s, bool block=false)
Definition: katedocument.cpp:530
KateViRange motionToScreenColumn()
Definition: katevinormalmode.cpp:2594
KateViRange motionDownToFirstNonBlank()
Definition: katevinormalmode.cpp:2084
QString number(int n, int base)
KateViRange motionToNextVisualLine()
Definition: katevinormalmode.cpp:2951
int count(const T &value) const
QSet< KTextEditor::MovingRange * > & highlightedYankForDocument()
Definition: katevinormalmode.cpp:4208
const QString getLastSearchPattern() const
The current search pattern.
Definition: kateviinputmodemanager.cpp:422
bool commandBottomViewOnNonBlank()
Definition: katevinormalmode.cpp:1715
bool commandSwitchToRightView()
Definition: katevinormalmode.cpp:1873
bool commandScrollPageDown()
Definition: katevinormalmode.cpp:1614
void fillRegister(const QChar ®, const QString &text, OperationMode flag=CharWise)
Definition: katevimodebase.cpp:963
bool isSpace() const
bool commandCollapseToplevelNodes()
Definition: katevinormalmode.cpp:1928
bool commandEnterInsertModeLast()
enter insert mode at the last insert position
Definition: katevinormalmode.cpp:630
bool commandSwitchToPrevTab()
Definition: katevinormalmode.cpp:1903
Definition: katerenderer.h:72
virtual QChar character(const KTextEditor::Cursor &position) const
Definition: katedocument.cpp:388
Definition: katevirange.h:33
Definition: katevimodebase.h:56
Definition: katerenderer.h:73
void beginMonitoringDocumentChanges()
Definition: katevinormalmode.cpp:486
KateViRange motionToPreviousBraceBlockEnd()
Definition: katevinormalmode.cpp:2857
Definition: katevimodebase.h:58
KateViRange textObjectInnerQuoteSingle()
Definition: katevinormalmode.cpp:3548
KateViRange textObjectComma(bool inner)
Definition: katevinormalmode.cpp:4134
Cursor findParagraphStart()
Definition: katevinormalmode.cpp:3392
KateViRange textObjectInnerQuoteDouble()
Definition: katevinormalmode.cpp:3538
KTextEditor::Cursor getNextJump(KTextEditor::Cursor)
Definition: katevimodebase.cpp:974
KateViRange motionToEndOfPrevWORD()
Definition: katevinormalmode.cpp:2267
bool commandEnterInsertModeBeforeFirstNonBlankInLine()
Definition: katevinormalmode.cpp:614
bool m_lastMotionWasLinewiseInnerBlock
Definition: katevinormalmode.h:350
Definition: kateviewinternal.h:58
bool isEmpty() const
KateViKeyMapper * keyMapper()
Definition: kateviinputmodemanager.cpp:913
KateViRange motionToPreviousSentence()
Definition: katevinormalmode.cpp:2959
const QString decodeKeySequence(const QString &keys) const
Definition: katevikeyparser.cpp:632
QString trimmed() const
virtual void goToPos(const KateViRange &r)
Definition: katevinormalmode.cpp:494
void updateCursor(const Cursor &c) const
Definition: katevimodebase.cpp:932
void remove(int i)
bool isUpper() const
KTextEditor::Cursor getMarkPosition(const QChar &mark) const
Definition: kateviinputmodemanager.cpp:781
KateViNormalMode * getViNormalMode()
Definition: kateviinputmodemanager.cpp:546
QString text() const
bool commandCenterViewOnCursor()
Definition: katevinormalmode.cpp:1672
virtual KTextEditor::Cursor documentEnd() const
Definition: katedocument.cpp:4681
void setLastSearchPlacesCursorAtEndOfMatch(bool b)
Definition: kateviinputmodemanager.h:233
Definition: katevivisualmode.h:34
void switchView(Direction direction=Next)
Definition: katevimodebase.cpp:1416
bool commandUnindentLines()
Definition: katevinormalmode.cpp:1600
void init(Mode mode, const QString &initialText=QString())
Definition: kateviemulatedcommandbar.cpp:401
bool commandScrollPageUp()
Definition: katevinormalmode.cpp:1624
void joinLines(unsigned int from, unsigned int to) const
Definition: katevinormalmode.cpp:4036
ushort unicode() const
KateViRange motionToEndOfPrevWord()
Definition: katevinormalmode.cpp:2240
Definition: katevimodebase.h:60
KateViRange motionRepeatlastTFBackward()
Definition: katevinormalmode.cpp:2500
bool handleKeypress(const QKeyEvent *e)
parses a key stroke to check if it's a valid (part of) a command
Definition: katevinormalmode.cpp:107
Cursor findWordEnd(int fromLine, int fromColumn, bool onlyCurrentLine=false) const
Definition: katevimodebase.cpp:604
bool commandIndentedPasteBefore()
Definition: katevinormalmode.cpp:1354
KateViRange textObjectASentence()
Definition: katevinormalmode.cpp:3453
QList< Key > keys() const
Definition: kateview.h:77
QString right(int n) const
Definition: kateviinputmodemanager.h:53
Cursor findNextWordStart(int fromLine, int fromColumn, bool onlyCurrentLine=false) const
Definition: katevimodebase.cpp:312
int lineToVisibleLine(int line) const
Convert a text buffer line to a visible line number.
Definition: katetextfolding.cpp:366
QString toLower() const
int key() const
Definition: katevimodebase.h:51
QVector< int > m_matchingMotions
Definition: katevinormalmode.h:339
KateViRange motionWordForward()
Definition: katevinormalmode.cpp:2100
bool commandSwitchToUpView()
Definition: katevinormalmode.cpp:1868
KateViRange motionToNextOccurrence()
Definition: katevinormalmode.cpp:2881
KateViRange motionWORDBackward()
Definition: katevinormalmode.cpp:2179
void setUndoMergeAllEdits(bool merge)
Definition: katedocument.cpp:4722
void pageDown(bool sel=false, bool half=false)
Definition: kateviewinternal.cpp:1586
QChar toLower() const
Definition: katevimodebase.h:57
bool commandSwitchToCmdLine()
Definition: katevinormalmode.cpp:1462
void repaint()
Definition: kateviinputmodemanager.h:52
KateViRange motionToAfterParagraph()
Definition: katevinormalmode.cpp:3052
KateViRange motionToCharBackward()
Definition: katevinormalmode.cpp:2436
KateViRange motionToLastLineOfWindow()
Definition: katevinormalmode.cpp:2938
bool commandPrependToBlock()
Definition: katevinormalmode.cpp:1805
KateViNormalMode(KateViInputModeManager *viInputModeManager, KateView *view, KateViewInternal *viewInternal)
Definition: katevinormalmode.cpp:53
bool commandSwitchToNextView()
Definition: katevinormalmode.cpp:1878
bool lastSearchBackwards() const
get search direction of last search.
Definition: kateviinputmodemanager.h:224
int findLineStartingWitchChar(const QChar &c, unsigned int count, bool forward=true) const
Definition: katevimodebase.cpp:899
Definition: kateviinsertmode.h:41
QStack< int > m_awaitingMotionOrTextObject
Definition: katevinormalmode.h:340
Definition: katevirange.h:29
QString & replace(int position, int n, QChar after)
bool commandReselectVisual()
Definition: katevinormalmode.cpp:661
void highlightYank(const KateViRange &range, const OperationMode mode=CharWise)
Definition: katevinormalmode.cpp:4167
bool commandSearchForward()
Definition: katevinormalmode.cpp:1509
KateViRange textObjectABracket()
Definition: katevinormalmode.cpp:3576
const T & at(int i) const
void storeLastChangeCommand()
copy the contents of the key events log to m_lastChange so that it can be repeated ...
Definition: kateviinputmodemanager.cpp:279
bool commandSwitchToNextTab()
Definition: katevinormalmode.cpp:1893
KateViRange motionToMiddleLineOfWindow()
Definition: katevinormalmode.cpp:2926
bool motionWillBeUsedWithCommand()
Definition: katevinormalmode.h:341
bool commandMakeUppercaseLine()
Definition: katevinormalmode.cpp:893
QChar getChosenRegister(const QChar &defaultReg) const
Definition: katevimodebase.cpp:940
QString mid(int position, int n) const
Cursor m_currentChangeEndMarker
Definition: katevinormalmode.h:379
void yankToClipBoard(QChar chosen_register, QString text)
Definition: katevimodebase.cpp:54
bool commandScrollHalfPageUp()
Definition: katevinormalmode.cpp:1634
QChar toUpper() const
bool lastSearchCaseSensitive()
Definition: kateviinputmodemanager.h:235
KateViEmulatedCommandBar * viModeEmulatedCommandBar()
Definition: kateview.cpp:3051
int encoded2qt(const QString &keypress) const
Definition: katevikeyparser.cpp:509
bool deleteRange(KateViRange &r, OperationMode mode=LineWise, bool addToRegister=true)
Definition: katevimodebase.cpp:65
KTextEditor::Cursor getPrevJump(KTextEditor::Cursor)
Definition: katevimodebase.cpp:979
bool commandSwitchToDownView()
Definition: katevinormalmode.cpp:1863
const QChar at(int position) const
KateViInputModeManager * m_viInputModeManager
Definition: katevimodebase.h:177
const QColor & savedLineColor() const
Definition: kateconfig.cpp:2666
KateViRange textObjectInnerInequalitySign()
Definition: katevinormalmode.cpp:3653
bool commandCloseNocheck()
Definition: katevinormalmode.cpp:1962
T & last()
KateViRange textObjectAQuoteDouble()
Definition: katevinormalmode.cpp:3533
void setCountedRepeatsBeginOnNewLine(bool countedRepeatsBeginOnNewLine)
Definition: kateviinsertmode.h:81
OperationMode getOperationMode() const
Definition: katevinormalmode.cpp:3905
KateViRange textObjectInnerComma()
Definition: katevinormalmode.cpp:3664
KateViRange textObjectAParen()
Definition: katevinormalmode.cpp:3564
bool commandSubtractFromNumber()
Definition: katevinormalmode.cpp:1798
bool isReplayingLastChange() const
Definition: kateviinputmodemanager.h:163
bool isRecordingMacro()
Definition: kateviinputmodemanager.cpp:341
bool m_motionCanChangeWholeVisualModeSelection
Definition: katevinormalmode.h:351
KateViRange textObjectInnerParen()
Definition: katevinormalmode.cpp:3570
bool commandEnterInsertMode()
enter insert mode at the cursor position
Definition: katevinormalmode.cpp:566
void setLastSearchPattern(const QString &p)
Set the current search pattern.
Definition: kateviinputmodemanager.cpp:434
int length() const
virtual QString text(const KTextEditor::Range &range, bool blockwise=false) const
Definition: katedocument.cpp:337
bool m_lastMotionWasVisualLineUpOrDown
Definition: katevimodebase.h:169
bool commandGoToNextJump()
Definition: katevinormalmode.cpp:1844
KateViRange motionToEndOfWord()
Definition: katevinormalmode.cpp:2201
bool commandRepeatLastChange()
Definition: katevinormalmode.cpp:1753
bool commandTopViewOnNonBlank()
Definition: katevinormalmode.cpp:1691
QString left(int n) const
void push_back(const T &value)
bool commandDeleteCharBackward()
Definition: katevinormalmode.cpp:1384
bool commandBottomViewOnCursor()
Definition: katevinormalmode.cpp:1720
QString fromLatin1(const char *str, int size)
bool commandGoToPrevJump()
Definition: katevinormalmode.cpp:1851
KateViRange motionToPreviousBraceBlockStart()
Definition: katevinormalmode.cpp:2801
QString getRegisterContent(const QChar ®)
Definition: katevimodebase.cpp:947
bool commandUnindentLine()
Definition: katevinormalmode.cpp:1576
KateViRange findSurroundingBrackets(const QChar &c1, const QChar &c2, bool inner, const QChar &nested1, const QChar &nested2) const
Definition: katevimodebase.cpp:764
KateViRange motionToMatchingItem()
Definition: katevinormalmode.cpp:2648
bool commandOpenNewLineUnder()
Definition: katevinormalmode.cpp:1032
Cursor findPrevWordEnd(int fromLine, int fromColumn, bool onlyCurrentLine=false) const
Definition: katevimodebase.cpp:416
QSet< KTextEditor::MovingRange * > m_highlightedYanks
Definition: katevinormalmode.h:373
KateViInsertMode * getViInsertMode()
Definition: kateviinputmodemanager.cpp:551
ViMode getLastVisualMode() const
Definition: katevivisualmode.h:55
void repeatLastChange()
repeat last change by feeding the contents of m_lastChange to feedKeys()
Definition: kateviinputmodemanager.cpp:315
bool commandToggleRegionVisibility()
Definition: katevinormalmode.cpp:2002
Definition: katevimodebase.h:52
KateViRange textObjectInnerCurlyBracket()
Definition: katevinormalmode.cpp:3594
const Range getWordRangeUnderCursor() const
Definition: katevimodebase.cpp:147
bool commandEnterVisualBlockMode()
Definition: katevinormalmode.cpp:651
bool commandTopView(bool onFirst)
Definition: katevinormalmode.cpp:1677
KateViVisualMode * getViVisualMode()
Definition: kateviinputmodemanager.cpp:556
bool commandSubstituteLine()
Definition: katevinormalmode.cpp:1228
bool commandChangeCaseLine()
Definition: katevinormalmode.cpp:1005
void shrinkRangeAroundCursor(KateViRange &toShrink, const KateViRange &rangeToShrinkTo)
Definition: katevinormalmode.cpp:4070
KateViRange textObjectInnerWord()
Definition: katevinormalmode.cpp:3171
void clear()
void editStart()
Enclose editor actions with editStart() and editEnd() to group them.
Definition: katedocument.cpp:776
QHash< QString, QString > m_matchingItems
Definition: katevinormalmode.h:364
KTextEditor::Attribute::Ptr m_highlightYankAttribute
Definition: katevinormalmode.h:372
ViMode getCurrentViMode() const
Definition: kateviinputmodemanager.cpp:451
KateViRange textObjectACurlyBracket()
Definition: katevinormalmode.cpp:3588
void appendSearchHistoryItem(const QString &searchHistoryItem)
Definition: kateviglobal.cpp:257
bool commandCenterView(bool onFirst)
Definition: katevinormalmode.cpp:1653
KateViRange motionUpToFirstNonBlank()
Definition: katevinormalmode.cpp:2092
bool commandMakeLowercaseLine()
Definition: katevinormalmode.cpp:846
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
int size() const
KateViRange textObjectInnerBracket()
Definition: katevinormalmode.cpp:3582
bool lastSearchPlacesCursorAtEndOfMatch()
Definition: kateviinputmodemanager.h:237
Cursor findPrevWordStart(int fromLine, int fromColumn, bool onlyCurrentLine=false) const
Definition: katevimodebase.cpp:493
bool commandStartRecordingMacro()
Definition: katevinormalmode.cpp:1937
KateViRange textObjectABackQuote()
Definition: katevinormalmode.cpp:3553
Definition: katevirange.h:29
bool commandAppendToBlock()
Definition: katevinormalmode.cpp:1820
void setTemporaryNormalMode(bool b)
Definition: kateviinputmodemanager.h:241
KateViRange motionRepeatlastTF()
Definition: katevinormalmode.cpp:2477
bool commandSearchBackward()
Definition: katevinormalmode.cpp:1494
QString repeated(int times) const
KateViRange motionToNextSentence()
Definition: katevinormalmode.cpp:2999
KateViRange motionWordBackward()
Definition: katevinormalmode.cpp:2134
bool isLower() const
bool isAnyVisualMode() const
Definition: kateviinputmodemanager.cpp:461
virtual bool removeText(const KTextEditor::Range &range, bool block=false)
Definition: katedocument.cpp:633
bool commandSwitchToLeftView()
Definition: katevinormalmode.cpp:1858
bool commandMakeLowercase()
Definition: katevinormalmode.cpp:821
KateViRange textObjectAQuoteSingle()
Definition: katevinormalmode.cpp:3543
void addCurrentPositionToJumpList()
Definition: katevinormalmode.cpp:554
Cursor findNextWORDStart(int fromLine, int fromColumn, bool onlyCurrentLine=false) const
Definition: katevimodebase.cpp:374
KateViRange motionToPrevOccurrence()
Definition: katevinormalmode.cpp:2896
Definition: katevimodebase.h:59
KateViRange motionToFirstLineOfWindow()
Definition: katevinormalmode.cpp:2913
void addToNumberUnderCursor(int count)
Definition: katevimodebase.cpp:1323
KateViRange findPatternForMotion(const QString &pattern, bool backwards, bool caseSensitive, const Cursor &startFrom, int count=1) const
Definition: katevimodebase.cpp:299
void setLastSearchCaseSensitive(bool caseSensitive)
Definition: kateviinputmodemanager.h:231
KateViRange textObjectInnerBackQuote()
Definition: katevinormalmode.cpp:3558
void setBlockAppendMode(KateViRange blockRange, BlockInsert b)
Definition: kateviinsertmode.cpp:594
KTextEditor::Cursor findMatchingBracket()
Definition: kateviewinternal.cpp:772
KateViRange motionFindCharBackward()
Definition: katevinormalmode.cpp:2360
bool commandSubstituteChar()
Definition: katevinormalmode.cpp:1216
T & top()
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.