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 = syntax, but for example's sake, will not. +?> + +
+ + += "This page was rendered on " . date("Y-m-d") ?>
+ +"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