Atom for Pythonist
Atom is a free and open-source text and source code editor for macOS, Linux, and Microsoft Windows with support for plug-ins written in Node.js, and embedded Git Control, developed by GitHub (Wikipedia).
Atom was launched in February 2014 by the GitHub team.
A hackable text editor for the 21st Century created by GitHub team which is simple, powerful and highly customizable.
Download for 32 bit or 64-bit installer according to your operating system. Once it is downloaded, go to the download folder and double-click on “AtomSetup-x64.exe” for installing it.
Click on the icon and install the editor as shown below:
After giving the permission to the windows, a beautiful image will appear with the caption “Atom is being installed. It will launch once it is done”.
Once it is installed, an icon on the desktop will appear. To use Atom, either click on the desktop icon or find the “Atom” in the start menu.
Atom for Pythonist
Pythonist loves Atom, as both are open source. It could be customized for Pythonist by installing six packages:
- platform_ide-terminal
- autocomplete-python
- python-autopep8
- linter-flake8
- Browser Plus
- file-icons
1. platform_ide-terminal
It is a terminal package for Atom for integrating command line in ATOM.
Click on File> Settings>Install "platform-ide-terminal"
It stays at the bottom of the editor. Click on the “plus sign” on the bottom-left side for using it.
For more information click here.
If you press Ctrl+T or Ctrl+P, the Fuzzy Finder will pop up. This will let you quickly search for any file in your project by typing parts of the path.
2. autocomplete-python
autocomplete-python autocompletes python packages, variables, methods, and functions with their arguments in Atom.
Click on File>Settings>Install autocomplete-python
3. python-autopep8
It formats the python code according to the PEP8 guidelines. For more information click here.
Click on the Settings of python-autopep8 and go to the Settings. Check the Format on Save
as shown below.
- autopep8 need to be installed on the system. Open bash and type
pip install autopep8
4. linter-flake8
Flake8 is a Python library that wraps PyFlakes, pycodestyle and Ned Batchelder’s McCabe script. It is a great toolkit for checking your code base against coding style (PEP8), programming errors (like “library imported but unused” and “Undefined name”) and to check cyclomatic complexity. For more information click here
- flake8 need to be installed on the system. Open bash and type
pip install flake8
5. Browser Plus
It opens a real browser in ATOM, which is very handy for debugging and checking the output at the same time. It opens the home page(maintained in the settings) or http://www.google.com.
ctrl + shift + P and search Browser Plus for opening the browser window.
6. file-icons
This put a little icon next to each file, which helps us to identify which kind of file it is.
File-specific icons in Atom for improved visual grepping.
Open File with Atom in one click
The normal procedure for opening a file or a directory with Atom is by first opening the editor Atom, with either of two methods as mentioned above. Then click on “File” > “Open folder” and browse to the file or the folder, which is a very cumbersome process as shown below:
Wouldn’t it be amazing if we could just open the file in one click? So let see how we can do it.
- Open the editor Atom
- Click on File > Settings and Click “System” tab. Check the
Show in file context menus
andShow in folder context menus
as shown below: - Close the editor Atom.
Right click and “open with Atom” option will appear as shown below. Atom is available with just a right click away.
Conclusion
We have learned about a wonderful open source editor called Atom. How it is being used by Pythonist and some tricks and tips about using it.
Leave a comment