vim/.vim/commands.vim " ██ " ░░ " ██ ██ ██ ██████████ ██████ █████ " ░██ ░██░██░░██░░██░░██░░██░░█ ██░░░██ " ░░██ ░██ ░██ ░██ ░██ ░██ ░██ ░ ░██ ░░ " ░░████ ░██ ░██ ░██ ░██ ░██ ░██ ██ " ░░██ ░██ ███ ░██ ░██░███ ░░█████ " ░░ ░░ ░░░ ░░ ░░ ░░░ ░░░░░ " " ▓▓▓▓▓▓▓▓▓▓ " ░▓ author ▓ xero <x@xero.nu> " ░▓ code ▓ http://code.xero.nu/dotfiles " ░▓ mirror ▓ http://git.io/.files " ░▓▓▓▓▓▓▓▓▓▓ " ░░░░░░░░░░ " " json pretty print function! JSONify() %!python -mjson.tool set syntax=json endfunction command J :call JSONify() function! UnMinify() %s/{\ze[^\r\n]/{\r/g %s/){/) {/g %s/};\?\ze[^\r\n]/{{&blob}}\r/g %s/;\ze[^\r\n]/;\r/g %s/[^\s]\zs[=&|]\+\ze[^\s]/ {{&blob}} /g normal ggVG= endfunction command UnMinify :call UnMinify() " remove trailing white space command Nows :%s/\s\+$// " remove blank lines command Nobl :g/^\s*$/d " toggle spellcheck command Spell :setlocal spell! spell? " make current buffer executable command Chmodx :!chmod a+x % " fix syntax highlighting command FixSyntax :syntax sync fromstart " let's make some textmode art! function! AsciiMode() e ++enc=cp850 set nu! set virtualedit=all set colorcolumn=80 endfunction command Ascii :call AsciiMode()