|
@@ -76,13 +76,13 @@ set modelines=3 "number of lines to check for modelines
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
|
|
" keep ctrl-a/ctrl-e for begining/end of line
|
|
" keep ctrl-a/ctrl-e for begining/end of line
|
|
-nmap <C-a> 0i
|
|
|
|
-imap <C-a> <esc>0i
|
|
|
|
-vmap <C-a> 0i
|
|
|
|
|
|
+nmap <C-a> <C-o>I
|
|
|
|
+imap <C-a> <C-o>I
|
|
|
|
+vmap <C-a> <C-o>I
|
|
|
|
|
|
-nmap <C-e> $i<right>
|
|
|
|
-imap <C-e> <esc>$i<right>
|
|
|
|
-vmap <C-e> $i<right>
|
|
|
|
|
|
+nmap <C-e> <C-o>A
|
|
|
|
+imap <C-e> <C-o>A
|
|
|
|
+vmap <C-e> <C-o>A
|
|
|
|
|
|
"reopen current file
|
|
"reopen current file
|
|
map <F5> :e!<CR>
|
|
map <F5> :e!<CR>
|
|
@@ -98,7 +98,7 @@ imap <F2> <ESC>:bn<CR>a
|
|
|
|
|
|
"imap <C-Space> <C-X><C-O> "smart completion
|
|
"imap <C-Space> <C-X><C-O> "smart completion
|
|
nmap <C-u> :u<CR>
|
|
nmap <C-u> :u<CR>
|
|
-imap <C-u> <esc>:u<CR>
|
|
|
|
|
|
+imap <C-u> <ESC>:u<CR>
|
|
|
|
|
|
nmap <C-i> :tabnext<CR>
|
|
nmap <C-i> :tabnext<CR>
|
|
"nmap <C-S-i> :tabprevious<CR>
|
|
"nmap <C-S-i> :tabprevious<CR>
|
|
@@ -146,7 +146,11 @@ set softtabstop=4
|
|
|
|
|
|
set showmatch "brace/parenthese/bracket matching
|
|
set showmatch "brace/parenthese/bracket matching
|
|
set nowrap "wrap long lines
|
|
set nowrap "wrap long lines
|
|
-set showbreak="++++ "
|
|
|
|
|
|
+if has("multi_byte")
|
|
|
|
+ set showbreak="…"
|
|
|
|
+else
|
|
|
|
+ set showbreak="+++"
|
|
|
|
+endif
|
|
|
|
|
|
"show some not printable chars
|
|
"show some not printable chars
|
|
set list
|
|
set list
|
|
@@ -166,10 +170,12 @@ set infercase "smart case support
|
|
" Email Settings
|
|
" Email Settings
|
|
"
|
|
"
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
-autocmd BufRead ~/.mutt/tmp/mutt-* set filetype=mail
|
|
|
|
-autocmd FileType mail set autoindent expandtab formatoptions=tcqn
|
|
|
|
-autocmd FileType mail vmap D dO[...]<CR>
|
|
|
|
-autocmd FileType mail call EnableSpellChecking()
|
|
|
|
|
|
+if has('autocmd')
|
|
|
|
+ autocmd BufRead ~/.mutt/tmp/mutt-* set filetype=mail
|
|
|
|
+ autocmd FileType mail set autoindent expandtab formatoptions=tcqna
|
|
|
|
+ autocmd FileType mail vmap D dO[...]<CR>
|
|
|
|
+ autocmd FileType mail call EnableSpellChecking()
|
|
|
|
+endif
|
|
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
" Filetypes Settings
|
|
" Filetypes Settings
|
|
@@ -181,21 +187,19 @@ filetype plugin indent on
|
|
" Global Triggers
|
|
" Global Triggers
|
|
"
|
|
"
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
-
|
|
|
|
-"reload Vim config file after saving
|
|
|
|
-autocmd BufWritePost ~/.vimrc :source ~/.vimrc
|
|
|
|
-
|
|
|
|
-"always limit the width for text files
|
|
|
|
-autocmd BufRead *.txt set tw=78
|
|
|
|
-
|
|
|
|
-autocmd QuickFixCmdPre * botright cwindow 5
|
|
|
|
|
|
+if has('autocmd')
|
|
|
|
+ "reload Vim config file after saving
|
|
|
|
+ autocmd BufWritePost $MYVIMRC :source $MYVIMRC
|
|
|
|
+ "always limit the width for text files
|
|
|
|
+ autocmd BufRead *.txt set tw=78
|
|
|
|
+ autocmd QuickFixCmdPre * botright cwindow 5
|
|
|
|
+endif
|
|
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
" Spell Checking
|
|
" Spell Checking
|
|
"
|
|
"
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
"set spellfile=~/.vim/spell/words
|
|
"set spellfile=~/.vim/spell/words
|
|
-
|
|
|
|
function! EnableSpellChecking()
|
|
function! EnableSpellChecking()
|
|
setlocal spell spelllang=fr,en_us
|
|
setlocal spell spelllang=fr,en_us
|
|
let b:spell = 1
|
|
let b:spell = 1
|
|
@@ -237,11 +241,11 @@ let Tlist_Use_SingleClick=1
|
|
let Tlist_Ctags_Cmd="~/.vim/bin/ctags-exuberant"
|
|
let Tlist_Ctags_Cmd="~/.vim/bin/ctags-exuberant"
|
|
nnoremap <silent> <F9> :Tlist<CR>
|
|
nnoremap <silent> <F9> :Tlist<CR>
|
|
|
|
|
|
|
|
+
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
" Useful functions
|
|
" Useful functions
|
|
"
|
|
"
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
-
|
|
|
|
function! CleanClose()
|
|
function! CleanClose()
|
|
let todelbufNr = bufnr("%")
|
|
let todelbufNr = bufnr("%")
|
|
let newbufNr = bufnr("#")
|
|
let newbufNr = bufnr("#")
|
|
@@ -256,3 +260,27 @@ function! CleanClose()
|
|
exe "bd".todelbufNr
|
|
exe "bd".todelbufNr
|
|
endfunction
|
|
endfunction
|
|
|
|
|
|
|
|
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
+" Pathogen plugin
|
|
|
|
+"
|
|
|
|
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
+call pathogen#runtime_append_all_bundles()
|
|
|
|
+call pathogen#helptags()
|
|
|
|
+
|
|
|
|
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
+" Gundo plugin
|
|
|
|
+"
|
|
|
|
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
+let g:gundo_right = 1
|
|
|
|
+let g:gundo_width = 80
|
|
|
|
+let g:gundo_preview_height = 35
|
|
|
|
+nnoremap <F3> :GundoToggle<CR>
|
|
|
|
+
|
|
|
|
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
+" NetRW setup
|
|
|
|
+"
|
|
|
|
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
+let g:netrw_liststyle=3 " Use tree-mode as default view
|
|
|
|
+let g:netrw_browse_split=4 " Open file in previous buffer
|
|
|
|
+let g:netrw_preview=1 " preview window shown in a vertically split
|
|
|
|
+
|