mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated plugins
This commit is contained in:
@ -106,6 +106,19 @@ snippet cout
|
||||
snippet cin
|
||||
std::cin >> ${1};
|
||||
##
|
||||
## Casts
|
||||
# static
|
||||
snippet sca
|
||||
static_cast<${1:unsigned}>(${2:expr})${3}
|
||||
# dynamic
|
||||
snippet dca
|
||||
dynamic_cast<${1:unsigned}>(${2:expr})${3}
|
||||
# reinterpret
|
||||
snippet rca
|
||||
reinterpret_cast<${1:unsigned}>(${2:expr})${3}
|
||||
# const
|
||||
snippet cca
|
||||
const_cast<${1:unsigned}>(${2:expr})${3}
|
||||
## Iteration
|
||||
# for i
|
||||
snippet fori
|
||||
|
@ -24,6 +24,10 @@ snippet incl
|
||||
# behavior directive
|
||||
snippet beh
|
||||
-behaviour(${1:behaviour}).
|
||||
snippet ifd
|
||||
-ifdef(${1:TEST}).
|
||||
${0}
|
||||
-endif.
|
||||
# if expression
|
||||
snippet if
|
||||
if
|
||||
@ -483,21 +487,21 @@ snippet testsuite
|
||||
-module(${0:`vim_snippets#Filename('', 'my')`}).
|
||||
|
||||
-include_lib("common_test/include/ct.hrl").
|
||||
|
||||
|
||||
%% Test server callbacks
|
||||
-export([suite/0, all/0, groups/0,
|
||||
init_per_suite/1, end_per_suite/1,
|
||||
init_per_group/2, end_per_group/2,
|
||||
init_per_testcase/2, end_per_testcase/2]).
|
||||
|
||||
|
||||
%% Test cases
|
||||
-export([
|
||||
]).
|
||||
|
||||
|
||||
%%--------------------------------------------------------------------
|
||||
%% COMMON TEST CALLBACK FUNCTIONS
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
|
||||
%%--------------------------------------------------------------------
|
||||
%% Function: suite() -> Info
|
||||
%%
|
||||
@ -512,7 +516,7 @@ snippet testsuite
|
||||
%%--------------------------------------------------------------------
|
||||
suite() ->
|
||||
[{timetrap,{minutes,10}}].
|
||||
|
||||
|
||||
%%--------------------------------------------------------------------
|
||||
%% Function: init_per_suite(Config0) ->
|
||||
%% Config1 | {skip,Reason} | {skip_and_save,Reason,Config1}
|
||||
@ -529,7 +533,7 @@ snippet testsuite
|
||||
%%--------------------------------------------------------------------
|
||||
init_per_suite(Config) ->
|
||||
Config.
|
||||
|
||||
|
||||
%%--------------------------------------------------------------------
|
||||
%% Function: end_per_suite(Config0) -> void() | {save_config,Config1}
|
||||
%%
|
||||
@ -540,7 +544,7 @@ snippet testsuite
|
||||
%%--------------------------------------------------------------------
|
||||
end_per_suite(_Config) ->
|
||||
ok.
|
||||
|
||||
|
||||
%%--------------------------------------------------------------------
|
||||
%% Function: init_per_group(GroupName, Config0) ->
|
||||
%% Config1 | {skip,Reason} | {skip_and_save,Reason,Config1}
|
||||
@ -556,7 +560,7 @@ snippet testsuite
|
||||
%%--------------------------------------------------------------------
|
||||
init_per_group(_GroupName, Config) ->
|
||||
Config.
|
||||
|
||||
|
||||
%%--------------------------------------------------------------------
|
||||
%% Function: end_per_group(GroupName, Config0) ->
|
||||
%% void() | {save_config,Config1}
|
||||
@ -570,7 +574,7 @@ snippet testsuite
|
||||
%%--------------------------------------------------------------------
|
||||
end_per_group(_GroupName, _Config) ->
|
||||
ok.
|
||||
|
||||
|
||||
%%--------------------------------------------------------------------
|
||||
%% Function: init_per_testcase(TestCase, Config0) ->
|
||||
%% Config1 | {skip,Reason} | {skip_and_save,Reason,Config1}
|
||||
@ -589,7 +593,7 @@ snippet testsuite
|
||||
%%--------------------------------------------------------------------
|
||||
init_per_testcase(_TestCase, Config) ->
|
||||
Config.
|
||||
|
||||
|
||||
%%--------------------------------------------------------------------
|
||||
%% Function: end_per_testcase(TestCase, Config0) ->
|
||||
%% void() | {save_config,Config1} | {fail,Reason}
|
||||
@ -605,7 +609,7 @@ snippet testsuite
|
||||
%%--------------------------------------------------------------------
|
||||
end_per_testcase(_TestCase, _Config) ->
|
||||
ok.
|
||||
|
||||
|
||||
%%--------------------------------------------------------------------
|
||||
%% Function: groups() -> [Group]
|
||||
%%
|
||||
@ -629,7 +633,7 @@ snippet testsuite
|
||||
%%--------------------------------------------------------------------
|
||||
groups() ->
|
||||
[].
|
||||
|
||||
|
||||
%%--------------------------------------------------------------------
|
||||
%% Function: all() -> GroupsAndTestCases | {skip,Reason}
|
||||
%%
|
||||
@ -644,14 +648,14 @@ snippet testsuite
|
||||
%% Description: Returns the list of groups and test cases that
|
||||
%% are to be executed.
|
||||
%%--------------------------------------------------------------------
|
||||
all() ->
|
||||
all() ->
|
||||
[].
|
||||
|
||||
|
||||
|
||||
|
||||
%%--------------------------------------------------------------------
|
||||
%% TEST CASES
|
||||
%%--------------------------------------------------------------------
|
||||
|
||||
|
||||
%%--------------------------------------------------------------------
|
||||
%% Function: TestCase(Config0) ->
|
||||
%% ok | exit() | {skip,Reason} | {comment,Comment} |
|
||||
|
@ -25,7 +25,21 @@ snippet add
|
||||
snippet print
|
||||
print-%: ; @echo $*=$($*)
|
||||
# ifeq
|
||||
snippet ifeq
|
||||
snippet if
|
||||
ifeq (${1:cond0}, ${2:cond1})
|
||||
${0}
|
||||
endif
|
||||
# ifeq ... else ... endif
|
||||
snippet ife
|
||||
ifeq (${1:cond0}, ${2:cond1})
|
||||
${3}
|
||||
else
|
||||
${0}
|
||||
endif
|
||||
# else ...
|
||||
snippet el
|
||||
else
|
||||
${0}
|
||||
# .DEFAULT_GOAL := target
|
||||
snippet default
|
||||
.DEFAULT_GOAL := ${1}
|
||||
|
@ -218,6 +218,18 @@ snippet interface
|
||||
{
|
||||
${0}
|
||||
}
|
||||
# Trait
|
||||
snippet trait
|
||||
/**
|
||||
* ${2:undocumented class}
|
||||
*
|
||||
* @package ${3:default}
|
||||
* @author ${4:`g:snips_author`}
|
||||
*/
|
||||
trait ${1:`vim_snippets#Filename()`}
|
||||
{
|
||||
${0}
|
||||
}
|
||||
# class ...
|
||||
snippet class
|
||||
/**
|
||||
@ -287,7 +299,7 @@ snippet el
|
||||
${0}
|
||||
}
|
||||
snippet eif
|
||||
elseif (${1:/* condition */}) {
|
||||
elseif (${1}) {
|
||||
${0}
|
||||
}
|
||||
snippet switch
|
||||
|
43
sources_non_forked/vim-snippets/snippets/twig.snippets
Normal file
43
sources_non_forked/vim-snippets/snippets/twig.snippets
Normal file
@ -0,0 +1,43 @@
|
||||
# twig block
|
||||
snippet bl
|
||||
{% block ${1} %}
|
||||
${2}
|
||||
{% endblock $1 %}
|
||||
# twig javascripts
|
||||
snippet js
|
||||
{% javascripts '${1}' %}
|
||||
<script src="{{ asset_url }}"></script>
|
||||
{% endjavascripts %}
|
||||
# twig stylesheets
|
||||
snippet css
|
||||
{% stylesheets '${1}' %}
|
||||
<link rel="stylesheet" href="{{ asset_url }}">
|
||||
{% endstylesheets %}
|
||||
# twig if
|
||||
snippet if
|
||||
{% if ${1} %}
|
||||
${2}
|
||||
{% endif %}
|
||||
# twig if ... else
|
||||
snippet ife
|
||||
{% if ${1} %}
|
||||
${2}
|
||||
{% else %}
|
||||
${0}
|
||||
{% endif %}
|
||||
# twig else
|
||||
snippet el
|
||||
{% else %}
|
||||
${0}
|
||||
# twig elseif
|
||||
snippet eif
|
||||
{% elseif ${1} %}
|
||||
${0}
|
||||
# twig for
|
||||
snippet for
|
||||
{% for ${1} in ${2} %}
|
||||
${3}
|
||||
{% endfor %}
|
||||
# twig extends
|
||||
snippet ext
|
||||
{% extends ${1} %}
|
Reference in New Issue
Block a user