Thursday, December 3, 2020

Re: Vim9 dict key notation old fashion depreciated

It's okay with this new notation and thank you for less chars as backslash.

Do profiler show performance gain for vimscript migrated in vim9 ?

g:fzf_colors = { fg: ['fg', 'Normal'],
bg: ["bg", "Normal"],
hl: ["fg", "IncSearch"],
info: ["fg", "IncSearch"],
border: ["fg", "Ignore"],
prompt: ["fg", "Comment"],
pointer: ["fg", "IncSearch"],
marker: ["fg", "IncSearch"],
spinner: ["fg", "IncSearch"],
header: ["fg", "WildMenu"],
['fg+']: ["fg", "CursorLine", "CursorColumn", "Normal"],
['bg+']: ["bg", "CursorLine", "CursorColumn"],
['hl+']: ["fg", "IncSearch"],
}


Le jeudi 3 décembre 2020 à 12:46:17 UTC+1, felipe.c...@gmail.com a écrit :
On Thursday, December 3, 2020 at 5:34:04 AM UTC-6 Bram Moolenaar wrote:
Looks like your problem is with the "fg+" key, the plus character is not
allowed in a literal key. You can use the Javascript notation, using
square brackets:

... 

['fg+']: ["fg", "CursorLine", "CursorColumn", "Normal"],

What's wrong with 'fg+'? In JavaScript there's no need for brackets. It's there for want to you use a variable.

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/b07afb38-c5d7-40d5-b8a1-2696dd576375n%40googlegroups.com.

No comments:

Post a Comment