I pick up all kinds of vim tricks and plugins but I can never remember all the shortcuts. I wrote up this quick reference to help myself memorize how to use these tools.
Caveat: some of these keybindings are unique to my .vimrc.
|<leader>f||Find files with rg by filename|
|<leader>*||Search file contents with rg (alt-a to select all). Results go in a QuickFix window.|
|<leader>* -t perl||Same as above but only search perl files|
|<leader><tab>||Search all vim mappings|
|<c-x><c-f>||Complete file names|
QuickFix keybindings: Search and replace across multiple files
|:cdo <cmd>||For each entry run <cmd>|
|:cdo s/<c-r>"//c||Same as above but don't need to retype the search regexp that was used by fzf|
|:cfdo <cmd>||For each file run <cmd>|
Browse the tags (packages, labels, subroutines, etc) of the current file and get an overview of its structure.
List, navigate between, and select buffers to edit.
|<leader>b||Open a window listing all buffers|
Vertically align stuff
|<leader>a<ctrl-p>||Align something in interactive mode|
|<leader>a=||Align around first occurance of =|
|<leader>a2=||Align around 2nd =|
|<leader>a*=||Align around all =|
|<leader>a-=||Align around last =|
|<leader>a<ctrl-x>||Align around a regular expression|
Provides links to the current line/selection on the github website so you easily talk about code with others.
|<leader>t||Get a link to the current line/selection|
Quick access to perldoc
|<leader>pd||perldoc on the package name under cursor|
|<leader>ph||perldoc on the package name under cursor|
|<leader>pf||perldoc on the function name under cursor|
|<leader>pv||perldoc on the special Perl variable under cursor|
Jump to the next/prev Perl method
|]m||Jump to the next Perl subroutine start|
|]M||Jump to the next Perl subroutine end|
|[m||Jump to the previous Perl subroutine start|
|[M||Jump to the previous Perl subroutine end|