How can I set a VIM filetype programmatically? -


is there way set vim filetype programmatically, instead of doing this:

au bufnewfile,bufread *.dump set filetype=sql 

i can this

let g:temp_file_type = 'sql' au bufnewfile,bufread *.dump set filetype= g:temp_file_type 

you can set options let prefixing option name &. eg:

let &filetype=g:temp_file_type 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -