syntax on
" If using a dark background within the editing area and syntax highlighting
- " turn on this option as well
+ " turn on this option as well.
set background=dark
" Uncomment the following to have Vim jump to the last position when
" Uncomment the following to have Vim load indentation rules and plugins
" according to the detected filetype.
+ " This is not recommanded if you often copy and paste into vim,
+ " as it messes all the indentation.
if has("autocmd")
filetype plugin indent on
endif
+
+ " This goes for comments folding: use co to expnad and zc to compress,
+ " zi to toggle on/off
+ set fdm=expr
+ set fde=getline(v:lnum)=~'^\\s*#'?1:getline(prevnonblank(v:lnum))=~'^\\s*#'?1:getline(nextnonblank(v:lnum))=~'^\\s*#'?1:0
" The following are commented out as they cause vim to behave a lot
" differently from regular Vi. They are highly recommended though.
set showcmd " Show (partial) command in status line.
"set showmatch " Show matching brackets.
+ # Ignorecase is quite userfull
set ignorecase " Do case insensitive matching
"set smartcase " Do smart case matching
"set incsearch " Incremental search