Re: Bug in vim script 'comments'?

2021-02-19 Fir de Conversatie Bram Moolenaar
Gary Johnson wrote: > A change was made to the 'comments' setting in ftplugin/vim.vim at > commit 7ff78465f7057a672a6de0d75d56286da253501b (between 8.2.1175 > and 8.2.1176) that introduced a change in formatting behavior that > I think is a bug. > > The setting of the 'comments' option was

Re: Bug of vim script

2019-09-15 Fir de Conversatie Tony Mechelynck
Gotcha! In a function, a:b means "the argument named b". However, c[a:b] is an error even outside a function. c[a:b] is an error because a: is a known namespace (function arguments) c[b,d] is an error because b is a known namespace (buffer variables) c[x:y] is not an error, even with no spaces.

Re: Bug of vim script

2019-09-15 Fir de Conversatie Tony Mechelynck
On Sun, Sep 15, 2019 at 8:55 AM Shidong Wang wrote: > > Hello, I am not sure if it is a bug, but it always make me confuses: > > here is a exmaple: > > func Test() > let c = 'sss' > let a = 1 > let b = 2 > echo c[a:b] > endf > > then call Test(), you will get error, Undefined variable: