Tutorial on VI at

A ton of good VIM stuff here from Ramesh: ref

Gmail encryption: ref

6.18.16 So I finally broke down and installed brew macvim
it's also here:
I don't know if the difference between the source for these two builds, 
if there is one, but that's for another day.

First, do everything you want to do automatically, manually.

1. Delete everything after a "[" on any line (it must be escaped as \[ to be literal).
   :g/\[/normal nd$ or for a range:  :62,66g/\[/normal nd$ 

2. Same for "("
    :g/(/normal nd$
     only do this on lines 1-7: :1-7/(/normal nd$
3. Insert a "- " at the beginning of lines 10 through 20 - :10,20s/^/- /
4.  1,$s/•//g - delete the dot at the beginning of the line
5.  1,$s/\t//g  - delete the tabs
6. remember to use abbrevlist.vim as a plugin to create insert text

Notes: " \+ " means "one or more of the preceding character."
Notes: " .   " means "any single character".
Notes: " ?  " 0 or 1 of the previous character."
Notes: " *   " 0 or more of the previous character."
Notes: " +  " 1 or more of the previous character."
Notes: " .*  " zero or more of any character".
"^" - at the beginning of a document.
"$" - at the end of a document.

Remember that it seems to work to write to the clipboard w/ :w !pboard (or something like this)
Cursory Flow for VIM app for EMR
- dbl-click - Ubuntu embedded starts
- open citrix / login to EMR
- open new HNP - select [Notes][new HNP alt-N][.mscadm][copy/paste to VIM]
- run script
- [copy/paste data to Epic]
- [sign]
- SOL will allow a hospital like Meadow View to use MAH computers.
- SOL will also allow easy audit of any chart and allow a physician to review his orders
- Ubuntu embedded could also run SNORT to do a quick security audit.
- SOL will consist in part of ICD10 codes

i - Switch to INSERT mode before current position
I - Switch to INSERT mode at the beginning of the current line
a - Switch to INSERT mode after current position (append)
A - Switch to INSERT mode at the end of the current line (Append)
o - Switch to INSERT mode after opening a new line after the current line
O - Switch to INSERT mode after opening a new line before the current line

ZZ - write the file and close the vsplit when editing .vimrc with -ev, then source it with -sv
Difference between %s and g: ref 

SoapXc - start with VIM
- 5l - 5 chars right
- 3J - 3 lines down
- 0 - bol
- $ - eol
- 0 - newline in I mode
- x - del char
- dw - del word
- d2d - del 2 sentences
- :w - save file - vim will not automatically overwrite file
- :w! - overwrite existing file
- :r newfile.txt - insert another file
- y, yy, yw, y$
- d - cut a block
- p - paste a block
- u - undo 
- . - repeat previous action
- c, cw, c3b, c$, c0
- r - single character replace
- /aword - search for aword
- :s/in/on/gcurv000

yy - yank
p - paste
5p - paste 5p - paste 5x
u - undo last action
dd - delete lines
daw - delete the word under the cursor
caw - delete the word under the cursor and put you in insert mode

w b - next word, previous
( ) - next paragraph previous
0 - beginning of line, $ - end of line

J - join all sentences into 1 line

:q - Quit vim
:q! - Quit vim (ignoring unsaved edits)
:w - Save document
:wq - Save document and quit vim

~/.vimrc file (in progress)
:set number - place numbers on the left hand side
:set syntax - syntax highlighting

How to figure out where your conf files for VIM are located:
:echo expand('~')
:echo $HOME
:echo $VIM