summaryrefslogtreecommitdiff
path: root/noncore/apps/tinykate/libkate/document/katecmds.h
Unidiff
Diffstat (limited to 'noncore/apps/tinykate/libkate/document/katecmds.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/tinykate/libkate/document/katecmds.h94
1 files changed, 94 insertions, 0 deletions
diff --git a/noncore/apps/tinykate/libkate/document/katecmds.h b/noncore/apps/tinykate/libkate/document/katecmds.h
new file mode 100644
index 0000000..bbd5937
--- a/dev/null
+++ b/noncore/apps/tinykate/libkate/document/katecmds.h
@@ -0,0 +1,94 @@
1/***************************************************************************
2 katecmds.h - description
3 -------------------
4 copyright : (C) 2001 by The Kate Team
5 (C) 2002 by Joseph Wenninger
6 email : kwrite-devel@kde.org
7 jowenn@kde.org
8
9 ***************************************************************************/
10
11/***************************************************************************
12 * *
13 * This program is free software; you can redistribute it and/or modify *
14 * it under the terms of the GNU General Public License as published by *
15 * the Free Software Foundation; either version 2 of the License, or *
16 * (at your option) any later version. *
17 * *
18 ***************************************************************************/
19#ifndef _KATECMDS_H
20#define _KATECMDS_H
21
22#include "katecmd.h"
23
24
25/**
26 * this namespace will be maintained by Charles Samuels <charles@kde.org>
27 * so we're going to be using this indentation style here.
28 *
29 * Respect my style, and I'll respect your's!
30 **/
31namespace KateCommands
32{
33
34/**
35 * This is by Christoph Cullmann
36 **/
37class InsertTime : public KateCmdParser
38{
39public:
40 InsertTime(KateDocument *doc=0) : KateCmdParser(doc) { }
41
42 bool execCmd(QString cmd=0, KateView *view=0);
43};
44
45/**
46 * -- Charles Samuels <charles@kde.org>
47 * Support vim/sed find and replace
48 * s/search/replace/ find search, replace with replace on this line
49 * %s/search/replace/ do the same to the whole file
50 * s/search/replace/i do the S. and R., but case insensitively
51 * $s/search/replace/ do the search are replacement to the selection only
52 *
53 * $s/// is currently unsupported
54 **/
55class SedReplace : public KateCmdParser
56{
57public:
58 SedReplace(KateDocument *doc=0) : KateCmdParser(doc) { }
59
60 bool execCmd(QString cmd=0, KateView *view=0);
61private:
62 static QString sedMagic(QString textLine, QString find, QString replace, bool noCase, bool repeat);
63};
64
65/**
66 * insert a unicode or ascii character
67 * base 9+1: 1234
68 * hex: 0x1234 or x1234
69 * octal: 01231
70 *
71 * prefixed with "char:"
72 **/
73class Character : public KateCmdParser
74{
75public:
76 Character(KateDocument *doc=0) : KateCmdParser(doc) { }
77
78 bool execCmd(QString cmd=0, KateView *view=0);
79};
80
81class Fifo : public KateCmdParser
82{
83public:
84 Fifo(KateDocument *doc=0) : KateCmdParser(doc) { }
85
86 bool execCmd(QString cmd=0, KateView *view=0);
87};
88
89}
90
91// vim: noet
92
93#endif
94