Leap: Neovim’s Answer to the Mouse
github.com
github.com
My problem with these types of plugins is that, although it's a bit more annoying to type out a few more characters, with my vanilla Vim workflow I can pre-compute the motions in my head - I can figure out I need to type d7l or whatever way before I get to the point in my editing where I need to, and as I'm typing it out I'm already thinking about what I want to do next. With sneak, easymotion, or leap, it looks like I can't actually figure out what keys I need to press to get to where I want until I've already started the motion. That means I need to take some time to read the label, etc. So maybe I've saved a few milliseconds of not having to type one or two more keys, but I lose that and more by having to parse what to do.
Curious about other experiences and if I'm off base though.
[1]: https://github.com/easymotion/vim-easymotion [2]: https://github.com/justinmk/vim-sneak
Counting characters is even worse. It takes me a good second and a half to confirm that “characters” is ten characters.
Primeagen has a good video about horizontal motions: https://www.youtube.com/watch?v=qZO9A5F6BZs.
:exec &rnu? "set nu nornu" : "set nonu rnu"
I wish there were vertical line numbers, though. Usually I just eyeball letter jumps (so rather than 7l I'll end up doing 10lhhh).
In practice, I can't say I've ever felt like moving the cursor around takes up an appreciable amount of time. If it does, then it is probably the case that I'm trying to do something manually that would be better macro-ized.
`:set cc=10,20,30,40,50,60,70,80,90`
Might have to change your highlights/colours so it's a bit more subtly, likely theme dependent.
I end up doing stuff like dt( to delete up until the opening parenthesis or ci’ to to delete inside quotes.
Otherwise as you said I’ll spam the keys till I’m at the point where I want.
This is just an example. Anyway,
To delete from the cursor at T to just before the A in Anyway without counting words.
Contrived example because there’s an even easier method. There are fun ways to do things and it’s satisfying when you figure out a neat method.
This is a line of text.
If the cursor is on "is" and you want to delete everything before "text", this is what I do: d/text<enter>
Any movement works for these actions, even searching to "select" everything between the cursor and the target. Often I'll use visual mode to get a quick confirmation before deleting it: v/text<enter>h
(check selection is what I want)
d
The visual mode one isn't exactly the same because one additional character, the first "t" in "text", is in the visual selection area, hence the "h" to go back one.if you have a unique letter, as in this case ("t"), a quicker way is "dtt" (delete till "t") or "ctt" (change till "t"). in case of non unique character it takes a count but that scales badly for me, and i use /.
Also I like to use "f" for find followed by the character you wish to move cursor to the character you desire to end up on the present line. (ex. "fl" jumps to the first "l" of the line.)
(I personally think of "f" as "find", not "first")
What beautiful chords at this here fireside chat.
I think that’s right anyway, no vim terminal at hand to check myself.
You can type "d2;" however.
q:
.,/This is a line of text/- d
. is the current line. /This is a line of text/ is the line that contains it and the - after the regex refers to the line immediately above. You could use _ to refer to the line immediately after, or -x or +x where x refers to the number of lines above or below the line that the regex matched. :1+2,$-2 d
1 is the address of the first line in the file and $ is the address of the last line in the file. Add 2 to the first to get the third line and subtract 2 from the last to get the third to last line. The d command deletes the lines in the address range.You can also address lines with a regex, like I did in the example in my previous comment. You can even use regex addressing for ranges. If you wanted to delete a python method definition in between other method definitions, you could do something like:
:/def method_to_delete/,/def/- d
which would start the range with the line that contains def method_to_delete and delete lines up to the line before the next line that contains the def keyword that starts the next method definition.You've changed my life
Similarly for lines. 4dd, ., ., ., and so on.
Of course, this only makes sense for deletion, not for changing or for movement (because the . to repeat a command is commonly not what you intended for changes and doesn't apply at all to pure movement actions).
No one actually counts :) For vertical motions, I use {/} and search; horizontal motions can use w/W/b/B/e/E, t/f/T/F as well. If you’re counting, you’re doing it wrong: big numbers can’t be recognized quickly, small numbers it’s faster to press ‘.’ than to hit the digit.
A lot of times I find a landmark on the line I’m working, for example, I see there’s a word with a “C”. Then, say I want to delete everything to that “C” I’ll do dtC. Or I want to delete everything in quotes on the line, I’ll do di”. Or I’ll pick a character, say “ “ (as in a blank space), and do 3f<space>, and if I need to jump more from there I’ll just just comma a couple times if I need.
I will, however, use 30j or 3J to operate across lines, since I have both absolute and relative line numbers turned on. But solely for movement I’m more likely to use HML to initially jump somewhere more than 5 lines, then do something like 4k or 2j to jump the rest of the way.
But you can with a little practice then it becomes normal.
For lines it's easiest, and relative line numbers makes it even easier.
But you can take off the training wheels if you just aim to be proficient after a solid day of practice.
And generally if I know where I want to go, I would just search with / instead of doing jjjjjjjjj
Usually, I'll get it right if it's under 30 characters, and will be off by one or two if it's between 30 and 50.
For normal code though, counting words is way quicker (e.g.: 7cw).
When it comes to rows, `relanumbers` helps a lot, there's no going back.
For larger chunks of text, things like `cif` (change inside function) and `co{` (change outside brackets) help a lot. Again, practice and keeping them in mind.
Also, every time threads like this appear on HN, I learn new stuff. Like, somebody mentioned using `c/X` (change, search, X). Gonna try that next time I need to replace all text leading to X (which is pretty common).
yes you do. leap is night and day to aforementioned, took me one search to find this neat comparison: https://www.reddit.com/r/neovim/comments/x25wmb/comment/imi2...
googled for `"emacs" "avy" "package"` was the 1st result. ;)
The built-in / with hlsearch on enter and nohlsearch on leave, together with the built-in <C-G> [1] for next match and <C-T> for previous match **while still in /** provides a faster and more natural solution because no need to read labels. From :help incsearch,
set incsearch
augroup vimrc-incsearch-highlight
autocmd!
autocmd CmdlineEnter /,\? :set hlsearch
autocmd CmdlineLeave /,\? :set nohlsearch
augroup END
From there, type / and search for 1,2,3... characters (however many you want) and see the matches on the screen thanks to hlsearch being turned on. Go to next/previous match with <C-G> or <C-T> as desired. To close the movement, hit enter as usual with /.For instance to delete until the second match of fum, type
d/fum<C-G><ENTER>
and it is very easy to follow the current match among all highlighted matches because the current match has a different color.[1]: see :help /_CTRL-G
Personally I have hlsearch turned on and nohlsearch mapped to H because persistent highlighting is sometimes useful, sometimes a bit annoying.
from the readme:
> it maps possible futures, and shows you which key(s) you will need to press before you actually need to do that.
In the preview gif it's showing the matched hintkeys LIVE as you search.
I think this is actually a huge different in UX. I'm using the emacs equivalent in avy, avy-goto-char-timer[1], and that small pause between searching and acting (typing the hints) makes the experience jarring enough that I don't want end up using goto-char-timer in motions that much (only for jumping across windows and panes)
With no delay between <leap key> and <hint key>, the UX of d<leap key><hint key> is much smoother
This doesn't seem significantly different from, say, /<c1><c2><CR> and then hitting n to go to the next match until you've found what you want. It's only one more character than this project is claiming to require (the extra <CR>). With hlsearch enabled it also shows you matches as you type.
This UX does not break my flow (it doesn't require focus/conscious thought):
1. Press <leap key> + <where to go key> while looking at the place I want to jump to
2. Hints are shown instantaneously (while I'm still looking at the place). Press <hint keys>. I'm there.I've also gotten past the mouse allergy phase. Some editing operations are just faster/easier with the mouse and it's not worth the overhead learning a new plugin to try to optimize it.
Lots of these micro-optimizations are saving dozens of milliseconds. All it takes is a couple minutes of overhead from learning, setup, or debugging to wipe out an entire lifetime of saved time from such micro-optimizations.
besides of not being able to measure this, it's not how i look at it.
i pickup and drop plugins and "waste" time on them because if we are a "match" it lets me stay in my "editing flow". (which doesn't have to be the same as being fast or effective)
> Lots of these micro-optimizations are saving dozens of milliseconds
I think you underestimate how much time it takes to move your hand to the mouse and move it back to the keyboard. It's at least half a second but likely more.
On another note, the productivity I’ve gained from using an actual IDE, particularly for things like moving files, renaming symbols, and other refactoring tasks, has probably saved me far more time and headache than avoiding to use the mouse.
I disagree, the only time I'm actually thinking about key combos is if I'm vim-golfing something or trying to create a macro to reformat a large amount of text.
In day-to-day coding I just think about what I want the result to be and it just happens.
> On another note, the productivity I’ve gained from using an actual IDE
Yeah, IDEs with semantic understanding of the underlying language are great. The stuff JetBrains releases is top notch in that regard. I used IntelliJ whilst working on a Kotlin project despite constantly getting pissed off that it didn't work like I wanted it too.
Knowing how to manipulate text for languages that don't have great IDE support is still worth it if you're ever forced to work in such languages. At my previous gig I had to maintain scripts/programs written in csh/bash/TCL/perl/SKILL/python/ruby, knowing vim well made refactoring significantly quicker/easier.
Now days I just write typescript all day so I do get the IDE to do most of the work.
Yes but no one is actually computing efficient key combos. Most people just use the movement they are used to (w, e, f, t) and the most common text objects (s, p, ‘, “, ), ], }) when doing operation. That plus repeat will do 95% of what you want. Add markings used with ed ranges and the occasional macro replayed line by line on a visual selection and you can do everything without ever having to think.
I suppose it's more useful if you're not too well versed in Vim motions though.
If you don't already have muscle memory for ace-jump-mode, which is IIRC why I did it that way, you can just bind the different things to separate combinations, like the avy readme suggests: https://github.com/abo-abo/avy/blob/master/README.md
I like VIM, it is my favourite editor, but I can understand why some people just don't see the appeal. At least for me, the bottlenecks in productivity don't come with how fast I can type code.
I spend an enormous amount of time _reading_ code and I want to move up and down quite a lot, but C-U/C-D move too fast (losing mental context) and C-E/C-Y are too slow and RSI-inducing; the wheel very easily allows you to encode an additional "velocity" dimension that the keyboard simply doesn't have.
When reading code, the mouse also allows you to navigate reasonably effectively using only one hand, leaving the other hand free for sipping coffee and taking notes.
That explains why my coffee ends up cold and abandoned most of the time!
1. Set 'scroll' to a value you're comfortable with, so that <C-D> and <C-U> move fewer lines.
2. Use a plugin that shows a scrolling animation when you use <C-D>, <C-U>, <C-F> or <C-B>. I use vim-smoothie (https://github.com/psliwka/vim-smoothie).
I use tmux to do cut and paste, but should I ever need something out of the terminal/browser into the other, or don’t feel like C-b] ‘ing something, the mouse is great.
If your terminal supports it (iterm, kitty, later versions of gnome-terminal and others) this osc52 plugin is really sweet. It even works over ssh.
Try playing some RTS games without a mouse if you want to understand why it's such a useful device in certain situations.
However, typing a few keys on the keyboard is still not as fast or as automatic as moving the mouse pointer to where your eyes are looking, IF your hand is already on the mouse (such as when scrolling around the code). Of course, if you have to move your hand from the keyboard to the mouse (such as when actively editing), the opposite is usually true.
Can they beat the best mouse+keyboard gurus? I very much doubt that.
Note again that I'm only talking about navigation - when you're actively editing, you're obviously going to lose too much time moving your hand between mouse and keyboard.
Something about jumping down pages via shortcuts just feels so clunky. I lose all visual sense of my position on the page.
I keep wanting an editor plugin to scroll the page down with a single keystroke. Ie give me the visual anchoring that a scroll wheel does, but with a single key press.
Either way generally i just tent to use my mouse when i'm lightly browsing. Skimming for some code, working through a thought, etc. Jumping down pages just snaps me outa my thought process a lot of the time, because i have no clue where i am, i gotta relearn my position; where my eyes are at. Likewise jumping half a page is a bit better, but still - that instant blink where the top half of the page is gone, the previous bottom is now the top, and the bottom is now entirely new.. it just feels too.. immediate.
https://github.com/karb94/neoscroll.nvim
There is a Helix issue (and poll, see last comment) requesting the same feature you could vote on:
People would equate the time it takes to press 4 keys vs moving the mouse but entirely forget the mental compute time of finding a pattern, recognition, selection of first 2 chars, etc. That for me takes more time than moving the mouse.
Of course the keyword here is "practice". And just using Vim without putting effort into learning these movements doesn't make you good at them, so people using Vim for years/decades without making them second nature and thus prefering the mouse is not too surprising.
Mouse is instant in terms of brain compute.
I spend solid 6 hours a day on vim. Almost every day. I don't look at the keyboard or what I am typing. I don't even think about what I am typing.
However, searching for 2 letters is a constant time operation and cannot be optimized away with repetition. You still need to go search for a word that starts with "ha" if you're trying to moving to a word "hackernews". THAT takes time and mental compute. This is very different from not looking at keyboard keys or your argument about a pianist.
Whatever that search time is exceeds the ease of using a mouse (for me). Trust me, it is not about practice.
As to myself, I've been using Vim for over 10 years, yet I think it tells nothing of my proficiency with Vim. It's easy enough to become dangerous enough with Vim to surpass any past traditional editor one has used before that (excluding emacs) yet it's just as easy to let one's skills slowly plateau (as I'm surely been prone to over the years). I rarely use a pointing device while in vim/tmux (an exception is when using a lot of splits which I probably should avoid using anyway).
btw the pointing device I'm using is a trackpad mounted on top of my Kinesis Advantage keyboard which means I don't have to take my palm off the keyboard to use the mouse (it is _not_ an argument to say that despite the short distance I almost never use the mouse in vim/tmux but just a side note and a setup that I recommend if you already own a Kinesis Advantage or a similar keyboard)
My ideal motion plugin would be Cursorless[0], except using the keyboard instead of voice commands. With Cursorless the markers you need to jump to are always visible, so there’s no need to react. Instead of jumping to characters you jump to tokens, so we do not need makers over every character (just above each token).
I've seen a few products but, IIRC, the reviews all conclude that the tech isn't there yet.
It seems like w/ an image sensor you can track eye vectors and head location relative to screen w/ a degree of certainty. And—much like tracking a rocket position—you could use a Kalman/Particle Filter to get a screen position pretty close to wherever I'm looking on the screen. I'd guess within 3 characters.
Feels like the kind of thing Apple should invest in and revolutionize...
First you have the quality of optics. Most computers have very small cameras that are low resolution and prone to noise in situations without ideal lighting.
That makes eyes hard to capture as a whole.
Then you need to figure out eye direction. Eyes flit around a lot (saccade) but you could perhaps smooth it out. But pupils are hard to see anyway through glasses. You better hope people wear large glasses with skinny frames and don’t suffer from very poor eyesight or astigmatism, both which lead to high refractions.
There are actually good products for this like tobi (sp?) etc where you can wear prescription lenses and have IR tracking for your eyes.
but even the , even if you get over the technical issues there’s the UX issue. How do you account for something getting your users attention without changing the input focus there? Let’s say they’re listening to music and a track changes, showing a notification.
And even if you figure all of that out, there’s the privacy angle. People don’t like being monitored constantly.
For the UX, I was imagining you have to press a button to instruct the computer that "Hey I'd like for you to move my cursor via eye-tracking". That way the cursor only moves when you want it to (same as today w/ a mouse) and isn't constantly moving around when you look around. Press down to have it move cursor to eye-tracked position and stop when you release.
Could possibly decompose the space bar to have that space for that button. Like have 3 mouse buttons where the right side of space bar is: (a) Track my eye movement while I press down and stop when I release, (b) left-click, (c) right click. Then you don't have to leave home row on your keyboard.
Or add one of those IBM Thinkpad mouse knubs somewhere on a keyboard and use those as mouse buttons instead of a mouse itself.
Idk, easy to dream of course. Hard to execute.
Why is the IR part of the spectrum better for the cameras? Is it because if I take an image of my eye and look at the IR part of the spectrum is it just easier to see parts of my eye that determine where it's looking?
This is effectively how the FaceID system on your iPhone can work regardless of lighting condition.
That means that even in dark situations, you can have much higher quality imaging , albeit in a limited range.
Therein lies a big part of the problem with eye based interaction. Our brains move our eyes for a lot of different tasks, saccade to get a constant read of your scene (eyes have very poor resolving power so need to move a lot), they also signify what you’re thinking (there’s a lot of studies in neurolonguistics about eye direction signalling how you’re thinking, but at a base level, you tend to look up or away when you’re pondering).
Anyway not to say it can’t be done. But it’s a fascinating domain at the cross section of UX, technology and neural science.
For what it’s worth, there are VR headsets with dedicated eye trackers built in (PSVR2, certain Vive Pro models, Varjo etc..) and there have been cameras from Canon (in the film days even!) that used eye tracking for autofocus targets.
It’ll be interesting to see how things shape up. Meta have their big keynote on Tuesday where the Quest Pro / Cambria is meant to have eye tracking sensors.
I would think our brain is doing some level of motion tracking on a point while our eyes build up a mental image of the local environment.
Pressing virtual UI buttons with eye tracking makes sense, but if my eyes flick to the wrong character in a text file, it's going to wreck my concentration and end up being more effort than tying a vim chord.
The main use case for me is jumping cursor close to some position while text editing. I'm a Vimmer and I typically just want to look somewhere and instantly move my cursor to where I'm looking sometimes. Easymotion style jumping is nice (I use it in fzf menus, for instance). But there's still that slight mental overhead of figuring out what I gotta type in to jump. Or if I use a mouse then I take hands off keyboard, move mouse, hands back on keyboard. Which sounds pretty simple but it's so slow compared to just jumping around in vim w/ hands always on keyboard.
Environmental challenges like lighting conditions, glare, whether the user has glasses or hair obscuring their eyes need to be controlled. If the user is looking downwards towards the screen, their eye appears more closed making it hard to accurately find the iris location.
You also need an accurate measure of the position of the head/eyes relative to the camera. So dedicated hardware like a depth camera might be needed for high precision tracking. Depth cameras come with their own set of issues.
The resolution of even a high-res camera versus the change in pupil location for small eye movements means that by the time you crop out the eyes, you might only be working with a very small image (<100pixels or less). Even with subpixel hinting, there's not a lot of detail left. Small errors here and in the head tracking location can cause large errors in the screen position estimation.
When I must do long distance jumps: No matter where I'm, the H, L, and M keys will get me to the top, middle, and bottom lines of the window, respectively. gm will get me to the middle of the row. From there on, relative jumps (set rnu), f, and F will do just fine.
But if you still want to target a particular location, just start searching for that text (/ or ?) - the cursor will be positioned there. If not, tap n a bunch of times, and you're there!
No plugin needed - but that's me. See :help motion.txt.
At this point I'm more bottlenecked for my thinking rather than my motion.
I'd argue it's better to first properly learn the motions rather than installing this plugin.
1. Look at where you want to jump to and scan for suitable search patterns.
2. Do a rough calculation to pick the closest semi-unique pattern.
3. Do the search on the pattern.
4. Go over the labels to see which label is the closest to where you want to go.
5. Pick the label to jump.
I just want some dumb muscle memory to navigate to where I want to go. I don't mind type a few extra keystrokes. I don't want to make all these decisions along the way.
On the bright side once you have the hardware you get trivial 3d scans of your face for VR conferencing.
The cameras can be calibrated when the eyes focus at the 4 corners of the editor.
For the cameras, may be a lidar would work better? IPhone has these 3D face scan for the longest time for unlocking. Those read the eyes.
Eye tracking HUD for fighter pilot have been working for a long time, so it's doable.
Edit: This page has some info on eye tracking. https://imotions.com/blog/eye-tracking-work/
So for the text
the quick brown fox jumps over the lazy dog
^
I know that with sneak I could type `gUzx ` to upper case everthing up until 'jumps'. But `v/x <ENTER>U` works just fine, and to my neanderthal brain is way less mental overhead. Not to mention I get to see what I am doing instead of having to just imagine it.Don't use VIM like you used Notepad. Use VIM like you use a manual transmission.
In that case it’s quite handy to have a motion plugin at your disposal. Or otherwise use plugins that extend the built in targets (like targets.vim)
Vim is imperative editing. You have to tell the computer how to edit by glueing together small nasty commands. It gives you “Vim problems.” The mouse is arguably a declarative solution. “I declare I want to edit here.” So much nicer and more efficient.
It sounds like something a motivated person should research and write a blog post or article about the different ways of jumping to code in different editors and different plugins. I don't think this is something every single project maintainer should have to research and educate users about, they have far better things to do with their time.
> with the ultimate goal of establishing a new standard interface for moving around in the visible editor
Which make me curious if they came up with a new kind of keyboard only movement paradigm worth my attention as someone that doesn't use Vim anymore, or if it's just Vim getting a feature other editors have had already and I can ignore the announcement since I'm not a Neovim user.
I'm curious, why author(s) sure on this? How did they measure 0 here?
Not saying it's not right, but pointing finger over your touch screen and/or mouse for me sounds more natural and less mental efforts than cryptic Vi-like stuff.
So it has come to this... I wonder if Neovim would be the new extensible editor since Fennel is a Lisp.
For a more lightweight, easier-to-use alternative, check out the author's new, work-in-progress plugin, Leap. It is a streamlined, refined successor of Lightspeed, incorporating all the lessons learned from the predecessor, achieving much better balance between speed, simplicity (of both interface and implementation) and intuitiveness.
Didn't check, dont know.
Been a long time since I read it, but Jeff Reskin’s Humane Interface is a great read on out interactions with the world around us.
The difference is that leap displays all labels needed immediately after the first search key has been typed, whereas hop (more typically of jump plugins) progressively changes them as you type (depending on which hop command you're using).
The idea is that reduces the tiny delay while you identify the label on the jump target you're looking at. Say you're searching for one 'function' amongst many. With leap (default shortcuts), the moment you've typed 'sf', everything you need to jump to your target is immediately displayed. With hop, after invoking the command (with a binding to, say HopChar1), each search-narrowing keypress creates new labels which you have to then identify and type.
Seems promising at first glance, but only more usage time will tell if it's worthwhile.
[1]: https://fennel-lang.org/ [2]: https://fennel-lang.org/from-clojure
The problem now, is that it looks like neovim is migrating to lua configuration. For example, this plugin requires a lua config file. This is a bit unfortunate, because I don't see how I am going to maintain a parallel lua configuration for nvim.
I kind of landed on paredit and incremental search in terms of how to be fast on this sort of thing (though I try to spend an hour or two a day in vi to stay sharp on that too, vi/nvim is very powerful).
What might I be missing out on? What’s the hottest of the new hotness in terms of making code fly around efficiently?
I’m no expert in the new hotness, but I hope you’re familiar with surround.vim and repeat.vim.
Both of those are by Tim Pope. Check out all his plugins!
I don't use amp as my primary editor, but was heavily tempted based on that feature - was really snappy
https://amp.rs/docs/usage/#jump-mode
Also (as others have mentioned here): it'd be great to see a bigger call out to prior art in the readme (and no name conflict with Raskin)
>require('leap').set_default_keymaps()
Where/how am I supposed to set this? It's rejected if I just put it in my vimrc as-is even after installing the plugin. Is it a lua snippet? But then where should it be stored?
I have a super minimalist vimrc as it is, so I'd really appreciate more detailed installation instructions...
Converting to init.lua is a somewhat fun exercise tho. Once you get a little lua in your config it expands and you get more familiar with it
Curious expression. The only kangaroos I know of that live in holes are joeys, in their mothers' pouches. Saw three today, one all inside, one poking its head out, and one that hadn't bothered to finish climbing in, one leg hanging out in a way that doesn't look comfortable, but it's common enough it clearly can't be too bad.
I'd like to see stuff like this get ported, because this is a game changer.
Can Neovim be used in conjunction with an IDE? I'd like to use the text editing of Vim, but the AST and project navigation power of an IDE.
The language server protocol understands the syntax of your language. There are also plugins for autocompletion, and a file tree for fast navigation.
Caveat - long term vim user just starting to dabble into this territory. Have got started with Telescope for fuzzy file search, and Nerdtree for file navigation.
There are plenty of GUI IDEs that use Neovim as their backends like Oni. You can just google “Neovim GUI” and get a long list of them.
I'd like to use NeoVim headlessly and leverage the strengths of both systems.
nmap f <Plug>(easymotion-overwin-f2)I have not tried any of these advanced text input schemes. I want to. Just thinking about this kind of thing led to my, "use a foot?" question.
I saw the "clutch" comment above. Something useful can definitely be done. Perhaps both feet together can improve on what is likely a struggle to be useful at first.
Driving comes to mind, and people do have better motor control than they might believe.
One foot for each axis vs both feet on a platform, or leaning into one with heels on the ground could work, and work differently too.
I do not have time right this minute, but I feel building some hardware might be in my future.
This is the sort of thing one needs to try.
In the 90's I modified the code of a spot welder to give me access to many sets of settings with just the foot pedal as input. That's it. Machine offered nothing else, and adding hardware to it was a no-no.
There were three sets of settings, let's call 'em A, B, C.
A quick tap changed settings.
A longer than "quick" tap placed a weld.
Longer than that delivered welds at the same setting in series, spot, spot, spot, etc.
The machine was a 60Hz machine, and each instruction on it's controller took one cycle. Amazingly, it did have a few program flow on foot pedal state type instructions! I remember one could skip a word, jump and basically pause. That might be all of them. Was enough to implement the flow I put above.
It took the shift after I set the code up for me to do it without really thinking about it.
Why do it?
I had several jobs that required parts be handled more than once, and the worst offender needed three settings.
Programming that old controller was like a simple assembly language. Each instruction word had several fields depending on what it did. And the cool part was getting to write the weld! Close electrodes, open or close pressure valve, modulate weld current, loop back to begin, and the like were there.
Doing the three settings job fit into the number of instruction words it could hold, but not by much!
I think feet can do more than we might think, and at least part of this is a design R&D problem.
The rest, if it makes sense at all, is "human didn't do shit with their feet" problem, agreed.
I just tried it and while it can jump between panes in the normal mode using vim keybindings, you have to use tmux keybindings to switch between panes in terminal mode.
It's key concept is that you jump to the first letter/number of a "word" and then navigate from there, and, the keys in the label are on the home row. 95% of the time it's less than two characters - I've got the plugin mapped to Alt-u (no meta).
A very common keystroke pattern for me is Alt-u, couple characters (jumps to the exact spot on the screen I want to be), [space] (to start selecting) f (for the character I want to go to) and maybe a couple ; (jump to next instance of that letter) to get to where I want to go, [enter] to copy into the copy-buffer.
it's fast, flexible and basically second nature.
Something like Lightspeed lets you zone in on the specific character faster than repeatedly pressing n. Sure, that means installing a plugin, but some people accept that trade off.
Yup, this is critical if you want to copy stuff out of vim, you generally don't want to accidentally use the terminal selection because you might take any decorations and LF characters not part of the actual file with you. i.e you want to be using vims copy commands not your your terminals context menu. Thankfully enabling mouse makes it override the terminal by default when dragging, but you still need to add a key binding to get it into the system clipboard buffer thingy... I use ctrl-c because i'm not hardcore enough :D
I've also configured vim to draw invisibles as different characters (spaces, tabs, LF), so it makes even less sense to try use the terminal's selection to copy.