From 00cc79588b09872e703c1a572822de0c59a13a74 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Wed, 16 Oct 2013 12:53:44 +0200 Subject: [PATCH] tabbing options --- vimrc | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/vimrc b/vimrc index 13d2097..7269ee3 100644 --- a/vimrc +++ b/vimrc @@ -22,6 +22,21 @@ set wrap " wrap lines set linebreak " do not wrap in the middle of a word set showbreak=▒▒ " show these chars for wrapped lines +" indent {{{1 +set expandtab " expand to spaces in Insert mode +set smarttab " a in an indent inserts 'shiftwidth' spaces +set softtabstop=4 " if non-zero, number of spaces to insert for a +set shiftwidth=4 " number of spaces used for each step of (auto)indent +set shiftround " round to 'shiftwidth' for "<<" and ">>" + +set cindent " use smart C indenting (see :h C-indenting) +set cinoptions=l1,c4,(0,U1,w1,m1,j1,J1 + +:nmap b :set expandtab tabstop=4 shiftwidth=4 softtabstop=4 +:nmap B :set expandtab tabstop=8 shiftwidth=8 softtabstop=4 +:nmap M :set noexpandtab tabstop=8 softtabstop=4 shiftwidth=4 +:nmap m :set expandtab tabstop=2 shiftwidth=2 softtabstop=2 + " backup/undo {{{1 set backup " keep a backup file set backupdir=$HOME/.vim/backupdir @@ -42,12 +57,6 @@ autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTree " airline {{{1 let g:airline#extensions#tabline#enabled = 1 -" tabbing {{{1 -:nmap b :set expandtab tabstop=4 shiftwidth=4 softtabstop=4 -:nmap B :set expandtab tabstop=8 shiftwidth=8 softtabstop=4 -:nmap M :set noexpandtab tabstop=8 softtabstop=4 shiftwidth=4 -:nmap m :set expandtab tabstop=2 shiftwidth=2 softtabstop=2 - " appearance {{{1 set background=dark " Dark background, d'uh! set number " show some linenumbers @@ -66,10 +75,6 @@ set scrolloff=5 " keep at least n lines above/below set viminfo='100,<50,s10,h,n~/.vim/viminfo " viminfo defaults but save file in .vim -" tabs {{{1 -set softtabstop=4 -set shiftwidth=4 -set expandtab " misc bindings {{{1 " Don't use Ex mode, use Q for formatting -- 2.48.1