Files
org-vim/runtime/ftplugin/env.vim
snelling-a 9148644c1e runtime(env): add ftplugin for env filetype
Patch 9.2.0033 (#19260) introduced a dedicated `env` filetype for
.env files, which were previously detected as `sh`. This left env
files without `commentstring`, `comments`, or `formatoptions` since
no ftplugin was added alongside the new filetype.

Add runtime/ftplugin/env.vim to set these options, matching the
behavior that .env files had when they used the `sh` filetype.

closes: #19522

Signed-off-by: snelling-a <72226000+snelling-a@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2026-02-27 18:51:34 +00:00

20 lines
406 B
VimL

" Vim filetype plugin file
" Language: env
" Maintainer: This runtime file is looking for a new maintainer.
" Last Change: 2026 Feb 27
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=b:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
let &cpo = s:cpo_save
unlet s:cpo_save