Skip to content
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

Vim Plugin for blue #98

Open
igordertigor opened this issue May 26, 2023 · 5 comments
Open

Vim Plugin for blue #98

igordertigor opened this issue May 26, 2023 · 5 comments

Comments

@igordertigor
Copy link

I noticed that there doesn't seem to be a vim plugin for blue. I therefore cloned the plugin at psf/black and extended it to run either "black" or "blue". Would that be something that you would like to include in your repository (as black does) or maybe something you would like to reference from the documentation?

@rotten
Copy link
Contributor

rotten commented Jun 28, 2023

FWIW, I think that would be pretty cool to try. I use vim as my main daily code editor.

@igordertigor
Copy link
Author

igordertigor commented Jun 28, 2023

The code is here. I use it with

Plug 'igordertigor/bnb.vim'

Let me know if it's useful (ideally in the issues).

@rotten
Copy link
Contributor

rotten commented Jun 28, 2023

Thanks! I'll give it a try.

@rotten
Copy link
Contributor

rotten commented Nov 21, 2023

Huh. I was cleaning up old tabs and came across this. At the time, I added

Plug 'igordertigor/bnb.vim'

to the plugin section of my .vimrc

I also added

let g:bnb_fixer = "blue"

Then I opened vim and ran :PlugUpdate to pick up the plugin. I verified it was loaded in .vim/plugged.

... and that is as far as I got. I couldn't figure out what command would cause it to reformat my open python file. I meant to come back and ask, but got side tracked (squirrel!) and totally forgot.

What do I do next?

@igordertigor
Copy link
Author

Hi @rotten , apologies for the late reply. The readme says it:
"Instead of running Black, BlackUpgrade and BlackVersion, you would use Bnb, BnbUpgrade and BnbVersion.". So you would just type :Black in vim.

By the way, I'm actually not using the anymore since I moved to nvim with a lua config, where I can use null-ls for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants