scr back current line current line
^ 2 scr back 1 scr back 1 scr back
. 1/2 scr back 1/2 scr fwd 1/2 scr fwd
= 1/2 scr back 1/2 scr fwd current line
Specifying no mark at all is the same as "+".
If the mark is "=", a line of dashes is printed
around the current line.
*:z!*
:[range]z![+-^.=][count]
Like ":z", but when [count] is not specified, it
defaults to the Vim window height minus one.
:[range]z[!]#[+-^.=][count] *:z#*
Like ":z" or ":z!", but number the lines.
*:=*
:= [args] Without [args]: prints the last line number.
With [args]: equivalent to `:lua ={expr}`. see |:lua|
:{range}= Prints the last line number in {range}. For example,
this prints the current line number: >
:.=
:norm[al][!] {commands} *:norm* *:normal*
Execute Normal mode commands {commands}. This makes
it possible to execute Normal mode commands typed on
the command-line. {commands} are executed like they
are typed. For undo all commands are undone together.
Execution stops when an error is encountered.
If the [!] is given, mappings will not be used.
Without it, when this command is called from a
non-remappable mapping (|:noremap|), the argument can
be mapped anyway.
{commands} should be a complete command. If
{commands} does not finish a command, the last one
will be aborted as if <Esc> or <C-C> was typed.
This implies that an insert command must be completed
(to start Insert mode, see |:startinsert|). A ":"
command must be completed as well. And you can't use
"gQ" to start Ex mode.
The display is not updated while ":normal" is busy.
{commands} cannot start with a space. Put a count of
1 (one) before it, "1 " is one space.
This command cannot be followed by another command,
since any '|' is considered part of the command.
This command can be used recursively, but the depth is
limited by 'maxmapdepth'.
An alternative is to use |:execute|, which uses an
expression as argument. This allows the use of
printable characters to represent special characters.
Example: >
:exe "normal \<c-w>\<c-w>"
<
:{range}norm[al][!] {commands} *:normal-range*
Execute Normal mode commands {commands} for each line
in the {range}. Before executing the {commands}, the
cursor is positioned in the first column of the range,
for each line. Otherwise it's the same as the
":normal" command without a range.
*:sh* *:shell* *E371* *E360*
:sh[ell] Removed. |vim-differences|
*:terminal* *:te*
:te[rminal][!] [{cmd}] Run {cmd} in a non-interactive 'shell' in a new
|terminal-emulator| buffer. Without {cmd}, start an
interactive 'shell'.
Type |i| to enter |Terminal-mode|, then keys are sent to
the job running in the terminal. Type <C-\><C-N> to
leave Terminal-mode. |CTRL-\_CTRL-N|. Type <C-\><C-O>
to execute a single normal mode command |t_CTRL-\_CTRL-O|
Fails if changes have been made to the current buffer,
unless 'hidden' is set.
If {cmd} is omitted, and the 'shell' job exits with no
error, the buffer is closed automatically
|default-autocmds|.
To enter |Terminal-mode| automatically: >
autocmd TermOpen * startinsert
<
*:!cmd* *:!*
:!{cmd} Execute {cmd} with 'shell'. See also |:terminal|.
For the filter command, see |:range!|.
The command runs in a non-interactive shell connected
to a pipe (not a terminal). Use |:terminal| to run an
interactive shell connected to a terminal.
Backgrounded ("&") commands must not write to stdout
or stderr, the streams are closed immediately. |E5677|
Use |jobstart()| instead. >
:call jobstart('foo', {'detach':1})
<
For powershell, chaining a stringed executable path
requires using the call operator (&). >
:!Write-Output "1`n2" | & "C:\Windows\System32\sort.exe" /r
<
Vim builds command line using options 'shell', 'shcf',
'sxq' and