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 | |
| 34 | " :Foo |
| 35 | \ arg1 |
| 36 | "\ comment |
| 37 | \ arg2 |
| 38 | |
| 39 | echo "TOP" |
| 40 | |
| 41 | |
| 42 | " Line-continuation comments |
| 43 | |
| 44 | :Foo |
| 45 | "\ line continuation comment |
| 46 | \ arg1 |
| 47 | "\ line continuation comment |
| 48 | \ arg2 |
| 49 | |
| 50 | |
dkearns | 04e5363 | 2024-04-11 06:18:37 +1000 | [diff] [blame] | 51 | " Issue: #13047 |
| 52 | |
| 53 | if !exists(":DiffOrig") |
| 54 | command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis |
| 55 | \ | wincmd p | diffthis |
| 56 | endif |
| 57 | |
| 58 | |
| 59 | " Issue: #11307 and #11560 |
| 60 | |
| 61 | " This is what we call " blah |
| 62 | |
| 63 | |
| 64 | " Issue # #9587 |
| 65 | |
| 66 | def CommentTitle() |
| 67 | # Title: ... |
| 68 | enddef |