CUTE Commands

Each CUTE command starts with a specific string; for example if you want to execute an external program, you have to type :!program. “:!” is the start string, indicating that command is an execution command (nobody dies ;-)). A % is substituted by the file name of the current document. More CUTE commands are listed below:

!

filter selected text with the given program; for example “!indent” causes the selected text to be indented.

>

insert output of a given program at the cursor position.

/

search text forward. Possible arguments are: re, cs, word, wrap. If one of these is given the search will match a regular expression, will be case sensitive, will search a word or will wrap around lines. For example: “/switch(.*) re”, will find a switch statement in C.

?

same as above, but search backward.

:

jump to given line number. For example ":22"

:py

run a python command. For example ":py clear()" will clear current view, as clear() is a built-in CUTE/python function.

:pythony

same as above.

:s

this is a sed-like substitution command. Options are g or gc. g will replace all found strings, gc will replace all found strings, but the user must confirm each substitution. Without an option CUTE will replace only the first occurrence. For example: “:s/true/TRUE gc”

:q

exit CUTE.

:quit

same as above.

:w

save current file.

:write

same as above.

:e

open given file. For example ":e /home/heiko/CUTE/cute.cpp".

:edit

same as above.

:wq

save all files and exit.

:x

same as above.

:close

close current file.

:cd

change current directory. For example “:cd /home/heiko/CUTE”.

:char

insert the given integer value as a character at the current cursor position. For example “:char 190”, will insert 3/4 char.