minor changes
This commit is contained in:
parent
4b0a5e927a
commit
1b08973e28
@ -4,8 +4,7 @@ endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
"Besides installing the js-beautify globally or in the
|
||||
"formatters/ folder, cloning the repository as a vim bundle
|
||||
"is supported as well.
|
||||
"formatters/ folder, installing as a vim bundle is supported.
|
||||
let s:prgname = "js-beautify"
|
||||
let s:arguments = "-i"
|
||||
|
||||
@ -17,7 +16,7 @@ if executable(s:prgpath)
|
||||
let b:formatprg=s:prgpath." ".s:arguments
|
||||
else
|
||||
"Else look for js-beautify globally
|
||||
"or in the formatters/folder
|
||||
"or in the formatters/ folder
|
||||
call g:FindFormatter(s:prgname,s:arguments)
|
||||
endif
|
||||
|
||||
|
@ -13,7 +13,7 @@ function! s:Autoformat()
|
||||
endif
|
||||
endfunction
|
||||
|
||||
"Create a command for this
|
||||
"Create a command for formatting the entire buffer
|
||||
command! Autoformat call s:Autoformat()
|
||||
|
||||
"Function for finding and setting the formatter
|
||||
@ -37,8 +37,3 @@ endfunction
|
||||
"So when buffer/window/tab changes,
|
||||
"(re)load formatprg from the bufferlocal variable
|
||||
au BufEnter,WinEnter * if exists("b:formatprg") | let &formatprg=b:formatprg
|
||||
|
||||
let b:autoformat = 1
|
||||
if b:autoformat==1
|
||||
inoremap <CR> <Esc>Vgqo
|
||||
endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user