1
0
Fork 0
mirror of synced 2024-12-24 07:43:20 -05:00

better tabs

This commit is contained in:
Mirosław Pragłowski 2015-02-13 23:52:00 +01:00
parent 2538b10b99
commit 84a0374b6d

View file

@ -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 <leader>w :w!<cr>
" :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 <leader>ba :1,1000 bd!<cr>
map <leader>tn :tabnew<cr>
map <leader>to :tabonly<cr>
map <leader>tc :tabclose<cr>
map <leader>tm :tabmove
map <leader>t<leader> :tabnext
map <leader>tm :tabmove
map <leader>t<leader> :tabnext
" Let 'tl' toggle between this and the last accessed tab
let g:lasttab = 1
@ -249,7 +250,7 @@ map <leader>te :tabedit <c-r>=expand("%:p:h")<cr>/
" Switch CWD to the directory of the open buffer
map <leader>cd :cd %:p:h<cr>:pwd<cr>
" 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 <silent> gv :call VisualSelection('gv', '')<CR>
" Open Ack and put the cursor in the right position
map <leader>g :Ack
map <leader>g :Ack
" When you press <leader>r you can search and replace the selected text
vnoremap <silent> <leader>r :call VisualSelection('replace', '')<CR>
@ -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 = @"