mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated plugins
This commit is contained in:
@ -89,6 +89,11 @@ snippet doc
|
||||
snippet fn
|
||||
fn(${1:args}) -> ${2} end
|
||||
|
||||
snippet fun
|
||||
function do
|
||||
${1}
|
||||
end
|
||||
|
||||
snippet mdoc
|
||||
@moduledoc """
|
||||
${1}
|
||||
|
@ -103,6 +103,8 @@ snippet lipp
|
||||
<%= link_to "${1:Link text...}", ${2:model}s_path %>
|
||||
snippet lt
|
||||
<%= link_to "${1:name}", ${2:dest} %>
|
||||
snippet ntc
|
||||
<%= number_to_currency(${1}) %>
|
||||
snippet ofcfs
|
||||
<%= options_from_collection_for_select ${1:collection}, ${2:value_method}, ${3:text_method}, ${4:selected_value} %>
|
||||
snippet rf
|
||||
|
@ -211,3 +211,11 @@ snippet t
|
||||
# variable declaration
|
||||
snippet v
|
||||
var ${1:t} ${2:string}
|
||||
# goroutine named function
|
||||
snippet g
|
||||
go ${1:funcName}(${2})
|
||||
# goroutine anonymous function
|
||||
snippet ga
|
||||
go func(${1} ${2:type}) {
|
||||
${3:/* code */}
|
||||
}(${4})
|
||||
|
@ -27,4 +27,5 @@ snippet ife
|
||||
snippet ifp
|
||||
- if ${1:condition}.presence?
|
||||
${2}
|
||||
|
||||
snippet ntc
|
||||
= number_to_currency(${1})
|
||||
|
@ -6,8 +6,8 @@ snippet html5
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>$2</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
$3
|
||||
</head>
|
||||
<body>
|
||||
@ -34,15 +34,15 @@ snippet idn
|
||||
|
||||
snippet label_and_input
|
||||
<label for="${2:$1}">${1}</label>
|
||||
<input type="${3:text}" name="${4:$2}" id="${5:$2}" value="${6}" />${7}
|
||||
<input type="${3:text}" name="${4:$2}" id="${5:$2}" value="${6}">${7}
|
||||
|
||||
|
||||
# FORMS
|
||||
# use idn . or n to add id
|
||||
snippet input
|
||||
<input type="${1:text}" value="${2}" ${3}/>${7}
|
||||
<input type="${1:text}" value="${2}" ${3}>${7}
|
||||
snippet submit
|
||||
<input type="submit" value="${2}" ${3}/>${7}
|
||||
<input type="submit" value="${2}" ${3}>${7}
|
||||
snippet textarea
|
||||
<textarea $1>$2</textarea>
|
||||
|
||||
@ -61,7 +61,7 @@ snippet img
|
||||
<img src="$1" alt="$2"/>
|
||||
# JS/CSS
|
||||
snippet css_file
|
||||
<link rel="stylesheet" href="${1:style.css}" type="text/css" media="${2:all}" />${3}
|
||||
<link rel="stylesheet" href="${1:style.css}" type="text/css" media="${2:all}">${3}
|
||||
snippet css_block
|
||||
<link rel="stylesheet" href="${1:style.css}" type="text/css" media="${2:all}">
|
||||
</link>
|
||||
|
@ -0,0 +1,30 @@
|
||||
snippet .attr
|
||||
.attr("${1}", ${2})
|
||||
snippet .style
|
||||
.style("${1}", ${2})
|
||||
snippet axis
|
||||
d3.svg.axis()
|
||||
.orient(${1})
|
||||
.scale(${2})
|
||||
snippet fd
|
||||
function(d) { ${1} }
|
||||
snippet fdi
|
||||
function(d, i) { ${1} }
|
||||
snippet marginconvention
|
||||
var ${1:margin} = { top: ${2:10}, right: ${3:10}, bottom: ${4:10}, left: ${5:10} };
|
||||
var ${6:width} = ${7:970} - $1.left - $1.right;
|
||||
var ${8:height} = ${9:500} - $1.top - $1.bottom;
|
||||
|
||||
var ${10:svg} = d3.select("${11}").append("svg")
|
||||
.attr("width", $6)
|
||||
.attr("height", $8)
|
||||
.append("g")
|
||||
.attr("transform", "translate(" + $1.left + "," + $1.top + ")")
|
||||
snippet nest
|
||||
d3.nest()
|
||||
.key(${1})
|
||||
.entries(${2})
|
||||
snippet scale
|
||||
d3.scale.linear()
|
||||
.domain(${1})
|
||||
.range(${2})
|
@ -185,3 +185,15 @@ snippet lc
|
||||
logger.critical(${1:msg})
|
||||
snippet li
|
||||
logger.info(${1:msg})
|
||||
snippet epydoc
|
||||
"""
|
||||
${1:Description}
|
||||
|
||||
@param ${2:param}: ${3: Description}
|
||||
@type $2: ${4: Type}
|
||||
|
||||
@return: ${5: Description}
|
||||
@rtype : ${6: Type}
|
||||
|
||||
@raise e: ${7: Description}
|
||||
"""
|
||||
|
Reference in New Issue
Block a user