Created
February 28, 2015 01:39
-
-
Save dahu/1aefc1700de639922065 to your computer and use it in GitHub Desktop.
Set the filetype of some.type.dist to <type>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " Barry Arthur, Feb 2015 | |
| " Set the filetype of some.type.dist to <type> | |
| function! DistFiletype() | |
| augroup DistFiletype | |
| exe 'au BufEnter ' . expand('<afile>') . ' set filetype=' . matchstr(expand('<afile>:t'), '\.\zs\w\+\ze\.dist$') . ' | au! DistFiletype' | |
| augroup END | |
| endfunction | |
| au BufNew,BufRead *.dist call DistFiletype() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment