From be0922c2ab66c6ba95d819d51fe8a5c203da2ff3 Mon Sep 17 00:00:00 2001 From: skywind3000 Date: Mon, 11 Jun 2018 14:54:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- languages/vimscript.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 ...