Mercurial > vim
comparison runtime/ftplugin/vim.vim @ 23573:e2e2cc5d0856
Update runtime files.
Commit: https://github.com/vim/vim/commit/82be4849eed0b8fbee45bc8da99b685ec89af59a
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jan 11 19:40:15 2021 +0100
Update runtime files.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 11 Jan 2021 19:45:05 +0100 |
parents | 0db0640e16e0 |
children | 96206643bd9f |
comparison
equal
deleted
inserted
replaced
23572:b35e568d74e6 | 23573:e2e2cc5d0856 |
---|---|
1 " Vim filetype plugin | 1 " Vim filetype plugin |
2 " Language: Vim | 2 " Language: Vim |
3 " Maintainer: Bram Moolenaar <Bram@vim.org> | 3 " Maintainer: Bram Moolenaar <Bram@vim.org> |
4 " Last Change: 2020 Aug 14 | 4 " Last Change: 2021 Jan 05 |
5 | 5 |
6 " Only do this when not done yet for this buffer | 6 " Only do this when not done yet for this buffer |
7 if exists("b:did_ftplugin") | 7 if exists("b:did_ftplugin") |
8 finish | 8 finish |
9 endif | 9 endif |
46 setlocal isk+=# | 46 setlocal isk+=# |
47 | 47 |
48 " Use :help to lookup the keyword under the cursor with K. | 48 " Use :help to lookup the keyword under the cursor with K. |
49 setlocal keywordprg=:help | 49 setlocal keywordprg=:help |
50 | 50 |
51 " Set 'comments' to format dashed lists in comments | 51 if "\n" .. getline(1, 10)->join("\n") =~# '\n\s*vim9\%[script]\>' |
52 " Avoid that #{} starts a comment. | 52 " Set 'comments' to format dashed lists in comments |
53 setlocal com=sO:\"\ -,mO:\"\ \ ,sO:#\ -,mO:#\ \ ,eO:##,:\",b:# | 53 setlocal com=sO:#\ -,mO:#\ \ ,eO:##,:# |
54 " Comments start with a double quote in a legacy script; | |
55 " with # in a Vim9 script | |
56 setlocal commentstring=\"%s | |
57 else | |
58 setlocal com=sO:\"\ -,mO:\"\ \ ,:\" | |
59 setlocal commentstring=#%s | |
60 endif | |
61 | |
54 | 62 |
55 " Format comments to be up to 78 characters long | 63 " Format comments to be up to 78 characters long |
56 if &tw == 0 | 64 if &tw == 0 |
57 setlocal tw=78 | 65 setlocal tw=78 |
58 endif | 66 endif |
59 | |
60 " Comments start with a double quote; in Vim9 script # would also work | |
61 setlocal commentstring=\"%s | |
62 | 67 |
63 if !exists("no_plugin_maps") && !exists("no_vim_maps") | 68 if !exists("no_plugin_maps") && !exists("no_vim_maps") |
64 let b:did_add_maps = 1 | 69 let b:did_add_maps = 1 |
65 | 70 |
66 " Move around functions. | 71 " Move around functions. |