A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/slim-template/vim-slim/issues/38 below:

Vim sets filetype to HTML (not Slim) when using 'doctype html' · Issue #38 · slim-template/vim-slim · GitHub

I was editing my Rails application layout file in Vim 7.3 with this vim-slim plugin installed and noticed that Vim was using a filetype of HTML instead of Slim for my application.html.slim file and not providing syntax highlighting.

My other views that followed the *.html.slim naming convention were correctly using the Slim filetype and syntax.

The culprit seemed to be the first line of the file, which was doctype html. I changed it to the equivalent doctype 5 and now Vim correctly sets the filetype to Slim for this file.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4