New answers tagged formatting
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:
...
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)
}
...
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.
Top 50 recent answers are included
Related Tags
formatting × 174indentation × 24
comments × 15
wrapping × 14
neovim × 11
vimrc × 10
filetype-markdown × 10
vimscript × 7
key-bindings × 7
line-breaks × 7
alignment × 7
autocmd × 6
visual-mode × 6
filetype-tex × 6
filetype-xml × 5
insert-mode × 4
filetype-python × 4
syntax-highlighting × 3
regular-expression × 3
search × 3
substitute × 3
cursor-motions × 3
filetype × 3
options × 3
filetype-html × 3