Home Download Buy Blog Forum Support

Cursor potition after Tab [solved]

Cursor potition after Tab [solved]

Postby vassy on Fri Jan 27, 2012 11:31 am

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 = <tr>|</tr>

I press enter twice:
<tr>

|</tr>

I move up one row:
<tr>
|
</tr>

I press tab and instead of
<tr>
[tab_space]|
</tr>

I get this:
<tr>

</tr>|

FUUUUUU
Last edited by vassy on Tue Jan 31, 2012 9:34 am, edited 1 time in total.
vassy
 
Posts: 3
Joined: Fri Jan 27, 2012 11:23 am

Re: Cursor potition after Tab

Postby highend on Fri Jan 27, 2012 12:03 pm

After entering tr<tab> you see something like this in the statusbar: "Line xx - Field 1 of 2"?

before you enter <tab> to add your tabulator in the newly created line, hit 2 x <esc>, that brings you out of the field editing mode.
highend
 
Posts: 93
Joined: Fri Jan 20, 2012 2:47 pm

Re: Cursor potition after Tab

Postby highend on Fri Jan 27, 2012 12:09 pm

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

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


to

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


In that case you don't need to hit <esc> 2 x.
highend
 
Posts: 93
Joined: Fri Jan 20, 2012 2:47 pm

Re: Cursor potition after Tab

Postby vassy on Sat Jan 28, 2012 1:21 pm

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.
vassy
 
Posts: 3
Joined: Fri Jan 27, 2012 11:23 am

Re: Cursor potition after Tab

Postby Sinled on Sun Jan 29, 2012 9:01 am

vassy

I have had such annoying problem, and simply changed default hotkey for "next field" in keybindings default file
from
Code: Select all
{ "keys": ["tab"], "command": "next_field", "context":
      [
         { "key": "has_next_field", "operator": "equal", "operand": true }
      ]
   }

to
Code: Select all
{ "keys": ["shift+tab"], "command": "next_field", "context":
      [
         { "key": "has_next_field", "operator": "equal", "operand": true }
      ]
   }
Sinled
 
Posts: 30
Joined: Thu Jan 12, 2012 6:14 pm
Location: Ukraine

Re: Cursor potition after Tab

Postby vassy on Tue Jan 31, 2012 9:34 am

Thanks mate! That fixed it. It's hard to figure this stuff out.
vassy
 
Posts: 3
Joined: Fri Jan 27, 2012 11:23 am


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot] and 30 guests