The command line interface is documented in the -h, --help
flags. CLI uses the http rest api to communicate between texc server and texc command.
Using the rest api requires a session token from the port file after the server is launched. The token is taken as a url param token={TOKEN}
. The path of the port file is:
On Windows: %LOCALAPPDATA%/texc/port
On Linux: ~/.local/share/texc/port
All text expansions are saved in the local app data folder.
On Windows: %LOCALAPPDATA%/texc/matches
On Linux: ~/.local/share/texc/matches
Identifiers are used to delete, modifiy or list text expansions.
- The contents of the
match
section in a text expansion - There can be multiple matches. The first match loaded will be expanded.
- Example, to delete a text expansion do:
texc remove {match}
- It is a unique positive integer assigned to text expansions
- Example, to delete a text expansion do:
texc remove --id {id}
- All text expansions are categorized into groups (The default is
all
) - We can add a text expansion to a group by doing:
texc add {match} {expand} --group {group}
- The specified text expansion will be saved in matches/{group}.csv
- Example, to disable all text expansion of a specific group do:
texc config --enable false --group {group}
A text expansion is only active if the enable attribute is set to true. Can be set using config
sub command.
Undo is possible by pressing backspace after the expansion. But undo is disabled if non-undoable tags are used in either match
section or expand
section
See tags.md for all the tags available
texc allows the usage of special tags inside match
or expand
sections.
For example we can do,
texc add "hello<enter>" world
Which will only replace hello after enter.
texc add hello "word<enter>"
Which will type word and then enter
texc add "<tcase>hello</tcase>" word
Which will toggle case sensitivity to be off.
To use the characters <
and >
in the text expansion do <<
and >>
which will be converted into <
and >
. So for example <<enter>>
will type <enter>
instead of pressing enter
In the expand
section we can use tags which contain lower case alpha numberic characters.
texc add hello "<a>"
But this is not same as,
texc add hello a
When we use in the first case the 'a' key will be affected by modifiers such as caps lock, but in the second case 'a' key will be typed as it is, with modifier keys not affecting it.