4
2

More than 3 years have passed since last update.

my_helpで自分だけのメモを作る

Last updated at Posted at 2020-12-28

!macOS-11.1 !ruby-2.7.2p137

Preface (はじめに)

あまり使わないコマンドの使い方や, ターミナル上のツールを久しぶりにアップデートしたら出てきたエラー文を無くす解決法, その場その場で調べて解決では時間の無駄になる.

こういった問題は`my_help`というEmacsのorg-modeでメモを作り, それらを一律管理するツールで解決することができます. 本記事はその`my_help`のインストールや主に使うコマンドを紹介します.

my_help

インストールは

> gem install my_help

入ったかどうか確認するためにとりあえず以下のコマンドを実行.

> my_help

以下のような出力が返ってくればインストールは無事完了.

Commands:
  my_help delete HELP             # delete HELP
  my_help edit HELP               # edit HELP
  my_help git [push|pull]         # git push or pull
  my_help help [COMMAND]          # Describe available commands or one specific command
  my_help list [HELP] [ITEM]      # list all helps, specific HELP, or ITEM
  my_help new HELP                # make new HELP
  my_help set_editor EDITOR_NAME  # set editor to EDITOR_NAME
  my_help setup                   # set up the test database
  my_help version                 # show version

以下によく使うコマンドだけを記述します.

list

> my_help list

と入力すると, いくらか出力が出た後, 最終的に


List all helps
       org: - emacs org-modeのhelp
      todo: - my todo
     emacs: - Emacs key bind

という出力が返ってくるはずである.

これは現在自分が持っているmy_helpのメモである.

new

自分に合わせたmy_helpのメモを作りたい時は

> my_help new memo

と打つ. これにより

> my_help list
-> 
List all helps
       org: - emacs org-modeのhelp
      todo: - my todo
      memo: - ヘルプのサンプル雛形
     emacs: - Emacs key bind

新たにmemoというmy_helpのメモが作成されました.

edit

先ほど作ったmemoを編集して自分だけのメモにしていく.ただ, その前に編集する際に用いるエディタを指定する.

> my_help set_editor emacs

その後,

> my_help edit memo

と打ち, `Shift-Tab`で各項目を展開すれば,

* head
 - ヘルプのサンプル雛形
 -   headに常に表示される内容を記述
* license
 -      cc by Shigeto R. Nishitani, 2016
* item_example
 - itemの例

と表示される.

これで自分の好きなようにmemoを編集することができます.

参考資料

4
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
2