From 2d4a6a784818db16a6654303c9ba4891f97dd996 Mon Sep 17 00:00:00 2001 From: Victorhck Date: Sat, 10 Apr 2021 21:11:39 +0200 Subject: [PATCH 1/3] fix error in example with dictionaries in ch24 --- ch24_vimscript_basic_data_types.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch24_vimscript_basic_data_types.md b/ch24_vimscript_basic_data_types.md index 98c5418..083bd82 100644 --- a/ch24_vimscript_basic_data_types.md +++ b/ch24_vimscript_basic_data_types.md @@ -714,7 +714,7 @@ To convert a dictionary into a list of lists, use `items()`: :call map(mealPlans, 'v:key . " and milk"') :echo mealPlans -" returns {'lunch': 'lunch and milk', 'breakfast': 'breakfast and milk', 'dinner': 'dinner and milk'} +" returns {'lunch': 'pancakes and milk', 'breakfast': 'waffles and milk', 'dinner': 'donuts and milk'} ``` The `v:key` is Vim's special variable, much like `v:val`. When iterating through a dictionary, `v:key` will hold the value of the current iterated key. From 05d64fa62302eb83d0d0f02ad5f5bf7a51a514b9 Mon Sep 17 00:00:00 2001 From: Victorhck Date: Fri, 16 Apr 2021 19:54:19 +0200 Subject: [PATCH 2/3] fix really small typo ch26 --- ch26_vimscript_variables_scopes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch26_vimscript_variables_scopes.md b/ch26_vimscript_variables_scopes.md index 1b0ce24..e8ed2d1 100644 --- a/ch26_vimscript_variables_scopes.md +++ b/ch26_vimscript_variables_scopes.md @@ -127,7 +127,7 @@ echo pancake " returns "pancake" echo g:pancake -"returns "pancake" +" returns "pancake" echo waffle " returns "waffle" From 6987983ec83e5047078e92f3f3b04c4f65fd35a0 Mon Sep 17 00:00:00 2001 From: Victorhck Date: Fri, 16 Apr 2021 19:57:59 +0200 Subject: [PATCH 3/3] keep changes in ch24 --- ch24_vimscript_basic_data_types.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch24_vimscript_basic_data_types.md b/ch24_vimscript_basic_data_types.md index a00a0ab..ef09d61 100644 --- a/ch24_vimscript_basic_data_types.md +++ b/ch24_vimscript_basic_data_types.md @@ -720,7 +720,7 @@ If you have a `mealPlans` dictionary, you can map it using `v:key`. :call map(mealPlans, 'v:key . " and milk"') :echo mealPlans -" returns {'lunch': 'pancakes and milk', 'breakfast': 'waffles and milk', 'dinner': 'donuts and milk'} +" returns {'lunch': 'lunch and milk', 'breakfast': 'breakfast and milk', 'dinner': 'dinner and milk'} ``` Similarly, you can map it using `v:val`: