0

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

1 Answer 1

1

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.

You must log in to answer this question.

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