Adding new functions to the Atom text editor
|
In the Reactor
When compared with veteran projects like Vim, this new editor includes several helpful features. It is possible to indent one or multiple lines of code to the right by highlighting and using the Tab key. Pressing the Shift+Tab keys moves a block of text to the left. The developers have also implemented an auto-complete feature. You can extend this feature with the Autocomplete-plus package. The package also makes it possible to change the key combination required for utilizing the function.
If you call up the settings via Ctrl+, and select the Soft Wrap feature, the editor will wrap lines at the edge of the display screen. An additional checkmark to select Soft Wrap At Preferred Line Length wraps the code according to the corresponding number of characters. A visible line will indicate the edge of the wrap which is preset for 80 characters. You can change the number of characters as needed in the Preferred Line Length line.
If the Soft Tabs option is activated, then the software will automatically change tabs into empty spaces. You can determine the number of empty spaces per tab via Tab Length . The folding feature lets the user simplify the structure of the code. The text editor collapses the code under a method, instruction, or function. This functionality is not really implemented well. The small triangles are difficult to select, and the editor jumps suddenly into another passage in the code.
Strengths and Weaknesses
This new tool also has a few deficiencies. The most noticeable of these is that Atom currently stutters when confronted with files that are greater than 2MB in size. The developers are working on a solution for this shortcoming. They are also constantly working on improving the startup speed for the editor and the reaction time of the graphical interface.
It was rather slow in testing, but this could be because of the surrounding virtual machine. On the other hand, it should be no surprise that the integrated code administration works better. For example, you can press the Ctrl+Alt+Z keys to restore the most recent version of a file. This command corresponds to the lines in Listing 2.
Listing 2
Restore Most Recent Version of a File
$ git checkout HEAD -- path $ git reset HEAD -- path
If you would like to know which of your files Git does not administer, press the Ctrl+Shift+B keys. This key combination is equivalent to git status . The language-git package emphasizes the messages for the commit, merge, and rebase actions. Via git-diff , the editor can graphically highlight lines that have been changed. If you look on GitHub for information about a file that you are currently editing, you will find a series of shortcuts that can help. See Table 1.
Table 1
GitHub Shortcuts
Key | Commands |
---|---|
Alt+G+O | Open a file on GitHub |
Alt+G+B | Display GitHub information about most recent modifications to the file |
Alt+G+H | View the GitHub history for a file |
Alt+G+C | Copy the GitHub URL for the current file |
Alt+G+R | Compare branch with GitHub |
« Previous 1 2 3 Next »
Buy this article as PDF
Pages: 4
(incl. VAT)