Show if spelling is on or off
This commit is contained in:
parent
c561fca8d6
commit
c12bc910ad
1 changed files with 22 additions and 2 deletions
24
vimrc
24
vimrc
|
@ -44,8 +44,8 @@ nnoremap <F10> :call ACPToggleMargins()<CR>
|
||||||
nnoremap <F11> :Limelight!!<CR>
|
nnoremap <F11> :Limelight!!<CR>
|
||||||
nnoremap <F12> :w<CR>
|
nnoremap <F12> :w<CR>
|
||||||
nnoremap <F2> :call ACPNModeTodo()<CR>
|
nnoremap <F2> :call ACPNModeTodo()<CR>
|
||||||
nnoremap <F7> :setlocal spell! spelllang=en_us<CR>
|
nnoremap <F7> :call ACPToggleSpellEnUs()<CR>
|
||||||
nnoremap <S-F7> :setlocal spell! spelllang=en_gb<CR>
|
nnoremap <S-F7> :call ACPToggleSpellEnGb()<CR>
|
||||||
nnoremap <down> <nop>
|
nnoremap <down> <nop>
|
||||||
nnoremap <left> <nop>
|
nnoremap <left> <nop>
|
||||||
nnoremap <right> <nop>
|
nnoremap <right> <nop>
|
||||||
|
@ -234,6 +234,26 @@ function! ACPToggleMargins()
|
||||||
execute "set colorcolumn=" . (&colorcolumn == "0" ? "73,81" : "0")
|
execute "set colorcolumn=" . (&colorcolumn == "0" ? "73,81" : "0")
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! ACPToggleSpellEnUs()
|
||||||
|
if &spell == 0
|
||||||
|
setlocal spell spelllang=en_us
|
||||||
|
echo "Spelling ON (en_US)"
|
||||||
|
else
|
||||||
|
setlocal nospell
|
||||||
|
echo "Spelling OFF"
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! ACPToggleSpellEnGb()
|
||||||
|
if &spell == 0
|
||||||
|
setlocal spell spelllang=en_gb
|
||||||
|
echo "Spelling ON (en_GB)"
|
||||||
|
else
|
||||||
|
setlocal nospell
|
||||||
|
echo "Spelling OFF"
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
function! ACPNModeTodo()
|
function! ACPNModeTodo()
|
||||||
" Toggles between TODO, WORK, WAIT, DONE, and blank.
|
" Toggles between TODO, WORK, WAIT, DONE, and blank.
|
||||||
" All are highlighted except DONE and blank.
|
" All are highlighted except DONE and blank.
|
||||||
|
|
Loading…
Reference in a new issue