runtime(env): add ftplugin for env filetype

Commit: 
https://github.com/vim/vim/commit/9148644c1eb73faad702eacac2d40925c0c9a2d0
Author: snelling-a <[email protected]>
Date:   Fri Feb 27 18:51:34 2026 +0000

    runtime(env): add ftplugin for env filetype
    
    Patch 9.2.0033 (https://github.com/vim/vim/issues/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 <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/runtime/ftplugin/env.vim b/runtime/ftplugin/env.vim
new file mode 100644
index 000000000..ad1ee7f11
--- /dev/null
+++ b/runtime/ftplugin/env.vim
@@ -0,0 +1,19 @@
+" 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

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1vw34J-00G5eP-OP%40256bit.org.

Raspunde prin e-mail lui