diff --git a/ftplugin/javascript.vim b/ftplugin/javascript.vim index 5347c11..c3f3f53 100644 --- a/ftplugin/javascript.vim +++ b/ftplugin/javascript.vim @@ -21,6 +21,13 @@ else call g:FindFormatter(s:prgname,s:arguments) endif +let b:autoformat = 1 +"Enable on-the-fly formatting +if b:autoformat==1 + "inoremap gqq + "inoremap } }gq% +endif + "Set indenting behaviour to match with the formatter set expandtab set tabstop=4