Home

Mon, Feb. 25th, 2008, 12:10 pm
vim in binary mode

When running self-extracting shell scripts (usually with a tar/tgz file embedded or something similar), and you have to change something in the script, switch vi to no end of line, and binary mode:
set binary
set noeol

Wed, Aug. 29th, 2007, 09:00 pm
Using Spaces Instead of TAB in Vi

Autoindent based on syntax, tabstop to 4 spaces instead of 8 (default), and use spaces instead of the TAB character (TAB is default).

To make permanent, edit ~/.vimrc and put this in it:
set autoindent
set tabstop=4
set expandtab


Then ":retab" to reformat a file with the new settings. http://www.vim.org/tips/tip.php?tip_id=12