I use vim as my editor and have customized it a bunch. Note that <g-j> means
to press g and j simultaneously. I generally run vim from the root of a
project directory.
<ctrl-s>saves the file. If in insert mode, it exits insert mode first. This is basically always how I exit insert mode.
}moves forward to the next blank line. I use this all the time{moves backward to the prev blank line. I use this all the time<g-j> kopens a file from the current directory, allowing you to search usingfzf. With a file selected, press<enter>to open the file in the current window<ctrl-v>to open the file in a new vertical split<ctrl-x>to open the file in a new horizontal split
<g-j> jallows you to select an already open buffer usingfzf. The same shortcuts as above will work.gasearches all files in the currenty directory and displays the results usingfzf. You can select a result to open that in a buffer.<shift-q>quits vimgrreloads the current file<ctrl-n>selects the word under the cursor. Pressing it again also selects the next instance of that word. You can keep pressing to select more instances of that word. Then you can press keys (egs) to work on all these instances at the same time. See vim-multiple-cursors for more info.gw <motion>breaks lines automatically. It's built-in, but I use it all the time.= <motion>automatically fixes indentation. Also built-in, but really useful.gs <motion>sorts lines or words across<motion><g-j> nlets you create a new file in the same directory as the current buffer.<shift-q>closes the current window, quitting vim if it's the only window open.gnclears the current highlighting<shift-8>searches forwards for instances of the word under the cursor<shift-3>searches backwards for instances of the word under the cursor.repeats the last action. I use this all the timeq<key>records a macro. This is great. Look up "vim macros" and learn to use them.
<ctrl-x> <ctrl-f>when your cursor is at the end of a word will allow you to select a file usingfzfto insert at current position in buffer.
<g-j> <space>switches windows
ctags is a really useful tool for navigating files. It tracks all the function and class declarations in all your files, and lets you search for them and jump to them.
gtopens a list of tags infzf.<g-j> ffinds the tag corresponding to the word under your cursor<g-j> ;jumps back to where you were after finding the tag under the cursor<g-j> oopens a sidebar which shows you all the tags in the current file. See tagbar for more info.
<g-j> isorts imports<g-j> aputs function arguments on multiple lines, or back on a single line. This is fantastic. Use it.gbswaps a function argument with the next onegBswaps a function argument with the previous one- The
iimotion applies to the current indent level. See doc
Take a look in dotConfig/nvim/config/maps.vim to find more shortcuts. There
are definitely others I use.