visit
Note: Towards the end of this article I discuss how you can automate the saving of a list of all of your plugins so that you can reinstall them as a group later, keep in a code repository, or migrate to a new development machine. Myself, I keep my configuration in the cloud, so I can continue to work at a client location with a predictable setup.
These instructions are tested and valid for
Atom 1.40
and Python 3
and up. (It may work for earlier versions of Atom, but untested.)1. Download Atom
“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. Atom is a desktop application built using web technologies.”You can use Atom's UI to install the plug-ins listed below using Atom's Settings View: just type
ctrl +
(on Linux or a PC), and cmd +
(on a Mac). Alternatively to bring up the Settings View, you can click on the Install tab, and type the package name you want to install into the Search packages search box.
For the rest of us who actually like to use the terminal window, I provide shell commands below.
2. Download a Linter Package (Source Code Checker)
$ apm install linter
$ pip install flake8
$ apm install linter-flake8
3. Download a Python AutoComplete Package and AutoFormatter
“Python completions for packages, variables, methods, functions, with their arguments. Powered by your choice of Jedi or Kite.” Jedi is a locally based library, and thus I myself prefer that one over Kite, which requires an online library.$ apm install autocomplete-python
$ pip install autopep8
$ apm install python-autopep8
4. Download a Script Package
“Run scripts based on file name, a selection of code, or by line number.” This is super useful for testing your code from within Atom instead of going to a different terminal window, and it is powerful because it is selection-based, which means you can run snippets versus whole files.$ apm install script
5. Download a File-Icons Package
“File icons similar to the vscode-icons pack for Visual Studio Code (//github.com/vscode-icons/vscode-icons) and built off of the logo-file-icons pack (//atom.io/packages/logo-file-icons) with tweaks and
additions. Tree view ui tweeks to closer match that of visual studio code.”
$ apm install atom-file-icons
6. Download a Syntax Highlighting Theme
“A syntax theme for . Inspired by Mattia Astorino's .“$ apm install atom-material-syntax
7. Download and Install Minimap
The package displays a Minimap preview of your file on the right hand side of your editor. The minimap-git-diff and minimap-highlight-selected plugins are also useful.
or, from the command line:
$ apm install minimap
$ apm install minimap-git-diff
$ apm install minimap-highlight-selected
8. Download and install a Jupyter Notebook Plugin
“A package that works like the Jupyter Notebook, but inside Atom. It's registered as an opener for .ipynb files — try opening one!"$ pip install jupyter jupyter_kernel_gateway
$ apm install jupyter-notebook
Alternatively, you can look at the Hydrogen package:
Hydrogen runs code interactively, allows you to inspect data, and plot. All the power of Jupyter kernels, inside your favorite text editor. It supports Python, R, JavaScript and .
Checkout the and to see what you can do with Hydrogen.9. Improve version control support for Atom
Because I work for several clients, I am often switching between Github, gitlab and Bitbucket for different repositories. Please look search for the following at :10. Using version control (or cloud drives) for configuration portability
Use to version control your Atom config file, and any other config files that you may have.
Linux:
~/.atom/config.cson
Windows:
%USERPROFILE%\.atom\config.cson
[or commonly]
C:\Users\{name}\AppData\Local\atom\config.cson
$ git clone //github.com/{username}/{repo}
git push
and git pull
As mentioned in the note at the beginning of the article, in order to track a common list of installed packages, at the terminal shell execute:$ apm list --installed --bare > ~/.atom/package.list
$ apm install --packages-file ~/.atom/package.list
An example of my
package.list
file is as below:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
Conclusion
In this article, I demonstrated how you can setup and maintain a python friendly development environment from with Atom (). As a developer who wants to reduce the amount of window/application switching as much as possible and create repeatable workflows, I hope that you find this equally useful. I look forward to your comments and suggestions for improvements!@DavidDataScience
Agree or disagree with some of the ideas presented in this article?
Looking for more coding articles? Subscribe to our newsletter in the footer below!