aboutsummaryrefslogtreecommitdiffhomepage
path: root/.config/vim/my/after/ftplugin/php.vim
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2021-11-19 22:28:06 +0900
committernsfisis <nsfisis@gmail.com>2021-11-19 22:28:06 +0900
commited4b5f69144ee6f93e0c7059b3676c230cbce581 (patch)
treed5a7ff65fe56c75d6589f00cc9de49dee5d48db5 /.config/vim/my/after/ftplugin/php.vim
parent0d4a7fe77275a40996a710b673e58b4d2d78a8f4 (diff)
downloaddotfiles-ed4b5f69144ee6f93e0c7059b3676c230cbce581.tar.gz
dotfiles-ed4b5f69144ee6f93e0c7059b3676c230cbce581.tar.zst
dotfiles-ed4b5f69144ee6f93e0c7059b3676c230cbce581.zip
vim: make vim XDG-Base-Directory-aware
Diffstat (limited to '.config/vim/my/after/ftplugin/php.vim')
-rw-r--r--.config/vim/my/after/ftplugin/php.vim30
1 files changed, 30 insertions, 0 deletions
diff --git a/.config/vim/my/after/ftplugin/php.vim b/.config/vim/my/after/ftplugin/php.vim
new file mode 100644
index 0000000..ec7fd3e
--- /dev/null
+++ b/.config/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