5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

vimで編集中のファイルのディレクトリをエクスプローラで開く

Last updated at Posted at 2016-02-20

すべてがvim内で完結できないレベルのため、
ちょっとした操作がしたくなったりしたときに
windowsのエクスプローラ開きたくなることがあります。

やりかた

explorerコマンドの引数にファイルのディレクトリを渡す

:!explorer %:p:h

もう少し便利に

vimrcに書いて、shift+F1でエクスプローラを開くキーを割り当てる

map <S-F1> :!explorer %:p:h<CR>

さらに深く

%:p:hの意味は

:help filename-modifiers

5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?