Kate
#include <katecmds.h>
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 &) |
Public Member Functions inherited from KTextEditor::Command | |
virtual | ~Command () |
Public Member Functions inherited from KTextEditor::RangeCommand | |
virtual | ~RangeCommand () |
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
|
inlinevirtual |
supported commands as prefixes
- Returns
- prefix list
Implements KTextEditor::Command.
Definition at line 257 of file katecmds.h.
|
virtual |
Execute command.
Valid command strings are:
- s/search/replace/ find
search
, replace it withreplace
on 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
Implements KTextEditor::Command.
Definition at line 920 of file katecmds.cpp.
|
virtual |
Implements KTextEditor::RangeCommand.
Definition at line 925 of file katecmds.cpp.
|
inlinevirtual |
This command does not have help.
- See also
- KTextEditor::Command::help
Implements KTextEditor::Command.
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.
Implements KTextEditor::RangeCommand.
Definition at line 248 of file katecmds.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:55 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.