NOTE: This page has been translated automatically from Russian to English. Original page.



1C syntax I am highlighting in text editors Atom, Sublime Text, VS Code

Packages that add support for syntax 1C: Enterprise 8 Atom text editors, Sublime Text and VS Code.
And not only.

Recently, the topic is gaining popularity Infostarte different "razukrashek" 1C-text. And I'll make a contribution.

Me, together with colleagues from the community xDrivenDevelopment , syntax, packages for Atom text editors have been developed, Sublime Text and VS Code.

What is the syntax for package?

Syntax packages - a special extension plug-ins for editors, text describing the module parsing rules. I draw your attention to the phrase "parsing rules." With this package you can install any theme editor any desired color. Most importantly, the editor will be understood that "ZnachenieZapolneno" - a built-in function, and the "Export" - keyword.

A couple of examples of the work:

Monokai:

Monokai

No less popular Solarized Light:

solarized Light

As you can see, regardless of the color editor, all of the keywords, operators, etc ..., are highlighted correctly.

Also in the present lights query language pack. Query text is highlighted even within the text module.

Query-monokai

What else?

However, not a single coloring alive 1C-programmer. Package adds some pleasant and necessary functions for editing code.

Let's take some items from the list of utilities:

1) Automatic insertion | when editing a multi-line:

An automatic line

2) The list of procedures and functions of the current file and / or the working directory:

The list of procedures and functions

3) Addition of procedures and functions of the global context:

Contextual help

4) Automatic indentation (forward and backward) at a set of modular structures (for example, If ... Then ... ENDIF):

autoindent

5) Using the data packets, you can launch files or * .bsl * .os through interpreter OneScript , developed EvilBeaver ( http://infostart.ru/profile/267027/ ). For detailed instructions on configuring startup scripts, see the "README" package you are interested in.

Starting oscript

A full list of features and the availability of each of them in the editor you can see here , in "Advanced Features." The link leads to "head" repository, where consolidated development work packages.

What's next?

Our team is trying to gradually expand the functionality of the package, adding new features. In the next release, for example, we plan to add support for standard text templates or, as they are called, snippets.

Just go to work on adding 1C syntax highlighting on himself github. The main difficulty now - the lack of popularity of extensions * .bsl on github. Publish your configuration and processing, attaches to git and OpenSource. The number of repositories in this step is very important.

And of course, leave your comments and suggestions here, see Issues repository or chatting gitter .

references

Here is a list of links on the packages:

The packages can be installed via the regular package managers of each of the editors (search for "1c bsl" should give the most relevant results). If you do not know how to do it on the packages page, there are links to installation instructions. README also includes links to additional functionality for setting instructions.

Thanks

Many thanks bambr1975 ( http://infostart.ru/profile/128365/ ) for help in taming VS Code and the implementation of many useful features in the packages!

Thanks to Andrew Ovsyankina (EvilBeaver) for OneScript. The presence of external scripts at 1C-language and prompted me to start work on the grammar.

Thanks to the whole team xDrivenDevelopment for testing, discussion, and every assistance in the design :)

And thank you for your attention!

Updates (significant)

A full list of changes is always available here (CHANGELOG mainly project repository).

1.3.0

Added linters files * .os. Used OneScript interpreter mode "check". It allows you to immediately see when you save the errors.

1.4.0

Added text templates (snippets). It is based on standard templates of the configurator.

Сниппеты

1C:Enterprise Developer's Community