mootools php faith camera linux

linux

VIM toggle indent



This is a short function to include in the .vimrc that will allow indenting to be toggled on and off.


toggle tab completion
function! ToggleIndent()
     if 
g:indent_on == 1
         
:set nocindent noai
         let g
:indent_on 0
         
echo "autoindent off"
     
else
         :
set cindent ai
         let g
:indent_on 1
         
echo "autoindent on"
     
endif
endfunction

let g
:indent_on 1


The function could easily be re-written to toggle most anything on and off in vim.

Last Updated: 2009-02-07 20:40:50
Creative Commons License Jay Johnston is a Zend Certified Engineer in PHP 5 LPI-ID: LPI000102450, Verfication Code: wmnnt56y2k  ... Jay Johnston is certified as LPIC-1 by the Linux Professional Institute