operator-camelize.vim icon indicating copy to clipboard operation
operator-camelize.vim copied to clipboard

変換すると文字が1文字増えるようです。

Open panghea opened this issue 11 years ago • 5 comments

例えば、 byte_length_between を <Leader>cw で変換すると ByteLengthBetweenn と,末尾にnが1文字残ってしまいます。

上記情報だけで解決できますでしょうか?一緒に入っているプラグインなども記述したほうが良いですか?

panghea avatar Mar 14 '14 00:03 panghea

うーん、再現しないので、次の情報が欲しいです。

  1. <Leader>cwを押したカーソルの位置
  2. verbose nmap <Leader>cの結果
  3. operator-user.vimは最新版を使っていますか?

tyru avatar Mar 15 '14 13:03 tyru

ご返答有難うございます。

  1. byte_length_betweenbyte_のbにカソールがある状態です。
  2. は以下のとおりです。
   \c            <Plug>(operator-camelize)
    Last set from C:\Tools\vim73-kaoriya-win32\_vimrc

3.は、0.0.9となっております。

*operator-user.txt* Define your own operator easily

Version 0.0.9

よろしくお願いします。

追記 解析のお役に立てるかわかりませんが、 byte_length_betweenを<Leader>cwした後のレジスタ内容も添付しておきます。

--- レジスタ ---
""   byte_length_betwee
"0   souryouRegex
"1   ByteLengthh^JByteLength^J
"2       echom "after2:" . getreg('z', 1)     ^J
"3   @z 
"4   byte_length_hoge
"5       echo "after:" .a:text^J
"6       echo "after:" .@z^J
"7       echo "prev:" .@z^J
"8       echo "hoge:" .@z^J
"9       echo "hoge:" .a:motion_wiseness^J
"d   opt
"i   opt
"v   op_camelize
"x   b
"y   ByteLength
"z   ByteLength
"-   byte_length_betwee
"*   byte_length_between
".   
":   redir msg.txt
"#   \Tools\vim73-kaoriya-win32\vimfiles\neokun\operator-camelize.vim\autoload\operator\camelize.vim
"/   yank     
'''                                                                                     

panghea avatar Mar 17 '14 01:03 panghea

3.は、0.0.9となっております。

*operator-user.txt* Define your own operator easily

Version 0.0.9

お、自分の環境と違いますね。 というか自分の環境が古いですね。。。

doc/operator-user.txt:

Version 0.0.7

https://github.com/kana/vim-operator-user/commit/1d51271383c0a24fc8fe87900cca8ae8a6ed640b

これが原因と思って、git pullして最新版にしましたが、それでも再現しないです。 operator-userのバージョンの違いではないとなると、 プラグインが緩衝する事はおそらく考えにくいので、 何らかのVimのオプションに違いがあり、operator-camelizeが前提としている条件が崩れて、結果に違いが出てると思われます。 もう一回operator-camelizeの処理を確認してみます。

tyru avatar Mar 18 '14 14:03 tyru

Kaoriya版VIMに同梱されているmswin.vimを読み込まない場合は、正常動作するようです。

panghea avatar May 27 '14 02:05 panghea

有用な情報ありがとうございます。 2014/05/27 11:04 "panghea.develop" [email protected]:

Kaoriya版VIMに同梱されているmswin.vimを読み込まない場合は、正常動作するようです。

— Reply to this email directly or view it on GitHubhttps://github.com/tyru/operator-camelize.vim/issues/1#issuecomment-44229334 .

tyru avatar May 27 '14 13:05 tyru