fix bug and modify .gitignore

fix the bug which appears and causes exception when there is no message in the group

add vim swap file and settings[.example].js to .gitignore
prepare for ajax