annotate runtime/ftplugin/dosbatch.vim @ 34550:4d8d41b7a8eb v9.1.0176

patch 9.1.0176: Cursor column wrong with 'virtualedit' and conceal Commit: https://github.com/vim/vim/commit/253ff4dece4e6cc4a9ff3ed935bc78f832b6fb7c Author: zeertzjq <zeertzjq@outlook.com> Date: Wed Mar 13 20:38:26 2024 +0100 patch 9.1.0176: Cursor column wrong with 'virtualedit' and conceal Problem: Cursor column wrong with 'virtualedit' and conceal. Solution: Correct cursor column at end of line if never reached. (zeertzjq) closes: #14190 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Wed, 13 Mar 2024 20:45:02 +0100
parents 8ae680be2a51
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim filetype plugin file
32004
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 20317
diff changeset
2 " Language: MS-DOS/Windows .bat files
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 20317
diff changeset
3 " Maintainer: Mike Williams <mrmrdubya@gmail.com>
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 20317
diff changeset
4 " Last Change: 12th February 2023
34134
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 32004
diff changeset
5 " 2024 Jan 14 by Vim Project (browsefilter)
32004
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 20317
diff changeset
6 "
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 20317
diff changeset
7 " Options Flags:
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 20317
diff changeset
8 " dosbatch_colons_comment - any value to treat :: as comment line
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " Only do this when not done yet for this buffer
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 if exists("b:did_ftplugin")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 " Don't load another plugin for this buffer
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 let b:did_ftplugin = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
3513
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3493
diff changeset
18 let s:cpo_save = &cpo
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3493
diff changeset
19 set cpo&vim
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3493
diff changeset
20
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 " BAT comment formatting
32004
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 20317
diff changeset
22 setlocal comments=b:rem,b:@rem,b:REM,b:@REM
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 20317
diff changeset
23 if exists("dosbatch_colons_comment")
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 20317
diff changeset
24 setlocal comments+=:::
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 20317
diff changeset
25 setlocal commentstring=::\ %s
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 20317
diff changeset
26 else
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 20317
diff changeset
27 setlocal commentstring=REM\ %s
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 20317
diff changeset
28 endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 setlocal formatoptions-=t formatoptions+=rol
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30
20317
2334bf788e8a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 16380
diff changeset
31 " Lookup DOS keywords using Windows command help.
2334bf788e8a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 16380
diff changeset
32 if executable('help.exe')
2334bf788e8a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 16380
diff changeset
33 if has('terminal')
2334bf788e8a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 16380
diff changeset
34 setlocal keywordprg=:term\ help.exe
2334bf788e8a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 16380
diff changeset
35 else
2334bf788e8a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 16380
diff changeset
36 setlocal keywordprg=help.exe
2334bf788e8a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 16380
diff changeset
37 endif
2334bf788e8a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 16380
diff changeset
38 endif
2334bf788e8a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 16380
diff changeset
39
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 " Define patterns for the browse file filter
34134
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 32004
diff changeset
41 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: 32004
diff changeset
42 let b:browsefilter = "DOS Batch Files (*.bat, *.cmd)\t*.bat;*.cmd\n"
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 32004
diff changeset
43 if has("win32")
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 32004
diff changeset
44 let b:browsefilter ..= "All Files (*.*)\t*\n"
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 32004
diff changeset
45 else
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 32004
diff changeset
46 let b:browsefilter ..= "All Files (*)\t*\n"
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 32004
diff changeset
47 endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 endif
3492
3482d151136b Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
49
20317
2334bf788e8a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 16380
diff changeset
50 let b:undo_ftplugin = "setlocal comments< formatoptions< keywordprg<"
34134
8ae680be2a51 runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Christian Brabandt <cb@256bit.org>
parents: 32004
diff changeset
51 \ . "| unlet! b:browsefilter"
3513
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3493
diff changeset
52
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3493
diff changeset
53 let &cpo = s:cpo_save
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3493
diff changeset
54 unlet s:cpo_save