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?

-tim



--
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

Reply via email to