Sean wrote:
> let readonly_list = ['0000 AAAA', '0010 BBBB']
> let readonly_pat = "^" . 0010

But the 0010 is parsed as a NUMBER and the result is appended to "^".

In Vim, the following will display 8:
  :echo 010

because (according to the infallible law of the C language), a number
beginning with a zero digit is octal.

Where did the 0010 come from? Is it in a variable (with value decimal
10)? Any you want it put into a four-digit string with leading zeroes?
If so, try (untested):

  let readonly_pat = '^' . printf('%04d', myvariable)

John


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to