From: eaman Date: Mon, 1 Jun 2009 14:13:08 +0000 (+0000) Subject: added vim folding X-Git-Url: http://git.piffa.net/web?p=doc%2F.git;a=commitdiff_plain;h=9e45c6d6e732e4a8005266c81c4e8b1978c4db64 added vim folding --- diff --git a/source/servizi.txt b/source/servizi.txt index 3ebc2b7..409ebed 100644 --- a/source/servizi.txt +++ b/source/servizi.txt @@ -150,7 +150,7 @@ Assicurarsi che sia installata nel sistema la versione completa dell'editor ``vi 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 @@ -163,14 +163,22 @@ Assicurarsi che sia installata nel sistema la versione completa dell'editor ``vi " 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