aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2021-11-07 11:32:46 +0900
committernsfisis <nsfisis@gmail.com>2021-11-07 11:32:46 +0900
commit0947ca93fd00101ad635a229431b8b2d56f45977 (patch)
tree77ca96d58b24a02cddacce7de6f7a01d7d1d9f2c
parentc65ae628279e7395cba5eff5b4b8e6d04143429a (diff)
downloaddotfiles-0947ca93fd00101ad635a229431b8b2d56f45977.tar.gz
dotfiles-0947ca93fd00101ad635a229431b8b2d56f45977.tar.zst
dotfiles-0947ca93fd00101ad635a229431b8b2d56f45977.zip
.vim: add after/ftplugin/php.vim
-rw-r--r--.vim/my/after/ftplugin/php.vim30
1 files changed, 30 insertions, 0 deletions
diff --git a/.vim/my/after/ftplugin/php.vim b/.vim/my/after/ftplugin/php.vim
new file mode 100644
index 0000000..ec7fd3e
--- /dev/null
+++ b/.vim/my/after/ftplugin/php.vim
@@ -0,0 +1,30 @@
+scriptencoding utf-8
+
+
+if exists('b:did_ftplugin_php_after')
+ finish
+endif
+
+
+
+FtpluginSetLocal expandtab
+FtpluginSetLocal shiftwidth=2
+FtpluginSetLocal softtabstop=2
+
+
+
+" If a buffer is empty, insert `<?php` tag and 2 blank lines, and position the
+" cursor at the end of the buffer (line 3, column 0).
+"
+" Example:
+" <?php
+"
+" [cursor]
+if line('$') ==# 1 && empty(getline(1))
+ call setline(1, ['<?php', '', ''])
+ call cursor(3, 0)
+endif
+
+
+
+let b:did_ftplugin_php_after = 1