author | jowenn <jowenn> | 2002-11-10 21:08:01 (UTC) |
---|---|---|
committer | jowenn <jowenn> | 2002-11-10 21:08:01 (UTC) |
commit | e97a6da57804aa14907dec327fbae71bff9b383e (patch) (unidiff) | |
tree | 15f6ee292dba24bdda72f5c72f6d2224c3516763 /noncore/apps/tinykate/libkate/document/katecmds.h | |
parent | 7c012ee8cd16d8befacc6f6750711443fac0fd5e (diff) | |
download | opie-e97a6da57804aa14907dec327fbae71bff9b383e.zip opie-e97a6da57804aa14907dec327fbae71bff9b383e.tar.gz opie-e97a6da57804aa14907dec327fbae71bff9b383e.tar.bz2 |
import of tiny kate. (saving not possible yet)
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.h | 94 |
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 | **/ | ||
31 | namespace KateCommands | ||
32 | { | ||
33 | |||
34 | /** | ||
35 | * This is by Christoph Cullmann | ||
36 | **/ | ||
37 | class InsertTime : public KateCmdParser | ||
38 | { | ||
39 | public: | ||
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 | **/ | ||
55 | class SedReplace : public KateCmdParser | ||
56 | { | ||
57 | public: | ||
58 | SedReplace(KateDocument *doc=0) : KateCmdParser(doc) { } | ||
59 | |||
60 | bool execCmd(QString cmd=0, KateView *view=0); | ||
61 | private: | ||
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 | **/ | ||
73 | class Character : public KateCmdParser | ||
74 | { | ||
75 | public: | ||
76 | Character(KateDocument *doc=0) : KateCmdParser(doc) { } | ||
77 | |||
78 | bool execCmd(QString cmd=0, KateView *view=0); | ||
79 | }; | ||
80 | |||
81 | class Fifo : public KateCmdParser | ||
82 | { | ||
83 | public: | ||
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 | |||