Web Development

I just switched from my trial version of PHPStorm to Vim with Janus.

PHPStorm is an awesome IDE. I would argue that it is the best IDE for PHP. However, it eats a lot of memory. Last time, it was a whopping 1Gb+.

Anyway, back on topic. Creating a file or folder in Vim is very very easy. NERDTree makes it even easier.

vim_nerdgree.png

Creating a File or Folder in Vim using NERDTree

Pressing m would open a menu below and you can select from a list of actions.

NERDTree Menu. Use j/k/enter and the shortcuts indicated
==========================================================
> (a)dd a childnode
  (m)ove the current node
  (d)elete the current node
  (r)eveal in Finder the current node
  (o)pen the current node with system editor
  (q)uicklook the current node
  (c)opy the current node
Add a childnode
==========================================================
Enter the dir/file name to be created. Dirs end with a '/'
/Library/WebServer/Documents/new-teacher-center/app/Model/

Pressing a would let you add a childnode. A childnode can be a file or folder depending if you add a forward slash ( / ) or not.

Creating a Folder

If we don’t add a forward slash like below, it would create a file.

Add a childnode
==========================================================
Enter the dir/file name to be created. Dirs end with a '/'
/Library/WebServer/Documents/new-project/app/Model/file

Creating a Folder

If we add a forward slash like below, it would create a folder.

Add a childnode
==========================================================
Enter the dir/file name to be created. Dirs end with a '/'
/Library/WebServer/Documents/new-project/app/Model/folder/

Further Resources

NERDTree is a great Vim plugin. To learn more about NERDTree, type in :help NERDTree for more commands.