Sublime Forum

Cursor potition after Tab [solved]

#1

This annoys me so much that I had to register on this forum.

I can’t explain the issue without giving an actual example. | is the cursor.

I use auto-complete by hitting tab
tr + tab =

|

I press enter twice:

|

I move up one row:

|

I press tab and instead of

[tab_space]|

I get this:

|

FUUUUUU

0 Likes

#2

After entering tr you see something like this in the statusbar: “Line xx - Field 1 of 2”?

before you enter to add your tabulator in the newly created line, hit 2 x , that brings you out of the field editing mode.

0 Likes

#3

As an alternative you could modify your .\HTML\html.sublime-completions file:

{ "trigger": "tr", "contents": "<tr>$1</tr>" },

to

{ "trigger": "tr", "contents": "<tr>$0</tr>" },

In that case you don’t need to hit 2 x.

0 Likes

#4

Thank you. But tr was just an example. I have to change all the entries in that file if I want this to work.
I searched for some info about the field editing mode but I couldn’t find any. I don’t see how exiting the element when hitting tab can help.

0 Likes

#5

vassy

I have had such annoying problem, and simply changed default hotkey for “next field” in keybindings default file
from

[code]{ “keys”: “tab”], “command”: “next_field”, “context”:

		{ "key": "has_next_field", "operator": "equal", "operand": true }
	]
}[/code]

to

[code]{ “keys”: “shift+tab”], “command”: “next_field”, “context”:

		{ "key": "has_next_field", "operator": "equal", "operand": true }
	]
}[/code]
0 Likes

#6

Thanks mate! That fixed it. It’s hard to figure this stuff out.

0 Likes