I am looking for a code editor with specific features. For Windows, commercial or free.
List of required features:
- The editor should be language-agnostic, and language-aware features should be customizable and importable/exportable via external definitions, transparent to the user if possible. So for example if I create my custom language, I can create custom lexer and highlighting schemes, etc. Ability to use or create advanced features for any language (e.g. grammar checkers, variable/function lists, etc.) obviously would be great.
- Scriptable/programmable: must have support for scripting (ideally with Python) with access to the text, caret, other internal editor features, so I can program editing features and bind them to shortcuts. Ideally with possibility to use GUI of the editor (e.g. show some list in a side-panel etc.).
- Highly customizable syntax highlighting features. I.e. not only basic things, but with ability to define the styling for individual characters and sequences (e.g. regex matching) and so that it can be set to different font, size and color for the match. (please note the emphasis). [*]
- Lines can be of different height. For example if I set the styler to 5pt font, and it matches the whole line - the line will have 50% height compared to the height lines with 10pt size.
- Ideally with support for line indents (tree-like editing). Indentation level (nesting level) must be accessible via scripting (e.g. to generate runnable Python code). (Note: please don't confuse indentation with inserting space or tabs character! Indents here = non-editable horizontal space).
[*] Important note on the requirement no.3: Even though some editors have extra rich formatting options, the common problem is that those are only applicable to the so-called 'tokens' (e.g. keywords, functions). So please note, that it is not enough. To better understand what I mean, here are concrete examples what I need to do:
- set the font/size for cyrillic letters inside strings only;
- set the font/size for numbers inside identifiers only;
- set the font/size for the hyphen character inside a word; etc...
Further criteria (less important):
- it should be fast and responsive, without much bloat;
- it would be great if it is actively developed so at least there is a chance that some useful features will be added;
- advanced scripting API for interactive features, for example ability to read mouse coordinates and detect the character or line under the mouse cursor;
- adequate tabulation support (indent-aware);
- no intrusive annoying features like something blinking, animations, switching focus, hogging the CPU&HDD etc.
Question:
Please suggest an editor which supports all of the above mentioned features.
Even if not everything is supported out of the box, but possible via scripting/extension, please also give a suggestion and some descriptions.
In other words, even if the editor is not exactly a code-editor, but it can fulfill the requirements, it can make a useful answer as well.
Not as a real example - but just to illustrate an alternative approach: for example, one can use e.g. Word or Adobe InDesign to edit the code, then generate sources and pass them to other tools. Yes, doing so would be kind of absurd for this task, but just to say - e.g. with InDesign all of the highlighting features and e.g. code generation are possible via scripting, so it's a viable option in theory.
What I have tested so far with lists by feature:
Notepad++
This editor fulfills many requirement, but still many features are limited. Super fast, no bloat. It is based on the Scintilla engine, which has many advanced features ahead of it's time. Something is possible via plug-ins. As a note, developing a plugin basically requires developing an C++ application, which may be quite a challenge.
So to my feature list:
- Partially. E.g. to define hilighting for a custom language must use UDL, but it's limited (see 3.). Built-in lexers are hard-coded, dev-guides are lacking.
- Yes - e.g. using the PythonScript plugin, and it's good.
- Partially. The problem is, it does not support regex-based matches.
So I can define stylers with various fonts/sizes, but I can apply it only to the tokens which are defined by the lexer (hard-coded), or via UDL, but UDL is limited to the unified grammar tokenizer (no custom operator groups, no user-defined match sequences). So basically the Scintilla's composer supports this, but the editor does not provide this to the user, so no way to use it directly. - No (all lines are of equal height).
- No.
gVIM
Great editor, super fast and customizable. But pretty limited in graphical features.
- Yes.
- Yes.
- No. (herewith limited to monospaced fonts only, but as a nice bonus it has regex-based hilighting)
- No.
- No.
VSCode
I've been testing it only for a while, so can't be sure about some features. It's pretty slow, so on a low-end machine will be hardly usable.
- ???. Seems like it tends to be extensible to support any language via extension, but the whole picture is unclear and its development seems pretty chaotic.
- ???. Extensions are possible, but I could not spot clear instructions or a dev-guide. Also it seems that many parts of the core editor are not customizable/accessible at all.
- No.
- No.
- No.