Currently, I can assign the Tab keyt either to “Indent Selection” or to “Next Placeholder”. I would like to configure the following behavior:
if cursor_in_placeholder:
put_cursor_in next_placeholder
else:
indent
And the reverse for Shift+Tab, of course.
Anonymous
This can already be achieved by a proper javascript user macro.You may create a script for the above task and assign <tab> as a shortcut to it in the options.</tab>See the section on user macros in the manual and example scripts in the wiki.You'll want the following undocument functionEdit: Sorry, it's more complex than I thought. First,
editor.currentPlaceHolder()works differently than I thought. You can't use it here. Second, scripts currently cannot be used for moving the cursor around.Last edit: Tim Hoffmann 2014-05-11
Wow, really great hint, I was looking for this feature for quite some tim. Thanks!
I tried to implement it with the following script, but I can't get it to work -- the script always indents the current line, even if the cursor is inside a placeholder. Any idea what I did wrong?
You are right. There is currently no way to achive this functionality. See my comment above.
Is this possible yet?
No, nothing changed here.
Are there any plans to add this funtionality?
While this functionality is reasonable (like many others), this is not a priority. So no plan. You can upvote the ticket. It increases the likelyhood of implementation if there is much interest.