quattro_4's diary

また同じ過ちを繰り返すと気付かんのか!?

Sublime Text 3でのversion2で使っていたものの動作

Sublime Text 2で使っていたもので動いたもの

  • sublコマンド

OS X Command Line - Sublime Text 3 Documentation

version2のsublはsubl2に変更

  • Sublime Text 2とSublime Text 3は併用できるが、アイコンは同じなので区別しようと思った
    • Sublime Text 2のアイコンを変える

https://github.com/reorx/Sublime-Text-2-Icon

$ ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl ~/bin/subl2
$ rm ~/bin/subl
$ ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl ~/bin/subl

コピーして動いたもの

  • 自前のカラースキーム Packages/User/RailsCastsColorScheme.tmTheme
  • Packages/Default/ 内の .pyファイル
    • exec.py
    • comment.py
    • duplicate_line.py
    • などの重要なもの
  • Packages/User/ 内の 自作 .pyファイル
  • Packages
    • CoffeeScript

User/Preferences.sublime-settings

主に

  • 空白の扱いとか
  • 無視するファイル、フォルダとか

Sublime Text 2のものであまり問題なさそう

{
	"auto_complete": false,
	"auto_complete_commit_on_tab": true,
	"bold_folder_labels": true,
	"disable_formatted_linebreak": true,
	"draw_white_space": "all",
	"ensure_newline_at_eof_on_save": true,
	"file_exclude_patterns":
	[
		"*.tar.gz",
		"*.sql",
		"*.log",
		".DS_Store",
		"*.db",
		"*.sqlite3",
		"*.pdf",
		"*.uml",
		"*.graffle"
	],
	"folder_exclude_patterns":
	[
		"Backup",
		"tmp",
		"log",
		"data",
		"fixtures",
		"coverage",
		".sass-cache",
		".git",
		".bundle"
	],
	"font_size": 12.0,
	"highlight_line": true,
	"highlight_modified_tabs": true,
	"ignored_packages":
	[
		"Vintage"
	],
	"indent_guide_options":
	[
		"draw_active",
		"draw_normal"
	],
	"line_padding_bottom": 0.5,
	"line_padding_top": 0.5,
	"new_window_settings":
	{
		"show_minimap": false
	},
	"save_on_focus_lost": true,
	"tab_size": 2,
	"translate_tabs_to_spaces": true,
	"trim_trailing_white_space_on_save": true
}

User/Default (OSX).sublime-keymap

  • 噂によると設定ファイルのJSONの最後の }, を許容してくれるらしい
  • 必要不可欠の reveal_in_side_bar は新機能(["shift+super+r"])とショートカットがかぶったので変えた
  • auto_completeはデフォルトオフにしているが、マニュアルで起動したい時に、Mac OS XのSpotlight(ctrl+space)とかぶるので変えた
  • 複数行カーソル選択の(ctrl+shift+↑、ctrl+shift+↓)もMac OS Xとかぶるので、OS側をオフにするか、Sublime側をRemapした方が良い
[
  // Embedded commands
  { "keys": ["ctrl+shift+super+r"], "command": "reveal_in_side_bar"},

  // Remap
  { "keys": ["ctrl+shift+space"], "command": "auto_complete" },
  { "keys": ["ctrl+shift+space"], "command": "replace_completion_with_auto_complete", "context":
    [
      { "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
      { "key": "auto_complete_visible", "operator": "equal", "operand": false },
      { "key": "setting.tab_completion", "operator": "equal", "operand": true }
    ]
  },
]

何かがおかしい

自分の環境だけの問題かもしれないが

  • ⌘⇧D duplicate_line が動かない。死活問題
    • Package/Default/*py をコピーして解決
  • ⌘/ toggle_comment が動かない。
    • Package/Default/*py をコピーして解決
  • コピー後の comment.pyで ⌘/ のコメントの切り替えができない。死活問題

ST2で比較的使っているもので、未検証のもの

重要な順

  • Package Control
  • FileDiffs
  • SideBarEnhancements
  • All Autocomplete
  • RubyTest
  • GitGutter
  • symbol, string, quot変換系
  • Markdown Preview
  • SCSS, Sass, Haml