summaryrefslogtreecommitdiff
path: root/vis/insert-mode/autoindent.keys
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-02-17 13:36:54 +0100
committerMarc André Tanner <mat@brain-dump.org>2017-02-17 13:36:54 +0100
commit930cf2ab0b872539c59e7702042692f7638d4e89 (patch)
tree1a11d5770310a3ed30874c882a09219bf929d532 /vis/insert-mode/autoindent.keys
parent1c4b748a508552358d5654412389636029257c29 (diff)
test/vis: add some more tests
Diffstat (limited to 'vis/insert-mode/autoindent.keys')
-rw-r--r--vis/insert-mode/autoindent.keys17
1 files changed, 17 insertions, 0 deletions
diff --git a/vis/insert-mode/autoindent.keys b/vis/insert-mode/autoindent.keys
new file mode 100644
index 0000000..6dda2f2
--- /dev/null
+++ b/vis/insert-mode/autoindent.keys
@@ -0,0 +1,17 @@
+:set ai<Enter>
+/for<Enter>
+o<Enter>
+<C-t>
+if (a > 0) {<Enter>
+<C-t>// positive<Enter><Enter>
+return --a;<Enter>
+<C-d>} else if (a < 0) {<Enter>
+<C-t>// negative<Enter><Enter>
+return ++a;<Enter>
+<C-d>} else {<Enter>
+<C-t>// equal<Enter><Enter>
+return a;<Enter>
+<C-d>}<Enter>
+<Escape>
+n
+O<Enter>// optimized loop