-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Single hjkl enabled, while repetitive striking disabled? #23
Comments
How about something like this? Another option might be to make Vim I think it is definitely an enhancement. There is no reason not to use |
This should definitely be added in the regular hardmode, because navigating using the hjkl in a non repetitive way should be allowed. I for example use relative line numbers so I can easily jump to a certain line by just looking at the line numbers and hittting j/k and actually disabled the plugin for now because it slowed me down even when not using anti-patterns |
I'm honestly not sharp enough with VimScript to discern whether your proposed solution is graceful and appropriate or not, @dbakker , or what the pros and cons of this solution or alternative solutions is. I'm a bit swamped with work this coming week, but I'll take some time to figure out what's going on in your function and whether it's the right way to go. Anybody else have any thoughts on his |
The code looks fine to me (Not a vimscript expert though), only thing I'd do is namespace the variables too: |
I agree BTW, thanks a ton for this plugin @wikitopian ! I've really enjoyed using it when i'm trying to exercise my vim muscles. The first time with it enabled was almost as painful as my first hour with vim 😄 |
I'm currently looking at this and testing it. Only issue so far is losing visual selection when you hit the limit of repetitive HJKL strokes. @AdamBrodzinski I'm also looking at implementing a setting with how many HJKL's are allowed, well attempting to |
Ok it's implemented including the config option, can people please test https://github.com/xeross/vim-hardmode/tree/hjkl-repeat There also seems to be some initialization issue when calling HardMode() which goes away if you change buffers, not sure why that happens. |
Found another bug, switching to insert mode and back does not reset the count. |
@xeross Great!! I'll make some time tomorrow night to dig in and test it out. Kudos! |
I've been using the hjkl-repeat branch for a few days and it works great (besides the bugs you've already mentioned). This isn't a bug but a design decision I wanted to bring up: If I set my limit to 1, and hit j, then 10j, it still counts that second j as passing the limit and that second command doesn't go through. I expected the 10 to reset my limit. Of course if it did reset, this allows 1j1j1j but I don't think anyone using this plugin would do that :). |
I found a bug. When you go into insert mode, exit, then try and backspace, backspace fails. It also has this behavior in other buffers that hard mode doesn't work in. I made a quick screencast of this and uploaded it to my dropbox. Unfortunately I couldn't narrate as everyone was asleep but it should be easy to follow with the keyboard clicking =) _edit_ I just read through the source and realized that the backspace is a normal behavior! However, it doesn't flash the easymode warning when you hit backspace. |
Yes, single Currently trying out |
My current code is bugged as detailed above, however I do not possess the knowledge to fix this. |
You could add With xeross' patch i can do |
sadly all the branches mentioned here are gone. Does anyone still have the latest code for this? |
Anyone still following this? :( |
teimu on r/vim and others have noted that these keys can be constructively integrated into intelligent motion commands, such as
v5jd
to delete five lines down and so on.Is there a graceful way to allow for
j
but disallowjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
?And should that be a separate mode or an enhancement to hard mode? I'm kind of favoring the latter?
The text was updated successfully, but these errors were encountered: