Sublime Forum

Amount, Times and Repeat

#1

Hello!

Does anyone knows why this is failing?

        { "keys": "alt+j"], "command": "set_motion", "args": {
		"motion": "move",
		"motion_args": {"by": "lines", "times":10,"forward": true, "extend":true }},
		"inclusive": true ,
		"context": {"key": "setting.command_mode"}]
	}

Selection receives a argument of amount:
move
move mode amount [extend]
mode One of characters, words, wordends, wordboundaries, lines, wholelines or pages
amount The number of mode elements to move the cursor by
extend If this has the literal value “extend”, the selection will be extended in the direction of movement
Moves each cursor, by the given mode, amount number of times.

Im trying to create a key binding that moves the cursor 10 times faster than regular movement.

I hope I can found how to make this. Is the only thing that is forcing me to use VIM.

Any help will be awesome

Thank you so much!

0 Likes

#2

Someone knows how to move the cursor 10 lines up or down? It seems to be a pretty easy task for a text editor :stuck_out_tongue:

I can’t find this in the docs or here.

0 Likes

#3

The move command doesn’t accept a times parameter. You’ll need to make a plugin command that manually calls move 10 times.

0 Likes

#4

Thank you so much for the answer mr. jps,

I look forward for that feature to be included

Your editor is the best.

Best Regards

0 Likes

#5

BTW if you move forward/backward several times by char in several long lines (with a plugin), you’ll see an undesirable horizontal scroll movement (some kind of flicker, but smoother).

I think the “repeat/times” parameter is necessary (because there are commands that could avoid scrolling if the command with “repeat” doesn’t require it).

0 Likes

#6

Yeah I did see this, you are right.

I’m facing problems in vintage mode too. Like:

-When you hit shift+V (visual line mode) and go up and down with k or j, Sublime do not select entire line… he is acting as regular visual mode.

-Auto-complete starts working with the first letter. If you are using another bind to escape Insert mode (like jj or ij) it gonna be a little difficult to escape from insert mode.

-MacVim and others bind regular OS movements to the VIM. Like CMD+L: Go to the last letter… etc.

  • Its pretty difficult to see the match tag. Its too sutil. And we continue to have the cursor problem… VIM have quick movements, its too easy to lost where are the cursor.

I did notice some other problems… I still think that Sublime is the one that gonna substitute the VIM :smile: But is not ready yet.

Best Regards

0 Likes

#7

One of that problems:
-Lets indent this code…
-Select the block, hit = and …
-The entire block go to a flat indentation.

There are a huge list of problems. But We have a great dev working on the product. I’m certain that all this will be fixed soon! :smiley:

Bests

0 Likes