LoginSignup
3
2

More than 5 years have passed since last update.

間違ってNetrw を実行してしまったときの対処法

Last updated at Posted at 2017-03-08

現象

ターミナルでVim を使って.bashrcファイルを編集しようとした際に、間違って以下のように実行してしまった。

$ vim .

そうすると以下のような画面が表示され、???となってしまった。

" ============================================================================
" Netrw Directory Listing                                        (netrw v140)
"   /Users/username
"   Sorted by      name
"   Sort sequence: [\/]$,\<core\%(\.\d\+\)\=\>,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,\.info$,\.swp$,\
"   Quick Help: <F1>:help  -:go up dir  D:delete  R:rename  s:sort-by  x:exec
" ============================================================================
../
.Trash/
.bash_sessions/
.cache/
.config/
.local/
.vim/
Applications/
Desktop/
Documents/
Downloads/

環境

  • OS: Mac OS X EI Capitan 10.11.6
  • Software
    • Terminal: 2.6.1
    • Vim: VIM - Vi IMproved 7.3

対処法

通常のVimと同じく[ESC]キーを押してから :q → [Enter]キーの順で入力すると元の画面に戻れる。

表示された画面は「Netrw」というVimのファイルブラウザでした。
Netrw はVim にデフォルトでインストールされているプラグインのようです。

おまけ

Netrw の詳しい使い方が気になる方は、以下を参照してください。

Netrwを使いこなす - ΔS > 0
vim netrw 使い方 Vim Netrw でお手軽ブラウジング(デフォルトでインストール)

3
2
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
3
2