Wiki

by yszheda

View project onGitHub

Tip 43: Expore the File System with netrw

Return to the top: <<Practical Vim>>

Preparation

Minimum requirement fot your vimrc file:

set nocompatible
filetype plugin on

Meet netrw--Vim's Native File Explorer

  • k/j
  • -: open the parent directory

Opening the File Explorer

Ex Command Shorthand Effect
:edit . :e. Open file explorer for current working directory
:Explore :E Open file explorer for the directory of the active buffer

References

# If you open the file in vim,
# then you can \"ayy@a the next line to execute the vim command: 
:h :Expore
  • :SExplore: open file explorer in a horizonrtal split window
  • :VExplore: open file explorer in a vertical split window

Working with Split Windows

Doing More with netrw

create new file

References

# If you open the file in vim,
# then you can \"ayy@a the next line to execute the vim command: 
:h netrw-%

create new directories

References

# If you open the file in vim,
# then you can \"ayy@a the next line to execute the vim command: 
:h netrw-d

rename existing files or directories

References

# If you open the file in vim,
# then you can \"ayy@a the next line to execute the vim command: 
:h netrw-rename

delete files or directories

References

# If you open the file in vim,
# then you can \"ayy@a the next line to execute the vim command: 
:h netrw-del

References

across network

References

# If you open the file in vim,
# then you can \"ayy@a the next line to execute the vim command: 
:h netrw-ref