aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2025-07-18 16:37:13 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2025-07-18 16:37:13 +0300
commit2c236869333dd20b77109fe7e9bb4ace30c0f774 (patch)
tree37551e37d3922c4f65f4c9d31abc7168294a0472 /src
parentcf7e3bc51731ea4be786ec163532a63d7f93af87 (diff)
downloadsciteco-2c236869333dd20b77109fe7e9bb4ace30c0f774.tar.gz
revised command topics
* Added some keywords. * Consistently added command variants with all modifiers. In principle including modifiers in the topics is unnecessary - you can always strip the modifiers and look up the raw command. However, looking up a command with modifiers can speed up the process (compare looking up ?S<TAB> vs ?::S<TAB> * The `@` modifier is listed only for commands without string arguments.
Diffstat (limited to 'src')
-rw-r--r--src/core-commands.c16
-rw-r--r--src/glob.c2
-rw-r--r--src/goto-commands.c2
-rw-r--r--src/move-commands.c24
-rw-r--r--src/qreg-commands.c16
-rw-r--r--src/ring.c2
-rw-r--r--src/search.c16
-rw-r--r--src/spawn.c4
8 files changed, 41 insertions, 41 deletions
diff --git a/src/core-commands.c b/src/core-commands.c
index 287a9a3..7222a9f 100644
--- a/src/core-commands.c
+++ b/src/core-commands.c
@@ -377,7 +377,7 @@ teco_state_start_loop_close(teco_machine_main_t *ctx, GError **error)
}
}
-/*$ ";" break
+/*$ ";" ":;" break
* [bool]; -- Conditionally break from loop
* [bool]:;
*
@@ -905,7 +905,7 @@ TECO_DEFINE_STATE_COMMAND(teco_state_start,
.keymacro_mask = TECO_KEYMACRO_MASK_START | TECO_KEYMACRO_MASK_CASEINSENSITIVE
);
-/*$ F<
+/*$ "F<" ":F<"
* F< -- Go to loop start or jump to beginning of macro
* :F<
*
@@ -946,7 +946,7 @@ teco_state_fcommand_loop_start(teco_machine_main_t *ctx, GError **error)
ctx->macro_pc = lctx->pc;
}
-/*$ F> continue
+/*$ "F>" ":F>" continue
* F> -- Go to loop end or return from macro
* :F>
*
@@ -1382,7 +1382,7 @@ teco_state_control_radix(teco_machine_main_t *ctx, GError **error)
}
}
-/*$ ^E glyphs2bytes bytes2glyphs
+/*$ "^E" ":^E" glyphs2bytes bytes2glyphs
* glyphs^E -> bytes -- Translate between glyph and byte indexes
* bytes:^E -> glyphs
* ^E -> bytes
@@ -1543,7 +1543,7 @@ teco_ranges_cleanup(void)
g_free(teco_ranges);
}
-/*$ ^B date time timestamp
+/*$ "^B" ":^B" "::^B" date time timestamp
* ^B -> (((year-1900)*16 + month)*32 + day) -- Retrieve date, time or timestamp
* :^B -> seconds
* ::^B -> timestamp
@@ -2241,7 +2241,7 @@ teco_state_ecommand_properties(teco_machine_main_t *ctx, GError **error)
}
}
-/*$ EL eol
+/*$ "EL" ":EL" EOL
* 0EL -- Set or get End of Line mode
* 13,10:EL
* 1EL
@@ -2404,7 +2404,7 @@ teco_codepage2str(guint codepage)
return NULL;
}
-/*$ EE encoding codepage charset
+/*$ "EE" ":EE" encoding codepage charset
* codepageEE -- Edit current document's encoding (codepage/charset)
* EE -> codepage
* codepage:EE
@@ -2598,7 +2598,7 @@ teco_state_ecommand_encoding(teco_machine_main_t *ctx, GError **error)
teco_interface_ssm(SCI_GOTOPOS, teco_interface_glyphs2bytes(dot_glyphs), 0);
}
-/*$ EX exit
+/*$ "EX" ":EX" exit
* [bool]EX -- Exit program
* -EX
* :EX
diff --git a/src/glob.c b/src/glob.c
index 93f3361..af66951 100644
--- a/src/glob.c
+++ b/src/glob.c
@@ -327,7 +327,7 @@ teco_state_glob_pattern_done(teco_machine_main_t *ctx, const teco_string_t *str,
return &teco_state_glob_filename;
}
-/*$ EN glob
+/*$ "EN" ":EN" glob
* [type]EN[pattern]$[filename]$ -- Glob files or match filename and check file type
* [type]:EN[pattern]$[filename]$ -> Success|Failure
*
diff --git a/src/goto-commands.c b/src/goto-commands.c
index 72be48e..97c58d0 100644
--- a/src/goto-commands.c
+++ b/src/goto-commands.c
@@ -154,7 +154,7 @@ gboolean teco_state_goto_process_edit_cmd(teco_machine_main_t *ctx, teco_machine
gboolean teco_state_goto_insert_completion(teco_machine_main_t *ctx, const teco_string_t *str,
GError **error);
-/*$ O
+/*$ "O" goto
* Olabel$ -- Go to label
* [n]Olabel1[,label2,...]$
*
diff --git a/src/move-commands.c b/src/move-commands.c
index 6324131..5c2159e 100644
--- a/src/move-commands.c
+++ b/src/move-commands.c
@@ -36,7 +36,7 @@
#include "core-commands.h"
#include "move-commands.h"
-/*$ J jump
+/*$ "J" ":J" jump
* [position]J -- Go to position in buffer
* [position]:J -> Success|Failure
*
@@ -90,7 +90,7 @@ teco_move_chars(teco_int_t n)
return TECO_SUCCESS;
}
-/*$ C move
+/*$ "C" ":C" move
* [n]C -- Move dot <n> characters
* -C
* [n]:C -> Success|Failure
@@ -117,7 +117,7 @@ teco_state_start_move(teco_machine_main_t *ctx, GError **error)
}
}
-/*$ R reverse
+/*$ "R" ":R" reverse
* [n]R -- Move dot <n> characters backwards
* -R
* [n]:R -> Success|Failure
@@ -158,7 +158,7 @@ teco_move_lines(teco_int_t n)
return TECO_SUCCESS;
}
-/*$ L line
+/*$ "L" ":L" line
* [n]L -- Move dot <n> lines forwards
* -L
* [n]:L -> Success|Failure
@@ -193,7 +193,7 @@ teco_state_start_line(teco_machine_main_t *ctx, GError **error)
}
}
-/*$ B backwards
+/*$ "B" ":B" backwards
* [n]B -- Move dot <n> lines backwards
* -B
* [n]:B -> Success|Failure
@@ -328,7 +328,7 @@ teco_find_words(gsize *pos, teco_int_t n, gboolean end_of_word)
return TRUE;
}
-/*$ W word
+/*$ "W" ":W" "@W" ":@W" word
* [n]W -- Move dot <n> words forwards
* -W
* [n]:W -> Success|Failure
@@ -353,7 +353,7 @@ teco_find_words(gsize *pos, teco_int_t n, gboolean end_of_word)
* buffer, the command yields an error.
* If colon-modified it instead returns a condition code.
*/
-/*$ P
+/*$ "P" ":P" "@P" ":@P"
* [n]P -- Move dot <n> words backwards
* -P
* [n]:P -> Success|Failure
@@ -401,7 +401,7 @@ teco_state_start_words(teco_machine_main_t *ctx, const gchar *cmd, gint factor,
return &teco_state_start;
}
-/*$ V
+/*$ "V" ":V" "@V" ":@V"
* [n]V -- Delete words forwards
* -V
* [n]:V -> Success|Failure
@@ -417,7 +417,7 @@ teco_state_start_words(teco_machine_main_t *ctx, const gchar *cmd, gint factor,
* \(lq@V\(rq is especially useful to remove the remainder of the
* current word.
*/
-/*$ Y
+/*$ "Y" ":Y" "@Y" ":@Y"
* [n]Y -- Delete word backwards
* -Y
* [n]:Y -> Success|Failure
@@ -544,7 +544,7 @@ teco_state_start_kill(teco_machine_main_t *ctx, const gchar *cmd, gboolean by_li
return TRUE;
}
-/*$ K kill
+/*$ "K" ":K" kill
* [n]K -- Kill lines
* -K
* from,to K
@@ -572,7 +572,7 @@ teco_state_start_kill_lines(teco_machine_main_t *ctx, GError **error)
teco_state_start_kill(ctx, "K", TRUE, error);
}
-/*$ D delete
+/*$ "D" ":D" delete
* [n]D -- Delete characters
* -D
* from,to D
@@ -600,7 +600,7 @@ teco_state_start_delete_chars(teco_machine_main_t *ctx, GError **error)
teco_state_start_kill(ctx, "D", FALSE, error);
}
-/*$ ^Q lines2glyphs glyphs2lines
+/*$ "^Q" ":^Q" lines2glyphs glyphs2lines
* [n]^Q -> glyphs -- Convert between lines and glyph lengths or positions
* [position]:^Q -> line
*
diff --git a/src/qreg-commands.c b/src/qreg-commands.c
index 1d2766f..a1da5f9 100644
--- a/src/qreg-commands.c
+++ b/src/qreg-commands.c
@@ -308,7 +308,7 @@ teco_state_queryqreg_got_register(teco_machine_main_t *ctx, teco_qreg_t *qreg,
return &teco_state_start;
}
-/*$ Q Qq query
+/*$ "Q" "Qq" ":Qq" query
* Qq -> n -- Query Q-Register existence, its integer or string characters
* -Qq -> -n
* <position>Qq -> code
@@ -446,7 +446,7 @@ teco_state_setqregstring_nobuilding_done(teco_machine_main_t *ctx,
return &teco_state_start;
}
-/*$ ^Uq
+/*$ "^Uq" ":^Uq" "set string" append
* [c1,c2,...]^Uq[string]$ -- Set or append to Q-Register string without string building
* [c1,c2,...]:^Uq[string]$
*
@@ -516,7 +516,7 @@ teco_state_setqregstring_building_done(teco_machine_main_t *ctx, const teco_stri
return teco_state_setqregstring_nobuilding_done(ctx, str, error);
}
-/*$ EU EUq
+/*$ "EU" "EUq" ":EUq"
* [c1,c2,...]EUq[string]$ -- Set or append to Q-Register string with string building characters
* [c1,c2,...]:EUq[string]$
*
@@ -564,7 +564,7 @@ teco_state_getqregstring_got_register(teco_machine_main_t *ctx, teco_qreg_t *qre
return &teco_state_start;
}
-/*$ G Gq get
+/*$ G Gq get paste
* Gq -- Insert Q-Register string
*
* Inserts the string of Q-Register <q> into the buffer
@@ -603,7 +603,7 @@ teco_state_setqreginteger_got_register(teco_machine_main_t *ctx, teco_qreg_t *qr
return &teco_state_start;
}
-/*$ U Uq
+/*$ "U" "Uq" ":Uq" set
* nUq -- Set Q-Register integer
* -Uq
* [n]:Uq -> Success|Failure
@@ -687,7 +687,7 @@ teco_state_macro_got_register(teco_machine_main_t *ctx, teco_qreg_t *qreg,
return &teco_state_start;
}
-/*$ M Mq eval
+/*$ "M" "Mq" ":Mq" call eval macro
* Mq -- Execute macro
* :Mq
*
@@ -738,7 +738,7 @@ teco_state_indirect_done(teco_machine_main_t *ctx, const teco_string_t *str, GEr
return &teco_state_start;
}
-/*$ EI indirect
+/*$ "EI" ":EI" indirect include
* EIfile$ -- Execute from indirect command file
* :EIfile$
*
@@ -850,7 +850,7 @@ teco_state_copytoqreg_got_register(teco_machine_main_t *ctx, teco_qreg_t *qreg,
return &teco_state_start;
}
-/*$ X Xq
+/*$ "X" "Xq" ":Xq" "@Xq" ":@Xq" copy extract
* [lines]Xq -- Copy into or append or cut to Q-Register
* -Xq
* from,toXq
diff --git a/src/ring.c b/src/ring.c
index afda650..c25d778 100644
--- a/src/ring.c
+++ b/src/ring.c
@@ -629,7 +629,7 @@ teco_state_read_file_done(teco_machine_main_t *ctx, const teco_string_t *str, GE
*/
TECO_DEFINE_STATE_EXPECTFILE(teco_state_read_file);
-/*$ EF close
+/*$ "EF" ":EF" close
* [n]EF -- Remove buffer from ring
* -EF
* [n]:EF
diff --git a/src/search.c b/src/search.c
index d5387da..4724643 100644
--- a/src/search.c
+++ b/src/search.c
@@ -56,7 +56,7 @@ TECO_DEFINE_UNDO_SCALAR(teco_search_parameters_t);
*/
static teco_search_parameters_t teco_search_parameters;
-/*$ ^X search-mode
+/*$ "^X" "search mode"
* mode^X -- Set or get search mode flag
* -^X
* ^X -> mode
@@ -887,7 +887,7 @@ teco_state_search_done(teco_machine_main_t *ctx, const teco_string_t *str, GErro
##__VA_ARGS__ \
)
-/*$ S search pattern compare
+/*$ "S" ":S" "::S" search pattern compare
* [n]S[pattern]$ -- Search for pattern
* -S[pattern]$
* from,toS[pattern]$
@@ -1030,7 +1030,7 @@ teco_state_search_all_done(teco_machine_main_t *ctx, const teco_string_t *str, G
return &teco_state_start;
}
-/*$ N
+/*$ "N" ":N" "search all"
* [n]N[pattern]$ -- Search over buffer-boundaries
* -N[pattern]$
* from,toN[pattern]$
@@ -1137,7 +1137,7 @@ teco_state_search_kill_done(teco_machine_main_t *ctx, const teco_string_t *str,
return &teco_state_start;
}
-/*$ FK
+/*$ "FK" ":FK"
* FK[pattern]$ -- Delete up to occurrence of pattern
* [n]FK[pattern]$
* -FK[pattern]$
@@ -1188,7 +1188,7 @@ teco_state_search_delete_done(teco_machine_main_t *ctx, const teco_string_t *str
return &teco_state_start;
}
-/*$ FD
+/*$ "FD" ":FD" "::FD"
* [n]FD[pattern]$ -- Delete occurrence of pattern
* -FD[pattern]$
* from,toFD[pattern]$
@@ -1249,7 +1249,7 @@ teco_state_replace_done(teco_machine_main_t *ctx, const teco_string_t *str, GErr
: &teco_state_replace_ignore;
}
-/*$ FS
+/*$ "FS" ":FS" "::FS"
* [n]FS[pattern]$[string]$ -- Search and replace
* -FS[pattern]$[string]$
* from,toFS[pattern]$[string]$
@@ -1354,7 +1354,7 @@ teco_state_replace_default_done(teco_machine_main_t *ctx, const teco_string_t *s
: &teco_state_replace_default_ignore;
}
-/*$ FR
+/*$ "FR" ":FR" "::FR" search-replace
* [n]FR[pattern]$[string]$ -- Search and replace with default
* -FR[pattern]$[string]$
* from,toFR[pattern]$[string]$
@@ -1393,7 +1393,7 @@ teco_state_replace_default_all_done(teco_machine_main_t *ctx, const teco_string_
return state;
}
-/*$ FN
+/*$ "FN" ":FN" "::FN" "search-replace all"
* [n]FN[pattern]$[string]$ -- Search and replace with default over buffer-boundaries
* -FN[pattern]$[string]$
* from,toFN[pattern]$[string]$
diff --git a/src/spawn.c b/src/spawn.c
index 187de27..abcce75 100644
--- a/src/spawn.c
+++ b/src/spawn.c
@@ -491,7 +491,7 @@ cleanup:
/* in cmdline.c */
gboolean teco_state_execute_process_edit_cmd(teco_machine_main_t *ctx, teco_machine_t *parent_ctx, gunichar key, GError **error);
-/*$ EC pipe filter
+/*$ "EC" :EC" pipe filter
* ECcommand$ -- Execute operating system command and filter buffer contents
* linesECcommand$
* -ECcommand$
@@ -624,7 +624,7 @@ teco_state_egcommand_got_register(teco_machine_main_t *ctx, teco_qreg_t *qreg,
return &teco_state_execute;
}
-/*$ EG EGq
+/*$ "EG" "EGq" ":EGq"
* EGq command$ -- Set Q-Register to output of operating system command
* linesEGq command$
* -EGq command$