Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to "complete completion within completion"? Example:

Completions:

'fra' => '\frac{$1}{$0}'
'bf' => '\mathbf{$0}'

I do fra<tab>bf<tab> and want to have \frac{\mathbf{***}}{}, not \frac{bf}{***} where *** is the cursor.

share|improve this question
    
Pressing Escape between the first and second tab would be a possible workaround to cancel the first completion's chain of insert locations. –  Daniel Beck Apr 24 '13 at 20:01
    
    
@DanielBeck: That unfortunately conflicts with exiting the insert mode in Vintage. –  mreq Apr 24 '13 at 20:06
    
Open up the default key binding file and search for clear_fields. This is the command that cancels the chain of fields in snippets. Just bind that to any key combination (and use the same context) in your user key bindings file. –  Daniel Beck Apr 24 '13 at 20:19
    
Alternatively, bind next_field to a different key combination and press that instead. The Tab key is really overloaded... –  Daniel Beck Apr 24 '13 at 20:32
show 1 more comment

1 Answer

At least part of the answer is setting "auto_complete_with_fields": true in your settings file.

That will make it trigger the completion instead of skipping to the next tab stop.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.