diff --git a/languages/vimscript.md b/languages/vimscript.md index 35611bd..bf8b1bb 100644 --- a/languages/vimscript.md +++ b/languages/vimscript.md @@ -149,6 +149,8 @@ false ## If, For, While, and Try/Catch +条件判断: + ```VimL if ... @@ -157,12 +159,19 @@ elseif else ... endif +``` + +循环: + +```VimL for in continue break endfor ``` +复杂循环: + ```VimL for [var1, var2] in [[1, 2], [3, 4]] " on 1st loop, var1 = 1 and var2 = 2 @@ -170,11 +179,15 @@ for [var1, var2] in [[1, 2], [3, 4]] endfor ``` +While 循环: + ```VimL while endwhile ``` +异常捕获: + ```VimL try ...