]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
xptemplate: add VHDL snippets
authorSimon Ruderich <simon@ruderich.org>
Tue, 29 Apr 2014 13:53:37 +0000 (15:53 +0200)
committerSimon Ruderich <simon@ruderich.org>
Tue, 29 Apr 2014 13:53:37 +0000 (15:53 +0200)
vim/ftplugin/vhdl/vhdl.xpt.vim [new file with mode: 0644]

diff --git a/vim/ftplugin/vhdl/vhdl.xpt.vim b/vim/ftplugin/vhdl/vhdl.xpt.vim
new file mode 100644 (file)
index 0000000..adf93b2
--- /dev/null
@@ -0,0 +1,67 @@
+" vim: ft=xpt
+
+" XPTemplate template file.
+"
+" Language:     VHDL
+" Maintainer:   Simon Ruderich <simon@ruderich.org>
+" License:      GPL v3+
+
+" Copyright (C) 2014  Simon Ruderich
+"
+" This file is free software: you can redistribute it and/or modify
+" it under the terms of the GNU General Public License as published by
+" the Free Software Foundation, either version 3 of the License, or
+" (at your option) any later version.
+"
+" This file is distributed in the hope that it will be useful,
+" but WITHOUT ANY WARRANTY; without even the implied warranty of
+" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+" GNU General Public License for more details.
+"
+" You should have received a copy of the GNU General Public License
+" along with this file.  If not, see <http://www.gnu.org/licenses/>.
+
+
+XPTemplate priority=lang
+
+let s:f = g:XPTfuncs()
+
+XPTinclude
+      \ _common/common
+
+
+XPT vhdl
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+
+`cursor^
+
+
+XPT slv
+std_logic_vector(`from^ downto `to^)
+
+
+XPT entity
+entity `name^ is
+    port(
+        `cursor^
+    );
+end entity;
+
+XPT architecture
+architecture `behavioral^ of `entity^ is
+begin
+    `cursor^
+end architecture;
+
+XPT process
+process`list^
+begin
+    `cursor^
+end process;
+
+XPT if
+if `condition^ then
+    `cursor^
+end if;