From 419af505870c71942745a1f5cd968d465f927b2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kim=20Silkeb=C3=A6kken?= Date: Wed, 30 Mar 2011 13:35:35 +0200 Subject: [PATCH] Update var initialization --- plugin/EasyMotion.vim | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/plugin/EasyMotion.vim b/plugin/EasyMotion.vim index 0500f0e..0665914 100644 --- a/plugin/EasyMotion.vim +++ b/plugin/EasyMotion.vim @@ -61,13 +61,15 @@ endif " }}} " Initialize variables {{{ - let s:index_to_key = split(g:EasyMotion_keys, '\zs') + let s:index_to_key = {} let s:key_to_index = {} - let index = 0 - for i in s:index_to_key - let s:key_to_index[i] = index - let index += 1 + let idx = 0 + for char in split(g:EasyMotion_keys, '\zs') + let s:index_to_key[idx] = char + let s:key_to_index[char] = idx + + let idx += 1 endfor let s:var_reset = {}