Toggle the width of the NERDTree window
This little script is a plugin in for the NERDTree Vim plugin. It adds a new key (that is, w) which toggles the width of the NERDTree window between the default width and the width of the longest file name.
Quite useful if you want to have a clear view on your files and you don't want to maximize your NERDTree.
You need, of course, the NERDTree. Then, put this script in the nerdtree_plugin/ subdirectory in the installation of NERDTree.
If you use Plug, just add the line below to your plugin list (probably some place in the .vimrc):
Plug alexandre/toggle_width.vim