You can automatically set the file type for certain file extensions using autocmd:
autocmd BufRead,BufNewFile *.txt,*.TXT set filetype=markdown
Add this line to yours .vimrc.
Enter :help autocmdinside vim for more details; see also.: :help autocmd-group. . See also: :help filetype.
source
share