KateVi::NormalViMode

#include <normalvimode.h>

Inherits KateVi::ModeBase.

Inherited by KateVi::VisualViMode.

Public Member Functions

 NormalViMode (InputModeManager *viInputModeManager, KTextEditor::ViewPrivate *view, KateViewInternal *viewInternal)
 
void beginMonitoringDocumentChanges ()
 
bool commandAbort ()
 
bool commandAddToNumber ()
 
bool commandAlignLine ()
 
bool commandAlignLines ()
 
bool commandAppendToBlock ()
 
bool commandBottomView (bool onFirst)
 
bool commandBottomViewOnCursor ()
 
bool commandBottomViewOnNonBlank ()
 
bool commandCenterView (bool onFirst)
 
bool commandCenterViewOnCursor ()
 
bool commandCenterViewOnNonBlank ()
 
bool commandChange ()
 
bool commandChangeCase ()
 
bool commandChangeCaseLine ()
 
bool commandChangeCaseRange ()
 
bool commandChangeLine ()
 
bool commandChangeToEOL ()
 
bool commandCloseNocheck ()
 
bool commandCloseView ()
 
bool commandCloseWrite ()
 
bool commandCollapseLocal ()
 
bool commandCollapseToplevelNodes ()
 
bool commandDelete ()
 
bool commandDeleteChar ()
 
bool commandDeleteCharBackward ()
 
bool commandDeleteLine ()
 
bool commandDeleteToEOL ()
 
bool commandEnterInsertMode ()
 
bool commandEnterInsertModeAppend ()
 
bool commandEnterInsertModeAppendEOL ()
 
bool commandEnterInsertModeBeforeFirstNonBlankInLine ()
 
bool commandEnterInsertModeLast ()
 
bool commandEnterReplaceMode ()
 
bool commandEnterVisualBlockMode ()
 
bool commandEnterVisualLineMode ()
 
bool commandEnterVisualMode ()
 
bool commandExpandAll ()
 
bool commandExpandLocal ()
 
bool commandFormatLine ()
 
bool commandFormatLines ()
 
bool commandGoToNextJump ()
 
bool commandGoToPrevJump ()
 
bool commandgPaste ()
 
bool commandgPasteBefore ()
 
bool commandIndentedPaste ()
 
bool commandIndentedPasteBefore ()
 
bool commandIndentLine ()
 
bool commandIndentLines ()
 
bool commandJoinLines ()
 
bool commandMakeLowercase ()
 
bool commandMakeLowercaseLine ()
 
bool commandMakeUppercase ()
 
bool commandMakeUppercaseLine ()
 
bool commandOpenNewLineOver ()
 
bool commandOpenNewLineUnder ()
 
bool commandPaste ()
 
bool commandPasteBefore ()
 
bool commandPrependToBlock ()
 
bool commandPrintCharacterCode ()
 
bool commandRedo ()
 
bool commandRepeatLastChange ()
 
bool commandReplaceCharacter ()
 
bool commandReplayMacro ()
 
bool commandReselectVisual ()
 
bool commandScrollHalfPageDown ()
 
bool commandScrollHalfPageUp ()
 
bool commandScrollPageDown ()
 
bool commandScrollPageUp ()
 
bool commandSearchBackward ()
 
bool commandSearchForward ()
 
bool commandSetMark ()
 
bool commandSplitHoriz ()
 
bool commandSplitVert ()
 
bool commandStartRecordingMacro ()
 
bool commandSubstituteChar ()
 
bool commandSubstituteLine ()
 
bool commandSubtractFromNumber ()
 
bool commandSwitchToCmdLine ()
 
bool commandSwitchToDownView ()
 
bool commandSwitchToLeftView ()
 
bool commandSwitchToNextTab ()
 
bool commandSwitchToNextView ()
 
bool commandSwitchToPrevTab ()
 
bool commandSwitchToRightView ()
 
bool commandSwitchToUpView ()
 
bool commandToggleRegionVisibility ()
 
