1. support adding new snippet
2. remove trail space