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

Feedback on a possibly interesting project #67

Open
forthrin opened this issue Nov 9, 2020 · 4 comments
Open

Feedback on a possibly interesting project #67

forthrin opened this issue Nov 9, 2020 · 4 comments
Labels
enhancement New feature or request
Projects

Comments

@forthrin
Copy link

forthrin commented Nov 9, 2020

Yet another text editor... Well, it could be promising judging from the fundamental values and choices listed.

I started writing one myself a while back, inspired by Kilo, to try to make something fully useful under 1000 lines of code. I obviously had to sacrifice syntax highlighting then, and I'm still hoping to come back to the project. Anyway:

The major, perpetual hurdle and migraine-inducing annoyance with switching text editors is always the same:

LEARNING YET ANOTHER SET OF KEYBOARD SHORTCUTS!!!! (And: "My favorite feature is missing!")

I addressed this in my own project by focusing on the universal UNIX shortcuts(Ctrl+A, Ctrl+E, Ctrl+K, etc.) and primarily making features around them, also using external tools whenever possible, eg. grep/perl for search/replace, etc.

I use Emacs, because I've used it for so long, and it's (easily) available on all terminals. I use nano for simpler tasks. I tried vi, and as much as I respect it's combination of features and minimalism, the single keystroke dogma is just too weird.

My major problem with Emacs is it completely chokes and crashes on long lines (eg. 200K of inline JSON in a HTML file). Also, I will not switch to a new editor which doesn't have the ingenious Emacs interactive search (Ctrl+S).

In conclusions, I might be interested in this project if it meets with the following criteria:

  1. Full compatibility and utilization of legacy UNIX shortcuts
  2. No slowdowns on startup and handling of large files whatsoever
  3. VERY conservative feature set, perfect the basic functions before (not :P) adding fancy/advanced features

Actually, one of my choices was also to make the code so simple that to change the logic ("configure") the editor, you would just change the code rather than changing options. This way, you could have it any way you wanted.

I would even suggest to so ambitious that the goal should be to become a bundled text editor on a majority of UNIX distributions, ie. preferred over nano/vi/Emacs. Then you will have really achieved something, and not be "Yet Another"...

I hope my feedback will provide some inspiration and direction the project. Feel free to comment back.

@curlpipe
Copy link
Owner

curlpipe commented Nov 9, 2020

Thanks so much for the feedback! I've recently addressed the issues with the key bindings, they are now configurable from the configuration file which I've documented in the wiki. I use the Colemak-GB keyboard for ergonomic reasons (I type for really long periods of time and I tired quickly on qwerty) so that probably explains some of the really weird ones in the default configuration, I could probably change them around a bit to these Unix ones by default. I am also making efforts to make Ox super efficient. I'm planning on working on making it eat huge files with no slowdown. I'm also working on solidifying the current feature set. I don't plan to add anything more until everything is the best it can be. I also considered making Ox modular with the code but I thought it would be a bit unnecessary as I was pretty much only writing this for myself, now it's become popular I will consider creating some way to selectively add and remove features by removing elements of the code but I'm not sure how easy that would be. I probably won't focus on that just yet but it can certainly be something to consider in the future.

@curlpipe
Copy link
Owner

curlpipe commented Nov 9, 2020

@forthrin Do you have a table for these UNIX shortcuts you speak of, I can't quite find them 🤔

@curlpipe curlpipe added the enhancement New feature or request label Nov 9, 2020
@forthrin
Copy link
Author

This is the list I compiled from various sources. It may be inaccurate/incomplete/incorrect, so do look around for a complete reference (source codes for shells/terminal emulation), or ask the most scruffy-looking sandal-wearing person you know.

PS! Another thing I did was install a frequency counter in Emacs for which keystrokes/functions I used most often. Doing this will truly surprise you. At least in my case, four keys were topping the list by far. You can guess which ones.

Alt  + Del  Delete word before cursor
Alt  + B    Back one word
Alt  + C    Capitalize character
Alt  + D    Delete word after cursor
Alt  + F    Forward one word
Alt  + L    Lower case to end of word
Alt  + R    Revert line
Alt  + T    Swap word with previous
Alt  + U    Uppercase to end of word
Ctrl + _    Undo
Ctrl + A    Start of line
Ctrl + B    Backward one character
Ctrl + C    Send SIGINT
Ctrl + D    Delete char / Send EOF
Ctrl + E    End of line
Ctrl + F    Forward one character
Ctrl + G    Escape history mode
Ctrl + H    Backspace
Ctrl + I    Tab
Ctrl + J    Newline
Ctrl + K    Cut line from cursor
Ctrl + L    Clear screen
Ctrl + M    Carriage Return
Ctrl + N    Next command in history
Ctrl + O    Execute history
Ctrl + P    Previous in history
Ctrl + Q    Continue output
Ctrl + R    Search history
Ctrl + S    Pause output / Back history
Ctrl + T    Swap char before cursor
Ctrl + U    Cut line before cursor
Ctrl + V    Literal character
Ctrl + W    Cut word before cursor
Ctrl + XX   Toggle cursor position
Ctrl + Y    Paste
Ctrl + Z    Send SIGTSTP

@curlpipe
Copy link
Owner

curlpipe commented Nov 11, 2020

@forthrin thanks for all the ideas.

@curlpipe curlpipe added this to Tasks in 0.2.* Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
0.2.*
Tasks
Development

No branches or pull requests

2 participants