]> git.rmz.io Git - dotfiles.git/commitdiff
use level folds
authorSamir Benmendil <samir.benmendil@gmail.com>
Wed, 16 Oct 2013 06:37:56 +0000 (08:37 +0200)
committerSamir Benmendil <samir.benmendil@gmail.com>
Wed, 16 Oct 2013 06:37:56 +0000 (08:37 +0200)
looks a bit cleaner to me

vimrc

diff --git a/vimrc b/vimrc
index 5ed5e5bc48f306e0048ba6a5e50ca5957f6876c1..55906d8426a671f054d5379dd11d25c07311af56 100644 (file)
--- a/vimrc
+++ b/vimrc
@@ -14,15 +14,14 @@ set nocompatible
 " pathogen.vim runtime path manipulation
 silent! call pathogen#infect()
 
-" search {{{
+" search {{{1
 set incsearch
 set ignorecase
 set smartcase
 set hlsearch
 nmap <Leader>q :nohl<CR>
-" }}}
 
-" NERDTree {{{
+" NERDTree {{{1
 " open/close NERDTree with \e
 nmap <Leader>e :NERDTreeToggle<CR>
 " <space> to open files/dirs
@@ -31,37 +30,32 @@ let NERDTreeMapActivateNode='<space>'
 autocmd vimenter * if !argc() | NERDTree | endif
 " close vim if only NERDTree is open
 autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
-" }}}
 
-" airline {{{
+" airline {{{1
 let g:airline#extensions#tabline#enabled = 1
-" }}}
 
-" tabbing {{{
+" tabbing {{{1
 :nmap <Leader>b :set expandtab tabstop=4 shiftwidth=4 softtabstop=4<CR>
 :nmap <Leader>B :set expandtab tabstop=8 shiftwidth=8 softtabstop=4<CR>
 :nmap <Leader>M :set noexpandtab tabstop=8 softtabstop=4 shiftwidth=4<CR>
 :nmap <Leader>m :set expandtab tabstop=2 shiftwidth=2 softtabstop=2<CR>
-" }}}
 
-" backup {{{
+" backup {{{1
 if has("vms")
   set nobackup          " do not keep a backup file, use versions instead
 else
   set backup            " keep a backup file
   set backupdir=$HOME/.vim/backupdir
 endif
-" }}}
 
-" appearance {{{
+" appearance {{{1
 set background=dark            " Dark background, d'uh!
 set number                     " show some linenumbers
 set showmatch                  " Show matching brackets.
 set showbreak=▒▒                  " show these chars for wrapped lines
 set list listchars=tab:»·,trail:· " show these chars for tabs and trailing spaces
-" }}}
 
-" misc options {{{
+" misc options {{{1
 set history=500                " keep 500 lines of command line history
 set ruler                      " show the cursor position all the time
 set confirm                    " Ask what to do when closing unsaved documents
@@ -73,15 +67,13 @@ set scrolloff=5                " keep at least n lines above/below
 set backspace=indent,eol,start " allow backspacing over everything in insert mode
 
 set viminfo='100,<50,s10,h,n~/.vim/viminfo " viminfo defaults but save file in .vim
-" }}}
 
-" tabs {{{
+" tabs {{{1
 set softtabstop=4
 set shiftwidth=4
 set expandtab
-" }}}
 
-" misc bindings {{{
+" misc bindings {{{1
 " Don't use Ex mode, use Q for formatting
 map Q gq
 
@@ -91,16 +83,14 @@ inoremap <C-U> <C-G>u<C-U>
 
 " Press `` to toggle insert and replace mode (no <Insert> key on Mac keyboard)
 imap `` <Insert>
-" }}}
 
-" paste toggle {{{
+" paste toggle {{{1
 nmap <F11> :set paste! paste?<CR>
 imap <F11> <C-o>:set paste!<CR>
 vmap <F11> <Esc>:set paste!<CR>gv
 set pastetoggle=<F11>
-" }}}
 
-" mouse {{{
+" mouse {{{1
 " In many terminal emulators the mouse works just fine, thus enable it.
 if has('mouse')
   "xterm mouse with middleclick paste
@@ -111,17 +101,15 @@ if has('mouse')
   set ttymouse=xterm
   "set ttymouse=xterm2
 endif
-" }}}
 
-" syntax {{{
+" syntax {{{1
 " Switch syntax highlighting on, when the terminal has colors
 " Also switch on highlighting the last used search pattern.
 if &t_Co > 2 || has("gui_running")
   syntax on
 endif
-" }}}
 
-" autocmd {{{
+" autocmd {{{1
 " Only do this part when compiled with support for autocommands.
 if has("autocmd")
   " Enable file type detection.
@@ -152,9 +140,9 @@ if has("autocmd")
   augroup END
 else
   set autoindent                " always set autoindenting on
-endif " has("autocmd") }}}
+endif " has("autocmd")
 
-" DiffOrig {{{
+" DiffOrig {{{1
 " Convenient command to see the difference between the current buffer and the
 " file it was loaded from, thus the changes you made.
 " Only define it when not defined already.
@@ -162,9 +150,8 @@ if !exists(":DiffOrig")
   command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis
                   \ | wincmd p | diffthis
 endif
-" }}}
 
-" fold {{{
+" fold {{{1
 set foldmethod=marker
 set foldlevelstart=99
 " space will toggle current fold in normal mode, if not in a fold, normal
@@ -174,9 +161,8 @@ vnoremap <Space> zf
 " save and restore folds
 autocmd BufWinLeave *.* mkview
 autocmd BufWinEnter *.* silent loadview
-" }}}
 
-function! NextIndent(exclusive, fwd, lowerlevel, skipblanks) " {{{
+function! NextIndent(exclusive, fwd, lowerlevel, skipblanks) " {{{1
 " Jump to the next or previous line that has the same level or a lower
 " level of indentation than the current line.
 "
@@ -222,4 +208,4 @@ onoremap <silent> [l :call NextIndent(0, 0, 0, 1)<CR>
 onoremap <silent> ]l :call NextIndent(0, 1, 0, 1)<CR>
 onoremap <silent> [L :call NextIndent(1, 0, 1, 1)<CR>
 onoremap <silent> ]L :call NextIndent(1, 1, 1, 1)<CR>
-" end of jump indent }}}
+" end of jump indent