From bde5b4ff6398feafca36ba82050203d6bdd4c463 Mon Sep 17 00:00:00 2001 From: Sergey Alexandrov Date: Sun, 13 May 2018 14:31:43 -0400 Subject: [PATCH 1/2] Use normal! to autointent code ... otherwise might not work as expected if the user mapped any of the commands used. See [here](http://learnvimscriptthehardway.stevelosh.com/chapters/29.html) about `normal!`. --- plugin/autoformat.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/autoformat.vim b/plugin/autoformat.vim index 289ff53..adacb78 100644 --- a/plugin/autoformat.vim +++ b/plugin/autoformat.vim @@ -169,7 +169,7 @@ function! s:Fallback() echomsg "Autoindenting..." endif " Autoindent code - exe "normal gg=G" + exe "normal! gg=G" endif endfunction From 7d199cd124ce3f7c26f0edbe89ffa32449e2efb4 Mon Sep 17 00:00:00 2001 From: Chiel ten Brinke Date: Thu, 24 May 2018 10:24:53 +0200 Subject: [PATCH 2/2] Prettier: don't require a local config. --- plugin/defaults.vim | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugin/defaults.vim b/plugin/defaults.vim index 5bf7d6a..76e0de2 100644 --- a/plugin/defaults.vim +++ b/plugin/defaults.vim @@ -160,9 +160,7 @@ if !exists('g:formatdef_standard_javascript') endif if !exists('g:formatdef_prettier_javascript') - if filereadable('.prettierrc') - let g:formatdef_prettier_javascript = '"prettier"' - endif + let g:formatdef_prettier_javascript = '"prettier"' endif " This is an xo formatter (inspired by the above eslint formatter)