New answers tagged

0 votes

Is it possible to apply formatters only for selected lines using ALE Vim plugin?

Range formatting is not supported by black because range of lines are in general not valid Python code. You may have a look at black-macchiato. Install black-macchiato by running the shell command: ...
user avatar
0 votes

Is it possible to apply formatters only for selected lines using ALE Vim plugin?

I'm doing this now with vim9script in ~/.vim/after/ftplugin/python.vim: autocmd! BufWritePre <buffer> { var view = winsaveview() silent! execute ':%!black --quiet -' winrestview(view) } ...
user avatar
0 votes

How can I reformat a multi-line string in vim when using the Python filetype?

I wrote a vim plugin to do this, here.
user avatar
  • 101

Top 50 recent answers are included