Kate
#include <katecmds.h>
Inherits Command, and RangeCommand.
Classes | |
| class | InteractiveSedReplacer |
Public Member Functions | |
| ~SedReplace () | |
| const QStringList & | cmds () |
| bool | exec (class KTextEditor::View *view, const QString &cmd, QString &errorMsg) |
| bool | exec (class KTextEditor::View *view, const QString &cmd, QString &errorMsg, const KTextEditor::Range &r) |
| bool | help (class KTextEditor::View *, const QString &, QString &) |
| bool | supportsRange (const QString &) |
Static Public Member Functions | |
| static bool | parse (const QString &sedReplaceString, QString &destDelim, int &destFindBeginPos, int &destFindEndPos, int &destReplaceBeginPos, int &destReplaceEndPos) |
| static SedReplace * | self () |
Detailed Description
Support vim/sed style search and replace.
Definition at line 220 of file katecmds.h.
Constructor & Destructor Documentation
|
inline |
Definition at line 226 of file katecmds.h.
Member Function Documentation
|
inline |
| bool KateCommands::SedReplace::exec | ( | class KTextEditor::View * | view, |
| const QString & | cmd, | ||
| QString & | errorMsg | ||
| ) |
Execute command.
Valid command strings are:
- s/search/replace/ find
search, replace it withreplaceon this line - %s/search/replace/ do the same to the whole file
- s/search/replace/i do the search and replace case insensitively
- $s/search/replace/ do the search are replacement to the selection only
- Note
- $s/// is currently unsupported
- Parameters
-
view view to use for execution cmd cmd string errorMsg error to return if no success
- Returns
- success
Definition at line 920 of file katecmds.cpp.
| bool KateCommands::SedReplace::exec | ( | class KTextEditor::View * | view, |
| const QString & | cmd, | ||
| QString & | errorMsg, | ||
| const KTextEditor::Range & | r | ||
| ) |
Definition at line 925 of file katecmds.cpp.
|
inline |
This command does not have help.
- See also
- KTextEditor::Command::help
Definition at line 251 of file katecmds.h.
|
static |
Parses sedReplaceString to see if it is a valid sed replace expression (e.g.
"s/find/replace/gi"). If it is, returns true and sets delimiter to the delimiter used in the expression; destFindBeginPos and destFindEndPos to the positions in * sedReplaceString of the begin and end of the "find" term; and destReplaceBeginPos and destReplaceEndPos to the begin and end positions of the "replace" term.
Definition at line 999 of file katecmds.cpp.
|
inlinestatic |
Definition at line 259 of file katecmds.h.
|
inline |
Definition at line 248 of file katecmds.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:57:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.
KDE API Reference