summaryrefslogtreecommitdiff
path: root/general/functions.vim
diff options
context:
space:
mode:
Diffstat (limited to 'general/functions.vim')
-rw-r--r--general/functions.vim8
1 files changed, 8 insertions, 0 deletions
diff --git a/general/functions.vim b/general/functions.vim
index 58db6b1f..47284f2e 100644
--- a/general/functions.vim
+++ b/general/functions.vim
@@ -3,6 +3,14 @@ augroup auto_spellcheck
autocmd BufNewFile,BufRead *.md setlocal spell
augroup END
+function! OpenLiveServer()
+ echo 'live server is on'
+ silent !live-server % &
+endfunction
+
+command Serve :call OpenLiveServer()
+nnoremap <silent>bs :call OpenLiveServer()<CR>
+
" Remove trailing whitespaces automatically before save
" augroup strip_ws
" autocmd BufWritePre * call utils#stripTrailingWhitespaces()