takac / vim-hardtime

Plugin to help you stop repeating the basic movement keys
MIT License
829 stars 30 forks source link

Allow {motion}[h,j,k,l] #25

Closed jackfranklin closed 8 years ago

jackfranklin commented 9 years ago

It would be really nice if there was an option to allow h,j,k,l if it's after a motion.

For example. 3j or 5k should be entirely allowed. I use relative numbers so for me I use this method to navigate round a lot. Would it be possible to have an option to allow this?

Thanks!

maxmurdoch commented 9 years ago

+1

takac commented 9 years ago

Allow use of keys blocked keys if its after a repetition (e.g. a '3'), not sure I agree. What situation are you moving in blocks of 2-9 very quickly? If you are moving in small blocks quickly, you should instead be moving in larger blocks or using a different motion. If you can convince me I can make it happen :grinning:

maxmurdoch commented 9 years ago

Primarily, like Jack, I use relative line numbers which makes using {number}{motion} the quickest way to move around.

Also, when I enter a file with > 200 lines I type 100j to move to the middle, and then I'd quickly be able to see which side of that I wanted, so I could type 50{j,k}. I wouldn't use / or ? because I don't necessarily know what I'm looking for and I don't want to waste cognitive energy thinking about it.

I almost never use repetitions of h,j,k,l to move, but not being able to prefix the movements with numbers makes your awesome plugin unusable for me :cry:

takac commented 9 years ago

I feel that if you are using big jumps like 100j you should instead be using a different motion. Using page down with Ctrl-d or Ctrl-f, using search or a couple paragraph motions. All of those options would take the same or less than 4 keys which you are using.

The easymotion plugin might also be a good solution for you. On Mon, 12 Jan 2015 at 21:03, Max Murdoch notifications@github.com wrote:

Primarily, like Jack, I use relative line numbers which makes using the quickest way to move around.

Also, when I enter a file with > 200 lines I type 100j to move to the middle, and then I'd quickly be able to see which side of that I wanted, so I could type 50{j,k}. I wouldn't use / or ? because I don't necessarily know what I'm looking for and I don't want to waste cognitive energy thinking about it.

I almost never use repetitions of h,j,k,l to move, but not being able to prefix the movements with numbers makes your awesome plugin unusable for me :(

— Reply to this email directly or view it on GitHub https://github.com/takac/vim-hardtime/issues/25#issuecomment-69645514.

ccolorado commented 9 years ago

I think @maxmurdoch 's point is that if that the plugin shouldn't get in the way when you for a typo or a miscalculation of a motion or worst affect your speed. Correcting the habit of spamming hjkl should not get in the way of using as many motions as fast as you need them. I want to get heavily penalize for spamming the keys in order to correct my habit faster. But that doesn't mean that the penalization should the time frame in which i cam move in an out of a code line. Would you (@takac) agree that setting the timeout to 10 seconds makes vim unusable ?

justmytwospence commented 9 years ago

+1 @ccolorado is how I feel as well.

takac commented 9 years ago

Have you tried setting let g:hardtime_allow_different_key = 1. This will allow you to press different motions without penalization. If you set the timeout to 10 seconds and have allow_different_keys set then Vim will still be very useable but you will still be penalized when you repeat a motion.

ccolorado commented 9 years ago

Well that helps only if you are not moving on the same direction.

takac commented 9 years ago

The main point of this plugin is to discourage a motion in the same direction. I'm aware that you could make a mistake, but hopefully you will make less mistakes as this plugin penalizes you.

This is a feature that this plugin is not intended to support.