Open rattletat opened 4 years ago
would be great if wellle/targets.vim could be used as text objects !!
I was able to make work with following config :D
`` let g:sandwich_no_default_key_mappings = 1 let g:textobj_sandwich_no_default_key_mappings = 1
call plug#begin('~/.vim/plugged')
Plug 'machakann/vim-sandwich' Plug 'wellle/targets.vim' call plug#end()
nmap sd
I needed to use
nmap sd <plug>(operator-sandwich-delete)a
nmap sr <plug>(operator-sandwich-replace)a
nmap sa <plug>(operator-sandwich-add)
xmap sa <plug>(operator-sandwich-add)
Another benefit seems to be that its possible now to use targets builtin objects like q
.
Sadly it seems to break the magic character f
. To make it work I had to add additionally:
nmap sdf <plug>(sandwich-delete)f
nmap srf <plug>(sandwich-replace)f
Hey I use targets.vim and vim-sandwich together.
I'm not sure whether this behavior is from vim itself or targets, but often you can just do something like this:
| is the cursor. One could press di) now and yield:
However, doing something like sd) is not possible atleast with my configuration. Is this achievable? This feature would make my vim operator experience more consistent.