diff options
author | Ekaitz Zárraga <ekaitz.zarraga@gmail.com> | 2016-04-07 10:10:40 +0200 |
---|---|---|
committer | Ekaitz Zárraga <ekaitz.zarraga@gmail.com> | 2016-04-07 10:10:40 +0200 |
commit | 7c6e604ebe2de47327db99daddc57b37058ba061 (patch) | |
tree | a62e10c24d7b73ff0710fa61bfb93f23c5548fa0 /vim/.vim/ftplugin | |
parent | 480d322cdad674dec98836268a9fcbb525d3d9da (diff) |
Drowmark configuration
Diffstat (limited to 'vim/.vim/ftplugin')
-rw-r--r-- | vim/.vim/ftplugin/drowmark.vim | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/vim/.vim/ftplugin/drowmark.vim b/vim/.vim/ftplugin/drowmark.vim new file mode 100644 index 0000000..bcc41d1 --- /dev/null +++ b/vim/.vim/ftplugin/drowmark.vim @@ -0,0 +1,23 @@ +" Spellcheck in markdown (automatic to english) +setlocal spelllang=es +setlocal spell + +" Textwidth for automatic wrap `gq` is formatting operation +setlocal textwidth=79 +setlocal formatoptions+=t +setlocal formatoptions-=l + + +" Highlight where the lines are more than 80 characters wide +setlocal colorcolumn=80 +highlight ColorColumn ctermbg=LightGreen + +" Auto-capitalize script +augroup SENTENCES + au! + autocmd InsertCharPre * if &ft=='markdown' | if search('\v(%^|[.!?]\_s+|\_^\-\s|\_^title\:\s|\n\n)%#', 'bcnw') != 0 | let v:char = toupper(v:char) | endif | endif +augroup END + +" Highlight spelling errors in red and underline +hi clear SpellBad +hi SpellBad cterm=underline ctermfg=Red |