–version command -use it to find url for vimrc and other vim config files
:version

–map timestamp to function key
–format: 11/10/2011 10:46:31 AM
:inoremap =strftime(“%c”)

–sort
—ascending
:%sort

—descending
:%sort!

—remove duplicates
:%sort --u

–for encoding in different formats
–use below for UTF-8 and Latin1 (allows use of both – will automatically encode using Latin1 if no UTF-8 characters are present)
–allows VIM to display chinese characters
set encoding=utf-8 fileencodings=utf-8,latin1
set guifont=Courier_New:h12
set guifontwide=NSimsun:h12

–for scripting (link on stack overflow: http://stackoverflow.com/questions/2153892/good-guide-on-vim-scripting)
–at command line use the following convention to point to your vim script

source /path/to/vim/file/scriptName.vim
–note if you put your code into a function you would need to issue the next command
call call FunctionName()

–cool way to execute scripts
write script in a vim window
ggyG -grabs script into buffer (alternatively use :%y”)
:@” -executes script from buffer

–use to format XML
-type the below (note file extention should be .xml)
gg=G

-need these 2 lines added to _vimrc in order for this command to work
set equalprg=xmllint\ --format\ --recover\ -\ 2>/dev/null
au FileType xml setlocal equalprg=xmllint\ --format\ --recover\ -\ 2>/dev/null