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:findlike commands, search all subdirectories recursivelyset wildmenuDisplay all matching files when tab-completing
=### Commands = Folding:
zfcreate foldzoopen foldzcclose foldzatoggle foldzddelete foldzOopen all foldszMclose all folds Alternatively use therangecommand 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:
HtopMmiddleLbottomzzcenter viewport on cursor
Scroll:
ctrl+edown one linectrl+yup one linectrl+dhalf page downctrl+uhalf page upctrl+ffoward one pagectrl+bback 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:
`mexact position to mark'mgo to mark:markslist marks
Spelling:
:set spellactivate spelling]sJump to next mistake[sJump to previous mistakez=Spelling suggestions:ababbreviationzgAdds word to regular dictionaryzGAdds 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+XIncrement, or decrement the first number found after the cursor.:undolistShow the undo tree:set nopastedisable 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>