From d3d5d579841e47a08112f714d79ba0ec4738af89 Mon Sep 17 00:00:00 2001 From: Dorian Karter Date: Fri, 5 May 2017 11:13:08 -0500 Subject: [PATCH] Use setlocal in all vim examples (#1403) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 72c17c00b..ae4b634b4 100644 --- a/README.md +++ b/README.md @@ -285,7 +285,7 @@ For Vim users, there are two main approaches: one that leans on [sbdchd](https:/ Vim users can add the following to their `.vimrc`: ```vim -autocmd FileType javascript set formatprg=prettier\ --stdin +autocmd FileType javascript setlocal formatprg=prettier\ --stdin ``` If you use the [vim-jsx](https://github.com/mxw/vim-jsx) plugin without @@ -346,7 +346,7 @@ See `:help autocmd-events` in Vim for details. If your project requires settings other than the default Prettier settings, you can pass arguments to do so in your `.vimrc` or [vim project](http://vim.wikia.com/wiki/Project_specific_settings), you can do so: ```vim -autocmd FileType javascript set formatprg=prettier\ --stdin\ --parser\ flow\ --single-quote\ --trailing-comma\ es5 +autocmd FileType javascript setlocal formatprg=prettier\ --stdin\ --parser\ flow\ --single-quote\ --trailing-comma\ es5 ``` Each command needs to be escaped with `\`. If you are using Neoformat and you want it to recognize your formatprg settings you can also do that by adding the following to your `.vimrc`: