Possibility of syntax highlighting “dotless dotfiles” on GitHub -


i manage dotfiles using git , github many of does. name original files without dot (e.g. zshrc, not .zshrc) can recognize them in finder , make symbolic links dot;

ln -s ~/.dotfiles/gitignore_global ~/.gitignore_global ln -s ~/.dotfiles/zshrc ~/.zshrc # , on... 

when remote repository @ github website, syntax highlight on gitconfig , gitignore_global invalid while others’ .gitconfig colored. however, zshrc has syntax highlight though not contain dot in name.

i highlight gitconfig , gitignore_global .gitconfig , .gitignore. there way achieve this?

thank in advance.

internally, github uses linguist library determine language statistics of repository , syntax highlighting of files, when browsing on github website. however, remarked it, syntaxes not correctly detected, gitconfig , gitignore_global files, because dot missing in front of filename.

to manually set syntax highlighting in files, can add emacs or vim modeline in 1 file's comment, anywhere in file. linguist library detect during parsing of file , syntax highlighting of choice enabled.

so, precisely answer question, if want syntax highlight gitconfig file (that basic ini file syntax, can add 1 of modelines anywhere inside:

vim modeline:

# vim: set filetype=dosini:  

emacs modeline:

# -*- mode: ini;-*- 

this feature documented on linguist github page.

for gitignore_global file, don't know available syntax highlighting .gitignore files.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -