===== vi / vim commands ===== follow link ^] Go Back ^t yank to register yy put after p put before P move around k h l j delete x delete word (including space) dw delete to end of line d$ delete word (not space) de delete line dd undo last command u undo delete line U redo ^R goto end ^G shift-G === spell checker === :setlocal spell spelllang=en_us Put map commands in your .vimrc file to associate function keys with turning on and off the spell checking: map :setlocal spell spelllang=en_us map :setlocal nospell === windows encoding === Your file is in little-endian UTF-16. With 'encoding' set to UTF-8, load it using :e ++enc=utf-16le filename If the first two bytes in the file are 0xFF 0xFE (the UTF-16le encoding marker, also known as the BOM for "byte order mark"), then the encoding can be recognised automatically if your 'fileencodings' start with ucs-bom (i.e., with ":set fencs^=ucs-bom"). -- Normally, if your 'encoding' is set to UTF-8, 'fileencodings' should be set to something like "ucs-bom,utf-8,default" (for Vim 7) or "ucs-bom,utf-8,latin1" (for Vim6, replace "latin1" by the 8-bit encoding you use most often). See :help ++opt :help mbyte-encoding :help encoding-values :help 'fileencodings' /"ucs-bom" :help 'bomb' especially the last paragraph :help :set^= HTH, Tony. ===== Convert Windows UTF-16 files to UTF-8 ===== Log files come from Windows in UTF-16. vim can handle it with the above. cat can display it fine, but less and vim prefer UTF-8. iconv -f UTF-16 -t UTF-8 drwtsn32.log |less