From 699ce8a5aa5d3218657124c957dd3b6e382817ad Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Sun, 21 Jan 2024 22:41:16 -0500 Subject: [PATCH] Add skeleton.php --- fake_home/.vim/templates/skeleton.php | 60 +++++++++++++++++++++++++++ fake_home/.vimrc | 1 + 2 files changed, 61 insertions(+) create mode 100644 fake_home/.vim/templates/skeleton.php diff --git a/fake_home/.vim/templates/skeleton.php b/fake_home/.vim/templates/skeleton.php new file mode 100644 index 0000000..e02f49f --- /dev/null +++ b/fake_home/.vim/templates/skeleton.php @@ -0,0 +1,60 @@ +'; + echo ''; + echo ''; + // This section could also use + + + + + <?= ucfirst(basename(__FILE__, '.php')) ?> + + + + + + + + + + + + + + + + + +

Hello world!

+ +

+ +
 "world!",
+        "how are" => "you?",
+        "i like the number"  => 3
+    ];
+
+    // Iterate over key-value pairs
+    foreach ($pairs as $k => $v) {
+      echo "($k, $v) ";
+    }
+    echo "\n\n";
+
+    // Iterate over keys
+    foreach (array_keys($pairs) as $key) {
+      echo "$key: $pairs[$key]\n";
+    }
+    echo "\n";
+
+    // Iterate over values
+    foreach ($pairs as $value) {
+      echo "values = $value\n";
+    }
+    ?>
+  
+ + + diff --git a/fake_home/.vimrc b/fake_home/.vimrc index 129dca4..8c98139 100644 --- a/fake_home/.vimrc +++ b/fake_home/.vimrc @@ -165,6 +165,7 @@ if has ("autocmd") autocmd BufNewFile *.py 0r ~/.vim/templates/skeleton.py autocmd BufNewFile *.rb 0r ~/.vim/templates/skeleton.rb autocmd BufNewFile *.lua 0r ~/.vim/templates/skeleton.lua + autocmd BufNewFile *.php 0r ~/.vim/templates/skeleton.php autocmd BufNewFile *.md 0r ~/.vim/templates/skeleton.md autocmd BufNewFile *.html 0r ~/.vim/templates/skeleton.html autocmd BufNewFile *.java 0r ~/.vim/templates/skeleton.java