Which editor to use

Software developers spend most of their time inside a source code editor.

Don't waste too much of your time with single-file editors like joe or nano. These are good for occasional changes in files on a server that you access via a terminal, but they are not designed for jumping back and forth in a repository with thousands of source code files.

If you haven't yet made up your choice about which editor to use, then we recommend to start with Atom. See below. There are other choices, most notably PyCharm.

Atom

"A hackable text editor for the 21st Century". https://atom.io/

Installation:

$ sudo apt install atom

Install the python-tools package and configure its "Path to Python directory" to point to your default virtualenv (which you defined in Set your default virtualenv).

Select File ‣ Add project folder... and add your ~/lino directory. This will cause Atom to index all files below this directory.

How to instruct Atom to use your default environment when doing syntax checks or finding definitions:

  • say Edit ‣ Preferences ‣ Packages

  • select the settings of the python-tools plugin

  • set the Path to Python directory field to ~/lino/env/bin (or whatever your chose as your default virtualenv )

Some useful keyboard shortcuts:

  • Ctrl+P open an existing file using fuzzy file name search within all files of the project.

  • Shfit+Ctrl+F find (and optionally replace) a text string in all files (or in some)

  • Alt+Q reflow selection

  • Ctrl+Alt+G go to definition

Other useful packages to install:

  • tidy-tabs causes Atom to close tabs that you haven't visited for some time. Useful because otherwise Atom can become a memory waster.