ログインすら忘れてて、1年以上放置してましたが、久々のメモ
ここ1年はお仕事の方で、webアプリ2〜3本リリースしたり、数回心折れそうになったりしてました。
で、最近新しい仕事に移ったという事&unity熱がまた発足したので、一時復活中です。
とりあえず気分転換の一つとしてエディタを乗り換えようかと思った訳で。
さよならemacs! ありがとうemacs!
と、いうわけでここからは自分用メモ。
細かいインストール方法とかは調べたらたくさん転がってるので割愛。
インストールしたパッケージとかを書いてます。
sublime text 3のダウンロード
ここからダウンロード
package control
package controlは入れなきゃ始まらない。
↑が見れなかった時の為の呪文。
View→Show Consoleに入力
import urllib.request,os; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); open(os.path.join(ipp, pf), 'wb').write(urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ','%20')).read())
sublemacsproのインストール
emacsのキーバインドにしてくれるパッケージ。
command + Shift + PでPackage controlを開き
Package Control : Add Repositoryに
https://github.com/grundprinzip/sublemacspro
を入力。
Package Control:Install Packageに
sublemacspro
が出てくるので、インストール。
さらにemacs風に
カーソル移動はsublemacsproを入れるだけでemacsに近づいたけど、
ctrl + m(改行)とかが効いてない。
Preferences→Key Bindings – User
に追記。
Userの方を優先してくれるらしい。
emacsでは鬼軍曹を入れていたので、それにそった形で設定を上書きする。
多分まだ足りない
[
// Key bindings like Emacs.
{"keys": ["ctrl+m"], "command": "insert", "args": {"characters": "\n"}},
// close
{ "keys": ["ctrl+x","ctrl+k"], "command": "close" },
// save
{ "keys": ["ctrl+x","ctrl+s"], "command": "save" },
// side_bar focus
{ "keys": ["ctrl+x","l"], "command": "focus_side_bar" },
// tab
{ "keys": ["ctrl+i"], "command": "insert_best_completion", "args": {"default": "\t", "exact": true} },
{ "keys": ["ctrl+i"], "command": "insert_best_completion", "args": {"default": "\t", "exact": false},
"context":
[
{ "key": "setting.tab_completion", "operator": "equal", "operand": true }
]
},
// find show panel
{ "keys": ["ctrl+s"], "command": "show_panel", "args": {"panel": "find", "reverse": false} },
// Find panel key bindings
{ "keys": ["ctrl+s"], "command": "find_next", "context":
[{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
},
{ "keys": ["shift+enter"], "command": "find_prev", "context":
[{"key": "panel", "operand": "find"}, {"key": "panel_has_focus"}]
},
]
※追記の可能性あり
Theme
SodaとかFlatlandとか試してみたけど、Phoenixに落ち着きました。
Install packegeからPhoneixを追加して、
Settings -Userに追記
"indent_to_bracket": true,
"phoenix_color_green": true,
"phoenix_eighties": true,
"phoenix_highlight_current_tab": true,
"phoenix_sidebar_tree_large": true,
"phoenix_solid_current_tab": true,
"theme": "Phoenix Dark.sublime-theme",
"translate_tabs_to_spaces": true
細かい設定はここ見ながらで。
おまけ
やたらキーリピートが遅く、KeyRemap4でも変わらないので調べてみたら
defaults write com.sublimetext.3 ApplePressAndHoldEnabled -bool false
をターミナルで叩かないといけないらしい、、
sublime2の場合は2の所を3にしたらうまくいく?