japanoise / emsys

ersatz-emacs text editor
MIT License
3 stars 2 forks source link

zmacs regions #19

Open japanoise opened 1 year ago

japanoise commented 1 year ago

i.e. highlight the region and track when it's active, i.e. ready to be highlighted. This would make replace-string and replace-regex more intuitive; when the region is inactive, they should work on the entire file.

japanoise commented 1 year ago
  1. C-g marks region inactive
  2. C-spc toggles active if on the mark; sets mark and makes active if not
  3. C-x C-x makes it active

When drawing the screen, eols/newlines should have a reset styles escape code.

nicholascarroll commented 4 months ago

Is this different to how Emacs works? I am going to make my fork of emsys into a little emacs clone. I will only be adding a couple more commands and then it will be finished. Visible mark using reverse video is one, but I want to try to exactly to match the look and feel of vanilla Emacs.

nicholascarroll commented 4 months ago

So if this issue aims to implement mark functionality different to vanilla Emacs, then I guess my fork is going to diverge. If so then I would like to propose we postpone this issue a few days while I get you some other contributions in via PRs:

  1. POSIX 2001 compliance
  2. Window-based cursors and scrolling so that split view on the one buffer works properly
  3. M-x toggle-truncate-lines and M-x visual-line-mode.
  4. Possibly refactoring editorPrompt so that you can do mark and all the edit commands down there
  5. The other currently open issues
  6. Bugfixing Are all those things that you would like to have in emsys?
japanoise commented 4 months ago

Is this different to how Emacs works? I am going to make my fork of emsys into a little emacs clone. I will only be adding a couple more commands and then it will be finished. Visible mark using reverse video is one, but I want to try to exactly to match the look and feel of vanilla Emacs.

The name "zmacs regions" is a historical artifact. Highlighting the region while active is standard gnu emacs behavior

nicholascarroll commented 4 months ago

I have implemented visual mark in my branch visual-mark. If you are interested, I would like to resolve a couple doubts before raising a PR:

PR will also wait on my other change issue #32