Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emacs emulator option #12

Open
ajeanmahoney opened this issue Dec 22, 2023 · 9 comments
Open

Emacs emulator option #12

ajeanmahoney opened this issue Dec 22, 2023 · 9 comments
Assignees

Comments

@ajeanmahoney
Copy link
Collaborator

Many team members are very proficient with Emacs and use it to edit RFCXML currently. The editor should offer an option of using an Emacs extension (like the Emacs extensions available in the VS Code marketplace). It should be optional because not all team members use Emacs.

@jennifer-richards
Copy link
Member

not all team members use Emacs

Sounds like user error 🔥

@JayDaley
Copy link
Contributor

JayDaley commented Jan 3, 2024

Is this just emacs key mapping or does the editor need to emulate emacs?

@ajeanmahoney
Copy link
Collaborator Author

EMACs_Commands.txt contains the commands that new RPC team members learn. A desired feature is ESC % (Start query-replace).

emacs.txt is the standard RPC .emacs cfg file (renamed so that GitHub would upload it). The RPC uses the following mods:

  • visual-line-mode is set so that hard line breaks are not inserted
  • a cfg block starting with "Next part added..." provides schema support

gnu-emacs.txt is the .gnu-emacs file (also renamed so that it could be uploaded).

@NGPixel
Copy link
Member

NGPixel commented Oct 8, 2024

Almost everything in the EMACs_Commands.txt file can be implemented. However, the following sequences are not supported using Electron's menuItem accelerator patterns:

  • Esc+%: Escape is not a modifier key.
  • M-gg: Double keycode not supported.

They would have to be replaced with a normal Modifier+Key code

The other solution is to implement our own key handler, in which case we can use any pattern.


It's not possible to use VS Code marketplace extensions directly. The monaco editor is simply one of the many components that make VS Code, and extensions require the full VS Code to work.

@NGPixel NGPixel self-assigned this Oct 9, 2024
@ajeanmahoney
Copy link
Collaborator Author

Commenting as a vi user here. Does this mean that the following would need to be replaced with a different key combo?

Esc-%   search and replace (step by step)
Esc-<  go to top of doc
Esc-g-g  go to a specific line number
Esc-c  init-cap forward a word
Esc-l  lowercase forward a word
Esc-b  move back a word
Esc-f  move forward a word (edited) 

@NGPixel
Copy link
Member

NGPixel commented Oct 10, 2024

If we go with electron menu accelerator patterns, then yes.

So if we expect all these to be implemented, it would make more sense to write our own key handler to avoid these limitations.

@ajeanmahoney
Copy link
Collaborator Author

The goal is not to slow down the editors that already know Emacs, so it looks like we need our own key handler.

@NGPixel
Copy link
Member

NGPixel commented Oct 13, 2024

Is it expected for users to be able to set what the Control or Meta key is? It's common to accept Control and Meta interchangeably as there's no Meta key on Windows. However, some examples you listed have different commands for both Control and Meta.

Is there a full list of commands expected to work?

@ajeanmahoney
Copy link
Collaborator Author

Users should be able to set the Control key. There is not a requirement to set the Meta key. The team uses Esc for the Meta key, but some team members use the Caps Lock for Control, another uses the Windows button.

At a minimum, the commands listed in EMACs_Commands.txt should be supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants