Kate
katecmds.cpp
  
Go to the documentation of this file.
  103       "<p>Cleans up the indentation of the selected lines or current line according to the indentation settings in the document. </p>");
  107       "<p>Inserts comment markers to make the selection or selected lines or current line a comment according to the text format as defined by the syntax highlight definition for the document.</p>");
  111       "<p>Removes comment markers from the selection or selected lines or current line according to the text format as defined by the syntax highlight definition for the document.</p>");
  119       "<p>If enabled, indentation of text pasted from the clipboard is adjusted using the current indenter.</p>"
  154       "<p>Sets the indentation width to the number <b>width</b>. Used only if you are indenting with spaces.</p>");
  192       "<p>Sets the line width for hard wrapping to <b>width</b>. This is used if you are having your text wrapped automatically.</p>");
  202         "<p>Sets the syntax highlighting system for the document. The argument must be a valid highlight name, as seen in the Tools → Highlighting menu. This command provides an autocompletion list for its argument.</p>");
  286     return (v->textFolding().newFoldingRange (range.isValid() ? range : v->selectionRange(), Kate::TextFolding::Persistent | Kate::TextFolding::Folded) != -1);
  290     return (v->textFolding().newFoldingRange (range.isValid() ? range : v->selectionRange(), Kate::TextFolding::Folded) != -1);
  294     QVector<QPair<qint64, Kate::TextFolding::FoldingRangeFlags> > startingRanges = v->textFolding().foldingRangesStartingOnLine (v->cursorPosition().line());
  509 KCompletion *KateCommands::CoreCommands::completionObject( KTextEditor::View *view, const QString &cmd )
  555   l << mappingCommands() << "d" << "delete" << "j" << "c" << "change" << "<" << ">" << "y" << "yank" <<
  604       msg = KateGlobal::self()->viInputModeGlobal()->getMapping( modeForMapCommand(cmd), args.at( 0 ), true );
  612       KateViGlobal::MappingRecursion mappingRecursion = (isMapCommandRecursive(cmd)) ? KateViGlobal::Recursive : KateViGlobal::NonRecursive;
  613       KateGlobal::self()->viInputModeGlobal()->addMapping( modeForMapCommand(cmd), args.at( 0 ), args.at( 1 ), mappingRecursion);
  714 KCompletion *KateCommands::ViCommands::completionObject( KTextEditor::View *view, const QString &cmd )
  722     QStringList l = KateGlobal::self()->viInputModeGlobal()->getMappings( KateViGlobal::NormalModeMapping );
  747 KateViGlobal::MappingMode KateCommands::ViCommands::modeForMapCommand(const QString& mapCommand)
  974   QSharedPointer<InteractiveSedReplacer> interactiveSedReplacer(new InteractiveSedReplacer(doc, find, replace, !noCase, !repeat, startLine, endLine));
  986       kDebug(13025) << "Interactive sedreplace is only currently supported with Vi mode plus Vi emulated command bar.";
  999 bool KateCommands::SedReplace::parse(const QString& sedReplaceString, QString& destDelim, int& destFindBeginPos, int& destFindEndPos, int& destReplaceBeginPos, int& destReplaceEndPos)
 1024 KateCommands::SedReplace::InteractiveSedReplacer::InteractiveSedReplacer(KateDocument* doc, const QString& findPattern, const QString& replacePattern, bool caseSensitive, bool onlyOnePerLine, int startLine, int endLine)
 1073     m_currentSearchPos = Cursor(currentMatch.start().line(), currentMatch.start().column() + replacementText.length());
 1109 QString KateCommands::SedReplace::InteractiveSedReplacer::currentMatchReplacementConfirmationMessage()
 1138   const QString replacementText = m_regExpSearch.buildReplacement(m_replacePattern, captureTexts, 0);
 1150 bool KateCommands::Character::help (class KTextEditor::View *, const QString &cmd, QString &msg)
 1154         "<p>This command allows you to insert literal characters by their numerical identifier, in decimal, octal or hexadecimal form.</p>"
 1215         "<p>Inserts a date/time string as defined by the specified format, or the format yyyy-MM-dd hh:mm:ss if none is specified.</p>"
 1227             "<tr><td>h</td><td>The hour without a leading zero (0..23 or 1..12 if AM/PM display).</td></tr>"
 1228             "<tr><td>hh</td><td>The hour with a leading zero (00..23 or 01..12 if AM/PM display).</td></tr>"
 1235             "<tr><td>AP</td><td>Use AM/PM display. AP will be replaced by either \"AM\" or \"PM\".</td></tr>"
 1236             "<tr><td>ap</td><td>Use am/pm display. ap will be replaced by either \"am\" or \"pm\".</td></tr>"
 1249     view->document()->insertText(view->cursorPosition(), QDateTime::currentDateTime().toString(cmd.mid(5, cmd.length()-5)));
 1251     view->document()->insertText(view->cursorPosition(), QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss"));
virtual bool insertText(const Cursor &position, const QString &text, bool block=false)=0
Cursor & start()
void startInteractiveSearchAndReplace(QSharedPointer< KateCommands::SedReplace::InteractiveSedReplacer > interactiveSedReplace)
Definition: kateviemulatedcommandbar.cpp:1222
virtual bool saveAs(const KUrl &url)
This KTextEditor::Command provides access to a lot of the core functionality of kate part...
Definition: katecmds.h:49
QScriptValue i18n(QScriptContext *context, QScriptEngine *engine)
i18n("text", arguments [optional]) 
Definition: katescripthelpers.cpp:186
void setIndentationMode(const QString &identationMode)
Definition: kateconfig.cpp:459
bool exec(class KTextEditor::View *view, const QString &cmd, QString &errorMsg)
Execute command. 
Definition: katecmds.cpp:920
bool viInputModeEmulateCommandBar() const 
Definition: kateconfig.cpp:1736
const QString getMapping(MappingMode mode, const QString &from, bool decode=false) const 
Definition: kateviglobal.cpp:186
bool supportsRange(const QString &range)
Definition: katecmds.cpp:498
KCompletion * completionObject(KTextEditor::View *, const QString &)
override completionObject from interfaces/document.h . 
Definition: katecmds.cpp:509
virtual bool isValid() const 
InteractiveSedReplacer(KateDocument *doc, const QString &findPattern, const QString &replacePattern, bool caseSensitive, bool onlyOnePerLine, int startLine, int endLine)
Definition: katecmds.cpp:1024
bool supportsRange(const QString &range)
Definition: katecmds.cpp:703
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:725
void rememberUserDidSetIndentationMode()
set indentation mode by user this will remember that a user did set it and will avoid reset on save ...
Definition: katedocument.h:952
virtual bool setMode(const QString &name)
Set the current mode of the document by giving its name. 
Definition: katedocument.cpp:1462
Definition: kateviglobal.h:61
const QStringList getMappings(MappingMode mode, bool decode=false) const 
Definition: kateviglobal.cpp:196
KCompletion * completionObject(KTextEditor::View *, const QString &)
override completionObject from interfaces/document.h . 
Definition: katecmds.cpp:714
Command
This KTextEditor::Command provides vi commands for the application. 
Definition: katecmds.h:175
bool help(class KTextEditor::View *, const QString &, QString &)
This command does not have help. 
Definition: katecmds.cpp:1150
KAction * find(const QObject *recvr, const char *slot, QObject *parent)
bool help(class KTextEditor::View *, const QString &, QString &)
This command does not have help. 
Definition: katecmds.cpp:1211
QString finalStatusReportMessage()
Definition: katecmds.cpp:1114
bool setCursorPosition(KTextEditor::Cursor position)
Definition: kateview.cpp:2393
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
bool exec(class KTextEditor::View *view, const QString &cmd, QString &msg)
execute command 
Definition: katecmds.cpp:825
Definition: kateviglobal.h:61
void indent(KTextEditor::Range range, int change)
Definition: katedocument.cpp:2898
QString currentMatchReplacementConfirmationMessage()
Definition: katecmds.cpp:1109
void removeMapping(MappingMode mode, const QString &from)
Definition: kateviglobal.cpp:181
QScriptValue i18ncp(QScriptContext *context, QScriptEngine *engine)
i18ncp("context", "singular", "plural", number, arguments [optional]) 
Definition: katescripthelpers.cpp:273
KUrl url
void addMapping(MappingMode mode, const QString &from, const QString &to, MappingRecursion recursion)
Definition: kateviglobal.cpp:171
KateViInputModeManager * getViInputModeManager()
Definition: kateview.cpp:1567
void comment(KateView *view, uint line, uint column, int change)
Definition: katedocument.cpp:3301
KSharedConfigPtr config()
insert a unicode or ascii character base 9+1: 1234 hex: 0x1234 or x1234 octal: 01231 ...
Definition: katecmds.h:317
bool unfoldRange(qint64 id, bool remove=false)
Unfold the given range. 
Definition: katetextfolding.cpp:191
virtual const KTextEditor::Range & selectionRange() const 
Definition: kateview.cpp:2760
virtual bool setHighlightingMode(const QString &name)
Set the current mode of the document by giving its name. 
Definition: katedocument.cpp:1484
QVector< QPair< qint64, FoldingRangeFlags > > foldingRangesStartingOnLine(int line) const 
Queries which folding ranges start at the given line and returns the id + flags for all of them...
Definition: katetextfolding.cpp:476
void replaceAllRemaining()
Definition: katecmds.cpp:1099
bool exec(class KTextEditor::View *view, const QString &cmd, QString &errorMsg)
execute command 
Definition: katecmds.cpp:221
This KTextEditor::Command provides vi 'ex' commands. 
Definition: katecmds.h:110
#define KCC_ERR(s)
static Range invalid()
KateViNormalMode * getViNormalMode()
Definition: kateviinputmodemanager.cpp:534
virtual Document * document() const =0
bool help(class KTextEditor::View *, const QString &, QString &)
Help for AppCommands. 
Definition: katecmds.cpp:851
virtual void setIgnoreCase(bool ignoreCase)
virtual Cursor cursorPosition() const =0
virtual void setItems(const QStringList &list)
virtual bool documentSave()=0
bool exec(class KTextEditor::View *view, const QString &cmd, QString &msg)
execute command 
Definition: katecmds.cpp:561
Definition: kateview.h:78
void replaceCurrentMatch()
Definition: katecmds.cpp:1059
Definition: kateviglobal.h:60
void setSearchPattern(const QString &searchPattern)
Set the current search pattern. 
Definition: kateview.cpp:2451
Definition: katedocument.h:74
Definition: kateviglobal.h:61
KGuiItem ok()
KAction * replace(const QObject *recvr, const char *slot, QObject *parent)
virtual int line() const 
Definition: kateviglobal.h:60
KateViEmulatedCommandBar * viModeEmulatedCommandBar()
Definition: kateview.cpp:2989
Cursor & end()
bool exec(class KTextEditor::View *view, const QString &cmd, QString &errorMsg)
execute command 
Definition: katecmds.cpp:1243
bool help(class KTextEditor::View *, const QString &, QString &)
This command does not have help. 
Definition: katecmds.cpp:90
Definition: kateconfig.h:145
qint64 newFoldingRange(const KTextEditor::Range &range, FoldingRangeFlags flags=FoldingRangeFlags())
Create a new folding range. 
Definition: katetextfolding.cpp:99
bool commandUnindentLine()
Definition: katevinormalmode.cpp:1513
KTextEditor::Range currentMatch()
Will return invalid Range if there are no further matches. 
Definition: katecmds.cpp:1039
bool exec(class KTextEditor::View *view, const QString &cmd, QString &errorMsg)
execute command 
Definition: katecmds.cpp:1164
void setIndentPastedText(bool on)
Definition: kateconfig.cpp:578
A KCompletion object that completes last ?unquoted? word in the string passed. 
Definition: katecmd.h:67
void editStart()
Enclose editor actions with editStart() and editEnd() to group them. 
Definition: katedocument.cpp:776
void setShowIndentLines(bool showLines)
Set whether a guide should be painted to help identifying indent lines. 
Definition: katerenderer.cpp:125
static int backslashString(const QString &haystack, const QString &needle, int index)
Definition: katecmds.cpp:873
int column() const 
QList< Action > parse(QSettings &ini)
void setIndentationWidth(int indentationWidth)
Definition: kateconfig.cpp:435
A KateViewBarWidget that attempts to emulate some of the features of Vim's own command bar...
Definition: kateviemulatedcommandbar.h:40
void skipCurrentMatch()
Definition: katecmds.cpp:1049
static bool parse(const QString &sedReplaceString, QString &destDelim, int &destFindBeginPos, int &destFindEndPos, int &destReplaceBeginPos, int &destReplaceEndPos)
Parses sedReplaceString to see if it is a valid sed replace expression (e.g. 
Definition: katecmds.cpp:999
QString number(KIO::filesize_t size)
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
            Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.
    KDE API Reference