Adds spell checking on mail and some focus bindins
This commit is contained in:
parent
e19865186e
commit
32e0ee47f2
1 changed files with 37 additions and 4 deletions
41
.vimrc
41
.vimrc
|
@ -93,10 +93,10 @@ let &t_SI = "\e[5 q"
|
||||||
let &t_EI = "\e[1 q"
|
let &t_EI = "\e[1 q"
|
||||||
|
|
||||||
" optional reset cursor on start:
|
" optional reset cursor on start:
|
||||||
" augroup myCmds
|
augroup myCmds
|
||||||
" au!
|
au!
|
||||||
" autocmd VimEnter * silent !echo -ne "\e[2 q"
|
autocmd VimEnter * silent !echo -ne "\e[1 q"
|
||||||
" augroup END
|
augroup END
|
||||||
|
|
||||||
|
|
||||||
" Highlighting {{{1
|
" Highlighting {{{1
|
||||||
|
@ -398,6 +398,10 @@ nnoremap <Left> xhP
|
||||||
nnoremap ; :
|
nnoremap ; :
|
||||||
nnoremap : ;
|
nnoremap : ;
|
||||||
|
|
||||||
|
" Maps the semi colon to colon in visual mode
|
||||||
|
vnoremap ; :
|
||||||
|
vnoremap : ;
|
||||||
|
|
||||||
" Move lines up/down/left/right using arrow keys
|
" Move lines up/down/left/right using arrow keys
|
||||||
nnoremap <Down> ddp
|
nnoremap <Down> ddp
|
||||||
nnoremap <Up> ddkP
|
nnoremap <Up> ddkP
|
||||||
|
@ -472,9 +476,32 @@ inoremap jj <Esc>
|
||||||
inoremap <C-l> <c-g>u<Esc>[s1z=`]a<c-g>u
|
inoremap <C-l> <c-g>u<Esc>[s1z=`]a<c-g>u
|
||||||
|
|
||||||
|
|
||||||
|
function! s:make_email_list(lines)
|
||||||
|
let l:emails = []
|
||||||
|
"return type( a:lines )
|
||||||
|
for email in a:lines
|
||||||
|
let l:address = substitute(split( email, "\t" )[0], " ","","" )
|
||||||
|
let l:name = split( email, "\t" )[1]
|
||||||
|
let l:emails = add( l:emails, l:name . " <" . l:address . ">" )
|
||||||
|
endfor
|
||||||
|
return join(l:emails, ', ')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
inoremap <expr> <c-c> fzf#vim#complete({
|
||||||
|
\ 'source': '$HOME/Contacts/lookup',
|
||||||
|
\ 'reducer': function('<sid>make_email_list'),
|
||||||
|
\ 'options': '--multi',
|
||||||
|
\ 'down': '30%' })
|
||||||
|
|
||||||
" Set double space in insert mode to go to next mark and enter insert mode
|
" Set double space in insert mode to go to next mark and enter insert mode
|
||||||
"inoremap <leader><leader> <Esc>:call NextMark()<cr>
|
"inoremap <leader><leader> <Esc>:call NextMark()<cr>
|
||||||
|
|
||||||
|
" Stops vim doing anything when terminal gains or looses focus
|
||||||
|
noremap <silent> <Esc>[I <nop>
|
||||||
|
noremap <silent> <Esc>[O <nop>
|
||||||
|
noremap! <silent> <Esc>[I <nop>
|
||||||
|
noremap! <silent> <Esc>[O <nop>
|
||||||
|
|
||||||
|
|
||||||
vnoremap <leader>u :B !urlencode<cr>
|
vnoremap <leader>u :B !urlencode<cr>
|
||||||
vnoremap <leader>U :B !urldecode<cr>
|
vnoremap <leader>U :B !urldecode<cr>
|
||||||
|
@ -493,6 +520,12 @@ augroup javascript
|
||||||
autocmd FileType javascript nnoremap <localleader>b Ithis.^y$$a = pa.bind(this);
|
autocmd FileType javascript nnoremap <localleader>b Ithis.^y$$a = pa.bind(this);
|
||||||
augroup END
|
augroup END
|
||||||
"
|
"
|
||||||
|
" email maps {{{2
|
||||||
|
augroup mail
|
||||||
|
autocmd!
|
||||||
|
"binds this in class
|
||||||
|
autocmd FileType mail setlocal spell
|
||||||
|
augroup END
|
||||||
" less maps {{{2
|
" less maps {{{2
|
||||||
augroup css
|
augroup css
|
||||||
autocmd!
|
autocmd!
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue