Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
gfカーソルの下でファイルを開こうとすることを知っています。gfのファイル名認識部分を利用して、カーソルの下のファイル名または URL を視覚的に簡単に選択する方法があるかどうか疑問に思いました。
gf
のファイル名検出はgf、オプションによって強化されてい'isfname'ます。対応する正規表現 atom もあり\fます。<cfile>したがって、カーソルの下にある現在のファイル名 (aka ) を次のように検索できます。
'isfname'
\f
<cfile>
:let @/ = '\f*\%#\f*'
最近の Vim 7.3 バージョンでは、gnコマンドを使用して一致を選択できます。
gn