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

Updated vim plugins

This commit is contained in:
amix
2015-02-24 10:45:22 +00:00
parent 8fa0bd4574
commit d195ccb777
104 changed files with 1743 additions and 1464 deletions

View File

@ -205,7 +205,6 @@ to maintain snippets for a language, please get in touch.
Notes: People are interested in snippets - and their interest may wane again.
This list is kept up-to-date on a best effort basis.
* Clojure - [lpil](https://github.com/lpil)
* Elixir - [iurifq](https://github.com/iurifq)
* Falcon - [steveno](https://github.com/steveno)
* HTML Django - [honza](http://github.com/honza)
@ -214,7 +213,6 @@ This list is kept up-to-date on a best effort basis.
* PHP - [chrisyue](http://github.com/chrisyue)
* Python - [honza](http://github.com/honza)
* Ruby - [taq](http://github.com/taq)
* Rust - [lpil](https://github.com/lpil)
* Scala - [gorodinskiy](https://github.com/gorodinskiy)
License

View File

@ -1,168 +0,0 @@
priority -50
snippet do
do
${1}
end
endsnippet
snippet if "if .. do .. end"
if ${1:condition} do
${2:expression}
end
endsnippet
snippet if "if .. do: .."
if ${1:condition}, do: ${2:expression}
endsnippet
snippet ife "if .. do .. else .. end"
if ${1:condition} do
${2:expression}
else
${3:expression}
end
endsnippet
snippet ife "if .. do: .. else:"
if ${1:condition}, do: ${2}, else: ${3}
endsnippet
snippet unless "unless .. do .. end"
unless ${1} do
${2}
end
endsnippet
snippet unless "unless .. do: .."
unless ${1:condition}, do: ${2}
endsnippet
snippet unlesse "unless .. do .. else .. end"
unless ${1:condition} do
${2}
else
${3}
end
endsnippet
snippet unlesse "unless .. do: .. else:"
unless ${1:condition}, do: ${2}, else: ${3}
endsnippet
snippet cond
"cond do"
${1} ->
${2}
end
endsnippet
snippet case
case ${1} do
${2} ->
${3}
end
endsnippet
snippet def
def ${1:name} do
${2}
end
endsnippet
snippet defin "def function(n), do: n"
def ${1:name}, do: ${2}
endsnippet
snippet defg
def ${1:name} when ${2:guard-condition} do
${3}
end
endsnippet
snippet defim
defimpl ${1:protocol_name}, for: ${2:data_type} do
${3}
end
endsnippet
snippet defma
defmacro ${1:name} do
${2}
end
endsnippet
snippet defmo
defmodule ${1:module_name} do
${2}
end
endsnippet
snippet defp
defp ${1:name} do
${2}
end
endsnippet
snippet defpr
defprotocol ${1:name}, [${2:function}]
endsnippet
snippet defr
defrecord ${1:record_name}, ${2:fields}
endsnippet
snippet doc
@doc """
${1}
"""
endsnippet
snippet fn
fn(${1:args}) -> ${2} end
endsnippet
snippet fun
function do
${1}
end
endsnippet
snippet mdoc
@moduledoc """
${1}
"""
endsnippet
snippet rec
receive do
${1} ->
${2}
end
endsnippet
snippet req
require ${1:module_name}
endsnippet
snippet imp
import ${1:module_name}
endsnippet
snippet ali "alias old-module to shorthand"
alias ${1:module_name}
endsnippet
snippet test
test "${1:test_name}" do
${2}
end
endsnippet
snippet try "try .. rescue .. end"
try do
${1}
rescue
${2} -> ${3}
end
endsnippet

View File

@ -111,7 +111,6 @@ public function get${1/\w+\s*/\u$0/}()
{
return $this->$1;$3
}
$0
endsnippet
snippet setter "PHP Class Setter" b
@ -266,7 +265,7 @@ namespace ${1:`!p
abspath = os.path.abspath(path)
m = re.search(r'[A-Z].+(?=/)', abspath)
if m:
snip.rv = m.group().replace('/', '\\')
snip.rv = m.group().replace('/', '\\')
`};
endsnippet
@ -277,7 +276,7 @@ namespace ${1:`!p
abspath = os.path.abspath(path)
m = re.search(r'[A-Z].+(?=/)', abspath)
if m:
snip.rv = m.group().replace('/', '\\')
snip.rv = m.group().replace('/', '\\')
`};
/**
@ -287,7 +286,6 @@ if m:
class $1
{
}
$0
endsnippet
snippet interface "Interface declaration template" b
@ -297,7 +295,7 @@ namespace ${1:`!p
abspath = os.path.abspath(path)
m = re.search(r'[A-Z].+(?=/)', abspath)
if m:
snip.rv = m.group().replace('/', '\\')
snip.rv = m.group().replace('/', '\\')
`};
/**
@ -306,7 +304,7 @@ if m:
*/
interface $1
{
public function ${3:someFunction}();$4
public function ${3:someFunction}();$4
}
endsnippet

View File

@ -6,7 +6,7 @@ snippet if if .. do .. end
if ${1} do
${0}
end
snippet if if .. do: ..
snippet if: if .. do: ..
if ${1:condition}, do: ${0}
snippet ife if .. do .. else .. end
if ${1:condition} do
@ -14,13 +14,13 @@ snippet ife if .. do .. else .. end
else
${0}
end
snippet ife if .. do: .. else:
snippet ife: if .. do: .. else:
if ${1:condition}, do: ${2}, else: ${0}
snippet unless unless .. do .. end
unless ${1} do
${0}
end
snippet unless unless .. do: ..
snippet unless: unless .. do: ..
unless ${1:condition}, do: ${0}
snippet unlesse unless .. do .. else .. end
unless ${1:condition} do
@ -28,7 +28,7 @@ snippet unlesse unless .. do .. else .. end
else
${0}
end
snippet unlesse unless .. do: .. else:
snippet unlesse: unless .. do: .. else:
unless ${1:condition}, do: ${2}, else: ${0}
snippet cond
cond do
@ -46,6 +46,13 @@ snippet def
def ${1:name} do
${0}
end
snippet defd
@doc """
${1:doc string}
"""
def ${2:name} do
${0}
end
snippet defim
defimpl ${1:protocol_name}, for: ${2:data_type} do
${0}
@ -71,7 +78,7 @@ snippet doc
${0}
"""
snippet fn
fn(${1:args}) -> ${0} end
fn ${1:args} -> ${0} end
snippet fun
function do
${0}
@ -95,9 +102,16 @@ snippet test
test "${1:test_name}" do
${0}
end
snippet testa
test "${1:test_name}", %{${2:arg: arg}} do
${0}
end
snippet try try .. rescue .. end
try do
${1}
rescue
${2} -> ${0}
end
snippet pry
require IEx; IEx.pry
$0

View File

@ -112,8 +112,8 @@ snippet fori
# Object Method
snippet :f
${1:method_name}: function (${2:attribute}) {
${0}
}${3:,}
${3}
},
# hasOwnProperty
snippet has
hasOwnProperty(${0})