How to set up smartphones and PCs. Informational portal

Atom text editor in Russian. Atom: a new code editor from Github

From the translator: yesterday, without an official announcement, several dozen repositories were published on Github, the contents of which indicated that the Github team has long been for programmers and is ready to present it to the public. A few hours later, the official website of the atom.io editor was launched, where you can now request an invite to beta testing, get acquainted with the documentation and plugins for the editor. This article is a translation of the first two posts from the Atom project blog about the concept and architecture of the editor.

Introducing Atom

Today, we're excited to launch the public beta of Atom, a new text editor that's not only easy to use, but also offers a lot of customization freedom.

Sublime and TextMate offer convenience, but only limited extensibility. On the other hand, Vim and Emacs are extremely flexible, but difficult to learn and require learning specific scripting languages ​​for modifications.

We believe we can do better. Our goal is an uncompromising combination of convenience and customizability: an editor that even a student who has just started to learn programming can understand, but at the same time a tool that will not limit an experienced hacker.

Since we started using Atom while we were working on it, what started out as an experiment turned into a necessity for us. This is just the beginning, and there is much more to be done to fully realize our vision as an editor. But the main goal has been achieved. Outside Atom - modern text editor that meets user expectations. And under the hood is a system that just asks for modifications and expansion.

In the coming weeks, we will send invitations to beta testers, and already now we have published more than 80 libraries and packages that are used in the editor. We have opened many of the APIs that are needed to write powerful extensions, but since this is a beta version, there may still be changes based on feedback from you. We will try to make them as carefully as possible, while actively refining the editor.

We are waiting for your feedback, packages and patches. Let's do it together!

atom nucleus

The web has its flaws, but two decades of development has made it an incredibly flexible and powerful platform. Therefore, when we decided to write a text editor that we ourselves would be happy to expand and modify, the choice of technology was obvious. But first, we had to get rid of a few constraints that held us back.
native web
Browsers are well suited for browsing the web, but writing code is a specific activity that requires specific tools. More importantly, the browser severely restricts access to local resources computer for security reasons, and for us a text editor that could not write a file normally or run a local subprocess was completely unacceptable.

Therefore, Atom is not a normal web application. This is a specialized Chromium browser, redesigned to be primarily a text editor rather than a web browser. Each Atom window is a separate local web page.

The JavaScript code running in each window has access to all the APIs that are available to any Node.js application. This hybrid solution creates unique opportunities for development.

Since all work happens locally, there is no need to worry about loading resources, concatenating scripts, and loading modules asynchronously. If you need some code, just require at the beginning of the file is enough. The Node.js module system makes it easy to split the system into small, well-focused packages.

JavaScript along with C++
Interaction native code is also very simple. For example, we wrote a wrapper around the engine regular expressions Oniguruma to support compatibility with TextMate. In the browser, we would have to deal with NaCl or Esprima . Integration with Node has greatly simplified the task.

In addition to the Node.js API, we also use native APIs dialog boxes browser, main and context menus, window size controls, and so on.

Web technologies: all the best
Another big plus of working on Atom was that we were always guaranteed to work with latest version Chromium. This means that we were not worried about cross-browser compatibility issues. We could use all the innovations of web technologies today.

For example, the layout of the workspace and editor panels uses flexbox . This is not yet a well-established standard, but despite the fact that it changed during the work, we were happy that we can already work with it.

We are confident in the future of the platform on which Atom is built, because web technologies are developed by the joint efforts of an entire industry. Native technologies come and go, but the web is getting better and more widespread every year. We will gladly use all its possibilities.

Atom is a program for editing text and program code with the most pragmatic interface. It can work with almost all common encodings and formats. text files and also includes a syntax highlighting feature. If desired, Atom can be used quite successfully as a file manager. Built-in "browser" allows you to easily switch between files and folders, move text documents"one by one" and in bulk, as well as comfortably view the directory structure in a tree-like list.

