abbreviate
:ab [lhs rhs]
Abbreviate lhs for rhs, or shows current abbreviations.
An abbreviation is used in insert-mode.
adjust window
:[1addr]z[type][count][flags]
Print the specified line with context.
If count is not specified, it default is 2. Type can be:
- : The specified line shall be decremented by the following value:
(((number of "-" characters) x count) -1)
+ : The specified line shall be incremented by the following value:
(((number of "+" characters) -1) x count) +
^ : The specified line shall be decremented by the following value:
(((number of "^" characters) +1) x count) -1
= : Embed context into lines of 40 - characters, with (count -1) / 2 around
match
. : show context with (count -1) / 2 around match
append
:[1addr]a[ppend]
Enter ex text input mode; the input text is placed
after the specified line.
arguments
:ar
Shows command line arguments, if provided
change
:[2addr]c[hange]
The input text replaces the specified lines
close
:close
Closes current document
copy
:[2addr]co[py] 1addr
:[2addr]t 1addr
Copy the specified lines after the
specified destination line
de
:de debug
Performs debug action, as available in debug menu
from wex-menus.xml
delete
:[2addr]d[elete][buffer]
Delete the specified lines into a buffer
(defaulting to the unnamed buffer)
edit
:e [+command][file]
If no file is specified shows select file dialog,
otherwise edits file and performs specified command on it
(you can use tab key for autocomplete).
You can also specify wildcards like ? or *
to open multiple files.
escape
:!command
:[2addr]!command
If no lines are specified executes command and shows output.
If lines are specified, they are passed to the program as standard
input, and the standard output and standard error of the program
replaces those lines in the edit buffer.
execute
:[2addr]@buffer
For each line executes the buffer.
file
:f
shows filename and state
global
:[2addr]g[lobal]/pattern/[commands]
:[2addr]v/pattern/[commands]
If pattern and commands are empty: remove all markers
otherwise if commands are empty: mark lines containing pattern
otherwise executes all commands for each line matching pattern,
commands separated by |, or (for v) executes all commands for each
line not matching pattern
goto
:[1addr]
Goto specified address
goto link
:gt
If text is selected and is a link, goes to link,
otherwise goes to link on current line
grep
:grep
grep:grep
[match]
[extension]
[folder]
[options]If nothing specified shows find in files dialog,
otherwise greps for match in folder matching file extension using
options:
/r: recursive
indent
:[2addr][>|<]
Increase, decrease indent for range
insert
:[1addr]i[nsert]
Enter ex text input mode; the input text is placed before
the specified line.
join
:[2addr]j[oin]
Joins lines
list
:[2addr]l[ist][flags]
See print
mark
:[1addr]ma[rk]character
:[1addr]kcharacter
Marks address with character
map
:map [alias cmd]
Maps
alias to
cmd, or shows current maps.
The
alias is interpreted as follow:
- It is a number. Use to e.g. overwrite control keys,
map 5 WWW
results in redefining ctrl-e as WWW.
- Otherwise. Maps strings to other strings, e.g.
map :A :ab
results in showing abbreviations after i
pressing :A.
move
:[2addr]m[ove] 1addr
Move the specified lines after the specified destination
line x
new
:new
New document (dialog)
number
:[2addr]nu[mber][flags]
:[2addr]#[flags]
These commands shall be equivalent to the ex command:
[2addr] p[rint][count] #[flags]
print
:[2addr]p[rint][flags]
:print [file]
Write the addressed lines
If the # flag is specified, each line is preceded by line number.
The second synopsis shows print dialog if file is not spcified,
otherwise prints file.
put
:[1addr]pu[t][buffer]
Append text from the specified buffer
(by default, the unnamed buffer) to the specified line
quit
:q [!]
Quit unless modified, quit forced
read
:[1addr]r[ead] [!][file]
If ! not specified insert contents of file below cursor,
otherwise inserts output or running file command below cursor
register
:reg
Shows registers (buffers) and variables from calculation mode
sed
:sed [match replace]
[extension]
[folder][options]
If nothing specified shows replace in files dialog,
otherwise replaces match by replace in folder matching file extension
using options:
/r: recursive
set
:set [
option[=[value]] ...][nooption ...][option? ...][all]]
If all specified shows all options,
otherwise sets, unsets, or queries specified options
sort
:[2addr]S[options]
Sorts range by lines using options:
r: reverse
u: unique
x,y: use columns
source
:so file
Executes all commands from file
substitute
:[2addr]s[ubstitute]/pattern/repl/[options]
:[2addr]&[options]
:[2addr]~[options]
Replace the first instance of the pattern pattern by the
string repl on each specified line. If both pattern and repl
are not specified or are empty (for example, "//" ),
the last s command is repeated. If only pattern is not specified
or is empty, the last regular expression used in the editor is
used as the pattern.
Supported options:
i: ignore case
c: ask for confirmation
g: global, otherwise only first match on line
When substituting you can use:
- & or \0 to represent the target,
- \U to convert to uppercase,
- \L to convert to lowercase,
- $ to match a line end, e.g. %s/$/EOL appends the string EOL at the end of each line.
- ~ to match against a previous replacement string.
Merging is not yet possible using a \n target, you can create a macro for that.
syntax
:syntax options
Use syntax highlighting, options are on or off
tab
:n
:prev
Next or previous
unabbreviate
:una lhs
Unabbreviate lhs
unmap
:unm lhs
Unmaps lhs
version
:ve
Shows version
visual
:vi
Switches to visual mode
write
:[2addr]w[rite] [>>][file]
If no lines are specified, the entire file is used.
If the >> argument is specified, and the file already exists,
the lines are appended to the file instead of replacing its contents.
write and exit
:x
Save and quit
write line
:[1addr]=
Shows line number
yank
:[2addr]y[ank][buffer]
Copy the specified lines to the specified buffer
(by default, the unnamed buffer)