I've done some improvements, now the plugin is multi-file safe and swtiches the view if the last edit position was in another opened file. Please if someone could take a look at the code and tell me if you see anything wrong: