textobj-camelcase.vim
キャメルケースとかアンスコ区切り単位で取り扱いたい場面ってけっこうありますよね。camelcasemotion.vimっていう便利なプラグインがあるんですけど、そこまで高機能じゃなくてテキストオブジェクトで扱えるだけで僕は十分なのでtextobj-userを利用してプラグインを書きました。
" textobj-camelcase - Text objects for camel case.
" Version: 0.0.1
" Author: Kazuhito Hokamura
" License: MIT license (see <http://www.opensource.org/licenses/mit-license>)
if exists('g:loaded_textobj_camelcase')
finish
endif
call textobj#user#plugin('camelcase', {
\ '-': {
\ '*pattern*': '[A-Za-z][a-z0-9]\+',
\ 'select': ['ac', 'ic'],
\ },
\ })
let loaded_textobj_camelcase = 1
うん、便利。
- Prev Entry:Ark(Catalyst)のルーティング
- Next Entry:Crypt::DHが遅いときはMath::BigInt::GMPを入れるといいらしい