[FEATURE] support configurable file extension

Small patch to support configurable file extensions. I separated this out from the merge behavior patch as I see you have other suggestions for that.

PS I know someone mentioned the anal-ity of formatting changes; if you want to push back on my auto whitespace corrections, LMK

My .vimrc includes,
```
" Only do this part when compiled with support for autocommands.
if has("autocmd")
  autocmd BufWritePre * :%s/\s\+$//ge
endif " has("autocmd")
```