Question Details

No question body available.

Tags

vim opencl file-type vim-syntax-highlighting

Answers (1)

Accepted Answer Available
Accepted Answer
March 1, 2026 Score: 2 Rep: 199,740 Quality: Medium Completeness: 40%

:help :setfiletype is typically used for setting the filetype of a buffer that doesn't have a filetype yet. The filetype of your .cl buffer has already been set to lisp by the time your autocommand is executed so :setfiletype does nothing by design.

You should use :help set and the :help 'filetype' option instead:

autocmd BufRead,BufNewFile
.cl set filetype=opencl