148 lines
3.7 KiB
VimL
148 lines
3.7 KiB
VimL
" Ma conf vim - Frank
|
|
|
|
"set grepprg=grep\ -nH\ $*
|
|
"let g:tex_flavor = "latex"
|
|
|
|
syntax on
|
|
|
|
"set nocompatible "fuck you !. impossible de backspace, sinon
|
|
"set backspace=indent,eol,start
|
|
|
|
"set ruler
|
|
set number
|
|
set ts=8 "Un tab, huit espaces
|
|
set noexpandtab "On veut pas remplacer tab -> espace
|
|
"set mouse=a
|
|
set wrap "Une grande ligne continue à la ligne
|
|
|
|
set hlsearch "On souligne les mots cherchés
|
|
set incsearch "recherche peu à peu
|
|
set ignorecase
|
|
|
|
set foldmethod=marker
|
|
|
|
"set cul "souligner la ligne actuelle
|
|
|
|
color desert
|
|
"colorscheme wombat256modv1
|
|
"color darkblue
|
|
set cursorline
|
|
hi CursorLine term=bold cterm=bold guibg=Grey40
|
|
|
|
set showcmd "on affiche la commande qu'on écrit
|
|
set laststatus=2
|
|
set statusline=
|
|
set statusline +=%5*%{&ff}%* "file format
|
|
set statusline +=%3*%y%* "file type
|
|
set statusline +=%4*\ %<%F%* "full path
|
|
set statusline +=%2*%m%* "modified flag
|
|
set statusline +=%1*%=%5l%* "current line
|
|
set statusline +=%2*/%L%* "total lines
|
|
set statusline +=%1*%4v\ %* "virtual column number
|
|
set statusline +=%2*0x%04B\ %* "character under cursor
|
|
|
|
hi User1 guifg=#eea040 guibg=#222222
|
|
hi User2 guifg=#dd3333 guibg=#222222
|
|
hi User3 guifg=#ff66ff guibg=#222222
|
|
hi User4 guifg=#a0ee40 guibg=#222222
|
|
hi User5 guifg=#eeee40 guibg=#222222
|
|
|
|
|
|
"filetype plugin indent on
|
|
|
|
"noremap <Up> ""
|
|
"noremap! <Up> <Esc>
|
|
"noremap <Down> ""
|
|
"noremap! <Down> <Esc>
|
|
"noremap <Left> ""
|
|
"noremap! <Left> <Esc>
|
|
"noremap <Right> ""
|
|
"noremap! <Right> <Esc>
|
|
"
|
|
noremap <S-Space> <Esc>
|
|
|
|
noremap j gj
|
|
noremap k gk
|
|
|
|
"inoremap { {}<Left>
|
|
"inoremap {<CR> {<CR>}<Esc>O
|
|
"inoremap {{ {
|
|
"inoremap /* /**/<Left><Left>
|
|
"inoremap /*<Space> /*<Space><Space>*/<Left><Left><Left>
|
|
"inoremap /*<CR> /*<CR> */<Esc>O
|
|
"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 listchars=tab:▸\
|
|
set listchars=tab:▸\ ,eol:¬
|
|
|
|
"inoremap jj <ESC>
|
|
"inoremap syso System.out.println
|
|
"Deux j en mode insert -> normal
|
|
|
|
set history=500
|
|
set undolevels=500
|
|
|
|
set title "titre du terminal
|
|
|
|
set autoindent
|
|
set smartindent
|
|
autocmd CursorMoved * exe printf('match IncSearch /\V\<%s\>/', escape(expand('<cword>'), '/\'))
|
|
|
|
"match ErrorMsg '\%>80v.\+'
|
|
"syntax match Search /\%<81v.\%>77v/
|
|
|
|
|
|
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
|
|
map <F5> :make
|
|
"TIPS : :copen :cclose :cw
|
|
|
|
|
|
"SKELETONS
|
|
|
|
" When editing a new file, load skeleton if any.
|
|
" If we find <+FILENAME+> in skeleton, replace it by the filename.
|
|
" If we find <+HEADERNAME+> in skeleton, replace it by the filename
|
|
" uppercase with . replaced by _ (foo.h become FOO_H).
|
|
autocmd BufNewFile *
|
|
\ let skel = $HOME . "/.vim/skeletons/skel." . expand("%:e") |
|
|
\ if filereadable(skel) |
|
|
\ execute "silent! 0read " . skel |
|
|
\ let fn = expand("%") |
|
|
\ let hn = substitute(expand("%"), "\\w", "\\u\\0", "g") |
|
|
\ let hn = substitute(hn, "\\.", "_", "g") |
|
|
\ let hn = substitute(hn, "/", "_", "g") |
|
|
\ let cn = expand("%:t:r") |
|
|
\ %s/<+FILENAME+>/\=fn/Ige |
|
|
\ %s/<+HEADERNAME+>/\=hn/Ige |
|
|
\ %s/<+CLASSNAME+>/\=cn/Ige |
|
|
\ unlet fn hn cn |
|
|
\ endif |
|
|
\ unlet skel |
|
|
\ goto 1
|
|
|
|
" skeleton template use <+KEY+>
|
|
nnoremap § <esc>/<+.\{-1,}+><return>c/+>/e<return>
|
|
inoremap § <esc>/<+.\{-1,}+><return>c/+>/e<return>
|