aking vim nicer

This commit is contained in:
Frank Villaro-Dixon 2013-09-04 23:27:49 +02:00
parent ba96bcf3e3
commit a80a56c803

View file

@ -1,17 +1,11 @@
" Ma conf vim - Frank " Ma conf vim - Frank
"set grepprg=grep\ -nH\ $*
"let g:tex_flavor = "latex"
"execute pathogen#infect() "execute pathogen#infect()
map <Tab> <C-w>w
map <S-Tab> <C-w>W
syntax on syntax on
"set spelllang=en,fr "set spelllang=en,fr
set spell "set spell
"set nocompatible "fuck you !. impossible de backspace, sinon "set nocompatible "fuck you !. impossible de backspace, sinon
set backspace=indent,eol,start set backspace=indent,eol,start
@ -29,11 +23,9 @@ set ignorecase
set foldmethod=marker set foldmethod=marker
"set cul "souligner la ligne actuelle set cul "souligner la ligne actuelle
color desert color desert
"colorscheme wombat256modv1
"color darkblue
set cursorline set cursorline
hi CursorLine term=bold cterm=bold guibg=Grey40 hi CursorLine term=bold cterm=bold guibg=Grey40
@ -41,14 +33,14 @@ hi CursorLine term=bold cterm=bold guibg=Grey40
set showcmd "on affiche la commande qu'on écrit set showcmd "on affiche la commande qu'on écrit
set laststatus=2 set laststatus=2
set statusline= set statusline=
set statusline +=%5*%{&ff}%* "file format set statusline +=%5*%{&ff}%* "file format
set statusline +=%3*%y%* "file type set statusline +=%3*%y%* "file type
set statusline +=%4*\ %<%F%* "full path set statusline +=%4*\ %<%F%* "full path
set statusline +=%2*%m%* "modified flag set statusline +=%2*%m%* "modified flag
set statusline +=%1*%=%5l%* "current line set statusline +=%1*%=%5l%* "current line
set statusline +=%2*/%L%* "total lines set statusline +=%2*/%L%* "total lines
set statusline +=%1*%4v\ %* "virtual column number set statusline +=%1*%4v\ %* "virtual column number
set statusline +=%2*0x%04B\ %* "character under cursor set statusline +=%2*0x%04B\ %* "character under cursor
hi User1 guifg=#eea040 guibg=#222222 hi User1 guifg=#eea040 guibg=#222222
hi User2 guifg=#dd3333 guibg=#222222 hi User2 guifg=#dd3333 guibg=#222222
@ -73,6 +65,11 @@ noremap <S-Space> <Esc>
noremap j gj noremap j gj
noremap k gk noremap k gk
cmap Q q
command W w
map <Tab> <C-w>w
map <S-Tab> <C-w>W
"inoremap { {}<Left> "inoremap { {}<Left>
"inoremap {<CR> {<CR>}<Esc>O "inoremap {<CR> {<CR>}<Esc>O
"inoremap {{ { "inoremap {{ {
@ -80,25 +77,18 @@ noremap k gk
"inoremap /*<Space> /*<Space><Space>*/<Left><Left><Left> "inoremap /*<Space> /*<Space><Space>*/<Left><Left><Left>
"inoremap /*<CR> /*<CR> */<Esc>O "inoremap /*<CR> /*<CR> */<Esc>O
"inoremap // // "inoremap // //
"ab #d #define
"ab #i #include
"inoremap #d #define<space>
"inoremap #in #include <.h><left><left><left>
"inoremap #i" #include ".h"<left><left><left>
"inoremap #i< #include <.h><left><left><left>
"inoremap #ifn #ifndef<space>
cmap Q q
command W w
set list set list
"set listchars=tab:▸\ "set listchars=tab:▸\ ,eol:¬
set listchars=tab:▸\ ,eol "set listchars=tab:>-,trail:.,eol:¬
"set listchars=tab:▸-,trail:.,eol:¬
"inoremap jj <ESC> set listchars=tab:\|\ "Cool for ifs/whiles
"inoremap syso System.out.println set listchars+=trail"For eol with spaces
"Deux j en mode insert -> normal set listchars+=eol:↲ "To show eol;not very useful with trail, but cool anyway :p
set listchars+=nbsp:⍽ "For unbreakeable spaces
set history=500 set history=500
set undolevels=500 set undolevels=500
@ -107,21 +97,16 @@ set title "titre du terminal
set autoindent set autoindent
set smartindent set smartindent
autocmd CursorMoved * exe printf('match IncSearch /\V\<%s\>/', escape(expand('<cword>'), '/\'))
"match ErrorMsg '\%>80v.\+' "highlight identic words
"syntax match Search /\%<81v.\%>77v/ autocmd CursorMoved *
\ exe printf('match IncSearch /\V\<%s\>/', escape(expand('<cword>'), '/\'))
"Highlight in red lines longer than 80 chars
"""autocmd BufWinEnter * call matchadd('ErrorMsg', '\%>80v.\+', -1)
set cc=80
hi ColorColumn ctermbg=lightblue guibg=lightgrey
autocmd BufWinEnter * call matchadd('ErrorMsg', '\%>80v.\+', -1)
"highlight OverLength ctermbg=red ctermfg=white guibg=#592929
"match OverLength /\%81v.\+/
"set cc=80
"execute "set colorcolumn=" . join(range(81,335), ',')
"highlight ColorColumn guibg=#000000
"highlight ColorColumn ctermbg=blue
"MAKEFILES "MAKEFILES
@ -157,8 +142,9 @@ nnoremap § <esc>/<+.\{-1,}+><return>c/+>/e<return>
inoremap § <esc>/<+.\{-1,}+><return>c/+>/e<return> inoremap § <esc>/<+.\{-1,}+><return>c/+>/e<return>
"Automatic line wrap/br when writing mails in mutt
au BufRead /dev/shm/mutt-* set tw=80 au BufRead /dev/shm/mutt-* set tw=80
"Automatic documentation
autocmd BufNewFile,BufRead *.py set keywordprg=pydoc autocmd BufNewFile,BufRead *.py set keywordprg=pydoc
autocmd BufNewFile,BufRead *.php set keywordprg=~/.vim/scripts/doc.php.sh autocmd BufNewFile,BufRead *.php set keywordprg=~/.vim/scripts/doc.php.sh