An Example Yankpad File

Menu

org-mode

ae: Agenda Entry   src

I use it to insert a new appointment in my agenda (kept in org-mode).

** $1
   :PROPERTIES:
   :LOCATION: $2
   :ATTENDEES: $3
   :END:
   `(org-time-stamp 1)`

   $0

ruby-mode

map: Map   src

.map { |x| $0 }

each: Each   src

.each do |x|
  $0
end

if: Condition   src

if $0 then
  $1
else
  $2
end

hledger-mode

These are some snippets to simplify data entry in my ledger file (based on hledger).

cw: cash withdrawal   src

When I withdraw cash from the bank, it gets in my pocket.

`(format-time-string "%Y-%2m-%2d" (current-time))`  Adolfo
  cash     $1
  bank

  $0

ad: bank -> dining   src

When I dine out, sometimes I pay with my ATM card.

`(format-time-string "%Y-%m-%d" (current-time))` $1
  dining     $2
  bank

  $0

ag: bank -> groceries   src

When I buy groceries, sometimes I pay with my ATM card

`(format-time-string "%Y-%m-%d" (current-time))` $1
  groceries     $2
  bank

$0

ge: generic entry   src

In many other cases, I need to specify everything…

`(format-time-string "%Y-%m-%d" (current-time))` $1
  $2     $3
  $4

$0

web-mode

destroy: Destroy   src

This is useful in Rails views (you need a zurb_icon helper which makes a string into an icon).

<%= link_to zurb_icon('Destroy'), $0, method: :delete, data: { confirm: '$1' } %>