emacs_help 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.travis.yml +4 -0
- data/CODE_OF_CONDUCT.md +49 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +67 -0
- data/Rakefile +10 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/emacs_help.gemspec +33 -0
- data/exe/eh +5 -0
- data/exe/emacs_help +5 -0
- data/lib/#emacs_help.rb# +5 -0
- data/lib/emacs_help/version.rb +3 -0
- data/lib/emacs_help.rb +115 -0
- metadata +103 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 9c77c7ec21eb03ec13511ed67bfaef9193ab8b77
|
4
|
+
data.tar.gz: ae4172a393fe2653e0f37744b2e87709a691c73f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f556b9e85c36df98b457848967acdcbc6eb494f97e2bde8b9baa6c1eb5e501c3d10f30783049e969bf806ec830307dfdbbe6335783dab8a39cdfa9ccd61ae4b7
|
7
|
+
data.tar.gz: 67c886a7e3afa16a4ab43fd228402910e7d6b3271abbb51f698f366e525e32b8e01ee29dc4fa7aaa34b65e2ff18bc3c397e8984d8d1c95f997bb0c43b148a665
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, and in the interest of
|
4
|
+
fostering an open and welcoming community, we pledge to respect all people who
|
5
|
+
contribute through reporting issues, posting feature requests, updating
|
6
|
+
documentation, submitting pull requests or patches, and other activities.
|
7
|
+
|
8
|
+
We are committed to making participation in this project a harassment-free
|
9
|
+
experience for everyone, regardless of level of experience, gender, gender
|
10
|
+
identity and expression, sexual orientation, disability, personal appearance,
|
11
|
+
body size, race, ethnicity, age, religion, or nationality.
|
12
|
+
|
13
|
+
Examples of unacceptable behavior by participants include:
|
14
|
+
|
15
|
+
* The use of sexualized language or imagery
|
16
|
+
* Personal attacks
|
17
|
+
* Trolling or insulting/derogatory comments
|
18
|
+
* Public or private harassment
|
19
|
+
* Publishing other's private information, such as physical or electronic
|
20
|
+
addresses, without explicit permission
|
21
|
+
* Other unethical or unprofessional conduct
|
22
|
+
|
23
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
24
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
25
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
26
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
27
|
+
threatening, offensive, or harmful.
|
28
|
+
|
29
|
+
By adopting this Code of Conduct, project maintainers commit themselves to
|
30
|
+
fairly and consistently applying these principles to every aspect of managing
|
31
|
+
this project. Project maintainers who do not follow or enforce the Code of
|
32
|
+
Conduct may be permanently removed from the project team.
|
33
|
+
|
34
|
+
This code of conduct applies both within project spaces and in public spaces
|
35
|
+
when an individual is representing the project or its community.
|
36
|
+
|
37
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
38
|
+
reported by contacting a project maintainer at shigeto_nishitani@me.com. All
|
39
|
+
complaints will be reviewed and investigated and will result in a response that
|
40
|
+
is deemed necessary and appropriate to the circumstances. Maintainers are
|
41
|
+
obligated to maintain confidentiality with regard to the reporter of an
|
42
|
+
incident.
|
43
|
+
|
44
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
45
|
+
version 1.3.0, available at
|
46
|
+
[http://contributor-covenant.org/version/1/3/0/][version]
|
47
|
+
|
48
|
+
[homepage]: http://contributor-covenant.org
|
49
|
+
[version]: http://contributor-covenant.org/version/1/3/0/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Shigeto R. Nishitani
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
# EmacsHelp
|
2
|
+
|
3
|
+
emacsの編集操作のキーバインドを表示するヘルプ.日本語がデフォルト
|
4
|
+
|
5
|
+
すぐにいらんようになるやろけど...
|
6
|
+
|
7
|
+
|
8
|
+
## Installation
|
9
|
+
|
10
|
+
Add this line to your application's Gemfile:
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
gem 'emacs_help'
|
14
|
+
```
|
15
|
+
|
16
|
+
And then execute:
|
17
|
+
|
18
|
+
$ bundle
|
19
|
+
|
20
|
+
Or install it yourself as:
|
21
|
+
|
22
|
+
$ gem install emacs_help
|
23
|
+
|
24
|
+
## Usage
|
25
|
+
|
26
|
+
```
|
27
|
+
|
28
|
+
特殊キー操作:c-f, controlキーを押しながらf, M-f, escキーを押した後一度離してf
|
29
|
+
操作の中断c-g, 操作の取り消し(Undo) c-x u
|
30
|
+
|
31
|
+
Usage: eh [options]
|
32
|
+
-v, --version show program Version.
|
33
|
+
-c, --カーソル Cursor移動
|
34
|
+
-p, --ページ Page移動
|
35
|
+
-f, --ファイル File操作
|
36
|
+
-e, --編集 Edit操作
|
37
|
+
-w, --ウィンドウ Window操作
|
38
|
+
-b, --バッファ Buffer操作
|
39
|
+
-q, --終了 終了操作
|
40
|
+
```
|
41
|
+
|
42
|
+
|
43
|
+
## Development
|
44
|
+
|
45
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. Run `bundle exec emacs_help` to use the gem in this directory, ignoring other installed copies of this gem.
|
46
|
+
|
47
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
48
|
+
|
49
|
+
## programの狙い
|
50
|
+
|
51
|
+
### windowsとかの対応
|
52
|
+
日本語使えるんやろか?
|
53
|
+
|
54
|
+
### CUIに日本語を組み込むことの可能性
|
55
|
+
Rubyは日本語がcommandにも普通に使えますが,
|
56
|
+
それを組み込んだ時にどれほど使いやすいのかを検証する.
|
57
|
+
たんに日本語でできるだけでいいのか,英語を覚えていく方がいいのか...
|
58
|
+
|
59
|
+
## Contributing
|
60
|
+
|
61
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/emacs_help. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
62
|
+
|
63
|
+
|
64
|
+
## License
|
65
|
+
|
66
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
67
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "emacs_help"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/emacs_help.gemspec
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'emacs_help/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "emacs_help"
|
8
|
+
spec.version = EmacsHelp::VERSION
|
9
|
+
spec.authors = ["Shigeto R. Nishitani"]
|
10
|
+
spec.email = ["shigeto_nishitani@me.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{display emacs help in Japanese.}
|
13
|
+
spec.description = %q{display emacs help in Japanese.}
|
14
|
+
spec.homepage = "https://github.com/daddygongon/emacs_help"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
|
18
|
+
# delete this section to allow pushing this gem to any host.
|
19
|
+
# if spec.respond_to?(:metadata)
|
20
|
+
# spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
|
21
|
+
# else
|
22
|
+
# raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
|
23
|
+
# end
|
24
|
+
|
25
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
26
|
+
spec.bindir = "exe"
|
27
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
|
+
spec.require_paths = ["lib"]
|
29
|
+
|
30
|
+
spec.add_development_dependency "bundler", "~> 1.11"
|
31
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
32
|
+
spec.add_development_dependency "minitest", "~> 5.0"
|
33
|
+
end
|
data/exe/eh
ADDED
data/exe/emacs_help
ADDED
data/lib/#emacs_help.rb#
ADDED
data/lib/emacs_help.rb
ADDED
@@ -0,0 +1,115 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
require "optparse"
|
3
|
+
require "emacs_help/version"
|
4
|
+
|
5
|
+
module EmacsHelp
|
6
|
+
class Command
|
7
|
+
def self.run(argv=[])
|
8
|
+
print "\n 特殊キー操作:"
|
9
|
+
print "c-f, controlキーを押しながらf, "
|
10
|
+
print "M-f, escキーを押した後一度離してf\n"
|
11
|
+
print " 操作の中断c-g, 操作の取り消し(Undo) c-x u \n\n"
|
12
|
+
new(argv).execute
|
13
|
+
end
|
14
|
+
|
15
|
+
def initialize(argv=[])
|
16
|
+
@argv = argv
|
17
|
+
data_path = File.join(ENV['HOME'], '.hikirc')
|
18
|
+
end
|
19
|
+
|
20
|
+
def execute
|
21
|
+
@argv << '--help' if @argv.size==0
|
22
|
+
command_parser = OptionParser.new do |opt|
|
23
|
+
opt.on('-v', '--version','show program Version.') { |v|
|
24
|
+
opt.version = EmacsHelp::VERSION
|
25
|
+
puts opt.ver
|
26
|
+
}
|
27
|
+
opt.on('-c','--カーソル','Cursor移動') {cursor_move}
|
28
|
+
opt.on('-p','--ページ','Page移動') {bulk_move}
|
29
|
+
opt.on('-f','--ファイル','File操作') {file}
|
30
|
+
opt.on('-e','--編集','Edit操作') {edit}
|
31
|
+
opt.on('-w','--ウィンドウ','Window操作') {window}
|
32
|
+
opt.on('-b','--バッファ','Buffer操作') {buffer}
|
33
|
+
opt.on('-q','--終了','終了操作') {quit}
|
34
|
+
end
|
35
|
+
begin
|
36
|
+
command_parser.parse!(@argv)
|
37
|
+
rescue=> eval
|
38
|
+
p eval
|
39
|
+
end
|
40
|
+
exit
|
41
|
+
end
|
42
|
+
|
43
|
+
def disp(lines)
|
44
|
+
lines.each{|line|
|
45
|
+
if line.include?(',')
|
46
|
+
show line
|
47
|
+
else
|
48
|
+
puts line
|
49
|
+
end
|
50
|
+
}
|
51
|
+
end
|
52
|
+
def show(line)
|
53
|
+
puts "\t#{line}"
|
54
|
+
end
|
55
|
+
|
56
|
+
def quit
|
57
|
+
cont = ["c-x c-c, Quit emacs, ファイルを保存して終了",
|
58
|
+
"c-z, suspend emacs, 一時停止,fgで復活"]
|
59
|
+
disp(cont)
|
60
|
+
end
|
61
|
+
|
62
|
+
def window
|
63
|
+
cont=["c-x 2, 2 windows, 二つに分割",
|
64
|
+
"c-x 1, 1 windows, 一つに戻す",
|
65
|
+
"c-x 3, windows, 縦線分割",
|
66
|
+
"c-x o, Other windows, 次の画面へ移動"]
|
67
|
+
disp(cont)
|
68
|
+
end
|
69
|
+
|
70
|
+
def buffer
|
71
|
+
cont =[ "c-x b, show Buffer, バッファのリスト",
|
72
|
+
"c-x c-b, next Buffer, 次のバッファへ移動"]
|
73
|
+
disp(cont)
|
74
|
+
end
|
75
|
+
|
76
|
+
def edit
|
77
|
+
cont = ["c-d, Delete char, 一字削除",
|
78
|
+
"c-k, Kill line, 一行抹消,カット",
|
79
|
+
"c-y, Yank, ペースト",
|
80
|
+
"c-w, Kill region, 領域抹消,カット",
|
81
|
+
"領域選択は,先頭でc-spaceした後,最後尾へカーソル移動",
|
82
|
+
"c-s, forward Search WORD, 前へWORDを検索",
|
83
|
+
"c-r, Reverse search WORD, 後ろへWORDを検索",
|
84
|
+
"M-x query-replace WORD1 <return> WORD2:一括置換(y or nで選択)"]
|
85
|
+
disp(cont)
|
86
|
+
end
|
87
|
+
|
88
|
+
def file
|
89
|
+
cont =[ "c-x c-f, Fine file, ファイルを開く",
|
90
|
+
"c-x c-s, Save file, ファイルを保存",
|
91
|
+
"c-x c-w, Write file NAME, ファイルを別名で書き込む"]
|
92
|
+
disp(cont)
|
93
|
+
end
|
94
|
+
|
95
|
+
def bulk_move
|
96
|
+
cont = ["c-v, move Vertical, 次のページへ",
|
97
|
+
"M-v, move , 前のページへ",
|
98
|
+
"c-l, centrise Line, 現在行を中心に",
|
99
|
+
"M-<, move Top of file, ファイルの先頭へ",
|
100
|
+
"M->, move Bottom of file, ファイルの最後尾へ"]
|
101
|
+
disp(cont)
|
102
|
+
end
|
103
|
+
|
104
|
+
def cursor_move
|
105
|
+
cont = ["c-f, move Forwrard, 前・右へ",
|
106
|
+
"c-b, move Backwrard, 後・左へ",
|
107
|
+
"c-a, go Ahead of line, 行頭へ",
|
108
|
+
"c-e, go End of line, 行末へ",
|
109
|
+
"c-n, move Next line, 次行へ",
|
110
|
+
"c-p, move Previous line, 前行へ"]
|
111
|
+
disp(cont)
|
112
|
+
end
|
113
|
+
|
114
|
+
end
|
115
|
+
end
|
metadata
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: emacs_help
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Shigeto R. Nishitani
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-10-23 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.11'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.11'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: minitest
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '5.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '5.0'
|
55
|
+
description: display emacs help in Japanese.
|
56
|
+
email:
|
57
|
+
- shigeto_nishitani@me.com
|
58
|
+
executables:
|
59
|
+
- eh
|
60
|
+
- emacs_help
|
61
|
+
extensions: []
|
62
|
+
extra_rdoc_files: []
|
63
|
+
files:
|
64
|
+
- ".gitignore"
|
65
|
+
- ".travis.yml"
|
66
|
+
- CODE_OF_CONDUCT.md
|
67
|
+
- Gemfile
|
68
|
+
- LICENSE.txt
|
69
|
+
- README.md
|
70
|
+
- Rakefile
|
71
|
+
- bin/console
|
72
|
+
- bin/setup
|
73
|
+
- emacs_help.gemspec
|
74
|
+
- exe/eh
|
75
|
+
- exe/emacs_help
|
76
|
+
- lib/#emacs_help.rb#
|
77
|
+
- lib/emacs_help.rb
|
78
|
+
- lib/emacs_help/version.rb
|
79
|
+
homepage: https://github.com/daddygongon/emacs_help
|
80
|
+
licenses:
|
81
|
+
- MIT
|
82
|
+
metadata: {}
|
83
|
+
post_install_message:
|
84
|
+
rdoc_options: []
|
85
|
+
require_paths:
|
86
|
+
- lib
|
87
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
requirements: []
|
98
|
+
rubyforge_project:
|
99
|
+
rubygems_version: 2.5.1
|
100
|
+
signing_key:
|
101
|
+
specification_version: 4
|
102
|
+
summary: display emacs help in Japanese.
|
103
|
+
test_files: []
|