my_help 0.3.6 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -0
- data/Rakefile +28 -0
- data/exe/e_h +1 -1
- data/exe/emacs_help +1 -1
- data/exe/git_help +1 -1
- data/hikis/README_ja.hiki +14 -0
- data/init.el +131 -0
- data/lib/daddygongon/{emacs_help → emacs_help.yml} +0 -0
- data/lib/daddygongon/{git_help → git_help.yml} +0 -0
- data/lib/daddygongon/{template_help → template_help.yml} +0 -0
- data/lib/daddygongon/todo_help.yml +68 -0
- data/lib/my_help/version.rb +1 -1
- data/lib/my_help.rb +6 -4
- data/lib/specific_help.rb +1 -0
- data/my_help.wiki/Home.md +14 -0
- data/my_help.wiki/README_ja.md +14 -0
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30e9fbb25c42b30265ba6c9fa88f47db9ac984a7
|
4
|
+
data.tar.gz: db31a83a6d0fe0a631ae2f9ca80f02dbe2a654bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6326c44722969f0cbdf6969e044ca7603af7f46d56d91bedc1e479d240be542bc833e91299618a1101f96220e7045528f4f7fd9d3332498d316254044e10fe1a
|
7
|
+
data.tar.gz: be884e7ee9e5c6f15e7f89a4b7312e5ebcd3c66270d5630519974246926c0c9df8180d90ee61c51a11efeee5488196b812743d7bc18b388c12ea053a728de2e3
|
data/README.md
CHANGED
@@ -314,3 +314,17 @@ Removing t_h
|
|
314
314
|
Removing template_help
|
315
315
|
Successfully uninstalled my_help-0.3.2
|
316
316
|
```
|
317
|
+
|
318
|
+
# Rakefile
|
319
|
+
幾つかの環境設定用のtoolがRakefileに用意されている.
|
320
|
+
```
|
321
|
+
rake add_yml # add .yml mode on ~/.emacs.d/init.el
|
322
|
+
rake clean_exe # clean up exe dir
|
323
|
+
rake to_yml # add .yml on all help files
|
324
|
+
```
|
325
|
+
add_yml, to_ymlは3.6から4.0へ移行する時に行ったhelpファイルの拡張子変更,
|
326
|
+
3.6では拡張子なしで4.0では'.yml',に対する対応のために用意したツール.
|
327
|
+
add_ymlは~/.my_help/*_helpファイルを全て~/.my_help/*_help.ymlに変える.
|
328
|
+
to_ymlは~/.emacs.d/init.elに'.yml'の設定が書き込まれていない時,ruby-modeでemacsを起動するsciptを埋め込む.
|
329
|
+
|
330
|
+
clean_exeは,githubへuploadする時に,開発者個人のhelpファイルをrmして整頓する.
|
data/Rakefile
CHANGED
@@ -9,6 +9,34 @@ task :default do
|
|
9
9
|
system 'rake -T'
|
10
10
|
end
|
11
11
|
|
12
|
+
desc "add .yml mode on ~/.emacs.d/init.el"
|
13
|
+
task :add_yml do
|
14
|
+
adds = <<EOS
|
15
|
+
;; =================
|
16
|
+
;; .yml auto ruby-mode
|
17
|
+
;; =================
|
18
|
+
(add-to-list 'auto-mode-alist '("\\.yml$" . ruby-mode))
|
19
|
+
EOS
|
20
|
+
print adds
|
21
|
+
p Dir.chdir(File.join(ENV['HOME'],'.emacs.d'))
|
22
|
+
File.open('init.el','a+'){|file|
|
23
|
+
cont=file.read
|
24
|
+
cont.include?('.yml') ? break : file.write(adds)
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
desc "add .yml on all help files"
|
29
|
+
task :to_yml do
|
30
|
+
p Dir.chdir(File.join(ENV['HOME'],'.my_help'))
|
31
|
+
Dir.entries('.').each{|file|
|
32
|
+
next if file == '.' or file=='..'
|
33
|
+
next if file[0]=='#' or file[-1]=='~'
|
34
|
+
next unless File.extname(file)==''
|
35
|
+
#FileUtils::DryRun.mv(file, file+'.yml',:verbose=>true)
|
36
|
+
FileUtils.mv(file, file+'.yml',:verbose=>true)
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
12
40
|
desc "make documents by yard"
|
13
41
|
task :yard => [:hiki2md] do
|
14
42
|
YARD::Rake::YardocTask.new
|
data/exe/e_h
CHANGED
data/exe/emacs_help
CHANGED
data/exe/git_help
CHANGED
data/hikis/README_ja.hiki
CHANGED
@@ -300,3 +300,17 @@ Removing t_h
|
|
300
300
|
Removing template_help
|
301
301
|
Successfully uninstalled my_help-0.3.2
|
302
302
|
>>>
|
303
|
+
|
304
|
+
!Rakefile
|
305
|
+
幾つかの環境設定用のtoolがRakefileに用意されている.
|
306
|
+
<<<
|
307
|
+
rake add_yml # add .yml mode on ~/.emacs.d/init.el
|
308
|
+
rake clean_exe # clean up exe dir
|
309
|
+
rake to_yml # add .yml on all help files
|
310
|
+
>>>
|
311
|
+
add_yml, to_ymlは3.6から4.0へ移行する時に行ったhelpファイルの拡張子変更,
|
312
|
+
3.6では拡張子なしで4.0では'.yml',に対する対応のために用意したツール.
|
313
|
+
add_ymlは~/.my_help/*_helpファイルを全て~/.my_help/*_help.ymlに変える.
|
314
|
+
to_ymlは~/.emacs.d/init.elに'.yml'の設定が書き込まれていない時,ruby-modeでemacsを起動するsciptを埋め込む.
|
315
|
+
|
316
|
+
clean_exeは,githubへuploadする時に,開発者個人のexeファイルをrmして整頓する.
|
data/init.el
ADDED
@@ -0,0 +1,131 @@
|
|
1
|
+
;; るびきちのemacs lispテクニックバイブルに従ってdefaultの色つけを活性化
|
2
|
+
;; (require 'generic-x)
|
3
|
+
;; tabの自動生成がうっとおしいからやめた
|
4
|
+
|
5
|
+
;; elファイルの置き場所を設定
|
6
|
+
(setq load-path (cons "~/.emacs.d/inits" load-path))
|
7
|
+
(setq load-path (cons "~/.emacs.d/ruby-mode" load-path))
|
8
|
+
(setq load-path (cons "~/.emacs.d/processing-mode" load-path))
|
9
|
+
(setq load-path (cons "~/.emacs.d/haml-mode-master" load-path))
|
10
|
+
;; 起動時にスタートアップ画面を表示しない
|
11
|
+
(setq inhibit-startup-message t)
|
12
|
+
;; 1 行ずつスムーズにスクロールする
|
13
|
+
(setq scroll-step 1)
|
14
|
+
;; 行数を指定してジャンプする (goto-line)
|
15
|
+
;;(global-set-key "\C-l" 'goto-line)
|
16
|
+
;; 言語を日本語に設定
|
17
|
+
(set-language-environment 'Japanese)
|
18
|
+
;; 極力UTF-8とする
|
19
|
+
(prefer-coding-system 'utf-8)
|
20
|
+
|
21
|
+
;; エンコード方式をUTF-8に
|
22
|
+
(set-default-coding-systems 'utf-8)
|
23
|
+
;; C-zでUndo
|
24
|
+
;;(global-set-key "\C-z" 'undo)
|
25
|
+
;; 行番号をデフォルトで表示
|
26
|
+
;;(require 'line-num)
|
27
|
+
;;(global-linum-mode 1)
|
28
|
+
;; 対応する括弧を光らせる
|
29
|
+
(show-paren-mode 1)
|
30
|
+
;; 最近使ったファイルの一覧
|
31
|
+
(recentf-mode 1)
|
32
|
+
;; タイトルバーに開いているバッファのパスを表示
|
33
|
+
(setq frame-title-format (format "%%f - Emacs@%s" (system-name)))
|
34
|
+
;; 現在行を目立たせる
|
35
|
+
;; (global-hl-line-mode)
|
36
|
+
;; バックアップファイルを作らない
|
37
|
+
;; (setq backup-inhibited t)
|
38
|
+
;; モードラインに時間を表示する
|
39
|
+
(display-time)
|
40
|
+
;; 現在の関数名をモードラインに表示
|
41
|
+
(which-function-mode 1)
|
42
|
+
;; 選択部分のインデント
|
43
|
+
(global-set-key "\C-x\C-i" 'indent-region)
|
44
|
+
|
45
|
+
(defun linux-c-mode ()
|
46
|
+
"C mode with adjusted defaults for use with the Linux kernel."
|
47
|
+
(interactive)
|
48
|
+
(c-mode)
|
49
|
+
(setq c-indent-level 8)
|
50
|
+
(setq c-brace-imaginary-offset 0)
|
51
|
+
(setq c-brace-offset -8)
|
52
|
+
(setq c-argdecl-indent 8)
|
53
|
+
(setq c-label-offset -8)
|
54
|
+
(setq c-continued-statement-offset 8)
|
55
|
+
(setq indent-tabs-mode nil)
|
56
|
+
(setq tab-width 8)
|
57
|
+
)
|
58
|
+
|
59
|
+
;; ======================================================================
|
60
|
+
;; Ruby mode
|
61
|
+
;; ======================================================================
|
62
|
+
(add-to-list 'auto-mode-alist '("\\.rake$" . ruby-mode))
|
63
|
+
(add-to-list 'auto-mode-alist '("Rakefile$" . ruby-mode))
|
64
|
+
(add-to-list 'auto-mode-alist '("\\.gemspec$" . ruby-mode))
|
65
|
+
(add-to-list 'auto-mode-alist '("\\.ru$" . ruby-mode))
|
66
|
+
(add-to-list 'auto-mode-alist '("\\.yaml$" . ruby-mode))
|
67
|
+
(add-to-list 'auto-mode-alist '("\\.yml$" . ruby-mode))
|
68
|
+
(add-to-list 'auto-mode-alist '("Gemfile$" . ruby-mode))
|
69
|
+
(add-to-list 'auto-mode-alist '("Guardfile$" . ruby-mode))
|
70
|
+
(add-to-list 'auto-mode-alist '("Guardfile$" . ruby-mode))
|
71
|
+
|
72
|
+
(autoload 'ruby-mode "ruby-mode"
|
73
|
+
"Mode for editing ruby source files" t)
|
74
|
+
(setq auto-mode-alist (append '(("\\.rb$" . ruby-mode)) auto-mode-alist))
|
75
|
+
(setq auto-mode-alist (append '(("\\.ru$" . ruby-mode)) auto-mode-alist))
|
76
|
+
(setq auto-mode-alist (append '(("\\.ru$" . ruby-mode)) auto-mode-alist))
|
77
|
+
(setq interpreter-mode-alist (append '(("ruby" . ruby-mode))
|
78
|
+
interpreter-mode-alist))
|
79
|
+
(autoload 'run-ruby "inf-ruby"
|
80
|
+
"Run an inferior Ruby process")
|
81
|
+
(autoload 'inf-ruby-keys "inf-ruby"
|
82
|
+
"Set local key defs for inf-ruby in ruby-mode")
|
83
|
+
(add-hook 'ruby-mode-hook
|
84
|
+
'(lambda ()
|
85
|
+
(inf-ruby-keys)))
|
86
|
+
(global-font-lock-mode 1)
|
87
|
+
|
88
|
+
;;;ruby-electric.el --- electric editing commands for ruby files
|
89
|
+
;;(require 'ruby-electric)
|
90
|
+
;;(add-hook 'ruby-mode-hook '(lambda () (ruby-electric-mode t)))
|
91
|
+
|
92
|
+
(setq ruby-indent-level 2)
|
93
|
+
(setq ruby-indent-tabs-mode nil)
|
94
|
+
|
95
|
+
;; ======================================================================
|
96
|
+
;; Processing mode
|
97
|
+
;; ======================================================================
|
98
|
+
;;(add-to-list 'load-path "/Users/bob/ruby-processing/processing2-emacs")
|
99
|
+
(autoload 'processing-mode "processing-mode" "Processing mode" t)
|
100
|
+
(add-to-list 'auto-mode-alist '("\\.pde$" . processing-mode))
|
101
|
+
(setq processing-indent-level 2)
|
102
|
+
|
103
|
+
(setq processing-location "/Users/bob/bin/processing-java")
|
104
|
+
(setq processing-application-dir "/Applications/Processing.app")
|
105
|
+
(setq processing-sketch-dir "~/Documents/Processing")
|
106
|
+
|
107
|
+
(setq-default indent-tabs-mode nil)
|
108
|
+
(setq tab-width 2)
|
109
|
+
|
110
|
+
;; =======================
|
111
|
+
;; haml mode
|
112
|
+
;; =======================
|
113
|
+
;;``` lisp
|
114
|
+
(require 'haml-mode)
|
115
|
+
;;```
|
116
|
+
(autoload 'haml-mode "haml-mode" "haml mode" t)
|
117
|
+
(add-to-list 'auto-mode-alist '("\\.haml$" . haml-mode))
|
118
|
+
(setq-default indent-tabs-mode t)
|
119
|
+
(setq tab-width 2)
|
120
|
+
|
121
|
+
|
122
|
+
;; =========
|
123
|
+
;; hiki mode
|
124
|
+
;; =========
|
125
|
+
(setq load-path (cons "/Users/bob/.emacs.d/hiki-mode" load-path))
|
126
|
+
(require 'hiki-mode)
|
127
|
+
;;(autoload 'hiki-edit "hiki-mode" nil t)
|
128
|
+
(setq-default indent-tabs-mode nil)
|
129
|
+
(add-to-list 'auto-mode-alist '("\.hiki$" . hiki-mode))
|
130
|
+
|
131
|
+
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
---
|
3
|
+
#start header, which appears every time.
|
4
|
+
:head: #never change
|
5
|
+
- todoを作るhelp
|
6
|
+
:license:
|
7
|
+
- " cc by Shigeto R. Nishitani, 2016"
|
8
|
+
|
9
|
+
:install: #text here too
|
10
|
+
:opts:
|
11
|
+
:short: -i
|
12
|
+
:long: --install
|
13
|
+
:desc: "my_helpのinstall"
|
14
|
+
:title: "my_helpのinstall"
|
15
|
+
:cont:
|
16
|
+
- "[sudo] gem uninstall my_help"
|
17
|
+
- "自分[hogehoge]のgithubにある古いmy_helpをdelete"
|
18
|
+
- "Fork from https://github.com/daddygongon/my_help"
|
19
|
+
- "git clone git@github.com:[hogehoge]/my_help.git"
|
20
|
+
- "cd my_help"
|
21
|
+
- "[sudo] bundle exec exe/my_help -c"
|
22
|
+
- "[sudo] bundle exec exe/my_help -m"
|
23
|
+
- "新しいterminalを開ける"
|
24
|
+
- "my_help -l"
|
25
|
+
|
26
|
+
:restart: #text here too
|
27
|
+
:opts:
|
28
|
+
:short: -r
|
29
|
+
:long: --restart
|
30
|
+
:desc: 新しいhelpをmake
|
31
|
+
:title: "my_helpのinstall"
|
32
|
+
:cont:
|
33
|
+
- "[sudo] gem uninstall my_help"
|
34
|
+
- "cd my_help"
|
35
|
+
- "[sudo] bundle exec exe/my_help -c"
|
36
|
+
- "[sudo] bundle exec exe/my_help -m"
|
37
|
+
- "could not find expected ':' while scanning a ...がでたら"
|
38
|
+
- "rm ~/.my_help/template_helpを試す"
|
39
|
+
- "あるいはemacs ~/.my_help/template_helpでyamlを修正"
|
40
|
+
|
41
|
+
:make: #text here too
|
42
|
+
:opts:
|
43
|
+
:short: -m
|
44
|
+
:long: --make
|
45
|
+
:desc: 新しいhelpをmake
|
46
|
+
:title: 新しいhelpをmake
|
47
|
+
:cont:
|
48
|
+
- "cd my_help"
|
49
|
+
- "bundle exec exe/my_help -i ruby_help"
|
50
|
+
- "bundle exec exe/my_help -e ruby_help"
|
51
|
+
- "[sudo] bundle exec exe/my_help -m"
|
52
|
+
|
53
|
+
:todo2hiki:
|
54
|
+
:opts:
|
55
|
+
:short: -t
|
56
|
+
:long: --todo
|
57
|
+
:desc: todoの内容をhikiに移す
|
58
|
+
:title: todoの内容をhikiに移す
|
59
|
+
:cont:
|
60
|
+
- hikiにlogin
|
61
|
+
- Seminar2016fを編集
|
62
|
+
- "*[[seminar_2016_11_25]]を入力"
|
63
|
+
- そこのlinkを選ぶ
|
64
|
+
- "{{toc}} {{bbs}を入力して保存"
|
65
|
+
- "todo_help --to_hiki"
|
66
|
+
- weeklyをcopy
|
67
|
+
- pasteしていく
|
68
|
+
|
data/lib/my_help/version.rb
CHANGED
data/lib/my_help.rb
CHANGED
@@ -23,7 +23,7 @@ module MyHelp
|
|
23
23
|
return if File::exists?(@local_help_dir)
|
24
24
|
FileUtils.mkdir_p(@local_help_dir, :verbose=>true)
|
25
25
|
Dir.entries(@default_help_dir).each{|file|
|
26
|
-
next if file=='template_help'
|
26
|
+
next if file=='template_help.yml'
|
27
27
|
file_path=File.join(@local_help_dir,file)
|
28
28
|
next if File::exists?(file_path)
|
29
29
|
FileUtils.cp((File.join(@default_help_dir,file)),@local_help_dir,:verbose=>true)
|
@@ -97,6 +97,7 @@ module MyHelp
|
|
97
97
|
exe_cont="#!/usr/bin/env ruby\nrequire 'specific_help'\n"
|
98
98
|
exe_cont << "help_file = File.join(ENV['HOME'],'.my_help','#{file}')\n"
|
99
99
|
exe_cont << "SpecificHelp::Command.run(help_file, ARGV)\n"
|
100
|
+
file = File.basename(file,'.yml')
|
100
101
|
[file, short_name(file)].each{|name|
|
101
102
|
p target=File.join('exe',name)
|
102
103
|
File.open(target,'w'){|file| file.print exe_cont}
|
@@ -108,8 +109,8 @@ module MyHelp
|
|
108
109
|
|
109
110
|
def clean_exe
|
110
111
|
local_help_entries.each{|file|
|
111
|
-
next if
|
112
|
-
|
112
|
+
next if ['emacs_help','e_h','todo_help','git_help'].include?(file)
|
113
|
+
file = File.basename(file,'.yml')
|
113
114
|
[file, short_name(file)].each{|name|
|
114
115
|
p target=File.join('exe',name)
|
115
116
|
FileUtils::Verbose.rm(target)
|
@@ -123,7 +124,7 @@ module MyHelp
|
|
123
124
|
puts "File exists. rm it first to initialize it."
|
124
125
|
exit
|
125
126
|
end
|
126
|
-
p template = File.join(@default_help_dir,'template_help')
|
127
|
+
p template = File.join(@default_help_dir,'template_help.yml')
|
127
128
|
FileUtils::Verbose.cp(template,target_help)
|
128
129
|
end
|
129
130
|
|
@@ -147,6 +148,7 @@ module MyHelp
|
|
147
148
|
local_help_entries.each{|file|
|
148
149
|
file_path=File.join(@local_help_dir,file)
|
149
150
|
help = YAML.load(File.read(file_path))
|
151
|
+
file = File.basename(file,'.yml')
|
150
152
|
print " #{file}\t:#{help[:head][0]}\n"
|
151
153
|
}
|
152
154
|
end
|
data/lib/specific_help.rb
CHANGED
data/my_help.wiki/Home.md
CHANGED
@@ -314,3 +314,17 @@ Removing t_h
|
|
314
314
|
Removing template_help
|
315
315
|
Successfully uninstalled my_help-0.3.2
|
316
316
|
```
|
317
|
+
|
318
|
+
# Rakefile
|
319
|
+
幾つかの環境設定用のtoolがRakefileに用意されている.
|
320
|
+
```
|
321
|
+
rake add_yml # add .yml mode on ~/.emacs.d/init.el
|
322
|
+
rake clean_exe # clean up exe dir
|
323
|
+
rake to_yml # add .yml on all help files
|
324
|
+
```
|
325
|
+
add_yml, to_ymlは3.6から4.0へ移行する時に行ったhelpファイルの拡張子変更,
|
326
|
+
3.6では拡張子なしで4.0では'.yml',に対する対応のために用意したツール.
|
327
|
+
add_ymlは~/.my_help/*_helpファイルを全て~/.my_help/*_help.ymlに変える.
|
328
|
+
to_ymlは~/.emacs.d/init.elに'.yml'の設定が書き込まれていない時,ruby-modeでemacsを起動するsciptを埋め込む.
|
329
|
+
|
330
|
+
clean_exeは,githubへuploadする時に,開発者個人のhelpファイルをrmして整頓する.
|
data/my_help.wiki/README_ja.md
CHANGED
@@ -314,3 +314,17 @@ Removing t_h
|
|
314
314
|
Removing template_help
|
315
315
|
Successfully uninstalled my_help-0.3.2
|
316
316
|
```
|
317
|
+
|
318
|
+
# Rakefile
|
319
|
+
幾つかの環境設定用のtoolがRakefileに用意されている.
|
320
|
+
```
|
321
|
+
rake add_yml # add .yml mode on ~/.emacs.d/init.el
|
322
|
+
rake clean_exe # clean up exe dir
|
323
|
+
rake to_yml # add .yml on all help files
|
324
|
+
```
|
325
|
+
add_yml, to_ymlは3.6から4.0へ移行する時に行ったhelpファイルの拡張子変更,
|
326
|
+
3.6では拡張子なしで4.0では'.yml',に対する対応のために用意したツール.
|
327
|
+
add_ymlは~/.my_help/*_helpファイルを全て~/.my_help/*_help.ymlに変える.
|
328
|
+
to_ymlは~/.emacs.d/init.elに'.yml'の設定が書き込まれていない時,ruby-modeでemacsを起動するsciptを埋め込む.
|
329
|
+
|
330
|
+
clean_exeは,githubへuploadする時に,開発者個人のhelpファイルをrmして整頓する.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: my_help
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shigeto R. Nishitani
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -152,10 +152,12 @@ files:
|
|
152
152
|
- hikis/README_ja.hiki
|
153
153
|
- hikis/emacs_help.hiki
|
154
154
|
- hikis/template_help.hiki
|
155
|
+
- init.el
|
155
156
|
- latexes/handout_pre.tex
|
156
|
-
- lib/daddygongon/emacs_help
|
157
|
-
- lib/daddygongon/git_help
|
158
|
-
- lib/daddygongon/template_help
|
157
|
+
- lib/daddygongon/emacs_help.yml
|
158
|
+
- lib/daddygongon/git_help.yml
|
159
|
+
- lib/daddygongon/template_help.yml
|
160
|
+
- lib/daddygongon/todo_help.yml
|
159
161
|
- lib/emacs_help.rb
|
160
162
|
- lib/my_help.rb
|
161
163
|
- lib/my_help/test.rb
|