1
0
mirror of https://github.com/amix/vimrc synced 2025-06-16 09:35:01 +08:00

Updated plugins

This commit is contained in:
amix
2016-08-02 14:48:32 +02:00
parent 64a81818ee
commit 61a22e9f3e
39 changed files with 1372 additions and 782 deletions

View File

@ -127,7 +127,6 @@ endsnippet
#############
snippet input "Input with Label" w
<label for="${2:${1/[[:alpha:]]+|( )/(?1:_:\L$0)/g}}">$1</label><input type="${3:text/submit/hidden/button}" name="${4:$2}" value="$5"${6: id="${7:$2}"}`!p x(snip)`>
endsnippet
snippet input "XHTML <input>" w
@ -141,9 +140,7 @@ endsnippet
snippet select "Select Box" w
<select name="${1:some_name}" id="${2:$1}"${3:${4: multiple}${5: onchange="${6:}"}${7: size="${8:1}"}}>
<option${9: value="${10:option1}"}>${11:$10}</option>
<option${12: value="${13:option2}"}>${14:$13}</option>${15:}
$0
${0:${VISUAL}}
</select>
endsnippet
@ -162,25 +159,25 @@ endsnippet
snippet body "<body>"
<body>
$0
${0:${VISUAL}}
</body>
endsnippet
snippet div "<div>" w
<div>
$0
${0:${VISUAL}}
</div>
endsnippet
snippet div. "<div> with class" w
<div`!p snip.rv=' class="' if t[1] else ""`${1:name}`!p snip.rv = '"' if t[1] else ""`>
$0
${0:${VISUAL}}
</div>
endsnippet
snippet div# "<div> with ID & class" w
<div`!p snip.rv=' id="' if t[1] else ""`${1:name}`!p snip.rv = '"' if t[1] else ""``!p snip.rv=' class="' if t[2] else ""`${2:name}`!p snip.rv = '"' if t[2] else ""`>
$0
${0:${VISUAL}}
</div>
endsnippet
@ -188,33 +185,39 @@ snippet form "XHTML <form>" w
<form action="${1:`!p
snip.rv = (snip.basename or 'unnamed') + '_submit'
`}" method="${2:get}" accept-charset="utf-8">
$0
<p><input type="submit" value="Continue →"`!p x(snip)`></p>
${0:${VISUAL}}
</form>
endsnippet
snippet h1 "XHTML <h1>" w
<h1>$0</h1>
<h1>${0:${VISUAL}}</h1>
endsnippet
snippet h2 "XHTML <h2>" w
<h2>$0</h2>
<h2>${0:${VISUAL}}</h2>
endsnippet
snippet h3 "XHTML <h3>" w
<h3>$0</h3>
<h3>${0:${VISUAL}}</h3>
endsnippet
snippet h4 "XHTML <h4>" w
<h4>$0</h4>
<h4>${0:${VISUAL}}</h4>
endsnippet
snippet h5 "XHTML <h5>" w
<h5>${0:${VISUAL}}</h5>
endsnippet
snippet h6 "XHTML <h6>" w
<h6>${0:${VISUAL}}</h6>
endsnippet
snippet head "XHTML <head>"
<head>
<meta charset="utf-8">
<title>${1:`!p snip.rv = snip.basename or "Page Title"`}</title>
$0
${0:${VISUAL}}
</head>
endsnippet
@ -232,20 +235,19 @@ endsnippet
snippet script "XHTML <script>" w
<script type="text/javascript" charset="utf-8">
$0
${0:${VISUAL}}
</script>
endsnippet
snippet style "XHTML <style>" w
<style type="text/css" media="screen">
$0
${0:${VISUAL}}
</style>
endsnippet
snippet table "XHTML <table>" w
<table border="${1:0}"${2: cellspacing="${3:5}" cellpadding="${4:5}"}>
<tr><th>${5:Header}</th></tr>
<tr><td>${0:Data}</td></tr>
${0:${VISUAL}}
</table>
endsnippet
@ -254,29 +256,29 @@ snippet a "Link" w
endsnippet
snippet p "paragraph" w
<p>$0</p>
<p>${0:${VISUAL}}</p>
endsnippet
snippet li "list item" w
<li>$0</li>
<li>${0:${VISUAL}}</li>
endsnippet
snippet ul "unordered list" w
<ul>
$0
${0:${VISUAL}}
</ul>
endsnippet
snippet td "table cell" w
<td>$0</td>
<td>${0:${VISUAL}}</td>
endsnippet
snippet th "table header" w
<th>$0</th>
<th>${0:${VISUAL}}</th>
endsnippet
snippet tr "table row" w
<tr>$0</tr>
<tr>${0:${VISUAL}}</tr>
endsnippet
snippet title "XHTML <title>" w
@ -286,7 +288,7 @@ endsnippet
snippet fieldset "Fieldset" w
<fieldset id="${1/[\w\d]+|( )/(?1:_:\L$0\E)/g}" ${2:class="${3:}"}>
<legend>$1</legend>
$0
${0:${VISUAL}}
</fieldset>
endsnippet

View File

@ -105,13 +105,17 @@ snippet imp
snippet ali
alias ${0:module_name}
snippet test
test "${1:test_name}" do
test "${1:test name}" do
${0}
end
snippet testa
test "${1:test_name}", %{${2:arg: arg}} do
${0}
end
snippet des
describe "${1:test group subject}" do
${0}
end
snippet exunit
defmodule ${1:`substitute(vim_snippets#Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} do
use ExUnit.Case, async: true

View File

@ -171,6 +171,9 @@ snippet pn
# print
snippet pr
fmt.Printf("%${1:s}\n", ${2:var})
# println
snippet pl
fmt.Println("${1:s}")
# range
snippet rn
range ${0}

View File

@ -30,6 +30,11 @@ snippet (f
(function(${1}) {
${0}
}(${2}));
# Minify safe iife
snippet ;fe
;(function(${1}) {
${0}
}(${2}))
# self-defining function
snippet sdf
var ${1:function_name} = function (${2:argument}) {

View File

@ -0,0 +1,127 @@
#
## Libraries
snippet lib
library ${1}
use ${1}.${2}
# Standard Libraries
snippet libs
library IEEE;
use IEEE.std_logic_1164.ALL;
use IEEE.numeric_std.ALL;
# Xilinx Library
snippet libx
library UNISIM;
use UNISIM.VCOMPONENTS.ALL;
## Entity Declaration
snippet ent
entity ${1:`vim_snippets#Filename()`} is
generic (
${2}
);
port (
${3}
);
end entity $1;
## Architecture
snippet arc
architecture ${1:behav} of ${2:`vim_snippets#Filename()`} is
${3}
begin
end $1;
## Declarations
# std_logic
snippet st
signal ${1} : std_logic;
# std_logic_vector
snippet sv
signal ${1} : std_logic_vector (${2} downto 0);
# std_logic in
snippet ist
${1} : in std_logic;
# std_logic_vector in
snippet isv
${1} : in std_logic_vector (${2} downto 0);
# std_logic out
snippet ost
${1} : out std_logic;
# std_logic_vector out
snippet osv
${1} : out std_logic_vector (${2} downto 0);
# unsigned
snippet un
signal ${1} : unsigned (${2} downto 0);
## Process Statements
# process
snippet pr
process (${1})
begin
${2}
end process;
# process with clock
snippet prc
process (${1:clk})
begin
if rising_edge ($1) then
${2}
end if;
end process;
# process all
snippet pra
process (${1:all})
begin
${2}
end process;
## Control Statements
# if
snippet if
if ${1} then
${2}
end if;
# if
snippet ife
if ${1} then
${2}
else
${3}
end if;
# else
snippet el
else
${1}
# if
snippet eif
elsif ${1} then
${2}
# case
snippet ca
case ${1} is
${2}
end case;
# when
snippet wh
when ${1} =>
${2}
# for
snippet for
for ${1:i} in ${2} ${3:to} ${4} loop
${5}
end loop;
# while
snippet wh
while ${1} loop
${2}
end loop;
## Misc
# others
snippet oth
(others => '${1:0}');