Like most other modern text editors, Atom opens new files in separate tabs working like a web browser. Thanks to this, the user can easily copy and move information between documents. Open tabs the program remembers when you close it, unless of course you have disabled this feature in the settings. By default, the editor uses a dark and dim theme. If you have to work a lot with text (especially at night), then you probably understand the benefits of such interface colors. The black background does not "cut" the eyes when working in the dark, and also reduces fatigue. Typically, such a design graphic shell used in "night modes", which are now customary to supply various text editors and "readers".

Atom - completely free program. The editor is an excellent tool for developers, copywriters, and indeed for everyone who does not have enough functionality of the standard Windows Notepad.

What's new in this version?

1.32.2 (10.11.2018)

  • fixed a bug where the execution of quick big changes could result in incorrect syntax highlighting;
  • fixed a bug that caused hangs when making some changes to ERB files;
  • fixed a bug where entering "#" erroneously inserted braces in several languages;
  • added several syntax highlighting classes that were accidentally removed in 1.32.0.

Atom was developed by the GitHub development team. They position their product as a text editor of the 21st century. What were the developers initially striving for and why did they even have a desire to create an atom, because the market is full of text editors? According to the developers, there are many similar programs on the market, for example, Sublime Text 3, Brackets, etc., but they have a number of disadvantages. Some text editors have rich opportunities in terms of expanding functionality, settings, but it is difficult to study this whole thing, to do it for an inexperienced user without special knowledge, while others, on the contrary, are easily digestible, but not very functional. So atom was developed in order to remove these edges, and combine all the advantages of competitors!

First start

When you first start the atom, a welcome window opens in front of us, consisting of two panels, on the left side is the editor's logo, a description with links, and on the right side of the menu of the main sections of the program with short descriptions of each - which will help you make friends with the atom from the first minutes.


Interface

The first thing that hooked me after installing atom was its nice and friendly interface, which contrasts sharply with competitors, in better side. The design of the atom is very intuitive and thoughtful, there is nothing superfluous, and all the elements are correctly located, so that even a beginner will not have difficulty at first understanding what is located where.

Code highlighting in general made me personally fall in love with the theme, which is the default after installing the atom. Agree, she's just amazing!


The program settings window is also very convenient and beautifully done, each setting has a description that will help you understand what it is for. In addition to this, the developers have included such an opportunity as viewing the description of additionally installed plugins and editor themes, without having to go to the page with the plugin on the Internet, which I think is cool!


atom text editor settings menu

The settings of the atom text editor can be opened through the "view" menu section, the "settings" item, or by using the hotkey combination - Ctrl + ,

The program has a great variety of settings, all settings are divided into semantic categories (also convenient).
Core – Program core settings Edit – Text editing settings and its display in the editor window System – atom display settings in the operating system context menu Keybindings – List and description of all text editor hot keys atom Packages – List of all plugins installed in the atom and their settings with description , as well as the button to enable / disable any plugin (even the system one). Themes - List section established themes and their settings. Updates - Section of notifications about new versions of plugins, themes and the atom text editor itself with an update button for each. Install - A section of additional plugins and themes for atom with a description of each, fast filter and the install button.

You can change almost everything here, and you don’t need to climb into system files, as in other code editors, everything can be done right in the settings panel by simply enabling / disabling one or another setting.

atom hotkeys

A separate section shows all the hot keys of the program and a description of what they are responsible for. Every hotkey you can rewrite to other keyboard shortcuts that are convenient for you personally. To do this, you need to click on the floppy disk icon to copy the configuration code for this function and then open the hotkey settings file using the link “your keymap file”, then paste the copied code in it and replace the recorded keyboard shortcuts with your own and save the file, after which you will immediately you can use the given hotkeys 🙂


atom plugins


Hot key hints

A cool feature of the atom is that there is a benefit in everything 🙂 When empty window editor, it displays a text slider with tips for frequently used program hotkeys.


Bookmarks

Bookmarks are available right out of the box in the atom, which will help speed up the process of navigating through large code. For example, you have css file with styles for site blocks, so by putting bookmarks at the beginning of each section of block styles, you can easily and quickly move between these sections of code by setting bookmarks on them. Or, when you finish the working day and want to quickly open the next day the place you worked with yesterday - bookmark it and don't worry!

