How do you find where a key mapping was defined?
:verbose map <key>
Use :verbose map to see the mapping definition and the file/line where it was set.
:verbose map <key>
Use :verbose map to see the mapping definition and the file/line where it was set.
<C-r>/ or q/
Press q/ to open search history in a window.
:set tabstop?
Append ? to any option name to query its value.
:redir @a | silent messages | redir END
Use :redir to capture command output.
:!ls
Use :! followed by any shell command.
:g/pattern/p
Use :g/pattern/p to print all matching lines.
:10,20d
Specify a line range before a command.
:r !date
Use :r !command to read the output of a shell command into the buffer below the cursor.
:10,15m 25
Use :m (move) with a range and destination.
:%normal A;
Use :%normal followed by normal mode keystrokes.
:marks
Use :marks to display all current marks with their line numbers, column positions, and file/text.
:10,15t 25
Use :t (copy) with a range and destination.
<C-f> on command line
While typing a command, press to open the command-line editing window.
:args *.py
Use :args *.
:argdo %s/old/new/ge | update
Use :argdo to execute a command in every file in the argument list.
<C-r>=system('cmd')
In command-line mode, =system('command') evaluates the shell command and inserts its output into the command line.
:s/pattern/replace/flags
The substitute command supports several flags that modify its behavior.
:{range}w filename
The :w command with a range and filename saves only the specified lines to a new file.
:verbose set option?
The :verbose prefix shows where an option was last set (which file, which line).
:help topic
Vim has an extensive built-in help system.