This is a simple way to make yasnippet and autocomplete work together on emacs.
Both of them use the Tab key to activate. Everytime you press Tab,
yasnippet will run first. If there is no snippet found, autocomplete will be
activated.
Download yasnippet and autocomplete and add them to the load path or just
simply install them using package.el. After that, add this to your .emacs
First, activate yasnippet.
Next, activate and config autocomplete. Put it after the code activating yasnippet.