Kate
KateCommands::SedReplace Class Reference
Support vim/sed style search and replace. More...
#include <katecmds.h>
Inheritance diagram for KateCommands::SedReplace:

Public Member Functions | |
const QStringList & | cmds () |
bool | exec (class KTextEditor::View *view, const QString &cmd, QString &errorMsg, const KTextEditor::Range &r) |
bool | exec (class KTextEditor::View *view, const QString &cmd, QString &errorMsg) |
bool | help (class KTextEditor::View *, const QString &, QString &) |
bool | supportsRange (const QString &) |
Detailed Description
Support vim/sed style search and replace.
Definition at line 144 of file katecmds.h.
Member Function Documentation
const QStringList& KateCommands::SedReplace::cmds | ( | ) | [inline, virtual] |
supported commands as prefixes
- Returns:
- prefix list
Implements KTextEditor::Command.
Definition at line 176 of file katecmds.h.
bool KateCommands::SedReplace::exec | ( | class KTextEditor::View * | view, | |
const QString & | cmd, | |||
QString & | errorMsg, | |||
const KTextEditor::Range & | r | |||
) | [virtual] |
Implements KTextEditor::RangeCommand.
Definition at line 650 of file katecmds.cpp.
bool KateCommands::SedReplace::exec | ( | class KTextEditor::View * | view, | |
const QString & | cmd, | |||
QString & | errorMsg | |||
) | [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 645 of file katecmds.cpp.
bool KateCommands::SedReplace::help | ( | class KTextEditor::View * | , | |
const QString & | , | |||
QString & | ||||
) | [inline, virtual] |
This command does not have help.
- See also:
- KTextEditor::Command::help
Implements KTextEditor::Command.
Definition at line 170 of file katecmds.h.
Implements KTextEditor::RangeCommand.
Definition at line 167 of file katecmds.h.
The documentation for this class was generated from the following files: