2016年10月19日 星期三

2016年10月15日 星期六

紀錄sublime 3 裝了啥

首先裝
packagecontrol:

https://packagecontrol.io/installation


 command + shift + p 找安裝套件


安裝alignment

Preferences > Packages Settings > Alignment > Settings - User
加入以下內容:

{
    // The mid-line characters to align in a multi-line selection, changing
    // this to an empty array will disable mid-line alignment
    "alignment_chars": [
        "=", ":"
    ],
    "alignment_space_chars": ["="],
    "alignment_prefix_chars": [
"+", "-", "&", "|", "<", ">", "!", "~", "%", "/", "*", "."
]

}



之後選取要alignment的內容
command + ctl + a



安裝git

安裝SideBarEnhancements



下載Vinageous


啟用vim模式
Preference->Setting-User 打開編輯,將ignored_packages裡面的[]清空
"ignored_packages":
 [
 ]


我的主要配置 Preferences -> Settings -> User



{ "color_scheme": "Packages/User/SublimeLinter/Monokai (SL).tmTheme", "highlight_line": true, "ignored_packages": [ "Vintage" ], "vintageous_use_ctrl_keys": true, "vintageous_use_sys_clipboard": true
}


方便我切換其tab:
修改Preferences -> Key Bindings -> User

[
{ "keys": ["super+left"], "command": "prev_view" },
{ "keys": ["super+right"], "command": "next_view" },
{ "keys": ["super+t"], "command": "new_file" },
]


參考mac os X 上sublime 的配置:
http://guoqiao.me/post/2015/0110-sublime-text-config-for-mac-os-x


我的keymap 長這樣:


[
{ "keys": ["super+left"], "command": "prev_view" },
{ "keys": ["super+right"], "command": "next_view" },
{ "keys": ["super+t"], "command": "new_file" },
{
"keys": ["super+alt+right"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.33, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
}
},
{
"keys": ["super+alt+left"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.66, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
}
},
{ "keys": ["alt+1"], "command": "move_to_group", "args": { "group": 0 } },
{ "keys": ["alt+2"], "command": "move_to_group", "args": { "group": 1 } },
{ "keys": ["alt+3"], "command": "move_to_group", "args": { "group": 2 } },
{ "keys": ["alt+4"], "command": "move_to_group", "args": { "group": 3 } },
{ "keys": ["alt+5"], "command": "move_to_group", "args": { "group": 4 } },
{ "keys": ["alt+6"], "command": "move_to_group", "args": { "group": 5 } },
{ "keys": ["alt+7"], "command": "move_to_group", "args": { "group": 6 } },
{ "keys": ["alt+8"], "command": "move_to_group", "args": { "group": 7 } },
{ "keys": ["alt+9"], "command": "move_to_group", "args": { "group": 8 } },
{ "keys": ["f1"], "command": "clone_file_and_move_to_group" }

]

我想要一個功能類似vim 裡面的:split


1) Tools → New Plugin

import sublime
import sublime_plugin

class CloneFileAndMoveToGroup(sublime_plugin.WindowCommand):
    def run(self):
        self.window.run_command("clone_file")
#        self.window.run_command("move_to_group", { "group": 1 })
        self.window.run_command("move_to_neighboring_group")
2) Sublime Text 2 → Preferences → Key Bindings — User
{ "keys": ["f1"], "command": "clone_file_and_move_to_group" }





安裝sftp

http://ephrain.pixnet.net/blog/post/60699853-%5Bsublime-text%5D-%E4%BD%BF%E7%94%A8-sftp-%E5%A5%97%E4%BB%B6%E8%87%AA%E5%8B%95%E5%90%8C%E6%AD%A5%E6%9C%AC%E5%9C%B0-%E9%81%A0%E7%AB%AF

2016年10月2日 星期日

NFS setup

http://flykof.pixnet.net/blog/post/23028290-ubunto%E4%B8%8B%E5%AE%89%E8%A3%9D%E8%A8%AD%E5%AE%9Anfs