Cycle text within predefined candidates.
yes
=>no
=>yes
January
=>February
=>March
trUe
=>faLse
keep case by default"
=>'
can handle non-keywords- 可
是
=> 可否
multibyte is fine Rails Metal
=>Thrash
=>Technical Death
handle multi-words by visual selection, or smart auto search<em>
important</em>
=><strong>
important</strong>
tag pairs cycle together「
quoted」
=>『
quoted』
special pairs cycle together
let g:cycle_no_mappings = 1
let g:cycle_max_conflict = 14
let g:cycle_select_ui = 'ui.select'
let g:cycle_conflict_ui = 'confirm'
let g:cycle_phased_search = 1
nmap <silent> <LocalLeader>a <Plug>CycleNext
vmap <silent> <LocalLeader>a <Plug>CycleNext
nmap <silent> <Leader>a <Plug>CyclePrev
vmap <silent> <Leader>a <Plug>CyclePrev
nmap <silent> <LocalLeader>ga <Plug>CycleSelect
vmap <silent> <LocalLeader>ga <Plug>CycleSelect
let g:cycle_default_groups = [
\ [['true', 'false']],
\ [['yes', 'no']],
\ [['on', 'off']],
\ [['+', '-']],
\ [['>', '<']],
\ [['"', "'"]],
\ [['==', '!=']],
\ [['0', '1']],
\ [['and', 'or']],
\ [['next', 'previous', 'prev']],
\ [['asc', 'desc']],
\ [['是', '否']],
\ [[',', '。', '、']],
\ [['✓', '✗', '◯', '✕', '✔', '✘', '⭕', '✖']],
\ [['lat', 'lon']],
\ [['latitude', 'longitude']],
\ [['ancestor', 'descendant']],
\ [['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday',
\ 'Friday', 'Saturday'], ['hard_case', {'name': 'Days'}]],
\ [['(:)', '(:)', '「:」', '『:』'], 'sub_pairs'],
\ ]
" For fileType "ruby" only
let g:cycle_default_groups_for_ruby = [
\ [['stylesheet_link_tag', 'javascript_include_tag']],
\ ]
" For HTML, but here just blindly add to global groups
let g:cycle_default_groups += [
\ [['h1', 'h2', 'h3', 'h4'], 'sub_tag'],
\ [['ul', 'ol'], 'sub_tag'],
\ [['em', 'strong', 'small'], 'sub_tag'],
\ ]
let g:cycle_default_groups += [
\ [['日', '一', '二', '三', '四', '五', '六']],
\ [['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']],
\ [['January', 'February', 'March', 'April', 'May', 'June', 'July',
\ 'August', 'September', 'October', 'November', 'December']],
\ [['portrait', 'landscape']],
\ ]
-
SwapIt by Michael Brown
Original ideas of special features including visual multi-words, xml tag pairs, omni-complete cycling. -
Cycle.vim by Zef
Yes, there is already a plugin named 'Cycle'. Maybe I have to rename mine. -
switch.vim by AndrewRadev
Supports more complicated patterns like ruby:a => 'b'
toa: 'b'
, which is generally unable to achieve by alternative projects. -
vim-clurin by syngan
Another early implementation, seems to have custom pattern and replace function features, but lacks documentation. -
toggle.vim by Timo Teifel
Maybe the very first plugin that introduced this idea.
-
In 繁體中文:
- 開發背景 (2011)
- 簡易使用說明 (2011)
- Group 設定簡介 (2011)