neoformat
neoformat copied to clipboard
format args doesn't take effect in visual mode
my config:
let g:neoformat_enabled_c = ['astyle']
let g:neoformat_c_astyle = {
\ 'exe': 'astyle',
\ 'stdin': 1,
\ 'args': [
\ '--style=linux',
\ '--pad-oper',
\ '--add-braces',
\ '--convert-tabs',
\ '--align-pointer=name',
\ '--break-return-type',
\ '--attach-return-type-decl',
\ '--pad-header',
\ '--unpad-paren',
\ '--max-code-length=120' ],
\ }
when I use :Neoformat in normal mode (format the whole buffer), it works fine.
if (t1 == 10)
return 1;
formats to:
if (t1 == 10) {
return 1;
}
But when I select some lines in visual mode and format (:'<,'>Neoformat), it works too, but don't use my format args.
the code mentioned above formats to:
if (t1 == 10)
{
return 1;
}