" The set of operator/textobj plugins to do well with 'sandwich' like structure " Last Change: 18-Jan-2022. " Maintainer : Masaaki Nakamura " License : NYSL " Japanese " English (Unofficial) if &compatible || exists("g:loaded_sandwich") finish endif let g:loaded_sandwich = 1 " intrinsic keymappings onoremap (textobj-sandwich-function-ip) :call sandwich#magicchar#f#ip('o') onoremap (textobj-sandwich-function-i) :call sandwich#magicchar#f#i('o') xnoremap (textobj-sandwich-function-ip) :call sandwich#magicchar#f#ip('x') xnoremap (textobj-sandwich-function-i) :call sandwich#magicchar#f#i('x') onoremap (textobj-sandwich-function-ap) :call sandwich#magicchar#f#ap('o') onoremap (textobj-sandwich-function-a) :call sandwich#magicchar#f#a('o') xnoremap (textobj-sandwich-function-ap) :call sandwich#magicchar#f#ap('x') xnoremap (textobj-sandwich-function-a) :call sandwich#magicchar#f#a('x') onoremap (textobj-sandwich-tagname-i) :call sandwich#magicchar#t#i() onoremap (textobj-sandwich-tagname-a) :call sandwich#magicchar#t#a() xnoremap (textobj-sandwich-tagname-i) :call sandwich#magicchar#t#i() xnoremap (textobj-sandwich-tagname-a) :call sandwich#magicchar#t#a() onoremap (textobj-sandwich-tag-i) :call sandwich#magicchar#t#it() onoremap (textobj-sandwich-tag-a) :call sandwich#magicchar#t#at() xnoremap (textobj-sandwich-tag-i) :call sandwich#magicchar#t#it() xnoremap (textobj-sandwich-tag-a) :call sandwich#magicchar#t#at() nmap (sandwich-add) (operator-sandwich-add) xmap (sandwich-add) (operator-sandwich-add) omap (sandwich-add) (operator-sandwich-add) nmap (sandwich-delete) (operator-sandwich-delete)(operator-sandwich-release-count)(textobj-sandwich-query-a) xmap (sandwich-delete) (operator-sandwich-delete) nmap (sandwich-replace) (operator-sandwich-replace)(operator-sandwich-release-count)(textobj-sandwich-query-a) xmap (sandwich-replace) (operator-sandwich-replace) nmap (sandwich-delete-auto) (operator-sandwich-delete)(operator-sandwich-release-count)(textobj-sandwich-auto-a) nmap (sandwich-replace-auto) (operator-sandwich-replace)(operator-sandwich-release-count)(textobj-sandwich-auto-a) """ default keymappings " If g:sandwich_no_default_key_mappings has been defined, then quit immediately. if exists('g:sandwich_no_default_key_mappings') | finish | endif if !exists('g:operator_sandwich_no_default_key_mappings') " add silent! nmap sa (sandwich-add) silent! xmap sa (sandwich-add) silent! omap sa (sandwich-add) " delete silent! nmap sd (sandwich-delete) silent! xmap sd (sandwich-delete) silent! nmap sdb (sandwich-delete-auto) " replace silent! nmap sr (sandwich-replace) silent! xmap sr (sandwich-replace) silent! nmap srb (sandwich-replace-auto) endif if !exists('g:textobj_sandwich_no_default_key_mappings') " auto silent! omap ib (textobj-sandwich-auto-i) silent! xmap ib (textobj-sandwich-auto-i) silent! omap ab (textobj-sandwich-auto-a) silent! xmap ab (textobj-sandwich-auto-a) " query silent! omap is (textobj-sandwich-query-i) silent! xmap is (textobj-sandwich-query-i) silent! omap as (textobj-sandwich-query-a) silent! xmap as (textobj-sandwich-query-a) endif