]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - vim/ftplugin/perl/perl.xpt.vim
ftplugin/*/*.xpt.vim: Add p (print) and pe (print error) snippets.
[config/dotfiles.git] / vim / ftplugin / perl / perl.xpt.vim
index d2ec9fb571aeebe2681cc2765c866da594e0ccd3..5259466361366be1db081839dff4d9db5f93393a 100644 (file)
 " You should have received a copy of the GNU General Public License
 " along with this file.  If not, see <http://www.gnu.org/licenses/>.
 
+
+" Prevent errors if XPTemplate is not installed.
+if !exists('g:XPT#ver')
+    finish
+endif
+
 XPTemplate priority=personal
 
 
 XPT perl
+XSET description|post=S(V(), '^description$', 'XXX')
 #!/usr/bin/perl
 
 # `description^
 
-# Copyright (C) `year^  Simon Ruderich
+# Copyright (C) `strftime("%Y")^  Simon Ruderich
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -50,3 +57,10 @@ use warnings;
 
 
 `cursor^
+
+
+XPT p
+print `cursor^;
+
+XPT pe
+print STDERR `cursor^;