-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Neoformat for formatexpr
#442
Comments
Hmm I think it's tricky because a lot of the underlying formatters don't support that sort of thing |
But For the time being, I just mapped |
@alecandido: you can give the following a try (I have been using it for months without much problem): function! NeoformatExpr() abort " {{{
" if v:char != ''
" return
" endif
let line1 = v:lnum
let line2 = v:lnum + v:count - 1
execute ':' . line1 . ',' . line2 . 'Neoformat'
endfunction "}}} PS. to enable it, just run |
Thanks, that is exactly what I had in mind (the concept, I was completely missing the implementation) |
I would like to do more or less the opposite of #36, i.e. use Neoformat as
formatexpr
, such that when I select some text and pressgq
it gets formatted as if I issued:Neoformat
, but without a custom mapping.I'd need a function to invoke, possibly passing parameters available to
formatexpr
:I believe it should be possible just setting
formatexpr
in my configurations, but I'm not familiar with Neoformat internals, that's why I'm asking for help.The text was updated successfully, but these errors were encountered: