]> code.delx.au - dotfiles/commitdiff
Vim: Updates to abbrs
authorJames Bunton <jamesbunton@delx.net.au>
Tue, 1 Jul 2008 11:21:56 +0000 (21:21 +1000)
committerJames Bunton <jamesbunton@delx.net.au>
Tue, 1 Jul 2008 11:21:56 +0000 (21:21 +1000)
 * C - added extra includes by default, adjusted formatting.
 * Added C++ main() skeleton.
 * Python - made more useful by default.

.vim/abbrs/cmain.c
.vim/abbrs/cmaina.c
.vim/abbrs/cppmain.cpp [new file with mode: 0644]
.vim/abbrs/cppmaina.cpp [new file with mode: 0644]
.vim/abbrs/pycopy.py
.vim/abbrs/pymain.py

index 986f79e9cf8d3847b9582ab275a66b614ca1cc74..74627c6159834464b53f153f7dab853c320e11a9 100644 (file)
@@ -1,9 +1,14 @@
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <inttypes.h>
 #include <stdbool.h>
 
 
-int main(void) {
+int
+main(void)
+{
        ___
        return 0;
 }
index 6c83354afc8d031a1d49ef8cc35e1f2c358366cd..84668d112d970eb7af39a1cbadca4bb1a95e0bdc 100644 (file)
@@ -1,9 +1,14 @@
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <inttypes.h>
 #include <stdbool.h>
 
 
-int main(int argc, char** argv) {
+int
+main(int argc, char** argv)
+{
        ___
        return 0;
 }
diff --git a/.vim/abbrs/cppmain.cpp b/.vim/abbrs/cppmain.cpp
new file mode 100644 (file)
index 0000000..c47dfd8
--- /dev/null
@@ -0,0 +1,14 @@
+#include <iostream>
+#include <cmath>
+#include <string>
+#include <vector>
+#include <inttypes.h>
+
+
+int
+main(void)
+{
+       ___
+       return 0;
+}
+
diff --git a/.vim/abbrs/cppmaina.cpp b/.vim/abbrs/cppmaina.cpp
new file mode 100644 (file)
index 0000000..dba7dca
--- /dev/null
@@ -0,0 +1,14 @@
+#include <iostream>
+#include <cmath>
+#include <string>
+#include <vector>
+#include <inttypes.h>
+
+
+int
+main(int argc, char** argv)
+{
+       ___
+       return 0;
+}
+
index cf711611a114b7fc1f888a5c242b6d304b77da09..f13374f13dedc21de5dabf64d7b38591af839fa2 100644 (file)
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
 # Copyright YEAR EMAIL
 # Licensed for distribution under the GPL version 2, check COPYING for details
 # ___Program purpose
index 3f6cb0b0eecf4ad0136b971a4213205864310456..93a447c8fc5a44eeaa9a19970f171e6240c4ea4c 100644 (file)
@@ -1,7 +1,15 @@
-def main():
+import math, os, os.path, sys
+
+def main(___arg):
        ___ pass
 
 if __name__ == "__main__":
-       main()
+       try:
+               ___arg = sys.argv[1]
+       except:
+               print >>sys.stderr, "Usage: %s ___arg" % sys.argv[0]
+               sys.exit(1)
+
+       main(___arg)