Mercurial > vim
annotate runtime/ftplugin/tcl.vim @ 34264:cce6b834635c v9.1.0071
patch 9.1.0071: Need a diff() Vim script function
Commit: https://github.com/vim/vim/commit/fa37835b8c0ed0f83952978fca4c332335ca7c46
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Thu Feb 1 22:05:27 2024 +0100
patch 9.1.0071: Need a diff() Vim script function
Problem: Need a diff() Vim script function
Solution: Add the diff() Vim script function using the
xdiff internal diff library, add support for
"unified" and "indices" mode.
(Yegappan Lakshmanan)
fixes: #4241
closes: #12321
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 01 Feb 2024 22:30:03 +0100 |
parents | 8ae680be2a51 |
children | 7c7432a53a6c |
rev | line source |
---|---|
2034 | 1 " Vim filetype plugin file |
2 " Language: Tcl | |
3 " Maintainer: Robert L Hicks <sigzero@gmail.com> | |
4 " Latest Revision: 2009-05-01 | |
34134
8ae680be2a51
runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents:
3410
diff
changeset
|
5 " 2024 Jan 14 by Vim Project (browsefilter) |
2034 | 6 |
7 if exists("b:did_ftplugin") | |
8 finish | |
9 endif | |
10 let b:did_ftplugin = 1 | |
11 | |
12 " Make sure the continuation lines below do not cause problems in | |
13 " compatibility mode. | |
14 let s:cpo_save = &cpo | |
15 set cpo-=C | |
16 | |
17 setlocal comments=:# | |
18 setlocal commentstring=#%s | |
19 setlocal formatoptions+=croql | |
20 | |
21 " Change the browse dialog on Windows to show mainly Tcl-related files | |
34134
8ae680be2a51
runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents:
3410
diff
changeset
|
22 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") |
8ae680be2a51
runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents:
3410
diff
changeset
|
23 let b:browsefilter = "Tcl Source Files (*.tcl)\t*.tcl\n" . |
8ae680be2a51
runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents:
3410
diff
changeset
|
24 \ "Tcl Test Files (*.test)\t*.test\n" |
8ae680be2a51
runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents:
3410
diff
changeset
|
25 if has("win32") |
8ae680be2a51
runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents:
3410
diff
changeset
|
26 let b:browsefilter .= "All Files (*.*)\t*\n" |
8ae680be2a51
runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents:
3410
diff
changeset
|
27 else |
8ae680be2a51
runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents:
3410
diff
changeset
|
28 let b:browsefilter .= "All Files (*)\t*\n" |
8ae680be2a51
runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents:
3410
diff
changeset
|
29 endif |
2034 | 30 endif |
31 | |
32 "----------------------------------------------------------------------------- | |
33 | |
34 " Undo the stuff we changed. | |
35 let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isf< kp<" . | |
36 \ " | unlet! b:browsefilter" | |
37 | |
38 " Restore the saved compatibility options. | |
39 let &cpo = s:cpo_save | |
3410
94601b379f38
Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
40 unlet s:cpo_save |
2034 | 41 |
42 " vim: set et ts=4 sw=4 tw=78: |