annotate runtime/ftplugin/sed.vim @ 32862:19cba3b0df5f

Runtime: add new sed ftplugin (#12843) Commit: https://github.com/vim/vim/commit/56bafd7a6a79203b86f7165a7bbac5730c170f64 Author: dkearns <dougkearns@gmail.com> Date: Sat Aug 19 20:13:31 2023 +1000 Runtime: add new sed ftplugin (https://github.com/vim/vim/issues/12843)
author Christian Brabandt <cb@256bit.org>
date Sat, 19 Aug 2023 12:15:04 +0200
parents
children 8ae680be2a51
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
32862
19cba3b0df5f Runtime: add new sed ftplugin (#12843)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " Vim filetype plugin file
19cba3b0df5f Runtime: add new sed ftplugin (#12843)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2 " Language: sed
19cba3b0df5f Runtime: add new sed ftplugin (#12843)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 " Maintainer: Doug Kearns <dougkearns@gmail.com>
19cba3b0df5f Runtime: add new sed ftplugin (#12843)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
4 " Last Change: 2020 Apr 1
19cba3b0df5f Runtime: add new sed ftplugin (#12843)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5
19cba3b0df5f Runtime: add new sed ftplugin (#12843)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 if exists("b:did_ftplugin")
19cba3b0df5f Runtime: add new sed ftplugin (#12843)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7 finish
19cba3b0df5f Runtime: add new sed ftplugin (#12843)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 endif
19cba3b0df5f Runtime: add new sed ftplugin (#12843)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 let b:did_ftplugin = 1
19cba3b0df5f Runtime: add new sed ftplugin (#12843)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10
19cba3b0df5f Runtime: add new sed ftplugin (#12843)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11 let s:cpo_save = &cpo
19cba3b0df5f Runtime: add new sed ftplugin (#12843)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12 set cpo&vim
19cba3b0df5f Runtime: add new sed ftplugin (#12843)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13
19cba3b0df5f Runtime: add new sed ftplugin (#12843)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 setlocal comments=:#
19cba3b0df5f Runtime: add new sed ftplugin (#12843)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15 setlocal commentstring=#\ %s
19cba3b0df5f Runtime: add new sed ftplugin (#12843)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 setlocal formatoptions-=t formatoptions+=croql
19cba3b0df5f Runtime: add new sed ftplugin (#12843)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17
19cba3b0df5f Runtime: add new sed ftplugin (#12843)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18 let b:undo_ftplugin = "setl com< cms< fo<"
19cba3b0df5f Runtime: add new sed ftplugin (#12843)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19
19cba3b0df5f Runtime: add new sed ftplugin (#12843)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
19cba3b0df5f Runtime: add new sed ftplugin (#12843)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
21 let b:browsefilter = "sed Script Files (*.sed)\t*.sed\n" ..
19cba3b0df5f Runtime: add new sed ftplugin (#12843)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
22 \ "All Files (*.*)\t*.*\n"
19cba3b0df5f Runtime: add new sed ftplugin (#12843)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
23 let b:undo_ftplugin ..= " | unlet! b:browsefilter"
19cba3b0df5f Runtime: add new sed ftplugin (#12843)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
24 endif
19cba3b0df5f Runtime: add new sed ftplugin (#12843)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
25
19cba3b0df5f Runtime: add new sed ftplugin (#12843)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
26 let &cpo = s:cpo_save
19cba3b0df5f Runtime: add new sed ftplugin (#12843)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
27 unlet s:cpo_save
19cba3b0df5f Runtime: add new sed ftplugin (#12843)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
28
19cba3b0df5f Runtime: add new sed ftplugin (#12843)
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
29 " vim: nowrap sw=2 sts=2 ts=8