I would like to have a \langle ... \rangle surround for use in latex.
Hence I have defined:
let g:operator#surround#blocks = {
\ '-' : [
\ {'block': ['\langle', '\rangle'], 'motionwise': ['char', 'line', 'block'], 'keys': ['<', '>']},
\ ] }
And the following block with vim-textobj-user:
call textobj#user#plugin('latex', {
\ 'code': {'pattern': ['\\langle\>', '\\rangle\>'], 'select-a': 'a<', 'select-i': 'i<' },
\ })
This allows me to change () to \langle\rangle using sra(<.
However I cannot change back. That is sra<( beeps and does nothing.
If I change to 'block': ['\\langle', '\\rangle'] I can do sra<(,
but then the original command inserts the wrong thing \\langle\\rangle
I seems to me this could be fixed by making sure we always search literaly, rather than using regex, when changing or deleting a surround.
I would like to have a
\langle ... \ranglesurround for use in latex.Hence I have defined:
And the following block with vim-textobj-user:
This allows me to change
()to\langle\rangleusingsra(<.However I cannot change back. That is
sra<(beeps and does nothing.If I change to
'block': ['\\langle', '\\rangle']I can dosra<(,but then the original command inserts the wrong thing
\\langle\\rangleI seems to me this could be fixed by making sure we always search literaly, rather than using regex, when changing or deleting a surround.