Home Download Buy Blog Forum Support

Amount, Times and Repeat

Amount, Times and Repeat

Postby malpeli on Sun Jan 22, 2012 7:20 am

Hello!

Does anyone knows why this is failing?
Code: Select all
        { "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!
malpeli
 
Posts: 33
Joined: Wed Oct 12, 2011 7:35 am

Re: Amount, Times and Repeat

Postby malpeli on Mon Jan 23, 2012 1:20 am

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

I can't find this in the docs or here.
malpeli
 
Posts: 33
Joined: Wed Oct 12, 2011 7:35 am

Re: Amount, Times and Repeat

Postby jps on Mon Jan 23, 2012 3:15 am

The move command doesn't accept a times parameter. You'll need to make a plugin command that manually calls move 10 times.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: Amount, Times and Repeat

Postby malpeli on Mon Jan 23, 2012 5:06 am

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
malpeli
 
Posts: 33
Joined: Wed Oct 12, 2011 7:35 am

Re: Amount, Times and Repeat

Postby dacap on Mon Jan 23, 2012 1:08 pm

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).
dacap
 
Posts: 8
Joined: Thu Dec 22, 2011 2:44 pm
Location: Santa Fe, Santa Fe, Argentina

Re: Amount, Times and Repeat

Postby malpeli on Mon Jan 23, 2012 4:35 pm

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 :) But is not ready yet.

Best Regards
malpeli
 
Posts: 33
Joined: Wed Oct 12, 2011 7:35 am

Re: Amount, Times and Repeat

Postby malpeli on Mon Jan 23, 2012 5:37 pm

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

Image

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! :D

Bests
malpeli
 
Posts: 33
Joined: Wed Oct 12, 2011 7:35 am


Return to General Discussion

Who is online

Users browsing this forum: estmatic, Google [Bot], prmaple and 31 guests