Vim is a command line text editor.
!!! Commands and configuration you want loaded by default can be put into a file called
For example, to show line numbers you could:
echo ":set number" >> ~/.vimrc
After opening vim, to edit press
i. To cancel out of editing mode, press
esc. If you aren't in editing mode, the commands explained below will work.
Normally, you would do:
You may wish to write, then quit:
You may also wish to force quit:
%s/find string/replace string/g
Ensure you are not in editing mode, then type
/ followed by your search string. Use
n to go to the next match, and
N to go to the previous match.
If you open multiple files (for example
vim *go), you can go to the next file using
Generally, you would want to write, then go to next file:
First, run the following (or put into your
:set spelllang=en :set spellfile=~/.vim/spell/en.utf-8.add
Then, to use spellcheck run:
Now, to view word suggestions, when hovering over a word try
z= and follow the prompts.
To navigate between misspelt words, use