Skip to content

Commit

Permalink
Tweak spell toggle letter again
Browse files Browse the repository at this point in the history
This version is based on the numerous z spelling maps, like z=.
  • Loading branch information
tpope committed Feb 2, 2022
1 parent e4006d6 commit f992923
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion doc/unimpaired.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ On Off Toggle Option
*[ob* *]ob* *yob* 'background' (dark is off, light is on)
*[oc* *]oc* *yoc* 'cursorline'
*[od* *]od* *yod* 'diff' (actually |:diffthis| / |:diffoff|)
*[oe* *]oe* *yoe* 'spell'
*[oh* *]oh* *yoh* 'hlsearch'
*[oi* *]oi* *yoi* 'ignorecase'
*[ol* *]ol* *yol* 'list'
Expand All @@ -90,6 +89,7 @@ On Off Toggle Option
*[ov* *]ov* *yov* 'virtualedit'
*[ow* *]ow* *yow* 'wrap'
*[ox* *]ox* *yox* 'cursorline' 'cursorcolumn' (x as in crosshairs)
*[oz* *]oz* *yoz* 'spell'

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

Expand Down
1 change: 1 addition & 0 deletions plugin/unimpaired.vim
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ call s:option_map('n', 'number', 'setlocal')
call s:option_map('r', 'relativenumber', 'setlocal')
call s:option_map('s', 'spell', 'setlocal')
call s:option_map('w', 'wrap', 'setlocal')
call s:option_map('z', 'spell', 'setlocal')
nmap <script> <Plug>(unimpaired-enable)v :<C-U>set virtualedit+=all<CR>
nmap <script> <Plug>(unimpaired-disable)v :<C-U>set virtualedit-=all<CR>
nmap <script> <Plug>(unimpaired-toggle)v :<C-U>set <C-R>=(&virtualedit =~# "all") ? "virtualedit-=all" : "virtualedit+=all"<CR><CR>
Expand Down

2 comments on commit f992923

@odnoletkov
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RIP my yoz toggle for foldmethod :)

@tpope
Copy link
Owner Author

@tpope tpope commented on f992923 Feb 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't win!

Please sign in to comment.