Writing mode is to be used when I am writing prose rather than code, for example markdown files or emails. Currently, it enables spellcheck and adds insert mode mappings that add undo points when certain punctuation is inserted, such as full stops or commas. Currently this is used for markdown files, emails and git commitsmaster
parent
ec1e8d41f9
commit
33777548d5
4 changed files with 15 additions and 2 deletions
@ -0,0 +1,12 @@ |
||||
function! mine#functions#text() abort |
||||
" set spellchecking |
||||
set spell |
||||
|
||||
" Add undo points when this punctuation is added |
||||
inoremap <buffer> ! !<C-g>u |
||||
inoremap <buffer> , ,<C-g>u |
||||
inoremap <buffer> . .<C-g>u |
||||
inoremap <buffer> : :<C-g>u |
||||
inoremap <buffer> ; ;<C-g>u |
||||
inoremap <buffer> ? ?<C-g>u |
||||
endfunction |
@ -0,0 +1 @@ |
||||
call mine#functions#text() |
@ -1 +1 @@ |
||||
setlocal spell |
||||
call mine#functions#text() |
||||
|
@ -1 +1 @@ |
||||
setlocal spell |
||||
call mine#functions#text() |
||||
|
Loading…
Reference in new issue