if exists('loaded_trailing_whitespace_plugin') | finish | endif
let loaded_trailing_whitespace_plugin = 1
this will stop the script from executing twice if it is, for some reason, loaded twice.
If you look around Github, you will find that it is convention for scripts to do this.
The variable also lets users disable the plugin under certain circumstances, for example I don't want the plugin to run in emails, so after this is merged I will be able to put in my .vimrc:
autocmd filetype mail let loaded_trailing_whitespace_plugin = 1
By adding these two lines to the top of the file:
this will stop the script from executing twice if it is, for some reason, loaded twice.
If you look around Github, you will find that it is convention for scripts to do this.
The variable also lets users disable the plugin under certain circumstances, for example I don't want the plugin to run in emails, so after this is merged I will be able to put in my .vimrc:
and the plugin won't run in email files.