X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/2989dc1bf822b1b2a6bd250cea37bbf20c237764..b3ceb293d9e69295a190fed93517cbe1b7372154:/docs/editor_integration.md?ds=sidebyside diff --git a/docs/editor_integration.md b/docs/editor_integration.md index 037b265..bc7c2e7 100644 --- a/docs/editor_integration.md +++ b/docs/editor_integration.md @@ -233,6 +233,36 @@ If you later want to update _Black_, you should do it like this: $ pip install -U black --no-binary regex,typed-ast ``` +## Gedit + +gedit is the default text editor of the GNOME, Unix like Operating Systems. Open gedit +as + +```console +$ gedit +``` + +1. `Go to edit > preferences > plugins` +2. Search for `external tools` and activate it. +3. In `Tools menu -> Manage external tools` +4. Add a new tool using `+` button. +5. Copy the below content to the code window. + +```console +#!/bin/bash +Name=$GEDIT_CURRENT_DOCUMENT_NAME +black $Name +``` + +- Set a keyboard shortcut if you like, Ex. `ctrl-B` +- Save: `Nothing` +- Input: `Nothing` +- Output: `Display in bottom pane` if you like. +- Change the name of the tool if you like. + +Use your keyboard shortcut or `Tools -> External Tools` to use your new tool. When you +close and reopen your File, _Black_ will be done with its job. + ## Visual Studio Code Use the @@ -256,7 +286,8 @@ Sublime Text, Visual Studio Code and many more), you can use the ## Atom/Nuclide -Use [python-black](https://atom.io/packages/python-black). +Use [python-black](https://atom.io/packages/python-black) or +[formatters-python](https://atom.io/packages/formatters-python). ## Gradle (the build tool)