vim

From RaySoft

vim is a highly configurable text editor built to enable efficient text editing. It is an improved version of the vi editor distributed with most UNIX systems.[1]

Documentation

Further Information

Forks

Configuration

Syntax

vim [PARAMETER ...] [FILE ...]

Parameters

+NUMBER
The cursor will be positioned on line NUMBER for the first file being edited. If NUMBER is missing, the cursor will be positioned on the last line.
+/PATTERN
The cursor will be positioned on the first line containing PATTERN in the first file being edited. The search starts at the cursor position, which can be the first line or the cursor position last. To force a search from the first line use +1 +/pat.
-c COMMAND
COMMAND will be executed after the first file has been read (and after autocommands and modelines for that file have been processed). COMMAND is interpreted as an Ex command.
NOTE:
You can use up to 10 -c arguments in a command. They are executed in the order given. A -S argument counts as a -c argument as well.
-m
Modifications not allowed to be written. The 'write' option will be reset, so that writing files is disabled. However, the 'write' option can be set to enable writing again.
-M
Modifications not allowed. The 'modifiable' option will be reset, so that changes are not allowed. The 'write' option will be reset, so that writing files is disabled. However, the 'modifiable' and 'write' options can be set to enable changes and writing.
-R
Readonly mode. The 'readonly' option will be set for all the files being edited. You can still edit the buffer, but will be prevented from accidentally overwriting a file. If you forgot that you are in View mode and did make some changes, you can overwrite a file by adding an exclamation mark to the Ex command, as in :w!. The 'readonly' option can be reset with :set noro.

Examples

Update the 'vim-plug' plugin from command line
vim -c 'PlugUpgrade | PlugUpdate | PlugClean | quitall'

References