]> ruderich.org/simon Gitweb - config/dotfiles.git/blob - vim/vim/ftplugin/go/go.xpt.vim
vim: xptemplate: remove unnecessary license text from templates
[config/dotfiles.git] / vim / vim / ftplugin / go / go.xpt.vim
1 " vim: ft=xpt
2
3 " XPTemplate template file.
4 "
5 " Language:     Go
6 " Maintainer:   Simon Ruderich <simon@ruderich.org>
7 " License:      GPL v3+
8
9
10 " Prevent errors if XPTemplate is not installed.
11 if !exists('g:XPT#ver')
12     finish
13 endif
14
15 XPTemplate priority=personal
16
17
18 XPT f
19 XSET description|post=S(V(), '^description$', 'XXX')
20 // `description^
21
22 // Copyright (C) `strftime("%Y")^  Simon Ruderich
23 //
24 // This program is free software: you can redistribute it and/or modify
25 // it under the terms of the GNU General Public License as published by
26 // the Free Software Foundation, either version 3 of the License, or
27 // (at your option) any later version.
28 //
29 // This program is distributed in the hope that it will be useful,
30 // but WITHOUT ANY WARRANTY; without even the implied warranty of
31 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
32 // GNU General Public License for more details.
33 //
34 // You should have received a copy of the GNU General Public License
35 // along with this program.  If not, see <http://www.gnu.org/licenses/>.
36
37 package main
38
39 import (
40     `imports^
41 )
42
43 func main() {
44     `cursor^
45 }
46
47 XPT ie "if err != nil { ... }
48 if err != nil {
49     `cursor^
50 }
51 XPT ier " if err != nil { return err }
52 if err != nil {
53     return ``ret?`, ^err
54 }
55 `cursor^
56 XPT iel " if err != nil { log.Fatal\(err) }
57 if err != nil {
58     log.Fatal(err)
59 }
60 `cursor^
61
62
63 XPT p
64 fmt.Println(`cursor^)
65 XPT pf
66 fmt.Printf(`cursor^)
67
68 XPT l
69 log.Print(`cursor^)
70 XPT lf
71 log.Printf(`cursor^)