diff options
author | xero <x@xero.nu> | 2015-04-18 15:02:42 -0400 |
---|---|---|
committer | xero <x@xero.nu> | 2015-04-18 15:02:42 -0400 |
commit | 3dc5acb49ddba5f99b35ff88274f14a3b35258fe (patch) | |
tree | e81bdd9d61399d778694f6f40977cd8b160be6dc /vim/.vim | |
parent | 59e0897bf3f32fcf1ef164df9c62e7efd644caf0 (diff) | |
download | dotfiles_ascii-3dc5acb49ddba5f99b35ff88274f14a3b35258fe.tar.xz dotfiles_ascii-3dc5acb49ddba5f99b35ff88274f14a3b35258fe.zip |
add some lazy vim settings
Diffstat (limited to '')
-rw-r--r-- | vim/.vimrc | 55 |
1 files changed, 44 insertions, 11 deletions
@@ -30,6 +30,16 @@ set noswapfile set wildmode=longest,list,full set wildmenu +" case insensitive search +set ignorecase +set smartcase + +" the /g flag on :s substitutions by default +set gdefault + +" show matching brackets/parenthesis +set showmatch + " make backspace behave in a sane manner set backspace=indent,eol,start @@ -57,7 +67,28 @@ set incsearch " no folding set foldlevel=99 set foldminlines=99 - + +" wrap long lines +set nowrap + +" use indents of 4 spaces +set shiftwidth=4 + +" tabs are spaces, not tabs +set expandtab + +" an indentation every four columns +set tabstop=4 + +" let backspace delete indent +set softtabstop=4 + +" remove trailing whitespaces and ^M chars +autocmd FileType c,cpp,java,php,js,python,twig,xml,yml autocmd BufWritePre <buffer> :call setline(1,map(getline(1,"$"),'substitute(v:val,"\\s\\+$","","")')) + +" make ; work like : for commands. lazy shifting +nnoremap ; : + " enable file type detection and do language-dependent indenting if has("autocmd") filetype on @@ -71,7 +102,10 @@ nnoremap <silent> <leader>y V:w !xsel -i -b<CR> nnoremap <silent> <leader>p :silent :r !xsel -o -b<CR> " remap code completion to ^space -inoremap <Nul> <C-x><C-o> +"inoremap <Nul> <C-x><C-o> +" inoremap <Nul> <C-n> +inoremap <C-Space> <C-x><C-o> +inoremap <C-@> <C-Space> " █▓▒░ wizard status line set laststatus=2 @@ -89,19 +123,19 @@ function! WizardStatus(mode) if &modified == 1 let statusline.="%#ModColor# »» " else - let statusline.=" " + let statusline.=" " endif if &readonly != '' hi StatColor guifg=#af0000 ctermfg=124 endif - let statusline.="%#StatColor#%F " + let statusline.="%#StatColor#%F " "let branch = system("git branch 2> /dev/null | sed -e '/^[^*]/d'") - let branch = system("git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* //'") - if branch != '' - let statusline .= '%#VoidColor#▓%#GitColor# ' . substitute(branch, '\n', '', 'g') . ' %#VoidColor#▓▒░ ' - else + "let branch = system("git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* //'") + "if branch != '' + " let statusline .= '%#VoidColor#▓%#GitColor# ' . substitute(branch, '\n', '', 'g') . ' %#VoidColor#▓▒░ ' + "else let statusline .= '%#VoidColor#▒░ ' - endif + "endif let statusline .= "%=%h%w\ %#TypeColor#▓" if &filetype != '' let statusline .="▒ %Y " @@ -124,8 +158,7 @@ function! Colorize(mode) else hi StatColor guibg=#af0000 guifg=#222222 ctermbg=124 ctermfg=235 endif -endfunction +endfunction au InsertEnter * call Colorize(v:insertmode) au InsertLeave * hi StatColor guibg=#3a3a3a guifg=#ffffff ctermbg=237 ctermfg=255 - |