q:- command line history
q/- search history
:sort u- sort the file
:set tw=80for soft word wrap, and works with outlines
gUconverts selection to ALL CAPS
guconverts selection to lowercase
gfgoes to file under cursor
:! <command>- run commands in vim
g_goes to last non-blank character
Ppastes before cursor
:letshows all vars
:set linebreakallows for soft line wraps
:set columns=80will limit the maximum number of columns to display to 80. This works nicely with
:set linebreakto create a nice UI for writing text.
:g/=/dwill delete all lines that contain
Ctrl+N/Pprovides autocompletion for words already defined in your file.
:! <command>to run commands from a vim window
:set suffixesadd+=.mdto allow for interpreting
<C-O>goes back to the last file you jumped from
#searches for same word forward and backward
:PluginInstallwill ask for your github password if you define the repo name incorrectly
Would be interesting to explore vim windows instead of tmux panes.
<C-w>fopens file under cursor in new vim window (not tmux window)
<C-w><C-w>switches between vim windows
:vsplitfor splitting windows
<C-w>[hjkl]to navigate between windows. More here
:setlocal spellto turn on spell check in a file
]sto go to next misspelled word
[sto go to previous misspelled word
zgto add word under cursor to
zOopens all folds at cursor
zmcloses all folds
For markdown, add this to your
Within a vim session, your fold settings will be saved for each file, so you can swap back and forth between things.
- https://shapeshed.com/vim-netrw/ has great stuff about
netrwand navigating files
- https://andrew.stwrt.ca/posts/vim-ctags/ ctags seem like they could be cool, should experiment with these more.
- Macros: https://vim.fandom.com/wiki/Macros
Markdown syntax improvements#
- Header highlighting
- Link highlighting
- Allow underscore mid-word
- indent bulleted lists
- Default column width to 60-70
- Don’t support indent-as-code
- Figure out folding
- File-specific usage of
- Possible to use vim in encrypted mode? How could you with .swp functionality?
- Would be cool to keystroke from jira ticket name out to chrome.
- Try out infinite history?
- Try out
Fun regex used to replace anything starting with a plus or hashtag. Uses capture groups. Note the escaped capture group parentheses