This is a Markdown test
- Item 1
- Item 2
- Item 3
‘’’ this is a code block? ‘’’
by Gary Cheeseman gary.cheeseman.me.uk
This is my Neovim setup as at July 2017
For package management I’m using junegunn/vim-plug: Minimalist Vim Plugin Manager
CTRL-a
add [COUNT] to the number or alphabetic characterCTRL-x
subtract [COUNT] to the number or alphabetic characterI am using the kshenoy/vim-signature plugin for bookmarks
Normal mode
where x
is a to z
mx
Toggle mark ‘x’ and display it in the leftmost column
dmx
Remove mark ‘x’ where x is a-zA-Z
m,
Place the next available mark
m.
If no mark on line, place the next available mark. Otherwise, remove (first) existing mark.
m-
Delete all marks from the current line
m<Space>
Delete all marks from the current buffer
]
` Jump to next mark
[
` Jump to prev mark
]'
Jump to start of next line containing a mark
['
Jump to start of prev line containing a mark
`]
Jump by alphabetical order to next mark
`[
Jump by alphabetical order to prev mark
']
Jump by alphabetical order to start of next line having a mark
'[
Jump by alphabetical order to start of prev line having a mark
m/
Open location list and display marks from current buffer`
m[0-9]
Toggle the corresponding marker !@#$%^&*()
m<S-[0-9]>
Remove all markers of the same type
]-
Jump to next line having a marker of the same type
[-
Jump to prev line having a marker of the same type
]=
Jump to next line having a marker of any type
[=
Jump to prev line having a marker of any type
m?
Open location list and display markers from current buffer
m<BS>
Remove all markers
normal mode
<leader>c space
NERDComToggleComment<leader>cs
NERDComSexyComment<leader>cm
NERDComMinimalComment<leader>cc
NERDCommenterComment<leader>cn
NERDCommenterNested<leader>cu
NERDComUncommentLinecommand mode
:ls
list buffers:ls!
list buffers including hidden:b6
goto buffer 6
:b [TAB]
goto buffer by name with auto-completion:b#
goto alternate buffer:bd
delete current buffer:bd 6
delete buffer 6
:bd 6 23
delete buffers 6
and 23
:bd [TAB]
delete buffer by name can do multiple:22,27bd
delete a range of buffers:%bd
delete entire range all buffers:bd!
adding a bang will delete the buffer even if changed!:bf
goto the first buffer in the list:bn
goto the next buffer in the list:bp
goto the previous buffer in the list:bm
goto the next modified buffer in the list:bl
goto the last buffer in the list:sb 6
split window and goto buffer 6
s
:sbn
split window and goto next buffer works with many abovecommand mode
:sp
split window:vsp
vertical split window:sp [TAB]
split window and open a file with auto-completion:vsp [TAB]
vertical split window and open a filenormal mode
CTRL-wx
exchange windowsCTRL-wv
split window verticallyCTRL-wc
close the focused windowCTRL-wo
make the focused window the only windowCTRL-wp
focus on previous windowCTRL-w CTRL-w
cycle round windowsCTRL-w[hjkl]
focus on different windowsCTRL-w[HRJL]
move window position3<CTRL>wj
insert mode
CTRL-w
delete previous workCTRL-t
shift line rightCTRL-d
shift line leftcompletions
CTRL-n
next completionCTRL-p
previous completionCTRL-e
abort completionCTRL-y
stop completion and accept the currently selected entryCTRL-X enters insert_expand mode
CTRL-x CTRL-e
scroll window one line upCTRL-x CTRL-y
scroll window one line downcompletions
CTRL-x CTRL-l
complete lineCTRL-x CTRL-n
search forwards for keywordCTRL-x CTRL-p
search backwards for keywordCTRL-x CTRL-]
search for tagCTRL-x CTRL-v
search for Vim commandsCTRL-x CTRL-s
spelling for word before cursorcommand mode
:mks [FILENAME]
save session to file:mks! [FILENAME]
save session to existing file:source [FILENAME]
reload sessioninsert mode
trigger then [TAB]
to expand the snippetCRTL-j
to move forward through placeholdersCRTL-k
to move backward through placeholdersCRTL-[TAB]
list snippetsnormal mode
<Leader><Leader>f{char}
Find {char} to the right.<Leader><Leader>F{char}
Find {char} to the left.<Leader><Leader>t{char}
Till before the {char} to the right.<Leader><Leader>T{char}
Till after the {char} to the left.<leader><leader>w
beginning of word forward<leader><leader>W
beginning of WORD forward<leader><leader>b
beginning of word backward<leader><leader>B
beginning of WORD backward<leader><leader>e
end of word forward<leader><leader>E
end of WORD forward<leader><leader>ge
end of word backward<leader><leader>gE
end of WORD backward<leader><leader>j
line downward<leader><leader>k
line upwardall modes
<C-e><C-e>
expand codingzf#j
creates a fold from the cursor down # lines.zf/string
creates a fold from the cursor to string.zj
moves the cursor to the next fold.zk
moves the cursor to the previous fold.zo
opens a fold at the cursor.zO
opens all folds at the cursor.zm
increases the foldlevel by one.zM
closes all open folds.zr
decreases the foldlevel by one.zR
decreases the foldlevel to zero – all folds will be open.zd
deletes the fold at the cursor.zE
deletes all folds.[z
move to start of open fold.]z
move to end of open fold.div>ul>ul
sudo synclient touchpadoff=1