Bookmarks in atom are in the "Edit" menu item "Bookmark". You can also bookmark/unmark a section of code using the Alt+Ctrl+F2 key combination. And move between bookmarks: Forward - F2 ; Back - Shift + F2 To view a list of all bookmarks in the document, you can use the keyboard shortcut - Ctrl + F2


Git and GitHub in Atom

A very convenient feature of atom is that it has a panel for working with Git version control, which allows you to maintain version control directly from the atom text editor without having to go to the console. Well, of course, the developers of the atom included support for linking the repository on GitHub with the atom editor. (We will talk more about working with Git in atom in the following articles)


Atom also has support for snippets (prepared pieces of code). When typing the initial letters of the snippet, a window appears with a list of snippets already prepared in the program (for of this type document) that match the entered letters. Snippets expand when you press the Tab button.
We can also create our own snippets (more on this in the next articles in this series). The snippet menu is located in the "Packages" section of the main menu, the "Snippets" item, and if we select the "available" item here, a window will open with a list of all available snippets for this type of code.


Command Panel in Atom

Everything available features and program commands are available in the command panel, which can be opened in the "Packages" menu item "Command Palette", or by pressing the hot key combination - Ctrl + Shift + P

In addition to the fact that the command panel lists all available functions, many functions to which hotkeys are assigned have a combination of hotkeys that launch this function\command.

We can filter the list by entering the team name in the quick filter box.


In addition to tabs, we can divide the editor window into panels. The panel menu is located in the main menu section "View" tab "Panes". Or from the context menu in the editor window. If you choose a command "Split - Up, Down, Left, Right", then another window will be added to the editor window at the top, bottom, left, right, according to the selected command. In turn, any panel can also be divided into an infinite number of additional panels. Panels can be resized by dragging outside the border of the desired panel.


That's basically all that I wanted to say in the first lesson from a series of lessons on this text editor, called Atom. By the way, Atom for me is now the main text editor in which I write program code.

I hope the article is useful for you, I'm waiting for your comment on this editor write what you like or don't like about it and what plugins for the atom you use. I would be happy to discuss with you this topic. And we don’t say goodbye on this - see you in the next article, which will be devoted to the analysis of all elements of the atom interface and its configuration! Till!

For convenient and effective programming I needed a development environment that should be fast, easily and flexibly customizable, with plugin support. In the process of searching, I came across Atom , I will tell about it and its plugins in the article.

Atom editor - open source development environment source code from the creators of GitHub based on the Electron framework, which is used to write cross-platform desktop applications using web technologies.

Installing the editor

color-picker

From the name it is clear that the plugin allows you to conveniently select colors from the palette in various formats, including formats for color selection in Sass and LESS. To bring up the palette, press Ctr + alt + c on Linux and Windows, Cmd + Shift + c for Mac. Download

Git projects

Ctr + Alt + O - will list all local repositories in operating system. If you work with git a lot, I think this plugin will be very handy. After installation, in the plugin settings you need to specify the path to the folder with all local repositories.

/path/to/repo1; /path/to/repo2; /path/to/repo3;

Merge conflicts

If you work in a team, you probably use a version control system and have probably encountered conflicts when merging branches. This plugin makes the conflict resolution process very comfortable and understandable. When you open Atom, this plugin analyzes the repository for conflicts, and if it finds them, it displays a window at the bottom of the editor with a list of files with conflicts. Download

Minimap

Shows a small map of the document that can be scrolled, it is convenient to navigate in in large numbers code. You can also adjust the size of symbols and the location of the mini-map in the plugin settings. Download

atom-alignment package

The plugin allows you to select a section of code and format it in a more decent form. For example, we have this code:

Click Ctrl+Alt+A and the code is formatted in more beautiful view.

var1="adas"; var123456 = "adadasd"; a = 1; bacd = "very long striiing"

Linter

