Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add toggle yoy for :syntax enable/off #205

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/unimpaired.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ On Off Toggle Option
*[ov* *]ov* *yov* 'virtualedit'
*[ow* *]ow* *yow* 'wrap'
*[ox* *]ox* *yox* 'cursorline' 'cursorcolumn' (x as in crosshairs)
*[oy* *]oy* *yoy* 'syntax'

The mnemonic for y is that if you tilt it a bit it looks like a switch.

Expand Down
3 changes: 3 additions & 0 deletions plugin/unimpaired.vim
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,9 @@ call s:map('n', 'yov', ':set <C-R>=(&virtualedit =~# "all") ? "virtualedit-=all"
call s:map('n', '[ox', ':set cursorline cursorcolumn<CR>')
call s:map('n', ']ox', ':set nocursorline nocursorcolumn<CR>')
call s:map('n', 'yox', ':set <C-R>=<SID>cursor_options()<CR><CR>')
call s:map('n', '[oy', ':set syntax=enable<CR>')
call s:map('n', ']oy', ':set syntax=off<CR>')
call s:map('n', 'yoy', ':if exists("g:syntax_on") <Bar> syntax off <Bar> else <Bar> syntax enable <Bar> endif<CR>')
call s:map('n', '[o+', ':set cursorline cursorcolumn<CR>')
call s:map('n', ']o+', ':set nocursorline nocursorcolumn<CR>')
call s:map('n', 'yo+', ':set <C-R>=<SID>cursor_options()<CR><CR>')
Expand Down