Thursday, July 1, 2010

Magento Annoyances

Great e-Commerce but the degree of separation between presentation and logic is about 10 folders from root (if you are a developer). I use vim for everything and it can get pretty annoying to work on Magento. So I present to you my .bashrc snippet:

alias pd=pushd
alias pop=popd
function cs() { cd `dirs -l +$1`; }

Go to code directory and do 'pd .' and go to templates directory and do 'pd .'. This will add presentation and logic folder to a linux directory stack which you can access via 'cs 1' or 'cs 2' or 'cs N' N being whatever folder is in the stack.