You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some of these resources may prove to be more useful to you than
this document. Exercises provided below are constructed
in such a way each build on each other. Consider this resource as a supplement
to the links given below. Before doing that start 'vimtutor'
Its common to place the .vimrc configuration file '/etc/vim/vimrc/' or '/etc/vimrc/' another
alternative which works well if the default .vimrc is read-only is to place it in your home directory '~'.
1. Basic Configuration
Upload git respository for pathogen into the following file path: '~/.vim/autoload/pathogen.vim'
Or copy and paste the following into your terminal/shell 'mkdir -p ~/.vim/autoload ~/.vim/bundle && '
'curl -LSso /.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim'
For each plugin upload them inside bundle folder
'/.vim/bundle/'
Lesson 1. Entering/Exiting Vim
Open a file with Vim FirstLesson.txt
Once in vim hit i to enter insert mode. Write some random
sentences for practice later. When finished hit the esc key.
Repeat this text selection, as many times as the task requires:
Using the arrow keys move the cursor about the screen.
Enter visual mode by pressing v
Highlight text using the cursor in visual mode using the arrow keys.
Press y to yank or otherwise known as copy the selected text.
Move using arrow keys again to intended location in the text to paste
Press p to paste selected text in question.
Upon exiting and saving your progress preform following keystokes listed below in the table to write or discard file edits:
Keystroke
Function
:w or w file
save changes to buffer or safe file to new file
ZZ or :wq
Save changes and quit
:q!
quit without saving
Lesson 2. Modes within vim
Insert:
Modify the file inserting new text.
Visual:
Visually select text by moving cursor over it,
then operate over the text thats selected.
Visual mode has many different subtypes: visual, block visual, and linewise visual.
Normal:
Default mode
Allows quick mauevers through the text.
Switching between other modes.
Select:
Command:
Lesson 3. Navigating text
Keystroke
Function
h
Move cursor left
l/spacebar
Move cursor right
k/Ctrl+p
Move cursor up
J/Ctrl+n
Move cursor down
w
Move cursor up
b
Move cursor down
e
Move cursor up
W
Move cursor down
B
Move to beginning of previous word before whitespace