Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

g:operator#surround#blocks に正規表現を設定したい #5

Closed
osyo-manga opened this issue Mar 4, 2014 · 1 comment
Closed
Labels

Comments

@osyo-manga
Copy link

いますぐほしい!というわけではないのですが忘れないうちに Issues に投げておきます。
以下のように g:operator#surround#blocks に正規表現を設定できれば便利そうだと思いました。

let g:operator#surround#blocks = {
\   "-" : [
\       { 'block' : ['\w*(', ')'], 'motionwise' : ['char', 'line', 'block'], 'keys' : ['(', ')'] },
\   ]
\}

<Plug>(operator-surround-delete)func(hoge)func() のみ削除するようなイメージです。
textobj-xbrackets.vim と組み合わせて使用することを考えています。
<Plug>(operator-surround-append)<Plug>(operator-surround-replace) で利用する場合は func(hoge( みたいに \w*( にマッチするワードを入力したら func({textobj})hoge({textobj}) みたいな感じになるとかですかねぇ。

@osyo-manga
Copy link
Author

#6 と合わせて自作する事にしたのでこの要望は取り下げます。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants