1

I am writing a Flex lexer and Bison parser for a plaintext file format using a sort of vertical parallelism: two characters that are in the same column are inherently associated with one another.

I am fine writing this file format in a plain text editor, but I should eventually work on creating a text editor that is customized to accelerate composition of my format. I have a few things in mind, but I will suppose anything that can be made to do this can be made to do the rest:

  1. Suppose the user is on the tenth column, and presses downarrow with a modifier like Alt. Newline and space will be automatically inserted, such that their cursor will appear on the tenth column.

  2. Returning a hexadecimal value dependent on precisely how long a key is held down (with modifier key).

I am an Ubuntu user and I use Gedit and Nano to edit files. And I know of Vim and Emacs but I suppose none of these were written to be very forkable: surely a smaller and kinder code would be more conducive instead. Or could Emacs just do it with some native macro function?

  • I don't know is forking is necessary & hope that you can get an emacs macro. Many IDEs are open source (although you just need an editor, not an IDE). Atom is very popular and modern, but you could also fork Eclipse, NetBeans, etc. Your best bet is a macro, but don't restrict it to emacs – Mawg Sep 2 at 10:14
0

You can try the CudaText editor (written in Lazarus). But better don’t fork it, rather make a plugin, which does all the functionality for hotkeys. Plugin can handle on_key, on_key_up events, so it can perform any actions after key presses. Refer to CudaText API wiki for info.

Together with a plugin you will need to make the lexer, for you syntax, and bind the plugin to the lexer via .inf file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.