mirror of
https://github.com/amix/vimrc
synced 2025-06-29 11:04:59 +08:00
Updated plugins
This commit is contained in:
@ -245,7 +245,6 @@ This list is kept up-to-date on a best effort basis.
|
||||
* Python - [honza](http://github.com/honza)
|
||||
* Ruby - [taq](http://github.com/taq)
|
||||
* Scala - [gorodinskiy](https://github.com/gorodinskiy)
|
||||
* Supercollider - [lpil](https://github.com/lpil)
|
||||
|
||||
License
|
||||
-------
|
||||
|
@ -44,13 +44,13 @@ snippet fi "<%= Fixtures.identify(:symbol) %>"
|
||||
endsnippet
|
||||
|
||||
snippet ft "form_tag" w
|
||||
`!p textmate_var('TM_RAILS_TEMPLATE_START_RUBY_INLINE', snip)`form_tag(${1::action => '${2:update}'}${3:, ${4:${5:class} => '${6:form}'\}}}) do`!p textmate_var('TM_RAILS_TEMPLATE_END_RUBY_EXPR', snip)`
|
||||
`!p textmate_var('TM_RAILS_TEMPLATE_START_RUBY_INLINE', snip)`form_tag(${1:action: '${2:update}'}${3:, ${4:${5:class}: '${6:form}'\}}}) do`!p textmate_var('TM_RAILS_TEMPLATE_END_RUBY_EXPR', snip)`
|
||||
$0
|
||||
`!p textmate_var('TM_RAILS_TEMPLATE_END_RUBY_BLOCK', snip)`
|
||||
endsnippet
|
||||
|
||||
snippet ffs "form_for submit 2" w
|
||||
`!p textmate_var('TM_RAILS_TEMPLATE_START_RUBY_EXPR', snip)`${1:f}.submit '${2:Submit}'${3:, :disable_with => '${4:$2ing...}'}`!p textmate_var('TM_RAILS_TEMPLATE_END_RUBY_EXPR', snip)`
|
||||
`!p textmate_var('TM_RAILS_TEMPLATE_START_RUBY_EXPR', snip)`${1:f}.submit '${2:Submit}'${3:, disable_with: '${4:$2ing...}'}`!p textmate_var('TM_RAILS_TEMPLATE_END_RUBY_EXPR', snip)`
|
||||
endsnippet
|
||||
|
||||
snippet f. "f_fields_for (nff)" w
|
||||
@ -84,7 +84,7 @@ snippet f. "f.radio_button" w
|
||||
endsnippet
|
||||
|
||||
snippet f. "f.submit" w
|
||||
`!p textmate_var('TM_RAILS_TEMPLATE_START_RUBY_EXPR', snip)`f.submit "${1:Submit}"${2:, :disable_with => '${3:$1ing...}'}`!p textmate_var('TM_RAILS_TEMPLATE_END_RUBY_EXPR', snip)`
|
||||
`!p textmate_var('TM_RAILS_TEMPLATE_START_RUBY_EXPR', snip)`f.submit "${1:Submit}"${2:, disable_with: '${3:$1ing...}'}`!p textmate_var('TM_RAILS_TEMPLATE_END_RUBY_EXPR', snip)`
|
||||
endsnippet
|
||||
|
||||
snippet f. "f.text_area" w
|
||||
@ -110,19 +110,19 @@ snippet ff "form_for" w
|
||||
endsnippet
|
||||
|
||||
snippet ist "image_submit_tag" w
|
||||
`!p textmate_var('TM_RAILS_TEMPLATE_START_RUBY_EXPR', snip)`image_submit_tag("${1:agree.png}"${2:${3:, :id => "${4:${1/^(\w+)(\.\w*)?$/$1/}}"}${5:, :name => "${6:${1/^(\w+)(\.\w*)?$/$1/}}"}${7:, :class => "${8:${1/^(\w+)(\.\w*)?$/$1/}-button}"}${9:, :disabled => ${10:false}}})`!p textmate_var('TM_RAILS_TEMPLATE_END_RUBY_EXPR', snip)`
|
||||
`!p textmate_var('TM_RAILS_TEMPLATE_START_RUBY_EXPR', snip)`image_submit_tag("${1:agree.png}"${2:${3:, id: "${4:${1/^(\w+)(\.\w*)?$/$1/}}"}${5:, name: "${6:${1/^(\w+)(\.\w*)?$/$1/}}"}${7:, class: "${8:${1/^(\w+)(\.\w*)?$/$1/}-button}"}${9:, disabled: ${10:false}}})`!p textmate_var('TM_RAILS_TEMPLATE_END_RUBY_EXPR', snip)`
|
||||
endsnippet
|
||||
|
||||
snippet it "image_tag" w
|
||||
`!p textmate_var('TM_RAILS_TEMPLATE_START_RUBY_EXPR', snip)`image_tag "$1${2:.png}"${3:${4:, :title => "${5:title}"}${6:, :class => "${7:class}"}}`!p textmate_var('TM_RAILS_TEMPLATE_END_RUBY_EXPR', snip)`
|
||||
`!p textmate_var('TM_RAILS_TEMPLATE_START_RUBY_EXPR', snip)`image_tag "$1${2:.png}"${3:${4:, title: "${5:title}"}${6:, class: "${7:class}"}}`!p textmate_var('TM_RAILS_TEMPLATE_END_RUBY_EXPR', snip)`
|
||||
endsnippet
|
||||
|
||||
snippet layout "layout"
|
||||
layout "${1:template_name}"${2:${3:, :only => ${4:[:${5:action}, :${6:action}]}}${7:, :except => ${8:[:${9:action}, :${10:action}]}}}
|
||||
layout "${1:template_name}"${2:${3:, only: ${4:[:${5:action}, :${6:action}]}}${7:, except: ${8:[:${9:action}, :${10:action}]}}}
|
||||
endsnippet
|
||||
|
||||
snippet jit "javascript_include_tag" w
|
||||
`!p textmate_var('TM_RAILS_TEMPLATE_START_RUBY_EXPR', snip)`javascript_include_tag ${1::all}${2:, :cache => ${3:true}}`!p textmate_var('TM_RAILS_TEMPLATE_END_RUBY_EXPR', snip)`
|
||||
`!p textmate_var('TM_RAILS_TEMPLATE_START_RUBY_EXPR', snip)`javascript_include_tag ${1::all}${2:, cache: ${3:true}}`!p textmate_var('TM_RAILS_TEMPLATE_END_RUBY_EXPR', snip)`
|
||||
endsnippet
|
||||
|
||||
snippet lt "link_to (name, dest)" w
|
||||
@ -130,23 +130,23 @@ snippet lt "link_to (name, dest)" w
|
||||
endsnippet
|
||||
|
||||
snippet lia "link_to (action)" w
|
||||
`!p textmate_var('TM_RAILS_TEMPLATE_START_RUBY_EXPR', snip)`link_to "${1:link text...}", :action => "${2:index}"`!p textmate_var('TM_RAILS_TEMPLATE_END_RUBY_EXPR', snip)`
|
||||
`!p textmate_var('TM_RAILS_TEMPLATE_START_RUBY_EXPR', snip)`link_to "${1:link text...}", action: "${2:index}"`!p textmate_var('TM_RAILS_TEMPLATE_END_RUBY_EXPR', snip)`
|
||||
endsnippet
|
||||
|
||||
snippet liai "link_to (action, id)" w
|
||||
`!p textmate_var('TM_RAILS_TEMPLATE_START_RUBY_EXPR', snip)`link_to "${1:link text...}", :action => "${2:edit}", :id => ${3:@item}`!p textmate_var('TM_RAILS_TEMPLATE_END_RUBY_EXPR', snip)`
|
||||
`!p textmate_var('TM_RAILS_TEMPLATE_START_RUBY_EXPR', snip)`link_to "${1:link text...}", action: "${2:edit}", id: ${3:@item}`!p textmate_var('TM_RAILS_TEMPLATE_END_RUBY_EXPR', snip)`
|
||||
endsnippet
|
||||
|
||||
snippet lic "link_to (controller)" w
|
||||
`!p textmate_var('TM_RAILS_TEMPLATE_START_RUBY_EXPR', snip)`link_to "${1:link text...}", :controller => "${2:items}"`!p textmate_var('TM_RAILS_TEMPLATE_END_RUBY_EXPR', snip)`
|
||||
`!p textmate_var('TM_RAILS_TEMPLATE_START_RUBY_EXPR', snip)`link_to "${1:link text...}", controller: "${2:items}"`!p textmate_var('TM_RAILS_TEMPLATE_END_RUBY_EXPR', snip)`
|
||||
endsnippet
|
||||
|
||||
snippet lica "link_to (controller, action)" w
|
||||
`!p textmate_var('TM_RAILS_TEMPLATE_START_RUBY_EXPR', snip)`link_to "${1:link text...}", :controller => "${2:items}", :action => "${3:index}"`!p textmate_var('TM_RAILS_TEMPLATE_END_RUBY_EXPR', snip)`
|
||||
`!p textmate_var('TM_RAILS_TEMPLATE_START_RUBY_EXPR', snip)`link_to "${1:link text...}", controller: "${2:items}", action: "${3:index}"`!p textmate_var('TM_RAILS_TEMPLATE_END_RUBY_EXPR', snip)`
|
||||
endsnippet
|
||||
|
||||
snippet licai "link_to (controller, action, id)" w
|
||||
`!p textmate_var('TM_RAILS_TEMPLATE_START_RUBY_EXPR', snip)`link_to "${1:link text...}", :controller => "${2:items}", :action => "${3:edit}", :id => ${4:@item}`!p textmate_var('TM_RAILS_TEMPLATE_END_RUBY_EXPR', snip)`
|
||||
`!p textmate_var('TM_RAILS_TEMPLATE_START_RUBY_EXPR', snip)`link_to "${1:link text...}", controller: "${2:items}", action: "${3:edit}", id: ${4:@item}`!p textmate_var('TM_RAILS_TEMPLATE_END_RUBY_EXPR', snip)`
|
||||
endsnippet
|
||||
|
||||
snippet linpp "link_to (nested path plural)" w
|
||||
@ -174,15 +174,15 @@ page.hide ${1:"${2:id(s)}"}
|
||||
endsnippet
|
||||
|
||||
snippet ins "page.insert_html (position, id, partial)"
|
||||
page.insert_html :${1:top}, ${2:"${3:id}"}, :${4:partial => "${5:template}"}
|
||||
page.insert_html :${1:top}, ${2:"${3:id}"}, ${4:partial: "${5:template}"}
|
||||
endsnippet
|
||||
|
||||
snippet rep "page.replace (id, partial)"
|
||||
page.replace ${1:"${2:id}"}, :${3:partial => "${4:template}"}
|
||||
page.replace ${1:"${2:id}"}, ${3:partial: "${4:template}"}
|
||||
endsnippet
|
||||
|
||||
snippet reph "page.replace_html (id, partial)"
|
||||
page.replace_html ${1:"${2:id}"}, :${3:partial => "${4:template}"}
|
||||
page.replace_html ${1:"${2:id}"}, ${3:partial: "${4:template}"}
|
||||
endsnippet
|
||||
|
||||
snippet show "page.show (*ids)"
|
||||
@ -198,31 +198,31 @@ page.visual_effect :${1:toggle_slide}, ${2:"${3:DOM ID}"}
|
||||
endsnippet
|
||||
|
||||
snippet rp "render (partial) (rp)"
|
||||
render :partial => "${1:item}"
|
||||
render partial: "${1:item}"
|
||||
endsnippet
|
||||
|
||||
snippet rpc "render (partial,collection) (rpc)"
|
||||
render :partial => "${1:item}", :collection => ${2:@$1s}
|
||||
render partial: "${1:item}", collection: ${2:@$1s}
|
||||
endsnippet
|
||||
|
||||
snippet rpl "render (partial,locals) (rpl)"
|
||||
render :partial => "${1:item}", :locals => { :${2:$1} => ${3:@$1}$0 }
|
||||
render partial: "${1:item}", locals: { ${2:$1}: ${3:@$1}$0 }
|
||||
endsnippet
|
||||
|
||||
snippet rpo "render (partial,object) (rpo)"
|
||||
render :partial => "${1:item}", :object => ${2:@$1}
|
||||
render partial: "${1:item}", object: ${2:@$1}
|
||||
endsnippet
|
||||
|
||||
snippet rps "render (partial,status) (rps)"
|
||||
render :partial => "${1:item}", :status => ${2:500}
|
||||
render partial: "${1:item}", status: ${2:500}
|
||||
endsnippet
|
||||
|
||||
snippet slt "stylesheet_link_tag" w
|
||||
`!p textmate_var('TM_RAILS_TEMPLATE_START_RUBY_EXPR', snip)`stylesheet_link_tag ${1::all}${2:, :cache => ${3:true}}`!p textmate_var('TM_RAILS_TEMPLATE_END_RUBY_EXPR', snip)`
|
||||
`!p textmate_var('TM_RAILS_TEMPLATE_START_RUBY_EXPR', snip)`stylesheet_link_tag ${1::all}${2:, cache: ${3:true}}`!p textmate_var('TM_RAILS_TEMPLATE_END_RUBY_EXPR', snip)`
|
||||
endsnippet
|
||||
|
||||
snippet st "submit_tag" w
|
||||
`!p textmate_var('TM_RAILS_TEMPLATE_START_RUBY_EXPR', snip)`submit_tag "${1:Save changes}"${2:, :id => "${3:submit}"}${4:, :name => "${5:$3}"}${6:, :class => "${7:form_$3}"}${8:, :disabled => ${9:false}}${10:, :disable_with => "${11:Please wait...}"}`!p textmate_var('TM_RAILS_TEMPLATE_END_RUBY_EXPR', snip)`
|
||||
`!p textmate_var('TM_RAILS_TEMPLATE_START_RUBY_EXPR', snip)`submit_tag "${1:Save changes}"${2:, id: "${3:submit}"}${4:, name: "${5:$3}"}${6:, class: "${7:form_$3}"}${8:, disabled: ${9:false}}${10:, disable_with: "${11:Please wait...}"}`!p textmate_var('TM_RAILS_TEMPLATE_END_RUBY_EXPR', snip)`
|
||||
endsnippet
|
||||
|
||||
snippet else "else (ERB)"
|
||||
|
@ -127,14 +127,18 @@ def triple_quotes_handle_trailing(snip, quoting_style):
|
||||
if not snip.c:
|
||||
# Do this only once, otherwise the following error would happen:
|
||||
# RuntimeError: The snippets content did not converge: …
|
||||
_, col = vim.current.window.cursor
|
||||
line = vim.current.line
|
||||
row, col = vim.current.window.cursor
|
||||
|
||||
# before ultisnip expansion, chars ahead cursor is at row - 1, col
|
||||
# after ultisnip expansion, they are pushed to row + 1, col - 1
|
||||
# when this function is run, it's already after ultisni expansion
|
||||
line = snip.buffer[row + 1]
|
||||
|
||||
# Handle already existing quote chars after the trigger.
|
||||
_ret = quoting_style * 3
|
||||
while True:
|
||||
try:
|
||||
nextc = line[col]
|
||||
nextc = line[col - 1]
|
||||
except IndexError:
|
||||
break
|
||||
if nextc == quoting_style and len(_ret):
|
||||
|
@ -160,9 +160,9 @@ snippet abs "abstract environment" b
|
||||
endsnippet
|
||||
|
||||
snippet tab "tabular / array environment" b
|
||||
\begin{${1:t}${1/(t)$|(a)$|(.*)/(?1:abular)(?2:rray)/}}{${2:c}}
|
||||
$0${2/(?<=.)(c|l|r)|./(?1: & )/g}
|
||||
\end{$1${1/(t)$|(a)$|(.*)/(?1:abular)(?2:rray)/}}
|
||||
\begin{${1:t}${1/(t)$|(a)$|(.*)/(?1:abular)(?2:rray)/}}{${2:c}}
|
||||
$0${2/(?<=.)(c|l|r)|./(?1: & )/g}
|
||||
\end{$1${1/(t)$|(a)$|(.*)/(?1:abular)(?2:rray)/}}
|
||||
endsnippet
|
||||
|
||||
snippet table "Table environment" b
|
||||
@ -384,7 +384,7 @@ snippet nn "Tikz node" w
|
||||
$0
|
||||
endsnippet
|
||||
|
||||
snippet lll "l" Aw
|
||||
snippet lll "l" w
|
||||
\ell
|
||||
endsnippet
|
||||
|
||||
@ -400,7 +400,7 @@ snippet <! "normal" Aw
|
||||
\triangleleft
|
||||
endsnippet
|
||||
|
||||
snippet "(\d|\w)+invs" "inverse" Awr
|
||||
snippet "((\d|\w)+)invs" "inverse" Awr
|
||||
`!p snip.rv = match.group(1)`^{-1}
|
||||
endsnippet
|
||||
|
||||
@ -520,4 +520,59 @@ snippet subpar* "Sub Paragraph*" wi
|
||||
\subparagraph*{$1${VISUAL}}
|
||||
endsnippet
|
||||
|
||||
snippet chapl "Chapter with label" wi
|
||||
\chapter{$1${VISUAL}}
|
||||
\label{cha:${2:${1/\W+/-/g}}}
|
||||
endsnippet
|
||||
|
||||
snippet secl "Section with label" wi
|
||||
\section{$1${VISUAL}}
|
||||
\label{sec:${2:${1/\W+/-/g}}}
|
||||
endsnippet
|
||||
|
||||
snippet sec*l "Section* with label" wi
|
||||
\section*{$1${VISUAL}}
|
||||
\label{sec:${2:${1/\W+/-/g}}}
|
||||
endsnippet
|
||||
|
||||
snippet subl "Subsection with label" wi
|
||||
\subsection{$1${VISUAL}}
|
||||
\label{sub:${2:${1/\W+/-/g}}}
|
||||
endsnippet
|
||||
|
||||
snippet sub*l "Subsection* with label" wi
|
||||
\subsection*{$1${VISUAL}}
|
||||
\label{sub:${2:${1/\W+/-/g}}}
|
||||
endsnippet
|
||||
|
||||
snippet subsubl "Subsection with label" wi
|
||||
\subsubsection{$1${VISUAL}}
|
||||
\label{ssub:${2:${1/\W+/-/g}}}
|
||||
endsnippet
|
||||
|
||||
snippet subsub*l "Subsubsection with label" wi
|
||||
\subsubsection*{$1${VISUAL}}
|
||||
\label{ssub:${2:${1/\W+/-/g}}}
|
||||
endsnippet
|
||||
|
||||
snippet parl "Paragraph with label" wi
|
||||
\paragraph{$1${VISUAL}}
|
||||
\label{par:${2:${1/\W+/-/g}}}
|
||||
endsnippet
|
||||
|
||||
snippet par*l "Paragraph* with label" wi
|
||||
\paragraph*{$1${VISUAL}}
|
||||
\label{par:${2:${1/\W+/-/g}}}
|
||||
endsnippet
|
||||
|
||||
snippet subparl "Sub Paragraph with label" wi
|
||||
\subparagraph{$1${VISUAL}}
|
||||
\label{subp:${2:${1/\W+/-/g}}}
|
||||
endsnippet
|
||||
|
||||
snippet subpar*l "Sub Paragraph* with label" wi
|
||||
\subparagraph*{$1${VISUAL}}
|
||||
\label{subp:${2:${1/\W+/-/g}}}
|
||||
endsnippet
|
||||
|
||||
# vim:ft=snippets:
|
||||
|
@ -3,6 +3,8 @@
|
||||
# Flutter stateless widget
|
||||
snippet stless
|
||||
class $1 extends StatelessWidget {
|
||||
const $1({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
@ -14,8 +16,10 @@ snippet stless
|
||||
# Flutter stateful widget
|
||||
snippet stful
|
||||
class $1 extends StatefulWidget {
|
||||
const $1({super.key});
|
||||
|
||||
@override
|
||||
_$1State createState() => _$1State();
|
||||
State<$1> createState() => _$1State();
|
||||
}
|
||||
|
||||
class _$1State extends State<$1> {
|
||||
@ -30,8 +34,10 @@ snippet stful
|
||||
# Flutter widget with AnimationController
|
||||
snippet stanim
|
||||
class $1 extends StatefulWidget {
|
||||
const $1({super.key});
|
||||
|
||||
@override
|
||||
_$1State createState() => _$1State();
|
||||
State<$1> createState() => _$1State();
|
||||
}
|
||||
|
||||
class _$1State extends State<$1>
|
||||
@ -85,5 +91,3 @@ snippet fsa
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
125
sources_non_forked/vim-snippets/snippets/gdscript.snippets
Normal file
125
sources_non_forked/vim-snippets/snippets/gdscript.snippets
Normal file
@ -0,0 +1,125 @@
|
||||
snippet class
|
||||
class $1 extends ${2:Reference}
|
||||
\t$3
|
||||
|
||||
|
||||
snippet pr
|
||||
print($1)
|
||||
|
||||
|
||||
snippet ready
|
||||
func _ready():
|
||||
\t${1:pass}
|
||||
|
||||
|
||||
snippet init
|
||||
func _init():
|
||||
\t${1:pass}
|
||||
|
||||
|
||||
snippet process
|
||||
func _process(delta):
|
||||
\t${1:pass}
|
||||
|
||||
|
||||
snippet input
|
||||
func _input(event):
|
||||
\t${1:pass}
|
||||
|
||||
|
||||
snippet inpute
|
||||
func _input_event(event):
|
||||
\t${1:pass}
|
||||
|
||||
|
||||
snippet draw
|
||||
func _draw():
|
||||
\t${1:pass}
|
||||
|
||||
|
||||
snippet guii
|
||||
func _gui_input(event):
|
||||
\t${1:pass}
|
||||
|
||||
|
||||
snippet for
|
||||
for $1 in $2:
|
||||
\t${3:pass}
|
||||
|
||||
|
||||
snippet for
|
||||
for $1 in range(${2:start}{$3:,end}):
|
||||
\t${4:pass}
|
||||
|
||||
|
||||
snippet if
|
||||
if ${1:condition}:
|
||||
\t${3:pass}
|
||||
elif ${2:condition}:
|
||||
\t${4:pass}
|
||||
else:
|
||||
\t${5:pass}
|
||||
|
||||
|
||||
snippet if
|
||||
if ${1:condition}:
|
||||
\t${2:pass}
|
||||
else:
|
||||
\t${3:pass}
|
||||
|
||||
|
||||
snippet if
|
||||
if ${1:condition}:
|
||||
\t${2:pass}
|
||||
|
||||
|
||||
snippet while
|
||||
while ${1:condition}:
|
||||
\t${2:pass}
|
||||
|
||||
|
||||
snippet func
|
||||
func ${1:method}(${2:args}):
|
||||
\t${3:pass}
|
||||
|
||||
|
||||
snippet signal
|
||||
signal ${1:signalname}(${2:args})
|
||||
|
||||
|
||||
snippet export
|
||||
export(${1:type}${2:,other_configs}) var ${3:name}${4: = default}${5: setget }
|
||||
|
||||
|
||||
snippet var
|
||||
var ${1:name}${2: = default}${3: setget }
|
||||
|
||||
|
||||
snippet onready
|
||||
onready var ${1:name} = get_node($2)
|
||||
|
||||
|
||||
snippet is
|
||||
${1:instance} is ${2:class}
|
||||
|
||||
|
||||
snippet in
|
||||
${1:element} in ${$2:array}
|
||||
|
||||
|
||||
snippet gdscript
|
||||
extends ${1:BaseClass}
|
||||
|
||||
# class member variables go here, for example:
|
||||
# var a = 2
|
||||
# var b = \textvar\
|
||||
|
||||
func _ready():
|
||||
\t# Called every time the node is added to the scene.
|
||||
\t# Initialization here
|
||||
\tpass
|
||||
|
||||
|
||||
|
||||
# snippet pass ##### do we really need this?
|
||||
# pass
|
1
sources_non_forked/vim-snippets/snippets/heex.snippets
Normal file
1
sources_non_forked/vim-snippets/snippets/heex.snippets
Normal file
@ -0,0 +1 @@
|
||||
extends eelixir
|
135
sources_non_forked/vim-snippets/snippets/org.snippets
Normal file
135
sources_non_forked/vim-snippets/snippets/org.snippets
Normal file
@ -0,0 +1,135 @@
|
||||
# Org Mode Snippets Imported from (https://github.com/doomemacs/snippets/)
|
||||
# Imported by ybenel (github.com/m1ndo)
|
||||
|
||||
# Begin
|
||||
snippet begin
|
||||
#+begin_${1:type} ${2:options}
|
||||
$0
|
||||
#+end_$1
|
||||
# Begin Center
|
||||
snippet <C
|
||||
#+begin_center
|
||||
$0
|
||||
#+end_center
|
||||
# Begin Comment
|
||||
snippet <c
|
||||
#+begin_comment
|
||||
$0
|
||||
#+end_comment
|
||||
# Begin Example
|
||||
snippet <e
|
||||
#+begin_example
|
||||
$0
|
||||
#+end_example
|
||||
# Begin Export Ascii
|
||||
snippet <a
|
||||
#+begin_export ascii
|
||||
$0
|
||||
#+end_export
|
||||
# Begin export html
|
||||
snippet <h
|
||||
#+begin_export html
|
||||
$0
|
||||
#+end_export
|
||||
# Begin export Latex
|
||||
snippet <l
|
||||
#+begin_export latex
|
||||
$0
|
||||
#+end_export
|
||||
# Begin export python
|
||||
snippet <p
|
||||
#+begin_export python
|
||||
$0
|
||||
#+end_export
|
||||
# Begin export shell
|
||||
snippet <s
|
||||
#+begin_export shell
|
||||
$0
|
||||
#+end_export
|
||||
# dot
|
||||
snippet dot
|
||||
#+begin_src dot :file ${1:file}.${2:svg} :results file graphics
|
||||
$0
|
||||
#+end_src
|
||||
# elisp
|
||||
snippet elisp
|
||||
#+begin_src emacs-lisp :tangle yes
|
||||
$0
|
||||
#+end_src
|
||||
# Entry
|
||||
snippet entry
|
||||
#+begin_html
|
||||
---
|
||||
layout: ${1:default}
|
||||
title: ${2:title}
|
||||
---
|
||||
#+end_html
|
||||
$0
|
||||
# Begin example
|
||||
snippet ex
|
||||
#+begin_example
|
||||
$0
|
||||
#+end_example
|
||||
# Begin export
|
||||
snippet export
|
||||
#+begin_export ${1:type}
|
||||
$0
|
||||
#+end_export
|
||||
# Figure
|
||||
snippet fig
|
||||
#+caption: ${1:caption}
|
||||
#+attr_latex: ${2:scale=0.75}
|
||||
#+name: fig-${3:label}
|
||||
# Org Header
|
||||
snippet head
|
||||
#+title: ${1:untitled document}
|
||||
#+author: ${2:user-full-name}
|
||||
#+email: ${3:user-mail-address}
|
||||
# Image
|
||||
snippet img
|
||||
#+attr_html: :alt $2 :align ${3:left} :class img
|
||||
[[${1:src}]${4:[${5:title}]}]
|
||||
$0
|
||||
# Inline
|
||||
snippet inl
|
||||
src_${1:language}${2:[${3::exports code}]}{${4:code}}
|
||||
# Inline source
|
||||
snippet srci
|
||||
src_${1:language}[${2:header}]{${0:body}}
|
||||
# Jupyter
|
||||
snippet jupyter
|
||||
#+begin_src jupyter-${1:$$(yas-choose-value '("python" "julia" "R"))}${2: :session $3}${4: :async yes}
|
||||
$0
|
||||
#+end_src
|
||||
# Matrix (latex)
|
||||
snippet matrix
|
||||
\left \(
|
||||
\begin{array}{${1:ccc}}
|
||||
${2:v1 & v2} \\
|
||||
$0
|
||||
\end{array}
|
||||
\right \)
|
||||
# Name
|
||||
snippet name
|
||||
#+name: $0
|
||||
# Quote
|
||||
snippet quote
|
||||
#+begin_quote
|
||||
$0
|
||||
#+end_quote
|
||||
# Source
|
||||
snippet src
|
||||
#+begin_src $1
|
||||
$0
|
||||
#+end_src
|
||||
# Todo
|
||||
snippet todo
|
||||
TODO ${1:task description}
|
||||
# Verse
|
||||
snippet verse
|
||||
#+begin_verse
|
||||
$0
|
||||
#+end_verse
|
||||
# Atrribute Width
|
||||
snippet #+attr_html:width
|
||||
#+attr_html: :width ${1:500px}
|
@ -44,6 +44,10 @@ snippet def
|
||||
def ${1:method_name}
|
||||
${0}
|
||||
end
|
||||
snippet defm
|
||||
def ${1:method}
|
||||
@$1 ||= ${0}
|
||||
end
|
||||
snippet deft
|
||||
def test_${1:case_name}
|
||||
${0}
|
||||
@ -372,6 +376,8 @@ snippet finad
|
||||
end
|
||||
snippet gre
|
||||
grep(${1:/pattern/}) { |${2:match}| ${0} }
|
||||
snippet grepv
|
||||
select { |${1:line}| $1 !~ ${2:/pattern/} }${0}
|
||||
snippet sub
|
||||
${1:g}sub(${2:/pattern/}) { |${3:match}| ${0} }
|
||||
snippet sca
|
||||
|
Reference in New Issue
Block a user