<leader> with default configuration is key \, so when you see <leader>-W means pressing \W
Read "A good vimrc" for more information.
Copy /etc/skel/.vimrc skeleton example, so that each user have a base to start personalizing it;
$ sudo cp ~/doc/conf/etc/skel/.vimrc /etc/skel/ $ sudo mkdir /etc/skel/.vim $ sudo mkdir /etc/skel/.vim/swap $ sudo mkdir /etc/skel/.vim/views $ sudo mkdir /etc/skel/.vim/undodir $ sudo mkdir /etc/skel/.vim/backup $ wget -O wombat2mod.vim http://www.vim.org/scripts/download_script.php?src_id=40 $ mv wombat2mod.vim /usr/share/vim/colors/
Default vimrc skeleton is configured to use wombat2mod, which is installed by adduser skeleton.
Horizontal split;
:sp
Vertical split;
:vsp
Change horizontal to vertical
ctrl+w H
Change vertical to horizontal
ctrl+w J
Move between window splits;
ctrl+w (k,j,l,h)
Use built in netrw to see directories and files;
To find files, run vim at top level of project and then use find auto completion or *;
:find nameofdirectory + Tab :find nameofdir* + Tab
For file browsing there is also a option to use edit;
:edit nameofdirectory/
Come from background;
$ fg
Moving page up and page down;
In vim you can apply predefined number of times to a operator, selection or object. For example to delete the next two words press: d + 2 + w. List of important operators objects, selections;
operator + count + object
Operator;
Objects;
Selections are like objects, for example d + i + w will delete "inner" word, c + a + w do the same plus the space;
Selection of useful combinations;
Tags, at top level of project;
$ ctags -R . $ vim src/hello_world.c
To follow a tag;
Ctrl-]
To get back;
Ctrl-t
Autocomplete, press to see all options;
Ctrl-n
To move forward and backward in options;
Ctrl-n Ctrl-p
Show auto completion with references to only this file;
Ctrl-x Ctrl-n
Show auto completion with filenames, * Tab can be used;
Ctrl-x Ctrl-f
Show auto completion with only tags;
Ctrl-x Ctrl-]
Press z= over the bad written word and select desired one.
If two files are open in split type :diffthis in both windows to get vimdiff of the files. To close type :diffoff.
This is part of the Hive System Documentation. Copyright (C) 2019 Hive Team. See the file Gnu Free Documentation License for copying conditions.