tags:

views:

101

answers:

1

At the moment I use:

map <C-F2> :set cursorcolumn<Bar>set cursorline<CR>
map <C-F3> :set nocursorcolumn<Bar>set nocursorline<CR>

How to modify the mapping to toggle on/off only by using C-F2?

+4  A: 
map <C-F2> :set cursorcolumn!<Bar>set cursorline!<CR>

From :help toggle

:se[t] {option}!   or
:se[t] inv{option}  Toggle option: Invert value. {not in Vi}
rampion
Ah - I've missed :help toogle. Thanks a lot!
vbd