On Wed, March 7, 2012 13:03, Bram Moolenaar wrote: > > Christian Brabandt wrote: > >> On So, 04 Mär 2012, Tim Chase wrote: >> >> > On 03/04/12 00:49, Paul Isambert wrote: >> > >howard Schwartz<howard...@gmail.com> a écrit: >> > >>au BufRead * for i in range(1,9) | let @i = "" | endfor >> > > >> > >You should use ":exe[cute]": >> > > >> > > au BufRead * for i in range(1,9) | exe "let @" . i . " = ''" | >> endfor >> > >> > >> > In attempting to answer for this, I reached for >> > curly-braces-expansion but discovered it didn't work as expected: >> > >> > :let i=3 >> > :let @{i}='' >> > :echo @{i} >> > >> > returned an E18 (on the let) and an E15 (on the echo). If I issue >> > >> > :let i=3 >> > :let x{i}=42 >> > :echo x3 >> > >> > it works as expected. Reading up at >> > >> > :help curly-braces-names >> > >> > doesn't give me much insight. Any takers to tell me it's a bug or >> > point out my misunderstanding? >> >> Attached patch fixes it > > Well, it supports the curly-braces notation in a two more places. But I > prefer to not further develop curly braces. > > It works with the :execute solution, right?
Fair enough. It should be mentioned in the docs then, that curly-brace expansion does not work with registers. regards, Christian -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php