Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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...


share|improve this question

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .