Thursday, October 28, 2010

Working with Vim Explore plugin

Vim Explore command let you browse files.

Hiding files and folders: Ctrl + H

Sometimes you would like exclude some files or folders from the list, e.g. pyc files that are results of python compilation, or .svn folders, etc. There is an easy way to get this done. Add the following to your ~/.vimrc file:
let g:netrw_list_hide = '.pyc,.svn,.egg-info'

Back to Explore: Ctrl + 6

When you click on a file in explore view Vim displays its content. Once you finished with your changes to the file there is a way to quickly get back to the explore view. Just press Ctrl+6.

Change current folder: c

When you are in Explore view you can use the following command to create a new file:
:e filename
This command create a file in a folder you started Vim, but sometimes that is not what you want, usually need a new file in a folder you currently browsing. Just press c to make a folder in explore view a current folder for Vim.
Read more about explore here.

No comments :

Post a Comment