Closed jiegliu closed 2 years ago
Hi, Thank you :-) !
Globally what you are describing is emacs shell mode with vi/vim bidings. :-)
In unlimitED, the current mapping is modeled after emacs.
And yes, I plan to implement a vim mode.
I will open some issues based on your remarks
what if we can use single ONE consistent key mapping in operating all text in screen, shell, editor to switch different modes and move, select, delete, copy...
You've got the basic idea. The most difficult part is to defined the basic interraction between the modes switching
goals below may be too many, but we can do it one by one After I using vim, I wonder why can't we use ESC, v, y, p in bash shell then, I found it has an weak pseudo-vi mode in bash shell, only work in current line(INPUT AREA) with limited function.
It can't even select or copy text returned by some command! what if we can use single ONE consistent key mapping in operating all text in screen, shell, editor to switch different modes and move, select, delete, copy...
I don't know for vim, but emacs has a mode where the editor is merged with the shell. and do move, select, delete, copy... and execute the last typed line.
what if we defined
Shift-ESC targeting on Chars showed on SCREEN ESC targeting on Chars showed on current line(input area of SHELL
Yes, You could also use jk etc. to move to previous lines/ start/end of screen.
and go to end of file to paste..
if you type "Enter" at end of file you run the entered command.
like shell mode in emacs with vi bindings..
also this program support detect, reprocess status of keys. Including 3 status: tap, hold, release of a key can emit different function(e.g. key remapping , text crud, cursor moving, window switch) Including sequence, concurrency of many keys Including condition depending on which app or which time
everything is programmable, not only text, but also your operations of keyboard can determine all behavior of keyboards, screen chars, time, your most frequent functions of your works!
Every crazy thing start on the your tap, start with UNLIMITED!
more detail examples
basic models: screen handle screen session or windows or panes including in Chromium, MPV, Terminal... IN USING SAME PATTERN OF KEY MAPPING!
What if you remap CapsLock into ESC, Ctrl and Capslock depending on when you are tapping and releasing it, holding it and holding it with Enter.
What if you wanna copy some text returned by shell: "Command 'unlimited' not found, but can be installed with: sudo apt install unlimited # version 1.2.3", JUST by tapping Shift-ESC, k, yy, p? and UNLIMITED is installed now!
Yes, I plan to do a command mode (a shell like line interpreter),
I want to ignore tty/pseudo terminal because it is slow.
What if you wanna PageUp long long text returned by a command in SHELL by tappingShift-ESC, Alt-V instead Ctrl-Shift-Up ?(Key Up-arrow is too far away your finger while Alt is convenient for your big finger)?
What if you wanna Shift-Tab in a reverse direction?
What if you wanna Ctrl-W to open a new window for web browser?
The job of remapping or programming on keys is done either by remapping-keys tool or other programs. The advantage of ALL IN ONE is that the daemon will program your operations on keyboards across Programs!Thus if you select a word, after v, e, the operation could pop a dict in the corner of screen and show the meaning of the word and pronounce it automatically. Also if you select a word, after v, e and Ctrl-D, it will open browser and search this function in https://docs.rs. or if any puzzle, continue tap g to google it!
This is really a good Idea.
Some terminal emulator like Konsole, provides this functionalty (reading the user screen and associate action).
Try "https://github.com" and ctrl+left click.
and if this program is done, it could detect `I'm writing github issue where there should exist a UNLIMITED help me typing! thus it will handle all my keyboard operation and all text of issues, reprocess to keys that the github issue support!"
You may wonder why not just typed in editor than copy to github issue? Because I wanna both of their power working together!!
What you want is user defined action/script on current selection/last line ?
Hello there
Thank you for your gentle explanation.
what i imagined is more like a autohotkey, it works like glue to link every program works consistent way
fn unlimitED: interpreter(keys u tapped) -> most frequent operations of your work {
if zero config {
map a -> a
map b -> b
map c -> c
...
}
if "capslock = [tap = esc, held_with_other = ctrl ]" in config {
...
}
if detect.("in Microsoft Word ").exist() {
turn vi-mode = true {
i -> insert mode
esc -> normal mode
w -> simulate mouse api or vbs api to choose a word
...
// well, leave these functions to other exist implementation program?
// but may it's hard to glue every program work together?
}
C- d = default shortkeys {}
}
if in select mode && "C-g" {
terminal_browser.openurl(google.("seletcted text").imFeelingLucky())
}
if detect.chrome.github.issuepage.exist() {
if s, simulate to scroll page to *S*earch TEXTAREA and start type
if i, simulate to scrool page to *I*ssue TEXTAREA and start type in vi-mode {
I -> send(End key)
j -> send(arrow down)
4j -> send (arrow down * 4)
...
}
// well, it's hard to say that which one is better:
// to implement this function by using api offered from different program:
// like vim plugin on vscode market, vim plugin in chrome store, or doom emacs using lisp
// OR by one single program to interpret your key strokes into vi-mode for different program
// as a result, u don't need find different plugins in different program by hand, just install unlimitED! and config 1 file
// thus we share single one config using vi-mode in different programs
// to manipulate window, invoke useful functions-chains of job and of course basic type abc
// and work with chromium/firefox or bash, no need to learn different style/language of how to install other program and plugins, you can find every useful plugin in unlimitED for handle editing in every usual programs, install&&config the unlimitED, and everything is ready to go!
// once unlimitED is installed, it control everything in everywhere when u wanna EDit, thus it called unlimitED!! unlimited devices, unlimited programs, unlimited every area you wanna edit! using unlimitED, edit it, now!
}
}
as for emacs, is it able to control web text area? detect texts? e.g. translate key f
to define a function template of rust in github issue page in a browser?
i hope these words could help a little, and i'm going to learn rust, maybe one day i could offer my power to this project with u
Catching input event and remapping them should be done at the window manager level. The window manager is in charge of user input dispatch to active window/task, switching, resizing and more. A simple text editor like unlimitED, is just a client that receive such events (via a terminal emulator).
Your main Idea is possible to implement in such programs like (kwin, mutter, etc...)
I hope this is more clear.
thank you, i got it ~
: )
ALL IN ONE, UNLIMITED!
goals below may be too many, but we can do it one by one
After I using vim, I wonder why can't we use
ESC
,v
,y
,p
in bash shellthen, I found it has an weak pseudo-vi mode in bash shell, only work in current line(INPUT AREA) with limited function.
what if we can use single ONE consistent key mapping in operating all text in screen, shell, editor to switch different modes and move, select, delete, copy...
what if we defined
Shift-ESC
targeting onChars showed on SCREEN
ESC
targeting onChars showed on current line(input area of SHELL
everything is programmable, not only text, but also your operations of keyboard can determine all behavior of keyboards, screen chars, time, your most frequent functions of your works!
Every crazy thing start on the your tap, start with UNLIMITED!
=====================================================================================================
more detail examples
What if you remap
CapsLock
intoESC
,Ctrl
andCapslock
depending on when you aretapping and releasing it
,holding it
andholding it with Enter
.What if you wanna copy some text returned by shell: "Command 'unlimited' not found, but can be installed with: sudo apt install unlimited # version 1.2.3", JUST by tapping
Shift-ESC
,k
,yy
,p
? and UNLIMITED is installed now!What if you wanna
PageUp
long long text returned by a command in SHELL by tappingShift-ESC
,Alt-V
insteadCtrl-Shift-Up
?(Key Up-arrow is too far away your finger whileAlt
is convenient for your big finger)?What if you wanna
Shift-Tab
in a reverse direction?What if you wanna
Ctrl-W
to open a new window for web browser?The job of remapping or programming on keys is done either by remapping-keys tool or other programs. The advantage of ALL IN ONE is that the daemon will program your operations on keyboards across Programs!Thus if you select a word, after
v
,e
, the operation could pop a dict in the corner of screen and show the meaning of the word and pronounce it automatically. Also if you select a word, afterv
,e
andCtrl-D
, it will open browser and search this function inhttps://docs.rs
. or if any puzzle, continue tapg
to google it!and if this program is done, it could detect `I'm writing github issue where there should exist a UNLIMITED help me typing! thus it will handle all my keyboard operation and all text of issues, reprocess to keys that the github issue support!"
You may wonder why not just typed in editor than copy to github issue? Because I wanna both of their power working together!!