2
1

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のファイラ netrwを使ってみる

Posted at

概要

ファイラをあまり利用しないので、pluginを入れるほどではないのですが、
ごく稀にファイラを利用したくなる時があるので、
vimのファイラ netrwをちょっとカスタマイズしました。

netrwの設定

let g:netrw_liststyle = 3  # ファイルをツリー表示にする
let g:netrw_winsize = 20   # ファイラのwindowサイズを20に設定

key mapping

nnoremap <silent> <LEADER>> :Vex /var/www/html<CR>
nnoremap <silent> <LEADER>< <C-w>t:close<CR>
  • leader + > で画面の左側に /var/www/html 配下のファイルツリーを表示するようにしています。
  • leader + < で左側の画面に移動し、そのwindowを閉じるコマンドをマッピングしました。

これで leader + > でファイラを表示し、leader + > でファイラを閉じるようにしています。

画面イメージ

1.png

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?