See https://vimways.org/2018/from-vimrc-to-vim/.
E.g. move the markdown autocommand to .vim/ftdetect/ghmarkdown. There's lots to do from that article series, so perhaps splitting that up is the best way to go.
Special care must be taken to install the vim directory structure properly, as it can be arbitrarily deep, within reason, and each level can have many differently-named directories. install can do this, but you have to explicitly name the subdirectories; see this Makefile for an example: https://sanctum.geek.nz/cgit/dotfiles.git/tree/Makefile#n603