# vim¶

there's a bunch of vim tutorials on youtube you should check out

here's a quick one, i'll redo this later, maybe short vids on individual features

vim is the single most important software I learned to use, it is a big time saver which makes it easy to document as you are working

often the main bottleneck in software projects is no or bad docs, particularly if you're working on something someone else built, but even on your own most people come back to their own projects and can't answer simple questions about them

vim is the best text editor because it was invented before the mouse, using a mouse to edit plain text adds a bottleneck, it is actually slow and distracting, chances are you will not believe that, until you learn to use the vim keyboard shortcuts and then it will become obvious and quite ridiculous

takes some effort up front but in the end makes things effortless, you can do it, like richard feynman said, "what one fool can do, another can..."

vim keybindings are so good all modern editors have a vim plugin, browsers have them, websites use them, and the command line has a vim mode so you're time invested can be reused in other areas

## charts¶

https://stackoverflow.com/questions/1497958/how-do-i-use-vim-registers

## custom bindings¶

@l - this is for wrapping links in <> in markdown

let @l='I<A>o'


gf will jump to a file if it exists

add this custom mapping to your .vimrc to map leader gf to create the filename under the cursor if it does not exist

:map <leader>gf :e <cfile><cr>


you were a dope, you opened two copies of the same file, now you can't save without over writing the other...

:w anotherfilename.md


replace end of line with , (using for m5stack zen app)

https://stackoverflow.com/questions/53546610/how-to-replace-line-end-with-a-comma-in-vim

%s/\n/,/|s/,\$//


## plugins¶

i try not to depend on plugins that much, you can achieve most things with just dotfiles but here's some i use

• fugitive
• goyo & vim
• ctrl p
• airline