Update gitignore to work better with vim
Fix IndexError on file switching [Qt]

fixes #393