Last active
April 16, 2017 21:18
Revisions
-
awinograd revised this gist
Apr 16, 2017 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,8 @@ autocmd FileType javascript set formatprg=prettier\ --stdin\ --single-quote\ --t autocmd FileType javascript.jsx set formatprg=prettier\ --stdin\ --single-quote\ --trailing-comma\ es5 nnoremap <silent> <leader>p gggqG<CR> " I decided to disable running prettier on save b/c of how " it loses the cursor position and instead just use `<leader>p` occasionally " That said, here are the commands I used for auto-prettier on save " autocmd BufWritePre *.js exe "normal! gggqG\<C-o>\<C-o>" " autocmd BufWritePre *.jsx exe "normal! gggqG\<C-o>\<C-o>" -
awinograd revised this gist
Apr 16, 2017 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,7 @@ autocmd FileType javascript set formatprg=prettier\ --stdin\ --single-quote\ --trailing-comma\ es5 autocmd FileType javascript.jsx set formatprg=prettier\ --stdin\ --single-quote\ --trailing-comma\ es5 nnoremap <silent> <leader>p gggqG<CR> " I decided to disable running prettier on save b/c of how it loses the cursor position and instead just use `<leader>p` occasionally " autocmd BufWritePre *.js exe "normal! gggqG\<C-o>\<C-o>" " autocmd BufWritePre *.jsx exe "normal! gggqG\<C-o>\<C-o>" -
awinograd created this gist
Apr 16, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ autocmd FileType javascript set formatprg=prettier\ --stdin\ --single-quote\ --trailing-comma\ es5 autocmd FileType javascript.jsx set formatprg=prettier\ --stdin\ --single-quote\ --trailing-comma\ es5 nnoremap <silent> <leader>p gggqG<CR>