194 points by m4xshen 1 day ago | 76 comments
BrouteMinou 22 hours ago
No way I am starting to count how many characters there are in front of my cursor just to have the satisfaction of typing "31-l"...
I am totally going to spam some 2w 3w llll until I reach the desired position.
skydhash 21 hours ago
roydivision 8 hours ago
https://stackoverflow.com/questions/12495442/what-do-the-f-a...
WhyNotHugo 19 hours ago
mystifyingpoi 21 hours ago
WhyNotHugo 19 hours ago
For numbers under 10, I usually hit the right amount. For numbers around 30, I might be off by one to five, but move on from then. When I want to remove similar prefixes from multiple non-consecutive lines, I might use things like 31x, go to the next instance (maybe continuing a search with n), and press period.
Honestly though, if you're moving forward 31 characters, there's often an easier approach, like 4w (move forward three Words). Again, at first I had to consciously think about which combination to use. Over time it becomes second nature.
I still use jjjj sometimes. It's imperfect, but at least it's the human that's the limiting factor, and not the software.
ramses0 14 hours ago
Moves to the top/bottom/middle of the viewport, and the. I'll jjjj/kkkk away! (or probably just search, mostly).
suprjami 18 hours ago
sevg 10 hours ago
BrouteMinou 16 hours ago
Thank you.
jackhalford 19 hours ago
ramses0 14 hours ago
Once you get "near", then zeroing in on your target (eg: `fj`, `Fa` for "adjacent") can be the fastest/most accurate way to get to where you want to go.
sureglymop 15 hours ago
konart 19 hours ago
You don't have to. There are many ways to do a jump without counting. Some of the require plugins like flash.nvim, some do require pressing `;` multiple times
Xerox9213 15 hours ago
baobun 17 hours ago
moistoreos 13 hours ago
qazxcvbnm 1 day ago
mercer 21 hours ago
blahgeek 23 hours ago
kiaofz 22 hours ago
codr7 13 hours ago
hellcow 13 hours ago
lblume 10 hours ago
3abiton 18 hours ago
soraminazuki 15 hours ago
rybosome 23 hours ago
To me, if my cursor is a few lines away from another line, the easiest way for me to get there is by either using h/j a few times, or looking at the absolute line number and doing that with gg.
Relative jumps are only useful to me in macros. Calculating a relative jump myself would 100% pull me out of the flow state where I just want to go up/down a few rows.
I have no proof of this, but I’d guess that the creator of this pattern didn’t feel the same way.
skydhash 23 hours ago
While I loved multi cursor with sublime. After I moved to Vim, I’ve never needed it. It’s either search~repeat or a macro. Now I’m using emacs, and it’s mostly occur-mode and macro. Grep edit is nice for bigger refactoring.
umbra07 18 hours ago
christophilus 23 hours ago
skydhash 22 hours ago
I tried evil mode, but it clashes with other keybinding in some places and I got unhappy with it. There's a philosophy conflict there. With vim, you're expected to have a command for an action and then bind it to a key. Your editing workflow is to compose those keys.
But with emacs, you're more expected to have a view and then a set of actions for that view. The power of emacs comes with how easy it is to integrate all those views together. For a programming workflow, you have the file explorer, the symbol explorer, the search result (single file and all files), the version control, the docs, the compilation|build window, the shell, the project tasks,... all together in the same place and linked to each other. With vim, you have to compose all those with a multiplexer and other tools (with conflicting bindings) to get there. Vim is still better for editing, but Emacs is better for workflows.
eviks 20 hours ago
And yes, for a few lines it's fine, the plugin has this number configurable.
rybosome 18 hours ago
WhyNotHugo 18 hours ago
Over time, I started using things like 13dd or 7yy with more ease.
Of course, `set relativenumber` is always recommended.
> Calculating a relative jump myself would 100% pull me out of the flow state where I just want to go up/down a few rows.
Yeah, you can't be a purist about it. If you're hard-focused and jjjjj is the first thing that comes to mind, then that's fine. When you're doing lighter work is when you have the spare mental capacity to train and improve on your workflow.
rgoulter 23 hours ago
For jumping around what's on screen, I think 'easymotion' ("jump anywhere on screen by pressing two characters") & variations are best in terms of how quickly they let you navigate for how easy it is to use.
eviks 20 hours ago
Or instead of 15j use another jump to command that accepts those letters as numbers
Or have some jump type of command that displays a-z labels 1 per row in the middle and you can jump without numbers and without shifting focus to the gutter
But yes, the most basic motion will still be more "intuitive"
ryanmcbride 23 hours ago
mathstuf 22 hours ago
fwip 23 hours ago
marcyb5st 24 hours ago
There are few minor things I don't agree as bad habits. For instance, Home/End should be allowed at least when you are in edit mode as they armonize with almost any other text input (not just editors, but also the text inputs/areas on websites).
m4xshen 24 hours ago
marcyb5st 23 hours ago
AdieuToLogic 14 hours ago
By that, I mean the hjkl navigation keys are the first kind of navigation people want to do and are conveniently easily typed with the right hand in a traditional "home-row" position.
Next, very common editing commands are associated with home-row keys associated with the left hand; asd, with finding a character on the current line associated with f (and F for finding backward).
After those, other lesser used, but still very useful, commands are associated with the rows above and below the "home-row".
Finally, repeating any of these is bound to prefixed numbers, which are of course two rows above the "home-row" on a QWERTY keyboard.
Modifiers such as Shift, Ctrl, and others are approximately the same distance as the numeric row, unless one binds CapsLock to be Ctrl on most modern keyboards (note that Sun's keyboard got it right and had Ctrl in the position most keyboards now have CapsLock).
Interestingly enough, learning vim can often times follow the above distances from hjkl with great result.
xeyownt 8 hours ago
nosioptar 24 minutes ago
mnurzia 17 hours ago
johnisgood 6 hours ago
perrygeo 24 hours ago
WhyNotHugo 19 hours ago
This made the biggest difference, more than anything else. It forced me to use hjkl and never the arrow keys.
Everything else is a bonus that comes by itself later.
suprjami 18 hours ago
That's what hardtime solves.
unshavedyak 1 day ago
Which is to say, i'd love to see this in Helix. I also toy with custom editors, and observability of available commands is high priority for me, a generalized solution here would be an elegant solve for that. It would also adapt to new features nicely.
n8cpdx 20 hours ago
lylejantzi3rd 24 hours ago
nickandbro 1 day ago
EDIT: thanks all for the feedback! Sorry there are not more levels, but if you check back in a week am adding a level editor!
foob 1 day ago
horsellama 23 hours ago
but clicking on the hamburger menu it shows a link to “Motions”, which seems to be the first level/demo of the game
nickandbro 23 hours ago
shlomo_z 1 day ago
nickandbro 1 day ago
linnnus 24 hours ago
JLO64 24 hours ago
nickandbro 23 hours ago
nickandbro 24 hours ago
darkwater 24 hours ago
avinassh 22 hours ago
xeyownt 8 hours ago
m4xshen 22 hours ago
SuperManifolds 22 hours ago
lherron 21 hours ago
Looks awesome, will not try!
yegle 23 hours ago
Sorry not meant to be a criticism. Maybe this is the last push for me to switch to using NeoVim.
ilvez 23 hours ago
I still keep vim configuration around but I've never felt the need for going back.
mystifyingpoi 21 hours ago
xeyownt 8 hours ago
I switched few years ago, and the switch was instant.
Afaik Neovim is fully backward compatible, unless maybe for some obscure features.
drabbiticus 23 hours ago
thdhhghgbhy 1 day ago
alabhyajindal 1 day ago