From 84a0374b6d9de632403bccd244cb005380500de9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miros=C5=82aw=20Prag=C5=82owski?= Date: Fri, 13 Feb 2015 23:52:00 +0100 Subject: [PATCH] better tabs --- vimrcs/basic.vim | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/vimrcs/basic.vim b/vimrcs/basic.vim index 1948f3e2..337d147a 100644 --- a/vimrcs/basic.vim +++ b/vimrcs/basic.vim @@ -1,12 +1,12 @@ """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" Maintainer: +" Maintainer: " Amir Salihefendic " http://amix.dk - amix@amix.dk " -" Version: +" Version: " 5.0 - 29/05/12 15:43:36 " -" Blog_post: +" Blog_post: " http://amix.dk/blog/post/19691#The-ultimate-Vim-configuration-on-Github " " Awesome_version: @@ -19,7 +19,7 @@ " Syntax_highlighted: " http://amix.dk/vim/vimrc.html " -" Raw_version: +" Raw_version: " http://amix.dk/vim/vimrc.txt " " Sections: @@ -61,7 +61,7 @@ let g:mapleader = "," " Fast saving nmap w :w! -" :W sudo saves the file +" :W sudo saves the file " (useful for handling the permission-denied error) command W w !sudo tee % > /dev/null @@ -73,7 +73,7 @@ command W w !sudo tee % > /dev/null set so=7 " Avoid garbled characters in Chinese language windows OS -let $LANG='en' +let $LANG='en' set langmenu=en source $VIMRUNTIME/delmenu.vim source $VIMRUNTIME/menu.vim @@ -105,23 +105,23 @@ set whichwrap+=<,>,h,l " Ignore case when searching set ignorecase -" When searching try to be smart about cases +" When searching try to be smart about cases set smartcase " Highlight search results set hlsearch " Makes search act like search in modern browsers -set incsearch +set incsearch " Don't redraw while executing macros (good performance config) -set lazyredraw +set lazyredraw " For regular expressions turn magic on set magic " Show matching brackets when text indicator is over them -set showmatch +set showmatch " How many tenths of a second to blink when matching brackets set mat=2 @@ -139,7 +139,7 @@ set foldcolumn=1 " => Colors and Fonts """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Enable syntax highlighting -syntax enable +syntax enable try colorscheme desert @@ -182,8 +182,9 @@ set expandtab set smarttab " 1 tab == 2 spaces -set shiftwidth=2 set tabstop=2 +set shiftwidth=2 +set softtabstop=2 " Linebreak on 500 characters set lbr @@ -233,8 +234,8 @@ map ba :1,1000 bd! map tn :tabnew map to :tabonly map tc :tabclose -map tm :tabmove -map t :tabnext +map tm :tabmove +map t :tabnext " Let 'tl' toggle between this and the last accessed tab let g:lasttab = 1 @@ -249,7 +250,7 @@ map te :tabedit =expand("%:p:h")/ " Switch CWD to the directory of the open buffer map cd :cd %:p:h:pwd -" Specify the behavior when switching between buffers +" Specify the behavior when switching between buffers try set switchbuf=useopen,usetab,newtab set stal=2 @@ -312,7 +313,7 @@ autocmd BufWrite *.coffee :call DeleteTrailingWS() vnoremap gv :call VisualSelection('gv', '') " Open Ack and put the cursor in the right position -map g :Ack +map g :Ack " When you press r you can search and replace the selected text vnoremap r :call VisualSelection('replace', '') @@ -372,7 +373,7 @@ function! CmdLine(str) exe "menu Foo.Bar :" . a:str emenu Foo.Bar unmenu Foo -endfunction +endfunction function! VisualSelection(direction, extra_filter) range let l:saved_reg = @"