2020-08-08 05:20:01 +02:00
|
|
|
" Random Useful Functions
|
|
|
|
|
2020-05-10 22:20:02 +02:00
|
|
|
" Turn spellcheck on for markdown files
|
2020-05-11 05:27:51 +02:00
|
|
|
augroup auto_spellcheck
|
|
|
|
autocmd BufNewFile,BufRead *.md setlocal spell
|
|
|
|
augroup END
|
2020-05-10 22:20:02 +02:00
|
|
|
|
2020-08-07 04:32:00 +02:00
|
|
|
function! OpenLiveServer()
|
|
|
|
echo 'live server is on'
|
|
|
|
silent !live-server % &
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
command Serve :call OpenLiveServer()
|
|
|
|
nnoremap <silent>bs :call OpenLiveServer()<CR>
|
|
|
|
|
2020-05-10 22:20:02 +02:00
|
|
|
" Remove trailing whitespaces automatically before save
|
2020-05-11 01:23:44 +02:00
|
|
|
" augroup strip_ws
|
2020-05-11 05:27:51 +02:00
|
|
|
" autocmd BufWritePre * call utils#stripTrailingWhitespaces()
|
2020-05-11 01:23:44 +02:00
|
|
|
" augroup END
|