Remove Emacs snippets
All of these snippets are now distributed with their Emacs configuration.
This commit is contained in:
parent
946b7425de
commit
f5f1259737
49 changed files with 0 additions and 386 deletions
|
@ -1,2 +0,0 @@
|
|||
((nil
|
||||
(require-final-newline . nil)))
|
1
emacs/.emacs.d/snippets/.gitignore
vendored
1
emacs/.emacs.d/snippets/.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
.yas-compiled-snippets.el
|
|
@ -1,8 +0,0 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: Xorg Section
|
||||
# key: Section
|
||||
# --
|
||||
Section "$1"
|
||||
Identifier "$2"
|
||||
$0
|
||||
EndSection
|
|
@ -1,5 +0,0 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: box-shadow
|
||||
# key: boxshadow
|
||||
# --
|
||||
box-shadow: ${1:offset-x} ${2:offset-y}${3: [blur-radius]}${4: [spread-radius]}${5: [color]};
|
|
@ -1,5 +0,0 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: depends-on
|
||||
# key: do
|
||||
# --
|
||||
(depends-on "$1")$0
|
|
@ -1,5 +0,0 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: face
|
||||
# key: face
|
||||
# --
|
||||
`($1 ((t (${2::foreground} $0))))
|
|
@ -1,12 +0,0 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: FAQ Question & Answer
|
||||
# key: faq
|
||||
# expand-env: ((yas-indent-line 'fixed))
|
||||
# --
|
||||
%dt
|
||||
= link_to '#' do
|
||||
.expand_icon
|
||||
$1
|
||||
%dd
|
||||
%p
|
||||
$0
|
|
@ -1,7 +0,0 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: block
|
||||
# key: block
|
||||
# --
|
||||
{% block $1 %}
|
||||
$0
|
||||
{% endblock %}
|
|
@ -1,8 +0,0 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: for
|
||||
# key: for
|
||||
# condition: pony-tpl-minor-mode
|
||||
# --
|
||||
{% for $1 in $2 %}
|
||||
$0
|
||||
{% endfor %}
|
|
@ -1,8 +0,0 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: Template Block
|
||||
# key: %
|
||||
# condition: pony-tpl-minor-mode
|
||||
# --
|
||||
{% $1 %}
|
||||
$0
|
||||
{% end$1 %}
|
|
@ -1,5 +0,0 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: script
|
||||
# key: script
|
||||
# --
|
||||
<script src="$1" type="${2:text/javascript}" language="${3:javascript}"></script>
|
|
@ -1,6 +0,0 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: trans with cap
|
||||
# key: trans
|
||||
# condition: pony-tpl-minor-mode
|
||||
# --
|
||||
{% trans "$1"|capfirst %}
|
|
@ -1,7 +0,0 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: PencilProperty
|
||||
# key: p
|
||||
# --
|
||||
<Property name="$1"
|
||||
displayName="$2"
|
||||
type="$3">$4</Property>
|
|
@ -1,5 +0,0 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: PropertyValue
|
||||
# key: pv
|
||||
# --
|
||||
<PropertyValue name="$1">$2</PropertyValue>
|
|
@ -1,9 +0,0 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: Shortcut
|
||||
# key: s
|
||||
# --
|
||||
<Shortcut displayName="$1"
|
||||
icon="$2"
|
||||
to="$3">
|
||||
$0
|
||||
</Shortcut>
|
|
@ -1,7 +0,0 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: codeblock
|
||||
# key: code
|
||||
# --
|
||||
#+begin_src $1
|
||||
$0
|
||||
#+end_src
|
|
@ -1,9 +0,0 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: Heading
|
||||
# key: *
|
||||
# --
|
||||
${1:*} ${2:TODO} $3
|
||||
${1:$(make-string (length text) ?\ )} :PROPERTIES:
|
||||
${1:$(make-string (length text) ?\ )} :CATEGORY: $4
|
||||
${1:$(make-string (length text) ?\ )} :END:
|
||||
${1:$(make-string (length text) ?\ )} $0
|
|
@ -1,51 +0,0 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: project
|
||||
# key: project
|
||||
# --
|
||||
#+TITLE: ${1:project_name}
|
||||
#+LINK: src ${2:http://code.ryuslash.org/cgit.cgi/$3$1/}
|
||||
#+LINK: tar_gz $2${4:snapshot/$1-master}.tar.gz
|
||||
#+LINK: zip $2$4.zip
|
||||
#+STARTUP: showall
|
||||
|
||||
#+begin_html
|
||||
<script src="/keyjs.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
keyjs_initialize({ "u": [ "keyjs_goto", "../index.html" ],
|
||||
"h": [ "keyjs_goto", "http://ryuslash.org" ] });
|
||||
</script>
|
||||
#+end_html
|
||||
|
||||
#+INCLUDE: "dlmenu.inc"
|
||||
|
||||
* About
|
||||
|
||||
${5:A short description about $1}
|
||||
|
||||
| $0Status | $6 |
|
||||
| Language | $7 |
|
||||
| License | ${8:GPLv3} |
|
||||
|
||||
* Why?
|
||||
|
||||
${9:Why did you even think of writing $1?}
|
||||
|
||||
* Features
|
||||
|
||||
${10:$1 does...}
|
||||
|
||||
* Dependencies
|
||||
|
||||
${11:$1 needs to have...}
|
||||
|
||||
* Download
|
||||
|
||||
${12:To download $1...}
|
||||
|
||||
* Install
|
||||
|
||||
${13:To install $1...}
|
||||
|
||||
* Usage
|
||||
|
||||
${14:Using $1...}
|
|
@ -1,14 +0,0 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: snippet
|
||||
# key: snippet
|
||||
# --
|
||||
#+TITLE: ${1:snippet-name}
|
||||
#+OPTIONS: toc:nil
|
||||
|
||||
* $1
|
||||
|
||||
${2:A short description abount $1}
|
||||
|
||||
#+BEGIN_SRC $3 :tangle yes
|
||||
$0
|
||||
#+END_SRC
|
|
@ -1,8 +0,0 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: function
|
||||
# key: function
|
||||
# --
|
||||
function $1($2)
|
||||
{
|
||||
$0
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: WP Plugin Header
|
||||
# key: header
|
||||
# --
|
||||
/*
|
||||
* Plugin Name: $1
|
||||
* Plugin URI: $2
|
||||
* Description: $3
|
||||
* Version: ${4:1.0}
|
||||
* Author: ${5:Tom Willemse}
|
||||
* Author URI: ${6:https://ryuslash.org}
|
||||
* License: ${7:GPLv2}
|
||||
*/
|
|
@ -1,7 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# name: Empty Defmethod
|
||||
# key: defm
|
||||
# --
|
||||
def ${1:name}(self, *args, **kwargs):
|
||||
'''$2'''
|
||||
return super(${3:`(progn (re-search-backward "^[ \t]*class \\(.+\\)(") (match-string 1)))`}, self).$1(*args, **kwargs)
|
|
@ -1,9 +0,0 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: Model Form
|
||||
# key: form
|
||||
# --
|
||||
class ${1:Model}Form(forms.ModelForm):
|
||||
'''Form for the $1 model.'''
|
||||
|
||||
class Meta:
|
||||
model = $1
|
|
@ -1,8 +0,0 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: Record form
|
||||
# key: defm
|
||||
# --
|
||||
@record_activity(model=${1:`(progn (re-search-backward "^[ \t]*model = \\([a-zA-Z_].*\\)$") (match-string 1))`})
|
||||
def form_valid(self, form):
|
||||
'''Make sure any changes to the $1 model get logged.'''
|
||||
return super(${2:`(progn (re-search-backward "^[ \t]*class \\(.+\\)(") (match-string 1)))`}, self).form_valid(form)
|
|
@ -1,8 +0,0 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: form_valid with return
|
||||
# key: formvalid
|
||||
# --
|
||||
def form_valid(self, form):
|
||||
rv = super(`(let ((name (python-info-current-defun))) (substring name 0 (cl-position ?. name)))`, self).form_valid(form)
|
||||
$0
|
||||
return rv
|
|
@ -1,6 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# name: from ... import ...
|
||||
# contributor: Tom Willemse
|
||||
# key: from
|
||||
# --
|
||||
from ${1:module} import ${2:class_or_module}
|
|
@ -1,7 +0,0 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: method
|
||||
# key: defm
|
||||
# --
|
||||
def $1(self$2):
|
||||
'''$3'''
|
||||
$0
|
|
@ -1,9 +0,0 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: Permission guard
|
||||
# key: defm
|
||||
# --
|
||||
@method_decorator(permission_required('$1',
|
||||
raise_exception=True))
|
||||
def dispatch(self, *args, **kwargs):
|
||||
'''Make sure the user has the $1 permission.'''
|
||||
return super(${3:`(progn (re-search-backward "^[ \t]*class \\(.+\\)(") (match-string 1)))`}, self).dispatch(*args, **kwargs)
|
|
@ -1,5 +0,0 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: url
|
||||
# key: url
|
||||
# --
|
||||
url(r'^$1', $2, name='$3'),
|
|
@ -1,5 +0,0 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: ProductSeed
|
||||
# key: pseed
|
||||
# --
|
||||
Product.find_or_create_by_name(parent_id: $1, name: '$2', description: '$3', price: '$4')
|
|
@ -1,5 +0,0 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: ProductSeedWithHW
|
||||
# key: pseed
|
||||
# --
|
||||
Product.find_or_create_by_name(parent_id: $1, name: '$2', description: '$3', price: '$4', width_in_cm: '$5', height_in_cm: '$6', width_in_mm: '${5:$(round (* 10 (string-to-int yas-text)))}', height_in_mm: '${6:$(round (* 10 (string-to-int yas-text)))}')
|
|
@ -1,8 +0,0 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: ProductSeedWithHWGroup
|
||||
# key: pseed
|
||||
# --
|
||||
Product.find_or_create_by_name(parent_id: $1, name: '$2', description: 'Small', price: '20.00', width_in_cm: '25.00', height_in_cm: '21.00', width_in_mm: '250', height_in_mm: '210')
|
||||
Product.find_or_create_by_name(parent_id: $1, name: '$2', description: 'Medium', price: '20.00', width_in_cm: '30.00', height_in_cm: '25.80', width_in_mm: '300', height_in_mm: '258')
|
||||
Product.find_or_create_by_name(parent_id: $1, name: '$2', description: 'Large', price: '20.00', width_in_cm: '35.00', height_in_cm: '30.00', width_in_mm: '350', height_in_mm: '300')
|
||||
Product.find_or_create_by_name(parent_id: $1, name: '$2', description: 'Extra large', price: '20.00', width_in_cm: '40.00', height_in_cm: '34.00', width_in_mm: '400', height_in_mm: '340')
|
|
@ -1,7 +0,0 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: describe
|
||||
# key: desc
|
||||
# --
|
||||
describe '$1' do
|
||||
$0
|
||||
end
|
|
@ -1,6 +0,0 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: do
|
||||
# key: do
|
||||
# --
|
||||
do$0
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
# -*- mode: snippet -*-
|
||||
# name: factory
|
||||
# key: factory
|
||||
# --
|
||||
FactoryGirl.define do
|
||||
factory :${1:`(file-name-sans-extension (file-name-nondirectory buffer-file-name))`} do
|
||||
$0
|
||||
end
|
||||
end
|
|
@ -1,5 +0,0 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: fill_in
|
||||
# key: fin
|
||||
# --
|
||||
fill_in '$1', with: $2
|
|
@ -1,11 +0,0 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: module ... end
|
||||
# key: mod
|
||||
# group: definitions
|
||||
# --
|
||||
module ${1:`(let ((fn (capitalize (file-name-nondirectory
|
||||
(directory-file-name
|
||||
default-directory)))))
|
||||
(replace-regexp-in-string "_" "" fn t t))`}
|
||||
$0
|
||||
end
|
|
@ -1,5 +0,0 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: reduce
|
||||
# key: reduce
|
||||
# --
|
||||
reduce { |a, e| $0 }
|
|
@ -1,5 +0,0 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: _self
|
||||
# key: _self
|
||||
# --
|
||||
{% import _self as ${1:`(file-name-nondirectory (file-name-sans-extension buffer-file-name))`} %}
|
|
@ -1,7 +0,0 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: block
|
||||
# key: blk
|
||||
# --
|
||||
{% block $1 %}
|
||||
$0
|
||||
{% endblock %}
|
|
@ -1,7 +0,0 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: default value
|
||||
# key: def
|
||||
# --
|
||||
{% if $1 is not defined %}
|
||||
{% set $1 = $2 %}
|
||||
{% endif %}
|
|
@ -1,5 +0,0 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: extends
|
||||
# key: ext
|
||||
# --
|
||||
{% extends "$1" %}
|
|
@ -1,7 +0,0 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: for
|
||||
# key: for
|
||||
# --
|
||||
{% for $1 in $2 %}
|
||||
`yas-selected-text`$0
|
||||
{% endfor %}
|
|
@ -1,7 +0,0 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: if
|
||||
# key: if
|
||||
# --
|
||||
{% if $1 %}
|
||||
$0
|
||||
{% endif %}
|
|
@ -1,9 +0,0 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: if...else
|
||||
# key: ife
|
||||
# --
|
||||
{% if $1 %}
|
||||
$0
|
||||
{% else %}
|
||||
|
||||
{% endif %}
|
|
@ -1,5 +0,0 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: Inline if
|
||||
# key: iif
|
||||
# --
|
||||
{% if $1 %}$0{% endif %}
|
|
@ -1,7 +0,0 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: import
|
||||
# key: imp
|
||||
# --
|
||||
{% import "${1:module}" as ${1:$(if (string-match "/\\\\([^/]*\\\\)$" yas-text)
|
||||
(match-string 1 yas-text)
|
||||
yas-text)} %}
|
|
@ -1,7 +0,0 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: macro
|
||||
# key: mac
|
||||
# --
|
||||
{% macro ${1:name}(${2:args}) %}
|
||||
$0
|
||||
{% endmacro %}
|
|
@ -1,5 +0,0 @@
|
|||
# -*- mode: snippet; require-final-newline: nil -*-
|
||||
# name: set
|
||||
# key: set
|
||||
# --
|
||||
{% set $1 = $2 %}
|
Loading…
Reference in a new issue