dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 1 | " Vim comments |
| 2 | |
| 3 | " Legacy-script comment |
| 4 | |
| 5 | # 42 " comment |
| 6 | |
| 7 | function! Foo() |
| 8 | " Legacy-script comment |
| 9 | # 42 " comment |
| 10 | endfunction |
| 11 | |
| 12 | def! Bar() |
| 13 | # Vim9-script comment |
| 14 | "useless string" # comment |
| 15 | enddef |
| 16 | |
| 17 | command -nargs=1 FooCommand { |
| 18 | # Vim9-script comment |
| 19 | "useless string" # comment |
| 20 | } |
| 21 | |
| 22 | autocmd BufNewFile * { |
| 23 | # Vim9-script comment |
| 24 | "useless string" # comment |
| 25 | } |
| 26 | |
| 27 | |
dkearns | 059cbe8 | 2024-06-12 03:27:53 +1000 | [diff] [blame] | 28 | " Multiline comments |
| 29 | |
| 30 | " comment |
| 31 | \ continuing comment |
| 32 | \ continuing comment |
| 33 | |
Doug Kearns | c29b533 | 2025-04-26 20:14:15 +0200 | [diff] [blame] | 34 | let foo = 42 " commment |
| 35 | \ continuing comment |
| 36 | \ continuing comment |
| 37 | |
dkearns | 059cbe8 | 2024-06-12 03:27:53 +1000 | [diff] [blame] | 38 | " :Foo |
| 39 | \ arg1 |
| 40 | "\ comment |
| 41 | \ arg2 |
| 42 | |
| 43 | echo "TOP" |
| 44 | |
| 45 | |
| 46 | " Line-continuation comments |
| 47 | |
| 48 | :Foo |
| 49 | "\ line continuation comment |
| 50 | \ arg1 |
| 51 | "\ line continuation comment |
| 52 | \ arg2 |
| 53 | |
| 54 | |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 55 | " Issue: #13047 |
| 56 | |
| 57 | if !exists(":DiffOrig") |
| 58 | command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis |
| 59 | \ | wincmd p | diffthis |
| 60 | endif |
| 61 | |
| 62 | |
| 63 | " Issue: #11307 and #11560 |
| 64 | |
| 65 | " This is what we call " blah |
| 66 | |
| 67 | |
| 68 | " Issue # #9587 |
| 69 | |
| 70 | def CommentTitle() |
| 71 | # Title: ... |
| 72 | enddef |