Storing your .vimrc
file in github is an easy way to work in any machine with internet access, using your vim settings.
Vim is usually installed in most of the Linux OS.
Just clone it, move it, and you're ready to go
README.md
: Cheatsheet itself.test.py
: File to try all shortcuts..vimrc
: Vim configuration file with some useful tips (commented in file).
Verb + Noun
e.g.
- d for delete
- w for word
- combine to be "delete word"
Commands are Repeatable and Undoable
- Repeatable: type "." to repeat a change
- Undoable: type "u"
- d => Delete
- c => Change (delete and enter insert mode)
-
/< => Indent
- v => Visually select
- y => Yank (copy)
- p => Paste
- h => 1 character left
- j => 1 line down
- k => 1 line up
- l => 1 character right
- w => word (forward by a "word")
- b => back (back by a "word")
- e => end of word (like word but cursor at the end)
- A => Append at the end of the line (doesn't matter where is the cursor)
- 2j => down 2 lines (works with other nouns)
- iw => "inner word" (works from anywhere in a word)
- it => "inner tag" (the contents of an HTML tag)
- i" => "inner quotes"
- ip => "inner paragraph"
- as => "a sentence"
e.g about these:
- ciw => Delete a complete word and enter insert mode)
- ci" => Delete text between quotes and ready to insert
- ci) => Delete text between () and ready to insert
- ci] => Delete text between [] and ready to insert
- cip => Delete text in a paragraph and ready to insert
- f,F => "find" the next character
- t,T => "find the next character, not including it
- /,? => Search (up to the next match)
- F,T,? do the same buck backwards e.g about these:
- c/model => delete from cursor to "model" and ready to insert
- cf, => delete from cursor to next "," and ready to insert
- df- => delete from cursor to next "-" and stay in normal mode
- x => Delete character in cursor.
- If it is your first time around, type
vimtutor
in your terminal. - Change save option to other keystroke (ctrl+s).
- Mapp keystrokes for typos (:Q as same as :q).