vim: Add shortcut to disable black

This commit is contained in:
Simon Bruder 2020-08-14 14:42:00 +02:00
parent 7d052f062e
commit 148d5378e4
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F

View file

@ -1 +1,3 @@
autocmd BufWritePre <buffer> execute ':silent Black' let b:black_disable = 0
autocmd BufWritePre <buffer> if b:black_disable != 1 | execute 'silent Black' | endif
map <Leader>b :let b:black_disable = (b:black_disable + 1) % 2<CR>