I want to find a way to set my default commentstring to '#' for files of unknown extension. As far as I know, there is no way to do this.
Issuing a setlocal commentstring=#\ %s on my .vimrc would overwrite the commentstring of all known files.
So, I came up to the following solution that works great :
autocmd BufNewFile,BufRead * if &syntax == '' | setlocal commentstring=#\ %s | endif
Idea taken from here: