- Vim Version
vim --version
-
View Runtimepath (inside Vim)
:echo &runtimepath
-
Which scripts are loaded
:scriptnames
-
View where a setting was loaded from
:verbose set <setting name>
(for example::verbose set background
)
-
Navigating
- Move to top of screen (Higher)
shft-h
- Move to Middle of screen
shift-m
- Move to Lower of screen
shift-l
- Move to top of screen (Higher)
-
What Line # am I on?
:set number
-
GOTO Line #
<esc>
#
shift-g
-
GOTO Line #
:#
-
GOTO Last Line
shift-g
-
Input Mode
[ESC]
- to end inut.
- repeat last editing command# command
- repeat command, # times/string/
- find patterna
- append character modeA
- append at EOLcw
- change wordd
- delete one characterdd
- deline linedw
- delete wordG
- End of Filei
- insertO
- open/insert linep
- paste/put buffer (re: paste a yanked line)r
- replace characterR
- Replace Charactersx
- delete one charactery
- yank (copy) a lineyy
- copy line in buffer
-
Command Mode
-
:q
- quit:q!
- quit, no save-
:u
- Undo last command:redo
- redo:w
- write:wq
- write & quit
-
-
Line Numbering
- ON
-
- OFF
:set nonumber | nonu
- ON
-
Copy Selection, with Mouse
- In the vim command line to enable copy/paste of text selected using the mouse.
:set mouse&
-
Replace text
- http://vim.wikia.com/wiki/Search_and_replace
(
:%/original_text/new_text/
- http://vim.wikia.com/wiki/Search_and_replace
(