0
0

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 内から実行環境を判定する(主に Windows)

0
Last updated at Posted at 2021-10-11
if has('win32')
  " Windows ローカル (64bit版でも has('win32') は 1 を返す)
elseif has('win32unix')
  " msys2, Cygwin など Unix環境を再現したもの (ただし WSL は除く)
else
  " その他のパターン(WSL も含む)
endif

WSL なのかそうでないかの判定ができない。
現状、isdirectory('/mnt/c) が 1 であるかどうかで判定するしかないだろうか?

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?