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

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

You must log in to answer this question.

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