moe icon indicating copy to clipboard operation
moe copied to clipboard

Easy mode with non-modal Windows like keybindings

Open tobimensch opened this issue 3 years ago • 0 comments

Again, what I ultimately want to do is: dnf remove anyeditorthatsnotmoe

:-D

Sometimes for one reason or the other I want to use a non-modal editor, or I have to.

Most of these have keybindings that in part originated on Windows, with ctrl+v for pasting and so forth.

This is also needed when somebody uses the system you setup, who has no prior experience with modal editors, just imagine a scenario where you can't install another editor and they had to use moe, it would be difficult for them.

So I suggest a command line option moe --easy for starting moe in easy mode.

It should always stay in insert mode and the bindings there should be extremely simple and everything that's commonly known from your typical Windows editor such as notepad should work there: ctrl+s - saves file ctrl+c - copies the (mouse) selection (mouse supported would also be needed for this) ctrl+x - cuts the (mouse) selection ctrl+v - pastes the clipboard at current cursor position ctrl+f - finding the next word (and staying in insert mode) ESC - I suggest that ESC should be used to get into ex command mode as opposed to getting into normal mode. From there you can go disable easy mode, if you want to. If you use ESC or ex commands in ex command mode (while simulataniously still using easy mode) you get back to easy mode. ctrl+a - for selecting the whole buffer ctrl+w - for closing the current window/pane ctrl+t - for opening a new window/pane/(or tab) Del - delete char to the right of the cursor ctrl+Del - delete word to the right of the cursor ctrl+Backspace - delete word to the left of the cursor Home - go to the start of the line End - go to the end of the line Ctrl+Home - go to the start of the document Ctrl+End - go to the end of the document Ctrl+LeftArrow - go to the previous word Ctrl+RightArrow - go to the next word UpArrow - go to the previous line DownArrow - go to the next line Ctrl+UpArrow - go to the previous line break Ctrl+DownArrow - go to the next line break PageDown - page down PageUp - page up F3 - go to the next search result Shift-F3 - go to the previous search result Ctrl+h - search and replace Ctrl+tab - go to next window/tab/pane Ctrl+shift+tab - go to previous window/tab/pane shift+Home - select from cursor to beginning of line shift+End - select from cursor to end of line

and so forth. Moe even supports some of those typical key combinations right now, such as Home and End for going to the first and last characters in a line.

Changing to and from easy mode could also be made possible within moe with: :easy and :modal and maybe also :easy off for those that can't remember :modal, and :modal off for those that can't remember :easy.

This is not a high priority feature, but would have the added side benefit of making the key(and eventual mouse) event binding system more generalized and robust. Those bindings should probably be defined in an external file and not be hardcoded.

This feature would also make it easier for people ot transition from Windows style editing to modal editing that have no prior experience with it, by not forcing them to use modal editing the whole time.

I can remember that I tried vim many times and gave up each time for years, until I finally learned it and stuck with it and other modal editors. One of the issues I had is that I had to learn all those combinations in an instant, because vim leaves no room for somebody who only knows a bunch of combinations instead of a whole lot. You either do or die with vim, and this is not a user friendly approach, because some people simply don't have the time to learn everything at once.

So :easy would also allow those who want to learn modal editing to learn it with the peace of mind of knowing that they can fall back to easy mode when they hit a wall. Making the learning curve less steep.

I'm sure the vim purists won't like this feature. :-)

tobimensch avatar Jul 07 '20 19:07 tobimensch