Personal emacs config
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
3.8 KiB

  1. [![Build Status](https://travis-ci.org/abo-abo/tiny.svg?branch=master)](https://travis-ci.org/abo-abo/tiny)
  2. [![Coverage Status](https://coveralls.io/repos/abo-abo/tiny/badge.svg?branch=master)](https://coveralls.io/r/abo-abo/tiny?branch=master)
  3. ### Main idea:
  4. This is an alternative to inserting numeric ranges with macros (i.e. `F3 F3`).
  5. The advantages are:
  6. 1. Brevity: consider `F3 F3 SPC M-1 M-0 F4` vs. `m10 C-;`.
  7. 2. Much better undo context: a single `C-_` will undo the whole thing
  8. and allow you to edit the code. With macros you'd have to undo multiple
  9. times and restart from scratch, instead of tweaking what you just invoked.
  10. 3. The ability to insert the same number several times in a single iteration,
  11. and transform it with `format`-style expressions
  12. e.g. `m6\n15%s=0%o=0x%x` will expand to
  13. 6=06=0x6
  14. 7=07=0x7
  15. 8=010=0x8
  16. 9=011=0x9
  17. 10=012=0xa
  18. 11=013=0xb
  19. 12=014=0xc
  20. 13=015=0xd
  21. 14=016=0xe
  22. 15=017=0xf
  23. 4. Last but not least, the ability to transform the number with lisp expressions.
  24. For instance:
  25. 1. `m5 10*xx` -> `25 36 49 64 81 100`
  26. 2. `m5 10*xx|0x%x` -> `0x19 0x24 0x31 0x40 0x51 0x64`
  27. 3. `m10+x?a%c` -> `a b c d e f g h i j k`
  28. 4. `m10+x?A%c` -> `A B C D E F G H I J K`
  29. 5. `m97,105stringx` -> `a,b,c,d,e,f,g,h,i`
  30. 6. `m97,102stringxupcasex` -> `aA,bB,cC,dD,eE,fF`
  31. 7. `m,3|%(+ x x) and %(* x x) and %s` -> `0 and 0 and 0,2 and 1 and 1,4 and 4 and 2,6 and 9 and 3,8 and 16 and 4,10 and 25 and 5`
  32. ### Use in conjunction with `org-mode`:
  33. m1\n14|*** TODO http://emacsrocks.com/e%02d.html
  34. *** TODO http://emacsrocks.com/e01.html
  35. *** TODO http://emacsrocks.com/e02.html
  36. *** TODO http://emacsrocks.com/e03.html
  37. *** TODO http://emacsrocks.com/e04.html
  38. *** TODO http://emacsrocks.com/e05.html
  39. *** TODO http://emacsrocks.com/e06.html
  40. *** TODO http://emacsrocks.com/e07.html
  41. *** TODO http://emacsrocks.com/e08.html
  42. *** TODO http://emacsrocks.com/e09.html
  43. *** TODO http://emacsrocks.com/e10.html
  44. *** TODO http://emacsrocks.com/e11.html
  45. *** TODO http://emacsrocks.com/e12.html
  46. *** TODO http://emacsrocks.com/e13.html
  47. *** TODO http://emacsrocks.com/e14.html
  48. You can even schedule and deadline:
  49. m\n8|**** TODO Learning from Data Week %(+ x 2) \nSCHEDULED: <%(date "Oct 7" (* x 7))> DEADLINE: <%(date "Oct 14" (* x 7))>
  50. **** TODO Learning from Data Week 2
  51. SCHEDULED: <2013-10-07 Mon> DEADLINE: <2013-10-14 Mon>
  52. **** TODO Learning from Data Week 3
  53. SCHEDULED: <2013-10-14 Mon> DEADLINE: <2013-10-21 Mon>
  54. **** TODO Learning from Data Week 4
  55. SCHEDULED: <2013-10-21 Mon> DEADLINE: <2013-10-28 Mon>
  56. **** TODO Learning from Data Week 5
  57. SCHEDULED: <2013-10-28 Mon> DEADLINE: <2013-11-04 Mon>
  58. **** TODO Learning from Data Week 6
  59. SCHEDULED: <2013-11-04 Mon> DEADLINE: <2013-11-11 Mon>
  60. **** TODO Learning from Data Week 7
  61. SCHEDULED: <2013-11-11 Mon> DEADLINE: <2013-11-18 Mon>
  62. **** TODO Learning from Data Week 8
  63. SCHEDULED: <2013-11-18 Mon> DEADLINE: <2013-11-25 Mon>
  64. **** TODO Learning from Data Week 9
  65. SCHEDULED: <2013-11-25 Mon> DEADLINE: <2013-12-02 Mon>
  66. **** TODO Learning from Data Week 10
  67. SCHEDULED: <2013-12-02 Mon> DEADLINE: <2013-12-09 Mon>
  68. Here's how to schedule a task that repeats Monday through Friday at 10:00, every week:
  69. m0\n4|** TODO Something work-related\nSCHEDULED: <%(date "mon" x) 10:00 +1w>
  70. ** TODO Something work-related
  71. SCHEDULED: <2013-11-04 Mon 10:00 +1w>
  72. ** TODO Something work-related
  73. SCHEDULED: <2013-11-05 Tue 10:00 +1w>
  74. ** TODO Something work-related
  75. SCHEDULED: <2013-11-06 Wed 10:00 +1w>
  76. ** TODO Something work-related
  77. SCHEDULED: <2013-11-07 Thu 10:00 +1w>
  78. ** TODO Something work-related
  79. SCHEDULED: <2013-11-08 Fri 10:00 +1w>
  80. ### Setup
  81. In `~/.emacs`:
  82. (require 'tiny)
  83. (tiny-setup-default)