bool commandToOtherEnd ()
 
bool commandTopView (bool onFirst)
 
bool commandTopViewOnCursor ()
 
bool commandTopViewOnNonBlank ()
 
bool commandUndo ()
 
bool commandUnindentLine ()
 
bool commandUnindentLines ()
 
bool commandYank ()
 
bool commandYankLine ()
 
bool commandYankToEOL ()
 
bool handleKeypress (const QKeyEvent *e) override
 
Range motionDown ()
 
Range motionDownToFirstNonBlank ()
 
Range motionFindChar ()
 
Range motionFindCharBackward ()
 
Range motionHalfPageDown ()
 
Range motionHalfPageUp ()
 
Range motionLeft ()
 
Range motionPageDown ()
 
Range motionPageUp ()
 
Range motionRepeatlastTF ()
 
Range motionRepeatlastTFBackward ()
 
Range motionRight ()
 
Range motionToAfterParagraph ()
 
Range motionToBeforeParagraph ()
 
Range motionToChar ()
 
Range motionToCharBackward ()
 
Range motionToColumn0 ()
 
Range motionToEndOfPrevWord ()
 
Range motionToEndOfPrevWORD ()
 
Range motionToEndOfWord ()
 
Range motionToEndOfWORD ()
 
Range motionToEOL ()
 
Range motionToFirstCharacterOfLine ()
 
Range motionToFirstLineOfWindow ()
 
Range motionToIncrementalSearchMatch ()
 
Range motionToLastLineOfWindow ()
 
Range motionToLineFirst ()
 
Range motionToLineLast ()
 
Range motionToMark ()
 
Range motionToMarkLine ()
 
Range motionToMatchingItem ()
 
Range motionToMiddleLineOfWindow ()
 
Range motionToNextBraceBlockEnd ()
 
Range motionToNextBraceBlockStart ()
 
Range motionToNextOccurrence ()
 
Range motionToNextSentence ()
 
Range motionToNextVisualLine ()
 
Range motionToPreviousBraceBlockEnd ()
 
Range motionToPreviousBraceBlockStart ()
 
Range motionToPreviousSentence ()
 
Range motionToPrevOccurrence ()
 
Range motionToPrevVisualLine ()
 
Range motionToScreenColumn ()
 
Range motionUp ()
 
Range motionUpToFirstNonBlank ()
 
Range motionWordBackward ()
 
Range motionWORDBackward ()
 
Range motionWordForward ()
 
Range motionWORDForward ()
 
virtual void reset ()
 
Range textObjectABackQuote ()
 
Range textObjectABracket ()
 
Range textObjectAComma ()
 
Range textObjectACurlyBracket ()
 
Range textObjectAInequalitySign ()
 
Range textObjectAParagraph ()
 
Range textObjectAParen ()
 
Range textObjectAQuoteDouble ()
 
Range textObjectAQuoteSingle ()
 
Range textObjectASentence ()
 
Range textObjectAWord ()
 
Range textObjectAWORD ()
 
Range textObjectInnerBackQuote ()
 
Range textObjectInnerBracket ()
 
Range textObjectInnerComma ()
 
Range textObjectInnerCurlyBracket ()
 
Range textObjectInnerInequalitySign ()
 
Range textObjectInnerParagraph ()
 
Range textObjectInnerParen ()
 
Range textObjectInnerQuoteDouble ()
 
Range textObjectInnerQuoteSingle ()
 
Range textObjectInnerSentence ()
 
Range textObjectInnerWord ()
 
Range textObjectInnerWORD ()
 

Protected Types

enum  PasteLocation { AtCurrentPosition, AfterCurrentPosition }
 

Protected Member Functions

void addHighlightYank (const KTextEditor::Range &range)
 
KTextEditor::Cursor cursorPosAtEndOfPaste (const KTextEditor::Cursor &pasteLocation, const QString &pastedText) const
 
void executeCommand (const Command *cmd)
 
