|
@@ -66,6 +66,15 @@ set modelines=3 "number of lines to check for modelines
|
|
|
"
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
|
|
+" 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-e> $i<right>
|
|
|
+imap <C-e> <esc>$i<right>
|
|
|
+vmap <C-e> $i<right>
|
|
|
+
|
|
|
"reopen current file
|
|
|
map <F5> :e!<CR>
|
|
|
"using redraw to disable highlighted search patterns
|
|
@@ -79,7 +88,8 @@ nmap <F2> :bn<CR>
|
|
|
imap <F2> <ESC>:bn<CR>a
|
|
|
|
|
|
"imap <C-Space> <C-X><C-O> "smart completion
|
|
|
-map <C-u> :u<CR>
|
|
|
+nmap <C-u> :u<CR>
|
|
|
+imap <C-u> <esc>:u<CR>
|
|
|
|
|
|
nmap <C-i> :tabnext<CR>
|
|
|
"nmap <C-S-i> :tabprevious<CR>
|
|
@@ -140,6 +150,14 @@ set incsearch "incremental searches
|
|
|
set ignorecase "ignore case in search patterns
|
|
|
set infercase "smart case support
|
|
|
|
|
|
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
+" 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()
|
|
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
" Filetypes Settings
|
|
@@ -147,7 +165,6 @@ set infercase "smart case support
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
filetype plugin indent on
|
|
|
|
|
|
-
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
" Global Triggers
|
|
|
"
|
|
@@ -165,14 +182,23 @@ autocmd QuickFixCmdPre * botright cwindow 5
|
|
|
" Spell Checking
|
|
|
"
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
+"set spellfile=~/.vim/spell/words
|
|
|
+
|
|
|
+function EnableSpellChecking()
|
|
|
+ setlocal spell spelllang=fr,en_us
|
|
|
+ let b:spell = 1
|
|
|
+endfunction
|
|
|
+
|
|
|
+function DisableSpellChecking()
|
|
|
+ setlocal nospell
|
|
|
+ unlet b:spell
|
|
|
+endfunction
|
|
|
|
|
|
function! ToggleSpell()
|
|
|
if !exists("b:spell")
|
|
|
- setlocal spell spelllang=fr,en_us
|
|
|
- let b:spell = 1
|
|
|
+ execute 'call EnableSpellChecking()'
|
|
|
else
|
|
|
- setlocal nospell
|
|
|
- unlet b:spell
|
|
|
+ execute 'call DisableSpellChecking()'
|
|
|
endif
|
|
|
endfunction
|
|
|
|