Checks code syntax on the fly and notifies you of errors. This plugin is the main package and other "linters-addons" for each programming language are installed to it (full list). This is done to end the "plugin war" ( The idea is to stop the linter plugins war, by providing a top level API for linters to parse and display errors in the Atom editor). Download

multi-cursor

From the name it is clear what this plugin does. On Linux, press Alt + Shift + Up to multiply cursors up or Alt + Shift + Down to multiply them down. Download .To exit multi-edit mode, press Esc.

File-icons

Shows an icon next to the file name. Download

From the translator: Yesterday, without an official announcement, several dozen repositories were published on Github, the contents of which indicated that the Github team has been developing a new text editor for programmers for a long time and is ready to present it to the public. A few hours later, the official website of the atom.io editor was launched, where you can now request an invite to beta testing, read the documentation and plugins for the editor. This article is a translation of the first two posts from the Atom project blog about the concept and architecture of the editor.

Introducing Atom

Today, we're excited to launch the public beta of Atom, a new text editor that's not only easy to use, but also offers a lot of customization freedom.

Sublime and TextMate offer convenience, but only limited extensibility. On the other hand, Vim and Emacs are extremely flexible, but difficult to learn and require learning specific scripting languages ​​for modifications.

We believe we can do better. Our goal is an uncompromising combination of convenience and customizability: an editor that even a student who has just started to learn programming can understand, but at the same time a tool that will not limit an experienced hacker.

Since we started using Atom while we were working on it, what started out as an experiment turned into a necessity for us. This is just the beginning, and there is much more to be done to fully realize our vision as an editor. But the main goal has been achieved. On the outside, Atom is a modern text editor that lives up to the expectations of users. And under the hood is a system that just asks for modifications and expansion.

In the coming weeks, we will send invitations to beta testers, and already now we have published more than 80 libraries and packages that are used in the editor. We've opened up many of the APIs we need to write powerful extensions, but since this is a beta release, it's still subject to change based on your feedback. We will try to make them as carefully as possible, while actively refining the editor.

We are waiting for your feedback, packages and patches. Let's do it together!

atom nucleus

The web has its flaws, but two decades of development has made it an incredibly flexible and powerful platform. Therefore, when we decided to write a text editor that we ourselves would be happy to expand and modify, the choice of technology was obvious. But first, we had to get rid of a few constraints that held us back.
native web
Browsers are well suited for browsing the web, but writing code is a specific activity that requires specific tools. More importantly, the browser severely restricts access to the local resources of the computer for security reasons, and for us a text editor that cannot write a file properly or run a local subprocess was completely unacceptable.

Therefore, Atom is not a normal web application. It's a specialized variant of the Chromium browser redesigned to be primarily a text editor rather than a web browser. Each Atom window is a separate local web page.

The JavaScript code running in each window has access to all the APIs that are available to any Node.js application. This hybrid solution creates unique development opportunities.

Since all work happens locally, there is no need to worry about loading resources, concatenating scripts, and loading modules asynchronously. If you need some code, just require at the beginning of the file is enough. The Node.js module system makes it easy to split the system into small, well-focused packages.

JavaScript along with C++
Interaction with native code is also very simple. For example, we wrote a wrapper around the Oniguruma regular expression engine to support compatibility with TextMate. In the browser, we would have to deal with NaCl or Esprima . Integration with Node has greatly simplified the task.

In addition to the Node.js API, we also use the native APIs of browser dialogs, main and context menus, window size control, and so on.

Web technologies: all the best
Another big plus of working on Atom was that we were always guaranteed to work with the latest version of Chromium. This means that we were not worried about cross-browser compatibility issues. We could use all the innovations of web technologies today.

For example, the layout of the workspace and editor panels uses flexbox . This is not yet a well-established standard, but despite the fact that it changed during the work, we were happy that we can already work with it.

We are confident in the future of the platform on which Atom is built, because web technologies are developed by the joint efforts of an entire industry. Native technologies come and go, but the web is getting better and more widespread every year. We will gladly use all its possibilities.

Top Related Articles