0

We can map key bindings to actions in Preferences --> Key Bindings - User. There is one type that I couldn't figure out how to map. I use unix style key bindings to navigate the file and would like to map continuous press of j to indicate that it should keep going down until I release the key press. How can I do that? I understand that I can use ctrl+f to go forward one page or go to specific line number with ctrl+g, but I specifically want to know how to map a continuous key press to a repetitive action. Is it possible and if so, how? Thanks.

Srini K
  • 3,315
  • 10
  • 37
  • 47
  • I think that is the default behaviuor but you won't be able to type _'j'_ – sergioFC Aug 03 '15 at 17:06
  • The default behavior is it goes down by only one line when when I press 'j', even if it stays pressed. I would like to see it keep going down line by line until I release the key press. Just wondering if there is way to do that. – Srini K Aug 03 '15 at 21:55
  • 1
    For me it continues going down until j is released. `{ "keys": ["j"], "command": "move", "args": {"by": "lines", "forward": true} }` – sergioFC Aug 03 '15 at 21:55
  • Tried, but doesn't seem to be working. Are you using sublime 2 or 3? – Srini K Aug 03 '15 at 22:02
  • Sublime text 3 build 3083 on windows 7 right now. EDIT: for me it also works in build 3083 on Linux Mint, – sergioFC Aug 03 '15 at 22:03
  • The only diff is I'm using it on mac, but that shouldn't matter. Let me try it again later in the day and will add to the comments. Thanks. – Srini K Aug 03 '15 at 22:06
  • 1
    I put that line and it caused some issues like it would always move down even when i want to type j, so I removed it from key bindings. However, even without that line it is magically working as I wanted it to, not sure what changed. The issue is resolved now but I've no idea why it didn't work before and what changed. Thanks for your help @sergioFC – Srini K Aug 04 '15 at 14:25
  • Well at least is solved haha – sergioFC Aug 04 '15 at 14:27

0 Answers0