As soon as I load any file in vim, It\'ll try to detect the file and color-highlight it if possible.
I want to know a vim command that will tell me which ftplugin or Fil
&filetype for script usage
&filetype
Minimal example:
echo &filetype
More realistic usage example:
if &filetype ==# 'c' || &filetype ==# 'cpp' setlocal noexpandtab endif
& syntax works for all options: https://vi.stackexchange.com/questions/2569/how-do-i-check-the-value-of-a-vim-option-in-vimscript
&