published
updated
Goals
- check out all the vim plugins i have saved
- tagbar
- fzf / ctrlP / vim-clap / ag
- linting
- iron.vim
- intermediate vim
- buffers/tabs/sessions
- folds
- make / build integration
- indentation with
=
- how to exit paste mode
- how to utilize macros better
- compile a vim cheat sheet
- learn advanced vim tricks
- complete vimtutor to the end
- learn some vimscript
- contribute to taskwiki
== .vimrc Configuration ==
set path+=**
When using:find
like commands, search all subdirectories recursivelyset wildmenu
Display all matching files when tab-completing
=### Commands = Folding:
zf
create foldzo
open foldzc
close foldza
toggle foldzd
delete foldzO
open all foldszM
close all folds Alternatively use therange
command like so::20,101 fold
Folding method is defined through the foldmethod
option
foldmethod
can be one of:
- manual - the above commands will all require a motion if set to this
- indent - fold based on indent
- syntax
- marker - set a marker with
{{{ }}}
- expr
Viewport:
H
topM
middleL
bottomzz
center viewport on cursor
Scroll:
ctrl+e
down one linectrl+y
up one linectrl+d
half page downctrl+u
half page upctrl+f
foward one pagectrl+b
back one page
Find:
f{character}
find chart{character}
to charF{character}
back find charT{character}
back to char , / ; for navigating matches
Change:
c{motion}
change {motion} e.g. cw is change word like d{motion} followed by i
Marks:
`m
exact position to mark'm
go to mark:marks
list marks
Spelling:
:set spell
activate spelling]s
Jump to next mistake[s
Jump to previous mistakez=
Spelling suggestions:ab
abbreviationzg
Adds word to regular dictionaryzG
Adds word to the current session dictionary
Modifiers: You can use modifiers to change the meaning of a noun. Some modifiers are i, which means “inner” or “inside”, and a, which means “around”.
ci(
change the contents inside the current pair of parenthesesci[
change the contents inside the current pair of square bracketsda'
delete a single-quoted string, including the surrounding single quotes
Substitue: :s
or :%s/<find-regex>/<replace-regex>
Macro pause: if you started recording macro with qa
and need to pause, stop the recording with q
and then resume with qA
Misc:
~
flips the case of a character)
Takes you to the start of the next sentence(
Takes you to the start of the previous sentence}
Takes you to the start of the next paragraph or block of text{
Takes you to the start of the previous paragraph or block of text<a href='
Jump to function start[{
Jump to block startCtrl+A
,Ctrl+X
Increment, or decrement the first number found after the cursor.:undolist
Show the undo tree:set nopaste
disable pastemode
=### external =
bindkey -v
to set vim commands in terminal (zsh only)
export EDITOR=vim
echo "set editing-mode vi" > ~/.inputrc
for GNU Readline basic vim emulation
=### tutorials =
- https://danielmiessler.com/study/vim/
- https://catswhocode.com/vim-commands/
- https://www.freecodecamp.org/news/learn-linux-vim-basic-features-19134461ab85/#9b6b
- https://www.keycdn.com/blog/vim-commands
- https://catswhocode.com/vim-commands/
- https://stevelosh.com/blog/2010/09/coming-home-to-vim/
=### talks =
=### books = https://www.vimfromscratch.com/book
Backlinks
- [[kendrit.html' >kendrit</a>