ruby_learner 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.rspec +3 -0
  4. data/.travis.yml +5 -0
  5. data/CODE_OF_CONDUCT.md +74 -0
  6. data/Gemfile +6 -0
  7. data/Gemfile.lock +58 -0
  8. data/LICENSE.txt +21 -0
  9. data/README.md +65 -0
  10. data/Rakefile +6 -0
  11. data/bin/console +14 -0
  12. data/bin/new_terminal +25 -0
  13. data/bin/setup +8 -0
  14. data/docs/happy_ruby/RussOlsen_EloquentRuby_c1.pdf +0 -0
  15. data/docs/happy_ruby/RussOlsen_EloquentRuby_c5.pdf +0 -0
  16. data/docs/happy_ruby/TanoshiiRuby_v3_c23.pdf +0 -0
  17. data/docs/happy_ruby/TanoshiiRuby_v5_c1.pdf +0 -0
  18. data/docs/happy_ruby/TanoshiiRuby_v5_c2-3.pdf +0 -0
  19. data/docs/happy_ruby/c2.ipynb +479 -0
  20. data/docs/happy_ruby/c3_4.ipynb +237 -0
  21. data/docs/seminar/8-1.org +18 -0
  22. data/exe/ruby_learner +5 -0
  23. data/lib/ruby_learner/h.rb +14 -0
  24. data/lib/ruby_learner/methods.rb +131 -0
  25. data/lib/ruby_learner/random_h.rb +16 -0
  26. data/lib/ruby_learner/ruby_learner.rb +43 -0
  27. data/lib/ruby_learner/sequential_h.rb +15 -0
  28. data/lib/ruby_learner/typing_practice.rb +21 -0
  29. data/lib/ruby_learner/version.rb +3 -0
  30. data/questions/random_check/.rspec +1 -0
  31. data/questions/random_check/random_h.rb +16 -0
  32. data/questions/random_check/section_1/.rspec +1 -0
  33. data/questions/random_check/section_1/lib/answer.rb +15 -0
  34. data/questions/random_check/section_1/lib/sentence.org +9 -0
  35. data/questions/random_check/section_1/lib/workplace.rb +5 -0
  36. data/questions/random_check/section_1/spec/spec_helper.rb +100 -0
  37. data/questions/random_check/section_1/spec/workplace_spec.rb +10 -0
  38. data/questions/random_check/section_2/.rspec +1 -0
  39. data/questions/random_check/section_2/lib/answer.rb +17 -0
  40. data/questions/random_check/section_2/lib/sentence.org +12 -0
  41. data/questions/random_check/section_2/lib/workplace.rb +5 -0
  42. data/questions/random_check/section_2/spec/.rspec +1 -0
  43. data/questions/random_check/section_2/spec/spec_helper.rb +100 -0
  44. data/questions/random_check/section_2/spec/workplace_spec.rb +11 -0
  45. data/questions/sequential_check/section_1/part_1/lib/answer.rb +9 -0
  46. data/questions/sequential_check/section_1/part_1/lib/sentence.org +9 -0
  47. data/questions/sequential_check/section_1/part_1/lib/workplace.rb +5 -0
  48. data/questions/sequential_check/section_1/part_1/spec/spec_helper.rb +100 -0
  49. data/questions/sequential_check/section_1/part_1/spec/workplace_spec.rb +10 -0
  50. data/questions/sequential_check/section_1/part_2/lib/answer.rb +16 -0
  51. data/questions/sequential_check/section_1/part_2/lib/sentence.org +12 -0
  52. data/questions/sequential_check/section_1/part_2/lib/workplace.rb +5 -0
  53. data/questions/sequential_check/section_1/part_2/spec/.rspec +1 -0
  54. data/questions/sequential_check/section_1/part_2/spec/spec_helper.rb +100 -0
  55. data/questions/sequential_check/section_1/part_2/spec/workplace_spec.rb +11 -0
  56. data/ruby_learner.gemspec +41 -0
  57. data/takahashi/docs/README.org +139 -0
  58. data/takahashi/docs/drill.html +875 -0
  59. data/takahashi/docs/drill.html~ +877 -0
  60. data/takahashi/docs/drill.org +446 -0
  61. data/takahashi/docs/ruby_for_beginner.html +2642 -0
  62. data/takahashi/docs/ruby_for_beginner.org +1430 -0
  63. data/takahashi/sample_prog/answer/10_1.rb +5 -0
  64. data/takahashi/sample_prog/answer/11_1.rb +5 -0
  65. data/takahashi/sample_prog/answer/11_2.rb +4 -0
  66. data/takahashi/sample_prog/answer/1_1.rb +1 -0
  67. data/takahashi/sample_prog/answer/1_2.rb +1 -0
  68. data/takahashi/sample_prog/answer/1_3.rb +1 -0
  69. data/takahashi/sample_prog/answer/2_1.rb +5 -0
  70. data/takahashi/sample_prog/answer/2_2.rb +12 -0
  71. data/takahashi/sample_prog/answer/3_1.rb +10 -0
  72. data/takahashi/sample_prog/answer/4_1.rb +7 -0
  73. data/takahashi/sample_prog/answer/5_1.rb +6 -0
  74. data/takahashi/sample_prog/answer/5_2.rb +3 -0
  75. data/takahashi/sample_prog/answer/6_1.rb +3 -0
  76. data/takahashi/sample_prog/answer/6_2.rb +5 -0
  77. data/takahashi/sample_prog/answer/6_3.rb +5 -0
  78. data/takahashi/sample_prog/answer/6_4.rb +7 -0
  79. data/takahashi/sample_prog/answer/7_1.rb +3 -0
  80. data/takahashi/sample_prog/answer/7_2.rb +8 -0
  81. data/takahashi/sample_prog/answer/9_1.rb +3 -0
  82. data/takahashi/sample_prog/answer/9_2.rb +5 -0
  83. data/takahashi/sample_prog/answer/9_3.rb +10 -0
  84. data/takahashi/sample_prog/answer/hello.rb +3 -0
  85. data/workshop/.rspec +1 -0
  86. data/workshop/emacs.d/ac-comphist.dat +50 -0
  87. data/workshop/emacs.d/cp5022x.el +156 -0
  88. data/workshop/emacs.d/elpa/archives/gnu/archive-contents +1240 -0
  89. data/workshop/emacs.d/elpa/archives/melpa/archive-contents +2 -0
  90. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/auto-complete-autoloads.el +65 -0
  91. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/auto-complete-config.el +551 -0
  92. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/auto-complete-config.elc +0 -0
  93. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/auto-complete-pkg.el +6 -0
  94. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/auto-complete.el +2164 -0
  95. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/auto-complete.elc +0 -0
  96. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/ada-mode +72 -0
  97. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/c++-mode +99 -0
  98. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/c-mode +55 -0
  99. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/caml-mode +231 -0
  100. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/clojure-mode +580 -0
  101. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/clojurescript-mode +475 -0
  102. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/coq-mode +278 -0
  103. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/css-mode +874 -0
  104. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/erlang-mode +216 -0
  105. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/ess-julia-mode +37 -0
  106. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/go-mode +25 -0
  107. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/haskell-mode +679 -0
  108. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/java-mode +53 -0
  109. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/js-mode +148 -0
  110. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/julia-mode +37 -0
  111. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/lua-mode +21 -0
  112. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/nim-mode +70 -0
  113. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/objc-mode +161 -0
  114. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/octave-mode +46 -0
  115. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/php-mode +6144 -0
  116. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/python-mode +379 -0
  117. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/qml-mode +183 -0
  118. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/ruby-mode +181 -0
  119. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/scala-mode +1347 -0
  120. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/scheme-mode +216 -0
  121. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/sclang-mode +1481 -0
  122. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/sh-mode +182 -0
  123. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/swift-mode +87 -0
  124. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/tcl-mode +172 -0
  125. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/ts-mode +797 -0
  126. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/tuareg-mode +231 -0
  127. data/workshop/emacs.d/elpa/auto-complete-20170124.1845/dict/verilog-mode +313 -0
  128. data/workshop/emacs.d/elpa/better-defaults-20170613.2104/better-defaults-autoloads.el +16 -0
  129. data/workshop/emacs.d/elpa/better-defaults-20170613.2104/better-defaults-pkg.el +2 -0
  130. data/workshop/emacs.d/elpa/better-defaults-20170613.2104/better-defaults.el +90 -0
  131. data/workshop/emacs.d/elpa/better-defaults-20170613.2104/better-defaults.elc +0 -0
  132. data/workshop/emacs.d/elpa/haml-mode-20170923.2153/haml-mode-autoloads.el +26 -0
  133. data/workshop/emacs.d/elpa/haml-mode-20170923.2153/haml-mode-pkg.el +2 -0
  134. data/workshop/emacs.d/elpa/haml-mode-20170923.2153/haml-mode.el +877 -0
  135. data/workshop/emacs.d/elpa/haml-mode-20170923.2153/haml-mode.elc +0 -0
  136. data/workshop/emacs.d/elpa/haml-mode-readme.txt +8 -0
  137. data/workshop/emacs.d/elpa/material-theme-20171123.1040/material-light-theme.el +918 -0
  138. data/workshop/emacs.d/elpa/material-theme-20171123.1040/material-light-theme.elc +0 -0
  139. data/workshop/emacs.d/elpa/material-theme-20171123.1040/material-theme-autoloads.el +32 -0
  140. data/workshop/emacs.d/elpa/material-theme-20171123.1040/material-theme-pkg.el +8 -0
  141. data/workshop/emacs.d/elpa/material-theme-20171123.1040/material-theme.el +912 -0
  142. data/workshop/emacs.d/elpa/material-theme-20171123.1040/material-theme.elc +0 -0
  143. data/workshop/emacs.d/elpa/ox-bibtex-chinese-readme.txt +21 -0
  144. data/workshop/emacs.d/elpa/popup-20160709.729/popup-autoloads.el +15 -0
  145. data/workshop/emacs.d/elpa/popup-20160709.729/popup-pkg.el +2 -0
  146. data/workshop/emacs.d/elpa/popup-20160709.729/popup.el +1432 -0
  147. data/workshop/emacs.d/elpa/popup-20160709.729/popup.elc +0 -0
  148. data/workshop/emacs.d/elpa/yaml-mode-20180212.1556/yaml-mode-autoloads.el +33 -0
  149. data/workshop/emacs.d/elpa/yaml-mode-20180212.1556/yaml-mode-pkg.el +2 -0
  150. data/workshop/emacs.d/elpa/yaml-mode-20180212.1556/yaml-mode.el +470 -0
  151. data/workshop/emacs.d/elpa/yaml-mode-20180212.1556/yaml-mode.elc +0 -0
  152. data/workshop/emacs.d/elpa/yaml-mode-readme.txt +25 -0
  153. data/workshop/emacs.d/haml-mode-master/.gitignore +1 -0
  154. data/workshop/emacs.d/haml-mode-master/.mailmap +2 -0
  155. data/workshop/emacs.d/haml-mode-master/MIT-LICENSE +20 -0
  156. data/workshop/emacs.d/haml-mode-master/README.md +47 -0
  157. data/workshop/emacs.d/haml-mode-master/haml-mode.el +887 -0
  158. data/workshop/emacs.d/iceberg_theme.el +202 -0
  159. data/workshop/emacs.d/init-open-recentf.el +133 -0
  160. data/workshop/emacs.d/init.el +229 -0
  161. data/workshop/emacs.d/inits/line-num.el +264 -0
  162. data/workshop/emacs.d/install-elisp.el +366 -0
  163. data/workshop/emacs.d/markdown-mode/markdown-mode.el +5978 -0
  164. data/workshop/emacs.d/notes +12 -0
  165. data/workshop/emacs.d/processing-mode/processing-mode.el +275 -0
  166. data/workshop/emacs.d/recentf +31 -0
  167. data/workshop/emacs.d/ruby-mode/inf-ruby.el +416 -0
  168. data/workshop/emacs.d/ruby-mode/rdoc-mode.el +130 -0
  169. data/workshop/emacs.d/ruby-mode/ruby-electric.el +205 -0
  170. data/workshop/emacs.d/ruby-mode/ruby-mode.el +1496 -0
  171. data/workshop/emacs.d/ruby-mode/ruby-style.el +78 -0
  172. data/workshop/emacs.d/ruby-mode/rubydb2x.el +104 -0
  173. data/workshop/emacs.d/ruby-mode/rubydb3x.el +115 -0
  174. data/workshop/emacs.d/ruby_learner_init.el +244 -0
  175. data/workshop/emacs.d/themes/dracula-theme.el +431 -0
  176. data/workshop/emacs.d/themes/iceberg-theme.el +205 -0
  177. data/workshop/emacs.d/themes/my-misterioso-theme.el +109 -0
  178. data/workshop/emacs.d/themes/my-wombat-theme.el +121 -0
  179. data/workshop/emacs.d/wiki-mode/wiki.el +976 -0
  180. data/workshop/emacs_help.org +34 -0
  181. data/workshop/lib/answer.rb +1 -0
  182. data/workshop/lib/sentence.org +1 -0
  183. data/workshop/lib/workplace.rb +1 -0
  184. data/workshop/restore/empty.rb +0 -0
  185. data/workshop/spec/spec_helper.rb +100 -0
  186. data/workshop/spec/workplace_spec.rb +1 -0
  187. data/workshop/training_data.txt +3 -0
  188. metadata +343 -0
