Sublime Forum

How do I go hit Tab go to next section

#1

Hello I am new to ST2 and I switched from aptana 3 to ST2. One thing I really liked about aptana is that when I hit tab in I went to the next section of the code. For example,

array = 'one', 'two', 'three']

So in this instance when I finish typing three and hit tab, I would go to the next element, in this case it might be , ‘four’
But when I am inside the string ‘three’ and hit the tab in ST2 it just tabs in white space, i.e array = 'three '] instead of going to the next section like I would like. I hope this makes sense because it really bothers me that I have to hit the right arrow key to go to the next section ->, this is not a problem in a laptop. But I am in a desktop and the keyboard is not so ideal for this job.

On a unrelated note is there a way to have the terminal/command like build in the text editor?

0 Likes

#2

Come on guys, someone here should know how to do this, I know most of you are in a laptop and the right arrow key is easy to access but I have a huge keyboard and to reach that key is a pain. =D

0 Likes

#3

Give me a few minutes. I’ll come up with the right keybinding. I currently use [code] { “keys”: “tab”], “command”: “move”, “args”: {“by”: “characters”, “forward”: true}, “context”:

     { "key": "selection_empty", "operator": "equal", "operand": true },
     { "key": "preceding_text", "operator": "not_regex_match", "operand": ":space:]]*", "match_all": true },
     { "key": "following_text", "operator": "regex_contains", "operand": "^\"'\\)\\}\\]]", "match_all": true },
     { "key": "auto_complete_visible", "operator": "equal", "operand": false },
     { "key": "has_next_field", "operator": "equal", "operand": false }
 ]

},
{ “keys”: “tab”], “command”: “move”, “args”: {“by”: “words”, “forward”: true}, “context”:

     { "key": "selection_empty", "operator": "equal", "operand": true},
     { "key": "preceding_text", "operator": "not_regex_match", "operand": ":space:]]*", "match_all": true },
     { "key": "following_text", "operator": "regex_contains", "operand": "^.,:;]", "match_all": true },
     { "key": "auto_complete_visible", "operator": "equal", "operand": false },
     { "key": "has_next_field", "operator": "equal", "operand": false }
 ]

},[/code] which I stole from someone. I’ll tweak it so it works for your use case.

0 Likes

#4

[quote=“C0D312”]Give me a few minutes. I’ll come up with the right keybinding. I currently use [code] { “keys”: “tab”], “command”: “move”, “args”: {“by”: “characters”, “forward”: true}, “context”:

     { "key": "selection_empty", "operator": "equal", "operand": true },
     { "key": "preceding_text", "operator": "not_regex_match", "operand": ":space:]]*", "match_all": true },
     { "key": "following_text", "operator": "regex_contains", "operand": "^\"'\\)\\}\\]]", "match_all": true },
     { "key": "auto_complete_visible", "operator": "equal", "operand": false },
     { "key": "has_next_field", "operator": "equal", "operand": false }
 ]

},
{ “keys”: “tab”], “command”: “move”, “args”: {“by”: “words”, “forward”: true}, “context”:

     { "key": "selection_empty", "operator": "equal", "operand": true},
     { "key": "preceding_text", "operator": "not_regex_match", "operand": ":space:]]*", "match_all": true },
     { "key": "following_text", "operator": "regex_contains", "operand": "^.,:;]", "match_all": true },
     { "key": "auto_complete_visible", "operator": "equal", "operand": false },
     { "key": "has_next_field", "operator": "equal", "operand": false }
 ]

},[/code] which I stole from someone. I’ll tweak it so it works for your use case.[/quote]

thank you very much I appreciate you have taken your precious time to help a fellow noob

0 Likes

#5

This is not possible with a keybinding alone. I’ll get back to you with a plugin. But I’ll have to do it tomorrow night. I’m busy til then.

0 Likes

#6

Thanks

0 Likes