functions.vim 482 B

12345678910111213141516171819
  1. " Random Useful Functions
  2. " Turn spellcheck on for markdown files
  3. augroup auto_spellcheck
  4. autocmd BufNewFile,BufRead *.md setlocal spell
  5. augroup END
  6. function! OpenLiveServer()
  7. echo 'live server is on'
  8. silent !live-server % &
  9. endfunction
  10. command Serve :call OpenLiveServer()
  11. nnoremap <silent>bs :call OpenLiveServer()<CR>
  12. " Remove trailing whitespaces automatically before save
  13. " augroup strip_ws
  14. " autocmd BufWritePre * call utils#stripTrailingWhitespaces()
  15. " augroup END