summaryrefslogtreecommitdiff
path: root/plugin/perso.vim
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/perso.vim')
-rwxr-xr-xplugin/perso.vim94
1 files changed, 34 insertions, 60 deletions
diff --git a/plugin/perso.vim b/plugin/perso.vim
index 11b4ed1..9af12b0 100755
--- a/plugin/perso.vim
+++ b/plugin/perso.vim
@@ -9,45 +9,24 @@ set t_Co=256
"map <leader>k <C-W>k
"map <leader>h <C-W>h
"map <leader>l <C-W>l
+filetype plugin indent on
-
-
-
-set encoding=utf-8
-set fileencoding=utf-8
-
-
+" Color :
+colo jellybeans
+set cursorline
hi CursorLine term=bold cterm=bold ctermbg=black
-
-
-
-filetype plugin indent on
-
+" Completion related options
+" wildcard char = <TAB>
+set wildmenu
+set wildmode=list:longest:full
nnoremap <silent><A-o> :set paste<CR>m`o<Esc>``:set nopaste<CR>
nnoremap <silent><A-O> :set paste<CR>m`O<Esc>``:set nopaste<CR>
-
inoremap <c-e> <Esc>A
inoremap <c-a> <Esc>0i
-
-"inoremap {<CR> {<CR>}<up><C-o>$
-"inoremap {{ {
-"inoremap {} {}
-"inoremap << <><left>
-"inoremap [ []<left>
-"inoremap [[ [
-"inoremap [] []
-"inoremap ( ()<left>
-"inoremap (( (
-"inoremap () ()
-"inoremap " ""<left>
-"inoremap "" ""
-"inoremap ' ''<left>
-"inoremap '' ''
-
"Perso C définition"
inoremap prt printf
inoremap swf printf
@@ -63,41 +42,43 @@ inoremap #io #include <stdio.h>
inoremap #main int main(void) {<CR>}<Esc><Up>A
inoremap ##main int main(int argc, char* argv[]) {<CR>}<Esc><Up>A
-
-
-
-
" Personal shortcurts
-" Copy clip
-nnoremap <silent>èè__ :set paste<CR>mn"+p'n:set nopaste<CR>
-" Select clip
-nnoremap <silent>èèè_ :set paste<CR>mn"*p'n:set nopaste<CR>
-nmap <C-X> :TagbarToggle<CR>
-
ca tn tabnew
ca tc tabc
+map <F5> :setlocal spell! spelllang=fr<CR>
+map <F6> :setlocal spell! spelllang=en_us<CR>
+inoremap <F7> <C-r>=strftime('%F')<CR>
+inoremap <F8> <C-r>=strftime('%c')<CR>
+
+
+" Personal compil shortcurts
+map <F9> :make<CR>:cw<CR><CR>
+noremap <silent> [q :copen<CR>
+noremap <silent> ]q :cclose<CR>
+noremap <silent> [Q :cfirst<CR>
+noremap <silent> ]Q :clast<CR>
+noremap <silent> [[ :cprev<CR>
+noremap <silent> ]] :cnext<CR>
+
"Allow vim clipboad <-> host clipboard to share data
set clipboard=unnamed
-
" Quick Comment :
-autocmd FileType c,cpp,java,go,scala let b:comment_leader = '//'
-autocmd FileType sh,ruby,python let b:comment_leader = '#'
-autocmd FileType conf,fstab let b:comment_leader = '#'
-autocmd FileType tex let b:comment_leader = '%'
-autocmd FileType mail let b:comment_leader = '>'
-autocmd FileType vim let b:comment_leader = '"'
-autocmd FileType haskell let b:comment_leader = '--'
-
+autocmd FileType c,cpp,java,go,scala,js let b:comment_leader = '//'
+autocmd FileType sh,ruby,python let b:comment_leader = '#'
+autocmd FileType conf,fstab let b:comment_leader = '#'
+autocmd FileType tex let b:comment_leader = '%'
+autocmd FileType mail let b:comment_leader = '>'
+autocmd FileType vim let b:comment_leader = '"'
+autocmd FileType haskell let b:comment_leader = '--'
autocmd FileType c,cpp,java,go,scala set foldmethod=syntax
-
noremap <silent> ,cc :<C-B>silent <C-E>s/^/<C-R>=escape(b:comment_leader,'\/')<CR>/<CR>:nohlsearch<CR>
noremap <silent> ,cu :<C-B>silent <C-E>s/^\V<C-R>=escape(b:comment_leader,'\/')<CR>//e<CR>:nohlsearch<CR>
@@ -108,19 +89,10 @@ noremap <silent> <c-c>c :<C-B>silent <C-E>s/^\V<C-R>=escape(b:comment_leade
nnoremap cd :cd %:p:h<CR>
nnoremap <silent> // :nohls<CR>
-map <F5> :setlocal spell! spelllang=fr<CR>
-map <F6> :setlocal spell! spelllang=en_us<CR>
-inoremap <F7> <C-r>=strftime('%F')<CR>
-inoremap <F8> <C-r>=strftime('%c')<CR>
-map <F9> :make<CR>:cw<CR><CR>
-noremap <silent> [q :copen<CR>
-noremap <silent> ]q :cclose<CR>
-noremap <silent> [Q :cfirst<CR>
-noremap <silent> ]Q :clast<CR>
-noremap <silent> [[ :cprev<CR>
-noremap <silent> ]] :cnext<CR>
+
+" Compil option
autocmd Filetype c call SetCCompiler()
function SetCCompiler()
if !(filereadable("makefile") || filereadable("Makefile"))
@@ -143,6 +115,8 @@ noremap <silent> zv :!markdown % \| w3m -I utf-8 -T text/html
+
+
set colorcolumn=80
set cursorcolumn
highlight CursorColumn ctermbg=Red