[vim/vim] feat(filetype): add razor filetype for .cshtml and .razor (PR #19207)

10 views
Skip to first unread message

Tristan Knight

unread,
Jan 18, 2026, 1:22:45 PMJan 18
to vim/vim, Subscribed

cshtml/razor is not html and is its own markup language

https://learn.microsoft.com/en-us/aspnet/core/mvc/views/razor?view=aspnetcore-10.0

Files containing Razor generally have a .cshtml file extension. Razor is also found in Razor component files (.razor). Razor syntax is similar to the templating engines of various JavaScript single-page application (SPA) frameworks, such as Angular, React, VueJs, and Svelte.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/19207

Commit Summary

  • 681655f feat(filetype): add razor filetype for .cshtml and .razor

File Changes

(2 files)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19207@github.com>

Tristan Knight

unread,
Jan 18, 2026, 2:04:46 PMJan 18
to vim/vim, Push

@tris203 pushed 1 commit.

  • 5e9fdb5 feat(filetype): add razor filetype for .cshtml and .razor


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19207/before/681655fc52c9b9532e424be5e3d02093c71d4738/after/5e9fdb51211e7e711544e5bd6d50c916828dc5ba@github.com>

Christian Brabandt

unread,
Jan 18, 2026, 3:44:40 PMJan 18
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#19207)

okay, so it seems to be the intended filetype even back then when .cshtml support was initially merged #10212 . But I am afraid merging this now will leave people without syntax highlighting while currently they get html highlighting and I don't want to break this so short before a plugin. So this has to wait until after the 9.2 release.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19207/c3765725903@github.com>

Tristan Knight

unread,
Jan 18, 2026, 3:58:41 PMJan 18
to vim/vim, Subscribed
tris203 left a comment (vim/vim#19207)

There is a highlighter here

https://github.com/jlcrochet/vim-razor


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19207/c3765739012@github.com>

Christian Brabandt

unread,
Jan 19, 2026, 2:07:05 PMJan 19
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#19207)

yes, one needs an additional plugin then.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19207/c3769744313@github.com>

Tristan Knight

unread,
Jan 19, 2026, 2:40:19 PMJan 19
to vim/vim, Subscribed
tris203 left a comment (vim/vim#19207)

yes, one needs an additional plugin then.

Appreciate that. Sorry I was too brief

I meant if we can get permission from the author to upstream the syntax would that alleviate your highlight concerns.

If not, or again that is too close to a release. Then obviously we wait.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19207/c3769844005@github.com>

Christian Brabandt

unread,
Feb 18, 2026, 5:05:00 PM (13 days ago) Feb 18
to vim/vim, Subscribed

Closed #19207 via 68dbb58.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19207/issue_event/22897710359@github.com>

Reply all
Reply to author
Forward
0 new messages