15 ms·
Leap: Neovim’s Answer to the Mouse
- rektide 4y agoThe heads up visibility, preview, seems potentially very useful.
- aldanor 4y agoHelix needs a jumping tool, badly.
- benreesman 4y agoSo this is a bit tangential (though I do intend to try this out) but I’m kind of a fanatic for keyboard efficiency and there seem to be a lot of experts on the thread. 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?
- gsinclair 4y agoI don’t quite understand what you’re asking here. 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!
- gsinclair 4y agoI read the GitHub page with interest, but glazed over at the examples. Full credit to the author; the whole README is well written. But I’d love to see this demonstrated on YouTube.
- chrismorgan 4y ago> Down the kangaroo hole 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.
- deleted 4y ago[deleted]
- ossusermivami 4y agoI can't get myself to use those leap/easymotion/avy in editors.. but I definitively use this in vimium to jump to link and use that feature a lot in kitty to be able to select text/url/word/file/sha compared to using the mouse it's a life save, I don't think I have ever seen this feature in any other terminal (maybe you can achieve the same thing with screen/tmux scripting but I don't use much multiplexers)
- xxxmaster 4y agoI've been using the same EasyMotion's similar 2 character jump functionlity for near 5 years now nmap f <Plug>(easymotion-overwin-f2)
- avilayoma12 4y ago
- stavros 4y agoIt seems I should probably finally make the jump from vim to Neovim.
- JadeNB 4y agoI hardly used plug-ins, so am not in a position to evaluate, but the author says that Leap is comparable to Sneak for vim.
- stavros 4y agoAh, thanks! I tried to switch once and stuff broke, so I abandoned it. I think, in general, Neovim is just more actively maintained, so it looks like I'll have to switch at some point anyway.
- least 4y agoBram is consistently updating vim and recently shipped 9.0 which introduces Vim 9 Script. I would say that there is a line being drawn in the sand more distinctly now, though. Those that adopt the new vim script will probably stick with vanilla vim and neovim's team has no plans at this time to support it [1]. And all these lua plugins are only compatible with neovim. [1] https://github.com/neovim/neovim/issues/13625 https://github.com/neovim/neovim/issues/13625
- alwillis 4y agoOne of the Neovim developers is working on a transpiler to run Vim9 script in Neovim: https://twitter.com/neovim/status/1575455161186664451 https://twitter.com/neovim/status/1575455161186664451
- least 4y agooh, cool! That's great news. It'll prolong the full fracture of the two for a while, at least.
- 4y ago
- echelon 4y agoI can't stop using IDEs like Clion with Vim key bindings. Clion offers one of the best Rust/C/C++ experiences that Vim, in my opinion, struggles to match. 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.
- Symmetry 4y agoI have a coworker who uses neovim with VS COde: https://marketplace.visualstudio.com/items?itemName=asvetliakov.vscode-neovim https://marketplace.visualstudio.com/items?itemName=asvetlia...
- peteatphylum 4y agoI think the majority of the functionality in leap can be had in IntelliJ IDE's with the AceJump plugin
- benrow 4y agoI haven't got very far into it yet, but there's a number of plugins which can nudge neovim towards IDE functionality. 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.
- latifk 4y agoNeovim has a headless mode that lets you interact with it via a msgpack rpc. So it can act like an editing “backend”. 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.
- lbotos 4y agoOnivim is no more :(
- latifk 4y agoIt looks interesting, but I already use Lightspeed (by the same author). Still not sure how this is an upgrade over that, even after reading the docs. Is there a more compelling argument for switching?
- vietjtnguyen 4y agoI was in the same boat. What made me switch is Leap supports jumping across panes/windows.
- isidor3 4y agoLooks like Leap is the new focus of their development: https://github.com/ggandor/leap.nvim/issues/3 https://github.com/ggandor/leap.nvim/issues/3
- novosel 4y agoFrom lightspeed's page, and I quote: 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.
- deleted 4y ago[deleted]
- bmer 4y agoRelated: https://news.ycombinator.com/item?id=21816854 https://news.ycombinator.com/item?id=21816854
- jerry1979 4y agoReminds me of Avy on emacs. https://karthinks.com/software/avy-can-do-anything/ https://karthinks.com/software/avy-can-do-anything/
- agumonkey 4y agodidn't read through the whole readme but it seems leap is avy + substructure jump. and if not, then we should make something like that :)
- dannyobrien 4y agoI was going to ask -- does anyone know a port to evil/emacs?
- deleted 4y ago[deleted]
- wging 4y agoBy "substructure jump" do you mean jumping to a character inside a word? Avy can do that! Compare avy-goto-char and avy-goto-word-1 (or avy-goto-word-0). I have a prefix arg setup working with avy that I stole from ace-jump-mode to jump to either words (avy-goto-word-1), subwords (avy-goto-subword-1, jump to the 'K' in ThisKindOfText, but not the 'x'), or arbitrary characters (avy-goto-char). 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 https://github.com/abo-abo/avy/blob/master/README.md
- agumonkey 4y agoI meant larger file jumps, say you start typing a prefix, avy applies overlays on matches, but you man quickly want to focus on a paragraph and not deal with the whole set of matches.
- 4y ago
- meitham 4y agoVim (and recently neovim) has been my editor for around 14 years now! That's about seven hours in this editor every day, and I still find the mouse very convenient for a lot of the moves where the destination cannot be described with one or two keys. I like the idea of this plugin but I don't think it will be a big leap over the use of mouse!
- jalino23 4y agobut the idea of not having to move your hands off the keyboard to reach the mouse sounds like a big leap!
- ablob 4y agoA trackpoint device embedded in the keyboard may or may not be your friend, then.
- therealdrag0 4y agoI use a split keyboard (kinesis advantage) with an apple magic trackpad Velcroed (Command Strip) in the middle. It’s great, esp for scrolling.
- noncoml 4y agoI used to love the “nipple” on thinkpads for that exact reason
- _dain_ 4y agoThey tend to get stuck off-centre for me.
- yarky 4y agoI've been using nvim for around 5 years for everything I do on a computer other than web browsing. It feels like I'm missing something here, but why would you ever need a mouse within your terminal? I don't recall never ever needing it :/
- timlod 4y agoThis is like Avy (or ace-jump-mode) in Emacs: https://github.com/abo-abo/avy https://github.com/abo-abo/avy
- fzzzy 4y agoIs this inspired by the Canon Cat? I don't see it mentioned.
- rmetzler 4y agoVimium, the browser plugin, has a similar functionality to follow links.
- capableweb 4y agoBeen around since ~2012 via vim-easymotion as well: https://github.com/easymotion/vim-easymotion https://github.com/easymotion/vim-easymotion
- akkartik 4y agoLink for others: https://leebyron.com/til/leap https://leebyron.com/til/leap
- aidos 4y agoIn the other direction, it was reading about leap that got me in to vim in the first place. I loved the idea of being able to just hop from one bit of text on your system to another. A couple of decades later, that’s exactly what I do in neovim. 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.
- didibus 4y agoWould be nice to see a section comparing it to Avy or Ace-jump and how it differs.
- qbasic_forever 4y agoWhy? If you're using vim you could care less how emacs, intellij etc. do things. 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.
- didibus 4y agoBecause it says: > 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.
- nathias 4y agocool, kind of like vimium for links
- _dain_ 4y ago+1 for vimium, I don't know how I used the web without it
- karolist 4y agoI'm using vimium in Chrome for a few weeks. So far my biggest problem with it is pages that capture the cursor and I end up typing movement commands in some random form/gdoc. Also tabs with pages that have it disabled (gmail, githunt's chrome new page) force you to use vanilla tab movement commands.
- ducktective 4y ago> Fennel So it has come to this... I wonder if Neovim would be the new extensible editor since Fennel is a Lisp.
- deleted 4y ago[deleted]
- llambda 4y agoHow does this compare to Hop[0]? [0] https://github.com/phaazon/hop.nvim https://github.com/phaazon/hop.nvim
- callahad 4y agoJust from skimming the docs, it looks like Leap's target keystrokes are more directly tied to the buffer's text (2 char prefix + optional discriminator), while Hop generates arbitrary labels... I can imagine the former feeling much more fluid, but haven't actually used either.
- Graziano_M 4y agoI actually use both (though I use hop more often). I use hop to find a specific line, but leap (or lightspeed) to jump to a specific character.
- cbushko 4y agoI use hop only for specific characters using `HopChar1`.
- aussiesnack 4y agoHop user here, and have just given leap a quick test. 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.
- ggerganov 4y agoI have a vimrc configuration that is compatible with neovim. This way I can use both editors depending on what is available in the current environment. Additionally, there are things that work better with vim and there are things that work better with neovim, so this way I can easily switch depending on what I need. 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.
- jitl 4y agoHave a Neovim config file in Lua that imports / evals your standard Vimrc.
- dotancohen 4y agoAs a two decade VIM user, this idea looks like "VIM for people who still think like mice". The mouse lets one jump to an arbitrary location on the current window. But the real goal is to jump to a specific object, be it a method signature, or variable declaration, or the beginning of the file, or the end of the line, etc, or the next occurrence of a keyword, or the beginning of this if clause, etc. VIM already has provision for getting to these places, and once they are in muscle memory you won't need to break your train of thought to use them. Don't use VIM like you used Notepad. Use VIM like you use a manual transmission.
- latifk 4y agoBuilt in targets should be preferred, sure, but there are plenty of situations not covered by those targets. 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)
- nickysielicki 4y agoIt’s the vim user that is stuck thinking like a mouse/notepad user, because the vim user has an index into the file that needs to be moved (your cursor), whereas the avy user doesn’t have to think about where he’s coming from, it’s all relative to the viewport. The typical emacs user navigates through project-wide greps and jumps, buffer local searches, and things like avy.
- johnfn 4y agoHm - I can't see how this is functionally significantly different than EasyMotion[1] or Sneak[2]. Not a knock on it - just curious if I'm missing something. 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 https://github.com/easymotion/vim-easymotion [2]: https://github.com/justinmk/vim-sneak https://github.com/justinmk/vim-sneak
- WhyNotHugo 4y agoThis is the same impression I get when reading the docs for Leap. It's pretty clear I won't be able to know which keys to press until I'm done pressing the first two, so I can't think of the whole thing as a single motion; I've to complete one motion, pause and think, and then continue. I suppose it's more useful if you're not too well versed in Vim motions though.
- airtonix 4y ago
- ravishi 4y agoI agree and experience the same. This is actually what makes vim's record and repeat so cool. Sometimes as I'm executing something I realizer there is a pattern and start recording. Two attempts later I'm done formatting a big block of text.
- porphyra 4y agoWell, the readme does mention that it's similar to Sneak.
- Lapsa 4y agoyou can use mouse in neovim?? :o
- kzrdude 4y agoJust like in Vim I guess. And while its enabled, it's good to remember that holding shift gives you back the terminal's own mouse/selection handling. Select in Vim and select text in terminal are two different things that are drawn in similar but not identical ways.
- aidos 4y agoOh, I didn’t know that shift reverts the mouse behaviour. I disable mouse because I like to split my normal Mac copy paste etc from what’s going on in vim but I might give that a shot.
- tomxor 4y ago> Select in Vim and select text in terminal are two different things 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.
- kache_ 4y agoyou know simple / works just fine for me :P
- latifk 4y agoI think / works well most cases, but is a bit annoying when you have several duplicate character sequences, so you end up having to type more and more of the sequence to discriminate.
- maxk42 4y agoThat's what 'n' is for. It also doesn't overwrite the 's' keybinding which is already used for substitution. I don't see the point of this plugin for people who are actually familiar with vim's keybindings.
- latifk 4y agoI am aware of “n”. You can be familiar with vim’s keybindings and still appreciate a different way to solve a problem. 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.
- cgreerrun 4y agoI wish eye-tracking hardware worked better. I feel like if it did it would be the ultimate "mouse". I've seen a few products but, IIRC, the reviews all conclude that the tech isn't there yet.
- cgreerrun 4y agoI wonder why it's a hard problem? I'm sure it is, but it would be interesting to know the key issues if anyone here has experience with it. 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...
- dagmx 4y agoEye tracking reliably is hard. 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.
- cgreerrun 4y agoI've been trying to flit my eyes around the screen to get a sense for how fast you'd need to track. Definitely seems pretty fast! At least sample 30Hz I'd bet. I could see how doing all the image processing that quick might be tricky w/out custom hardware (even w/out the glasses problem you mentioned). 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.
- CoolCold 4y ago> At the same time, it reduces mental effort to almost zero 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.
- penguin_booze 4y agoI'd dare say that, more often than not, one finds the need to jump locally to the cursor position, and not from one wild corner to another, as depicted in the video. 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.
- stjohnswarts 4y agoI find setting the relative line numbering setting to be quite useful as well If I need to be precise. I generally keep my terminal set to 100 wide so I can guesstimate x "letter distance" pretty accurately
- etra0 4y agoI agree -- I've been using vim for 4 years and jumping around has never been a problem. I use `f`, `t` and `/` a lot and usually that's more than enough (son of course `<n>[jk]`). 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.
- Izkata 4y agoThis is how Vimperator did link selection back before Firefox Quantum, except Vimperator wasn't restricted to 2 characters for matching. You could keep typing until there was only 1 match, or select a numeric index at any time. None of the post-Quantum alternatives got it right back when I was searching for a replacement (no idea if there's another since then that's figured it out).
- d3nj4l 4y agoTridactyl is pretty fucking good.
- cassepipe 4y agoUsing vimium FF. So far it has served me well.
- edix8899 4y agoVimium C (https://github.com/gdh1995/vimium-c https://github.com/gdh1995/vimium-c) supports link hinting by simply typing a few characters of the link you want to press. It also searches the actual url and alt-text for links without text (such as buttons and icons). I found it by accident looking through its settings and it has by far been the best improvement to my browsing experience since discovering tabs.
- haiter 4y ago
- dumpstate 4y agoIn a similar vein, but voice driven: https://github.com/cursorless-dev/cursorless https://github.com/cursorless-dev/cursorless.
- douglee650 4y agoIs this largely the same as `/{c1}{c2}` and using n or N to move between matches?
- alpaca128 4y agoSeems like it. I see no big advantage over just jumping wherever via search. Also search allows me to quickly look up a different part of the file and immediately jumping back with Escape.
- ww520 4y agoEmacs' Avy package has the same functionality for the longest time. I'll share my experience. Lots of people like this way of navigation in the Emacs world. I don't. It takes extra mental energy to navigate like this. You need to: 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.
- thrown_22 4y agoOne thing I've been playing around for the longest time is gaze detection. You're already looking at the area you need to jump to, with some dedicated hardware you have it as another type of mark and then you just need to lock it in place, switch directly or any number of other actions. Unfortunately you need a _very_ high resolution set of cameras placed in a known pattern around the screen for that and the hardware just doesn't exist to do it yet. On the bright side once you have the hardware you get trivial 3d scans of your face for VR conferencing.
- ww520 4y agoThis is a good idea. In addition to the input cursor, have an eye cursor showing on the text tracking where the eyes are looking at. The eye cursor moves to where the eyes focus. Press a special key, like ctrl-space, to set the input cursor to the eye cursor. 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/ https://imotions.com/blog/eye-tracking-work/
- thrown_22 4y agoYes, it's rather more doable if you wear glasses/helmets.
- a-dub 4y agoi just use forward and backward regular expressions to jump around. it's fast, flexible and basically second nature.
- ddingus 4y agoHas anyone ever tried using something else, say a foot, to move a pointer? 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.
- systemvoltage 4y agoWhat are the differences between the end-effector control of toes vs fingers? I suspect that your hands have evolved to specialize in fine motor control (examining fruits, eating stuff, picking out lice, etc.) and feet have evolved to provide locomotive stability. I bet there are major differences in its effectiveness beyond just neural training (those with amputated arms can make do).
- ddingus 4y agoDefinitely a consideration. 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.
- dingosity 4y agoMight be nice to choose a different name. "Leap" was Jef Raskin's name for incremental search around text documents with the Swyft, Canon Cat and original Macintosh
- googlryas 4y agoIs there something akin to this for tmux? It's essentially how I move around a screen but not quite as nice.
- galoisscobi 4y agoI'm half joking, but you could open neovim in your terminal, then open terminal mode in neovim, then open tmux in there and that way you get neovim navigation in your tmux session. 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.
- 91edec 4y agoHave you tried using https://github.com/christoomey/vim-tmux-navigator https://github.com/christoomey/vim-tmux-navigator ? I use it for using <C-hjkl> to move between window/panes in vim/tmux.
- galoisscobi 4y agoI haven’t tried that before. Looks neat. Thanks for sharing.
- ghshephard 4y agoYes - it's brilliant and I use it ~100 times/day when working with tmux. https://github.com/schasse/tmux-jump https://github.com/schasse/tmux-jump 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.
- 0x445442 4y agoHopefully I just missed it but I didn’t see one attribution to Jef or Aza Raskin or the Canon Cat. I find it very hard to believe the authors were not aware of that prior work.
- gjvc 4y agoexplained here https://www.youtube.com/watch?v=o_TlE_U_X3c https://www.youtube.com/watch?v=o_TlE_U_X3c
- fortran77 4y agoI've been using vi since 1988 or so, and I've never used a mouse.
- jrm4 4y agoEh, I'd kind of like the reverse, aka "mouse" as first-class citizen in a true vim editor (as opposed to emulated like in Kate or VSCode) Anyone know of anything like this. Classic Ctrl-C etc bindings would be a bonus.
- jupp0r 4y agoIf you are looking for something similar for vscode, I can recommend https://github.com/metaseed/metago https://github.com/metaseed/metago after having tried several similar extensions.
- simias 4y ago>Use your preferred plugin manager. No extra steps needed, besides optionally setting the default keymaps: >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...
- tonto 4y agoThat is a lua expression I believe (which only works in neovim, hence this plugin being neovim only), you can convert your vimrc to init.lua or make a lua block in your vimrc. The "lua<<EOF" method is common in vimrc xref https://github.com/nanotee/nvim-lua-guide#using-lua-from-vimscript https://github.com/nanotee/nvim-lua-guide#using-lua-from-vim... 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
- simias 4y agoThank you very much for this!
- omnimike 4y agoThe thing I don’t like about EasyMotion like plug-ins is that they require you to react to information which only appears on screen after you start to jump. With Leap it looks like it amortizes the cost of reacting by giving you the information you need one keystroke before you need to use it. I’m still not a fan of having to react though. 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). [0] https://github.com/cursorless-dev/cursorless https://github.com/cursorless-dev/cursorless
- pentaphobe 4y agoCurious how this compares to "jump mode" in `amp` 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 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)
- iansinnott 4y agoCool to see a project written in Fennel[1]! (a lisp on top of Lua that's unfortunately not quite Clojure[2]) [1]: https://fennel-lang.org/ https://fennel-lang.org/ [2]: https://fennel-lang.org/from-clojure https://fennel-lang.org/from-clojure
- stevebmark 4y agoThis sucks and it’s the same as EasyMotion from 10 years ago. 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.
- raydiatian 4y agoGlad to see people are making coarse-grained UI controls like this. Mouses (fine-grained ‘analog’ alternative) under-serves high-efficiency workflows. Like so much innovation has gone into smartphone gestures (even the keyboards have them), that classic desktop drag to point interfaces genuinely seem archaic. Can’t believe we don’t have commercially popular eye tracking yet, or gesture oriented mouse navigation.
- fulafel 4y agoCode browsing tip: the lua/ files are generated from the Fennel sources under fnl/ so you want to read only the latter.