diff options
| author | mitermayer <mitermayer.reis@gmail.com> | 2017-05-24 16:10:44 -0700 |
|---|---|---|
| committer | mitermayer <mitermayer.reis@gmail.com> | 2017-05-24 16:10:44 -0700 |
| commit | d60719ac3bf4ed1b10779406fd656e37c0bc42a3 (patch) | |
| tree | 345f3c3bd2cca064947804bb45b02db3f38df3c9 /autoload/prettier.vim | |
| parent | a53ffa1ba81c76d0b2c29afe55ab131c6cc9a0e3 (diff) | |
| download | vim-prettier-d60719ac3bf4ed1b10779406fd656e37c0bc42a3.tar.xz | |
Removing already actioned TODO and fixing indentation
Diffstat (limited to 'autoload/prettier.vim')
| -rw-r--r-- | autoload/prettier.vim | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/autoload/prettier.vim b/autoload/prettier.vim index 3cb21ee..3ec6cfb 100644 --- a/autoload/prettier.vim +++ b/autoload/prettier.vim @@ -1,6 +1,5 @@ let s:root_dir = fnamemodify(resolve(expand('<sfile>:p')), ':h') -" TODO => check all &ft comparisons and make sure we use match to protect from compound file types function! prettier#Prettier() abort let l:exec = s:Get_Prettier_Exec() @@ -11,11 +10,11 @@ function! prettier#Prettier() abort if exec != -1 let l:stdout = split(system(exec . s:Get_Prettier_Exec_Args(), getbufline(bufnr('%'), 1, '$')), '\n') - " delete all lines on the current buffer - silent! execute 1 . ',' . line('$') . 'delete _' + " delete all lines on the current buffer + silent! execute 1 . ',' . line('$') . 'delete _' - " replace all lines from the current buffer with output from prettier - call setline(1, stdout) + " replace all lines from the current buffer with output from prettier + call setline(1, stdout) else call s:Suggest_Install_Prettier() endif |
