Mercurial > vim
comparison runtime/ftplugin/vim.vim @ 30202:fee9eccee266
Update runtime files
Commit: https://github.com/vim/vim/commit/71b6d3397649fed68ef587aa863fcbdf5fdb057a
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Sep 10 13:13:14 2022 +0100
Update runtime files
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 10 Sep 2022 14:15:06 +0200 |
parents | 2198955f9e27 |
children | 1e91e26ceebf |
comparison
equal
deleted
inserted
replaced
30201:e1ffe98c7c42 | 30202:fee9eccee266 |
---|---|
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: 2022 Aug 4 | 4 " Last Change: 2022 Sep 09 |
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 " Comments starts with # in Vim9 script. We have to guess which one to use. | |
51 if "\n" .. getline(1, 10)->join("\n") =~# '\n\s*vim9\%[script]\>' | 52 if "\n" .. getline(1, 10)->join("\n") =~# '\n\s*vim9\%[script]\>' |
52 " Set 'comments' to format dashed lists in comments | |
53 setlocal com=sO:#\ -,mO:#\ \ ,eO:##,:# | |
54 " Comments starts with # in Vim9 script | |
55 setlocal commentstring=#%s | 53 setlocal commentstring=#%s |
56 else | 54 else |
57 setlocal com=sO:\"\ -,mO:\"\ \ ,eO:\"\",:\" | |
58 " Comments starts with a double quote in legacy script | |
59 setlocal commentstring=\"%s | 55 setlocal commentstring=\"%s |
60 endif | 56 endif |
57 | |
58 " Set 'comments' to format dashed lists in comments, both in Vim9 and legacy | |
59 " script. | |
60 setlocal com=sO:#\ -,mO:#\ \ ,eO:##,:#,sO:\"\ -,mO:\"\ \ ,eO:\"\",:\" | |
61 | 61 |
62 " set 'include' to recognize import commands | 62 " set 'include' to recognize import commands |
63 setlocal include=\\v^\\s*import\\s*(autoload)? | 63 setlocal include=\\v^\\s*import\\s*(autoload)? |
64 | 64 |
65 " set 'define' to recognize export commands | 65 " set 'define' to recognize export commands |