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.

I use firefox 4 with vimperator. I got tired of using "panorama switch blah" all the time, so I decided to set up a user defined command. It follows:

command! -nargs=1 pitch panorama switch <args>

Fairly straight-forward. With this setup I can type "pitch vim" and that will take me to the named tab-group for my vim tutorials and vim related junk. I quickly began to miss auto-completion, though, and so I changed the command as follows:

command! -nargs=1 -complete something pitch panorama switch <args>

The problem is I couldn't figure out which "something" would do the trick. Does anyone know which auto-completion category contains the tab-group names? Will I have to make my own (and if so, anyone know a good tutorial for that? :help wasn't quite helpful enough with regards to custom completions...

Thanks!

share|improve this question
add comment

1 Answer

Instead of define a new command, try an abreviation:

:ca pitch panorama switch

"ca" is for command line mode, "pitch" is your abreviation and "panorama switch", the command to expend.

Since you have done that, enter in command line mode, type "ca", then when you type space it expends to "panorama switch" which it use completion.

I suggest a quicker abreviation like "sw" or whatever to same typing time.


PS: It does not answer the question but I do not have enought reputation to leave a comment so I give an answer (and I think it does what you are looking for).

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.