Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

This question is not the same as In vim, how can I quickly switch between tabs?, but what I want is a bit similar to it, since we are all trying to find shortcuts when editing with vim:)

Now I am in the following mode:

set number
syntax on
colorscheme desert

Can I switch to the other mode quickly without typing 3 command?

That would be more convenient than inputing lots of commands.

set nonumber
syntax off
colorscheme blue
share|improve this question

Toggling the number setting is explained in this SO question:

set number
nnoremap <F2> :set nonumber!<CR>

Toggling the syntax highlighting is explained in the vimdoc:

:map <F7> :if exists("g:syntax_on") <Bar>
    \   syntax off <Bar>
    \ else <Bar>
    \   syntax enable <Bar>
    \ endif <CR>

And there is a script to cycle through colorscheme options at wikia.

share|improve this answer

Your Answer


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.