@@ -0,0 +1,202 @@
1
+ ;;; iceberg --- a dark blue theme
2
+ ;;; Commentary:
3
+ ;; _________________________________________
4
+ ;; \_ _/ ____| ____| ___ \ ____| ___ \ ___/
5
+ ;; | | |____| ____| ___ < ____| __ / |__ \
6
+ ;; /___\_____|_____|_____/_____|_| \_\_____/
7
+ ;;
8
+ ;; cool-headed perspective for your coding
9
+ ;;
10
+ ;;
11
+ ;; File: iceberg.el
12
+ ;; Colorscheme: cocopon <cocopon@me.com>
13
+ ;; Port: apnsngr <github.com/apnsngr>
14
+ ;; License: MIT
15
+ ;;
16
+ ;; Special thanks to Bozhidar Batsov (bbatsov). I used his zenburn Emacs theme
17
+ ;; as a guide for this theme.
18
+
19
+ ;;; Code:
20
+
21
+ (deftheme iceberg)
22
+
23
+ (let
24
+ ((class '((class color) (min-colors 89)))
25
+ (background "#161822")
26
+ (current-line "#1E2132")
27
+ (selection "#282D43")
28
+ (foreground "#C7C9D1")
29
+ (comment "#6B7089")
30
+ (cursor "#C7C9D1")
31
+ (line-number-fg "#454D73")
32
+ (red "#E27878")
33
+ (orange "#E2A478")
34
+ (green "#B4BE82")
35
+ (cyan "#89B8C2")
36
+ (blue "#84A0C6")
37
+ (purple "#A093C7")
38
+ (black "#0E0F14"))
39
+
40
+ (custom-theme-set-faces
41
+ 'iceberg
42
+
43
+ ;; Built-in
44
+ `(default ((t (:background ,background :foreground ,foreground))))
45
+ `(fringe ((t (:background ,current-line))))
46
+ `(minibuffer-prompt ((t (:foreground ,blue))))
47
+ `(menu ((t (:foreground ,foreground :background ,background))))
48
+ `(mode-line
49
+ ((t (:background ,current-line
50
+ :foreground ,foreground
51
+ :box (:line-width -1 :style released-button)))))
52
+ `(mode-line-inactive
53
+ ((t (:background ,current-line :foreground ,foreground))))
54
+ `(mode-line-buffer-id ((t (:foreground ,cyan :weight bold))))
55
+ `(region ((t (:background ,selection))))
56
+ `(highlight ((t (:background ,selection))))
57
+ `(success ((t (:foreground ,green :weight bold))))
58
+ `(warning ((t (:foreground ,red :weight bold))))
59
+
60
+ ;; Font-lock
61
+ `(font-lock-builtin-face ((t (:foreground ,foreground :weight bold))))
62
+ `(font-lock-comment-face ((t (:foreground ,comment))))
63
+ `(font-lock-comment-delimiter-face ((t :foreground ,comment)))
64
+ `(font-lock-constant-face ((t (:foreground ,purple))))
65
+ `(font-lock-doc-face ((t (:foreground ,comment))))
66
+ `(font-lock-doc-string-face ((t (:foreground ,comment))))
67
+ `(font-lock-function-name-face ((t (:foreground ,orange))))
68
+ `(font-lock-keyword-face ((t (:foreground ,blue))))
69
+ `(font-lock-preprocessor-face ((t (:foreground ,green))))
70
+ `(font-lock-string-face ((t (:foreground ,cyan))))
71
+ `(font-lock-type-face ((t (:foreground ,cyan))))
72
+ `(font-lock-variable-name-face ((t (:foreground ,purple))))
73
+ `(font-lock-warning-face ((t (:foreground ,red))))
74
+
75
+ ;; Everything else (ordered by alphabetically)
76
+
77
+ ;; diff
78
+ `(diff-added ((,class (:foreground ,green :background nil))
79
+ (t (:foreground ,green :background nil))))
80
+ `(diff-changed ((t (:foreground ,orange))))
81
+ `(diff-removed ((,class (:foreground ,red :background nil))
82
+ (t (:foreground ,red :background nil))))
83
+ `(diff-refine-added ((t (:inherit diff-added :weight bold))))
84
+ `(diff-refine-change ((t (:inherit diff-changed :weight bold))))
85
+ `(diff-refine-removed ((t (:inherit diff-removed :weight bold))))
86
+ `(diff-header ((,class (:background ,current-line))
87
+ (t (:background ,foreground :foreground ,background))))
88
+ `(diff-file-header
89
+ ((,class (:background ,current-line :foreground ,foreground :bold t))
90
+ (t (:background ,foreground :foreground ,background :bold t))))
91
+
92
+ ;; diff-hl
93
+ `(diff-hl-change ((,class (:foreground ,orange :background ,current-line))))
94
+ `(diff-hl-delete ((,class (:foreground ,red :background ,current-line))))
95
+ `(diff-hl-insert ((,class (:foreground ,green :background ,current-line))))
96
+ `(diff-hl-unknown ((,class (:foreground ,cyan :background ,current-line))))
97
+
98
+ ;; flycheck
99
+ `(flycheck-error
100
+ ((((supports :underline (:style wave)))
101
+ (:underline (:style wave :color ,red) :inherit unspecified))
102
+ (t (:foreground ,red :weight bold :underline t))))
103
+ `(flycheck-warning
104
+ ((((supports :underline (:style wave)))
105
+ (:underline (:style wave :color ,orange) :inherit unspecified))
106
+ (t (:foreground ,orange :weight bold :underline t))))
107
+ `(flycheck-info
108
+ ((((supports :underline (:style wave)))
109
+ (:underline (:style wave :color ,blue) :inherit unspecified))
110
+ (t (:foreground ,blue :weight bold :underline t))))
111
+ `(flycheck-fringe-error ((t (:foreground ,red :weight bold))))
112
+ `(flycheck-fringe-warning ((t (:foreground ,orange :weight bold))))
113
+ `(flycheck-fringe-info ((t (:foreground ,blue :weight bold))))
114
+
115
+ ;; hl-line-mode
116
+ `(hl-line ((t (:background ,current-line))))
117
+
118
+ ;; ido-mode
119
+ `(do-first-match ((t (:foreground ,blue :weight bold))))
120
+ `(ido-only-match ((t (:foreground ,green :weight bold))))
121
+ `(ido-subdir ((t (:foreground ,cyan))))
122
+
123
+ ;; isearch
124
+ `(isearch ((t (:foreground ,foreground :weight bold
125
+ :background ,selection))))
126
+ `(isearch-fail ((t (:foreground ,foreground :background ,red))))
127
+ `(lazy-highlight ((t (:foreground ,foreground :weight bold
128
+ :background ,current-line))))
129
+
130
+ ;; linum-mode
131
+ `(linum ((t (:foreground ,line-number-fg :background ,current-line))))
132
+
133
+ ;; org-mode
134
+ `(org-agenda-date-today
135
+ ((t (:foreground ,foreground :slant italic :weight bold))) t)
136
+ `(org-agenda-structure
137
+ ((t (:inherit font-lock-comment-face))))
138
+ `(org-archived ((t (:foreground ,foreground :weight bold))))
139
+ `(org-checkbox ((t (:background ,background :foreground ,foreground
140
+ :box (:line-width 1 :style released-button)))))
141
+ `(org-date ((t (:foreground ,purple))))
142
+ `(org-deadline-announce ((t (:foreground ,red))))
143
+ `(org-done ((t (:foreground ,green))))
144
+ `(org-formula ((t (:foreground ,orange))))
145
+ `(org-headline-done ((t (:foreground ,green))))
146
+ `(org-hide ((t (:foreground ,comment))))
147
+ `(org-level-1 ((t (:foreground ,blue))))
148
+ `(org-level-2 ((t (:foreground ,purple))))
149
+ `(org-level-3 ((t (:foreground ,cyan))))
150
+ `(org-level-4 ((t (:foreground ,green))))
151
+ `(org-level-5 ((t (:foreground ,red))))
152
+ `(org-level-6 ((t (:foreground ,orange))))
153
+ `(org-level-7 ((t (:foreground ,comment))))
154
+ `(org-level-8 ((t (:foreground ,foreground))))
155
+ `(org-link ((t (:foreground ,cyan))))
156
+ `(org-scheduled ((t (:foreground ,green))))
157
+ `(org-scheduled-previously ((t (:foreground ,red))))
158
+ `(org-scheduled-today ((t (:foreground ,blue))))
159
+ `(org-sexp-date ((t (:foreground ,blue :underline t))))
160
+ `(org-special-keyword ((t (:inherit font-lock-comment-face))))
161
+ `(org-table ((t (:foreground ,blue))))
162
+ `(org-tag ((t (:bold t :weight bold))))
163
+ `(org-time-grid ((t (:foreground ,blue))))
164
+ `(org-todo ((t (:bold t :foreground ,cyan :weight bold))))
165
+ `(org-upcoming-deadline ((t (:inherit font-lock-keyword-face))))
166
+ `(org-warning ((t (:bold t :foreground ,orange :weight bold :underline nil))))
167
+ `(org-column ((t (:background ,current-line))))
168
+ `(org-column-title ((t (:background ,background :underline t :weight bold))))
169
+ `(org-mode-line-clock-overrun ((t (:foreground ,background :background ,red))))
170
+ `(org-footnote ((t (:foreground ,cyan :underline t))))
171
+
172
+ ;; rainbow-delimiters
173
+ `(rainbow-delimiters-depth-1-face ((t (:foreground ,purple))))
174
+ `(rainbow-delimiters-depth-2-face ((t (:foreground ,blue))))
175
+ `(rainbow-delimiters-depth-3-face ((t (:foreground ,cyan))))
176
+ `(rainbow-delimiters-depth-4-face ((t (:foreground ,green))))
177
+ `(rainbow-delimiters-depth-5-face ((t (:foreground ,orange))))
178
+ `(rainbow-delimiters-depth-6-face ((t (:foreground ,red))))
179
+ `(rainbow-delimiters-depth-7-face ((t (:foreground ,comment))))
180
+ `(rainbow-delimiters-depth-8-face ((t (:foreground ,line-number-fg))))
181
+ `(rainbow-delimiters-depth-9-face ((t (:foreground ,foreground))))
182
+
183
+ ;; show-paren-mode
184
+ `(show-paren-match ((t (:background ,blue :foreground ,current-line))))
185
+ `(show-paren-mismatch ((t (:background ,orange :foreground ,current-line))))
186
+
187
+ )
188
+
189
+ (custom-theme-set-variables
190
+ 'iceberg
191
+ ;; TODO ANSI colors
192
+ ))
193
+
194
+ ;;;###autoload
195
+ (and load-file-name
196
+ (boundp 'custom-theme-load-path)
197
+ (add-to-list 'custom-theme-load-path
198
+ (file-name-as-directory
199
+ (file-name-directory load-file-name))))
200
+
201
+ (provide-theme 'iceberg)
202
+ ;;; iceberg-theme.el ends here
@@ -0,0 +1,133 @@
1
+ ;;; init-open-recentf.el --- Open recentf immediately after Emacs is started -*- coding: utf-8 ; lexical-binding: t -*-
2
+
3
+ ;; Copyright (C) 2015 USAMI Kenta
4
+
5
+ ;; Author: USAMI Kenta <tadsan@zonu.me>
6
+ ;; Created: 26 Oct 2015
7
+ ;; Version: 0.0.1
8
+ ;; Homepage: https://github.com/zonuexe/init-open-recentf.el
9
+ ;; Keywords: files recentf after-init-hook
10
+ ;; Package-Requires: ((emacs "24.4"))
11
+
12
+ ;; This file is NOT part of GNU Emacs.
13
+
14
+ ;; This program is free software; you can redistribute it and/or modify
15
+ ;; it under the terms of the GNU General Public License as published by
16
+ ;; the Free Software Foundation, either version 3 of the License, or
17
+ ;; (at your option) any later version.
18
+
19
+ ;; This program is distributed in the hope that it will be useful,
20
+ ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
21
+ ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
+ ;; GNU General Public License for more details.
23
+
24
+ ;; You should have received a copy of the GNU General Public License
25
+ ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
26
+
27
+ ;;; Commentary:
28
+ ;;
29
+ ;; Open recentf immediately after Emacs is started.
30
+ ;; Here are some example scenarios for when Emacs is started from the command line:
31
+ ;; - If files are opened (e.g. '$ emacs file1.txt'), nothing out of the ordinary occurs-- the file is opened.
32
+ ;; - However if a file is not indicated (e.g. '$ emacs '), recentf will be opened after emacs is initialized.
33
+ ;; This script uses only the inbuilt advice function for startup. It does not require or use any interactive function.
34
+ ;; (This approach is a dirty hack, but an alternative hook to accomplish the same thing does not exist.)
35
+ ;;
36
+ ;; Put the following into your .emacs file (~/.emacs.d/init.el)
37
+ ;;
38
+ ;; (init-open-recentf)
39
+ ;;
40
+ ;; `init-open-recentf' supports the following frameworks: helm, ido, anything (and the default Emacs setup without those frameworks).
41
+ ;; The package determines the frameworks from your environment, but you can also indicate it explicitly.
42
+ ;;
43
+ ;; (setq init-open-recentf-interface 'ido)
44
+ ;; (init-open-recentf)
45
+ ;;
46
+ ;; Another possible configuration is demonstrated below if you want to specify an arbitrary function.
47
+ ;;
48
+ ;; (setq init-open-recentf-function #'awesome-open-recentf)
49
+ ;; (init-open-recentf)
50
+ ;;
51
+
52
+ ;;; Code:
53
+ (require 'cl-lib)
54
+ (require 'recentf)
55
+
56
+ (defgroup init-open-recentf nil
57
+ "init-open-recentf"
58
+ :group 'initialization)
59
+
60
+ (defcustom init-open-recentf-function
61
+ nil
62
+ "Function to open recentf files (or other)."
63
+ :type '(function :tag "Invoke recentf (or other) function")
64
+ :group 'init-open-recentf)
65
+
66
+ (defcustom init-open-recentf-interface
67
+ nil
68
+ "Interface to open recentf files."
69
+ :type '(radio (const :tag "Use ido interface" 'ido)
70
+ (const :tag "Use helm interface" 'helm)
71
+ (const :tag "Use anything interface" 'anything)
72
+ (const :tag "Use Ivy/counsel interface" 'counsel)
73
+ (const :tag "Use Emacs default (recentf-open-files)" 'default)
74
+ (const :tag "Select automatically" 'nil))
75
+ :group 'init-open-recentf)
76
+
77
+ (defvar init-open-recentf-before-hook nil
78
+ "Run hooks before `init-open-recentf-open'.")
79
+
80
+ (defvar init-open-recentf-after-hook nil
81
+ "Run hooks after `init-open-recentf-open'.")
82
+
83
+ (defun init-open-recentf-buffer-files ()
84
+ "Return list of opened file names."
85
+ (let ((found-files '()))
86
+ (dolist (buffer (buffer-list))
87
+ (with-current-buffer buffer
88
+ (when buffer-file-name
89
+ (cl-pushnew buffer-file-name found-files))))
90
+ found-files))
91
+
92
+ (defun init-open-recentf-interface ()
93
+ ""
94
+ (or init-open-recentf-interface
95
+ (cond
96
+ ((and (boundp 'helm-mode) helm-mode) 'helm)
97
+ ((and (boundp 'ido-mode) ido-mode) 'ido)
98
+ ((and (boundp 'counsel-mode) counsel-mode) 'counsel)
99
+ ((fboundp 'anything-recentf) 'anything)
100
+ (:else 'default))))
101
+
102
+ (defun init-open-recentf-dwim ()
103
+ "Open recent file command you want (Do What I Mean)."
104
+ (if init-open-recentf-function
105
+ (call-interactively init-open-recentf-function)
106
+ (cl-case (init-open-recentf-interface)
107
+ ((helm) (helm-recentf))
108
+ ((ido) (find-file (ido-completing-read "Find recent file: " recentf-list)))
109
+ ((counsel) (counsel-recentf))
110
+ ((anything) (anything-recentf))
111
+ ((default) (recentf-open-files)))))
112
+
113
+ (defun init-open-recentf-open (&rest dummy-args)
114
+ "If files are opened, does nothing. Open recentf otherwise.
115
+ `DUMMY-ARGS' is ignored."
116
+ (prog2
117
+ (run-hooks 'init-open-recentf-before-hook)
118
+ (cond
119
+ ((init-open-recentf-buffer-files) t)
120
+ ((recentf-enabled-p) (init-open-recentf-dwim))
121
+ (:else
122
+ (error "`recentf-mode' is not enabled")))
123
+ (run-hooks 'init-open-recentf-after-hook)
124
+ (advice-remove 'display-startup-screen #'init-open-recentf-open)))
125
+
126
+ ;;;###autoload
127
+ (defun init-open-recentf ()
128
+ "Set 'after-init-hook ."
129
+ (advice-add 'command-line-1 :after #'init-open-recentf-open)
130
+ t)
131
+
132
+ (provide 'init-open-recentf)
133
+ ;;; init-open-recentf.el ends here
@@ -0,0 +1,229 @@
1
+ ;; るびきちのyaml-modeの説明従って..
2
+ ;; http://emacs.rubikitch.com/yaml-mode/
3
+ ;; 学内からはsetproxyを忘れぬように.
4
+ (require 'package)
5
+ (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)
6
+ (add-to-list 'package-archives '("marmalade" . "http://maramalae-repo.org/packages/"))
7
+ (add-to-list 'package-archives '("org" . "http:/orgmode.org/elpa/") t)
8
+ (add-to-list 'package-archives '("org-plus-contrib" . "https:/orgmode.org/elpa/contrib") t)
9
+
10
+ (fset 'package-desc-vers 'package--ac-desc-version)
11
+ (package-initialize)
12
+
13
+ ;; '(("gnu" . "http://elpa.gnu.org/packages/")
14
+
15
+ ;; るびきちのemacs lispテクニックバイブルに従ってdefaultの色つけを活性化
16
+ ;; (require 'generic-x)
17
+ ;; tabの自動生成がうっとおしいからやめた
18
+
19
+ ;; elファイルの置き場所を設定
20
+ (setq load-path (cons "~/ruby_learner/workshop/emacs.d/inits" load-path))
21
+ (setq load-path (cons "~/ruby_learner/workshop/emacs.d/ruby-mode" load-path))
22
+ (setq load-path (cons "~/ruby_learner/workshop/emacs.d/processing-mode" load-path))
23
+ (setq load-path (cons "~/ruby_learner/workshop/emacs.d/haml-mode-master" load-path))
24
+ (setq load-path (cons "~/ruby_learner/workshop/emacs.d/org-mode" load-path))
25
+ (setq load-path (cons "~/ruby_learner/workshop/emacs.d/themes" load-path))
26
+ ;;setting_theme
27
+ (add-to-list 'custom-theme-load-path "~/ruby_learner/workshop/emacs.d/themes")
28
+ (setq custom-theme-directory "~/ruby_learner/workshop/emacs.d/themes")
29
+ ;;(load-theme 'iceberg t)
30
+ ;;(load-theme 'dracula t)
31
+ ;;(load-theme 'my-misterioso t)
32
+ (load-theme 'my-wombat t)
33
+
34
+ ;; 起動時にスタートアップ画面を表示しない
35
+ (setq inhibit-startup-message t)
36
+ ;; 1 行ずつスムーズにスクロールする
37
+ (setq scroll-step 1)
38
+ ;; 行数を記載する
39
+ (global-linum-mode t)
40
+ (setq linum-format "%d")
41
+ (set-face-attribute 'linum nil
42
+ :foreground "#999999"
43
+ :background "#000000"
44
+ :height 0.9)
45
+ ;; 括弧補完
46
+ ;;(electric-pair-mode 1)
47
+ ;; 行数を指定してジャンプする (goto-line)
48
+ ;;(global-set-key "\C-l" 'goto-line)
49
+ ;; 言語を日本語に設定
50
+ (set-language-environment 'Japanese)
51
+ ;; 極力UTF-8とする
52
+ (prefer-coding-system 'utf-8)
53
+
54
+ ;; エンコード方式をUTF-8に
55
+ (set-default-coding-systems 'utf-8)
56
+
57
+ (setq coding-system-for-read 'utf-8)
58
+ (setq coding-system-for-write 'utf-8)
59
+ (require 'ruby-mode)
60
+ (defun ruby-mode-set-encoding () nil)
61
+ ;; C-zでUndo
62
+ ;;(global-set-key "\C-z" 'undo)
63
+ ;; 行番号をデフォルトで表示
64
+ ;;(require 'line-num)
65
+ ;;(global-linum-mode 1)
66
+ ;; 対応する括弧を光らせる
67
+ (show-paren-mode 1)
68
+ ;; 最近使ったファイルの一覧
69
+ (recentf-mode 1)
70
+ ;; タイトルバーに開いているバッファのパスを表示
71
+ (setq frame-title-format (format "%%f - Emacs@%s" (system-name)))
72
+ ;; 現在行を目立たせる
73
+ ;; (global-hl-line-mode)
74
+ ;; バックアップファイルを作らない
75
+ ;; (setq backup-inhibited t)
76
+ ;; モードラインに時間を表示する
77
+ (display-time)
78
+ ;; 現在の関数名をモードラインに表示
79
+ (which-function-mode 1)
80
+ ;; 選択部分のインデント
81
+ (global-set-key "\C-x\C-i" 'indent-region)
82
+
83
+ (defun linux-c-mode ()
84
+ "C mode with adjusted defaults for use with the Linux kernel."
85
+ (interactive)
86
+ (c-mode)
87
+ (setq c-indent-level 8)
88
+ (setq c-brace-imaginary-offset 0)
89
+ (setq c-brace-offset -8)
90
+ (setq c-argdecl-indent 8)
91
+ (setq c-label-offset -8)
92
+ (setq c-continued-statement-offset 8)
93
+ (setq indent-tabs-mode nil)
94
+ (setq tab-width 8)
95
+ )
96
+
97
+ ;; ======================================================================
98
+ ;; Ruby mode
99
+ ;; ======================================================================
100
+ (add-to-list 'auto-mode-alist '("\\.rake$" . ruby-mode))
101
+ (add-to-list 'auto-mode-alist '("Rakefile$" . ruby-mode))
102
+ (add-to-list 'auto-mode-alist '("\\.gemspec$" . ruby-mode))
103
+ (add-to-list 'auto-mode-alist '("\\.ru$" . ruby-mode))
104
+ (add-to-list 'auto-mode-alist '("Gemfile$" . ruby-mode))
105
+ (add-to-list 'auto-mode-alist '("Guardfile$" . ruby-mode))
106
+ (add-to-list 'auto-mode-alist '("Guardfile$" . ruby-mode))
107
+
108
+ (autoload 'ruby-mode "ruby-mode"
109
+ "Mode for editing ruby source files" t)
110
+ (setq auto-mode-alist (append '(("\\.rb$" . ruby-mode)) auto-mode-alist))
111
+ (setq auto-mode-alist (append '(("\\.ru$" . ruby-mode)) auto-mode-alist))
112
+ (setq auto-mode-alist (append '(("\\.ru$" . ruby-mode)) auto-mode-alist))
113
+ (setq interpreter-mode-alist (append '(("ruby" . ruby-mode))
114
+ interpreter-mode-alist))
115
+ (autoload 'run-ruby "inf-ruby"
116
+ "Run an inferior Ruby process")
117
+ (autoload 'inf-ruby-keys "inf-ruby"
118
+ "Set local key defs for inf-ruby in ruby-mode")
119
+ (add-hook 'ruby-mode-hook
120
+ '(lambda ()
121
+ (inf-ruby-keys)))
122
+ (global-font-lock-mode 1)
123
+
124
+ ;;;ruby-electric.el --- electric editing commands for ruby files
125
+ ;;(require 'ruby-electric)
126
+ ;;(add-hook 'ruby-mode-hook '(lambda () (ruby-electric-mode t)))
127
+
128
+ (setq ruby-indent-level 2)
129
+ (setq ruby-indent-tabs-mode nil)
130
+
131
+ ;; ruby code folding from https://coderwall.com/p/u-l0ra/ruby-code-folding-in-emacs
132
+ (add-hook 'ruby-mode-hook
133
+ (lambda () (hs-minor-mode)))
134
+
135
+ (eval-after-load "hideshow"
136
+ '(add-to-list 'hs-special-modes-alist
137
+ `(ruby-mode
138
+ ,(rx (or "def" "class" "module" "do" "{" "[")) ; Block start
139
+ ,(rx (or "}" "]" "end")) ; Block end
140
+ ,(rx (or "#" "=begin")) ; Comment start
141
+ ruby-forward-sexp nil)))
142
+
143
+ (global-set-key (kbd "C-c h") 'hs-hide-block)
144
+ (global-set-key (kbd "C-c s") 'hs-show-block)
145
+
146
+ ;; ======================================================================
147
+ ;; Processing mode
148
+ ;; ======================================================================
149
+ ;;(add-to-list 'load-path "/Users/bob/ruby-processing/processing2-emacs")
150
+ (autoload 'processing-mode "processing-mode" "Processing mode" t)
151
+ (add-to-list 'auto-mode-alist '("\\.pde$" . processing-mode))
152
+ (setq processing-indent-level 2)
153
+
154
+ (setq processing-location "/Users/bob/bin/processing-java")
155
+ (setq processing-application-dir "/Applications/Processing.app")
156
+ (setq processing-sketch-dir "~/Documents/Processing")
157
+
158
+ (setq-default indent-tabs-mode nil)
159
+ (setq tab-width 2)
160
+
161
+ ;; =======================
162
+ ;; haml mode
163
+ ;; =======================
164
+ ;;``` lisp
165
+ (require 'haml-mode)
166
+ ;;```
167
+ (autoload 'haml-mode "haml-mode" "haml mode" t)
168
+ (add-to-list 'auto-mode-alist '("\\.haml$" . haml-mode))
169
+ (setq-default indent-tabs-mode t)
170
+ (setq tab-width 2)
171
+
172
+ ;; =======================
173
+ ;; yaml mode
174
+ ;; =======================
175
+ (require 'yaml-mode)
176
+ (add-to-list 'auto-mode-alist '("\\.ya?ml$" . yaml-mode))
177
+ (define-key yaml-mode-map "\C-m" 'newline-and-indent)
178
+
179
+ ;; =======================
180
+ ;; org mode
181
+ ;; =======================
182
+ (require 'ox-latex)
183
+ ;; (require 'ox-bibtex) こいつは無くなったんかな.イランで.
184
+
185
+ ;; org-modeで行末で折り返しをする
186
+ (setq org-startup-truncated nil)
187
+ (unless (boundp 'org-latex-classes)
188
+ (setq org-latex-classes nil))
189
+ (add-to-list 'org-latex-classes
190
+ '("article"
191
+ "
192
+ \\documentclass{jsarticle}
193
+ \\usepackage[dvipdfmx]{graphicx}
194
+ \\usepackage[utf8]{inputenc}
195
+ \\usepackage[T1]{fontenc}
196
+ "
197
+ ("\\section{%s}" . "\\section*{%s}")
198
+ ("\\subsection{%s}" . "\\subsection*{%s}")
199
+ ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
200
+ ("\\paragraph{%s}" . "\\paragraph*{%s}")
201
+ ("\\subparagraph{%s}" . "\\subparagraph*{%s}")
202
+ ))
203
+
204
+ ;;; LaTeX 形式のファイル PDF に変換するためのコマンド
205
+ (setq org-latex-pdf-process
206
+ '("platex %f"
207
+ "bibtex %b"
208
+ "platex %f"
209
+ "platex %f"
210
+ "dvipdfmx %b.dvi"))
211
+
212
+ (custom-set-variables
213
+ ;; custom-set-variables was added by Custom.
214
+ ;; If you edit it by hand, you could mess it up, so be careful.
215
+ ;; Your init file should contain only one such instance.
216
+ ;; If there is more than one, they won't work right.
217
+ '(org-latex-pdf-process
218
+ (quote
219
+ ("pdflatex -interaction nonstopmode -output-directory %o %f"
220
+ "bibtex %o"
221
+ "pdflatex -interaction nonstopmode -output-directory %o %f"
222
+ "pdflatex -interaction nonstopmode -output-directory %o %f")))
223
+ '(package-selected-packages (quote (haml-mode yaml-mode))))
224
+ (custom-set-faces
225
+ ;; custom-set-faces was added by Custom.
226
+ ;; If you edit it by hand, you could mess it up, so be careful.
227
+ ;; Your init file should contain only one such instance.
228
+ ;; If there is more than one, they won't work right.
229
+ )