Groups
Sign in
Groups
vim_jp
Conversations
Labels
About
Send feedback
Help
matchit.vimの機能
248 views
カーソル移動
Skip to first unread message
tora
unread,
Aug 20, 2014, 10:10:25 PM
8/20/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vim...@googlegroups.com
vim 上にて matchit.vim というプラグインを利用しています。
このプラグインを使うと、htmlの文書では、あるタグの対応する閉じタグに移動が
%キーのみで、簡単にできて、とてもよいのですが、
html2文書の内部で、javascript が内蔵している文書を扱うときに、困ったことがあります。
それは、htmlのタグでない、{, }, (, ) などカーソル移動が %キーで、できなくなってしまったことです。
このvimにもともと備わっている(?)機能を生かしたままで、matchit.vimのhtml文書のタグ移動を使うことを
したいのですが、となたかご存知の方はいらっしゃいませんか。
( <, > についての動作は期待した動作をします。)
thinca
unread,
Aug 24, 2014, 10:34:31 PM
8/24/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vim...@googlegroups.com
この件について少し調べてみました。
matchit.vim ではバッファ毎に設定を変更できるのですが、html のバッファでは{,} と (,) が設定されていないようです。
Mac や Linux の場合は ~/.vim/after/ftplugin/html.vim もしくは Windows の場合は ~/vimfiles/after/ftplugin/html.vim と言う
ファイルを作り、以下の内容を書いてみてください。
let b:match_words .= ',{:},(:)'
これで動くようになると思います。
tora
unread,
Aug 25, 2014, 9:45:56 PM
8/25/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vim...@googlegroups.com
お教えいただきありがとうございます。
残念ながら、初心者なもので、回答が理解できません。つぎのことをお教えください。
私はkaoriya版(Win)を使用しているので、どこへhtml.vimを配置すればよいのでしょうか。
2014年8月25日月曜日 11時34分31秒 UTC+9 thinca:
thinca
unread,
Aug 26, 2014, 9:15:45 AM
8/26/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vim...@googlegroups.com
> 私はkaoriya版(Win)を使用しているので、どこへhtml.vimを配置すればよいのでしょうか。
ホームディレクトリ (C:\Users\username) 以下に、vimfiles\after\ftplugin\
と言うディレクトリを作成し、そこに html.vim を配置します。
つまりあなたの Windows のユーザー名が tora だとすると、
C:\Users\tora\vimfiles\after\ftplugin\html.vim
と言うことになります。
--
thinca <
thi...@gmail.com
>
2014年8月26日 10:45 tora <
m_ho...@d8.dion.ne.jp
>:
> --
> このメールは Google グループのグループ「vim_jp」に登録しているユーザーに送られています。
> このグループから退会し、グループからのメールの配信を停止するには
vim_jp+un...@googlegroups.com
> にメールを送信してください。
> このグループに投稿するには
vim...@googlegroups.com
にメールを送信してください。
>
http://groups.google.com/group/vim_jp
からこのグループにアクセスしてください。
> その他のオプションについては
https://groups.google.com/d/optout
にアクセスしてください。
tora
unread,
Aug 26, 2014, 9:16:43 PM
8/26/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vim...@googlegroups.com
教えていただいたことをやってみましたが、私の環境ではうまくできませんでした。
ただし、vimを起動して、最初の一回目の%キーの動作だけは期待した動作でした。
残念。
Reply all
Reply to author
Forward
0 new messages