bool executeKateCommand (const QString &command)
 
KTextEditor::Cursor findParagraphEnd ()
 
KTextEditor::Cursor findParagraphStart ()
 
KTextEditor::Cursor findSentenceEnd ()
 
KTextEditor::Cursor findSentenceStart ()
 
QRegExp generateMatchingItemRegex () const
 
int getFirstNonBlank (int line=-1) const
 
OperationMode getOperationMode () const
 
QSet< KTextEditor::MovingRange * > & highlightedYankForDocument ()
 
void highlightYank (const Range &range, const OperationMode mode=CharWise)
 
void initializeCommands ()
 
void joinLines (unsigned int from, unsigned int to) const
 
bool motionWillBeUsedWithCommand () const
 
bool paste (NormalViMode::PasteLocation pasteLocation, bool isgPaste, bool isIndentedPaste)
 
void reformatLines (unsigned int from, unsigned int to) const
 
void resetParser ()
 
void shrinkRangeAroundCursor (Range &toShrink, const Range &rangeToShrinkTo) const
 
Range textObjectComma (bool inner) const
 
bool waitingForRegisterOrCharToSearch ()
 

Protected Attributes

QStack< int > m_awaitingMotionOrTextObject
 
QVector< Command * > m_commands
 
bool m_commandShouldKeepSelection
 
bool m_commandWithMotion
 
unsigned int m_countTemp
 
KTextEditor::Cursor m_currentChangeEndMarker
 
bool m_deleteCommand
 
bool m_findWaitingForChar
 
QSet< KTextEditor::MovingRange * > m_highlightedYanks
 
KTextEditor::Attribute::Ptr m_highlightYankAttribute
 
bool m_isRepeatedTFcommand
 
bool m_isUndo
 
KeyParserm_keyParser
 
QString m_keys
 
bool m_lastMotionWasLinewiseInnerBlock
 
QString m_lastTFcommand
 
bool m_linewiseCommand
 
QVector< int > m_matchingCommands
 
QHash< QString, QStringm_matchingItems
 
QVector< int > m_matchingMotions
 
QRegExp m_matchItemRegex
 
bool m_motionCanChangeWholeVisualModeSelection
 
int m_motionOperatorIndex
 
QVector< Motion * > m_motions
 
bool m_pendingResetIsDueToExit
 
KTextEditor::Cursor m_positionWhenIncrementalSearchBegan
 
int m_scroll_count_limit
 

Detailed Description

Commands for the vi normal mode.

Definition at line 51 of file normalvimode.h.

Member Function Documentation

bool NormalViMode::commandEnterInsertMode ( )

enter insert mode at the cursor position

Definition at line 519 of file normalvimode.cpp.

bool NormalViMode::commandEnterInsertModeAppend ( )

enter insert mode after the current character

Definition at line 530 of file normalvimode.cpp.

bool NormalViMode::commandEnterInsertModeAppendEOL ( )

start insert mode after the last character of the line

Definition at line 556 of file normalvimode.cpp.

bool NormalViMode::commandEnterInsertModeLast ( )

enter insert mode at the last insert position

Definition at line 584 of file normalvimode.cpp.

int NormalViMode::getFirstNonBlank ( int  line = -1) const
protected

Get the index of the first non-blank character from the given line.

Parameters
lineThe line to be picked. The current line will picked instead if this parameter is set to a negative value.
Returns
the index of the first non-blank character from the given line. If a non-space character cannot be found, the 0 is returned.

Definition at line 3849 of file normalvimode.cpp.

bool NormalViMode::handleKeypress ( const QKeyEvent e)
override

parses a key stroke to check if it's a valid (part of) a command

Returns
true if a command was completed and executed, false otherwise

Definition at line 111 of file normalvimode.cpp.

void NormalViMode::resetParser ( )
protected

(re)set to start configuration.

This is done when a command is completed executed or when a command is aborted

Definition at line 425 of file normalvimode.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Jul 10 2020 22:55:58 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.