關於 sublime text 3 3083 從安裝到使用

   首先聲明我是個菜鳥,剛踏入it不久,文中也許有不對的地方,望指點,都是個人的一些經驗(聲明!!! 其中一些是借鑑別人的  謝謝 廣大的 朋友 ,),一點點的摸索,希望能幫助,更多的人省去一些查資料的時間,我會盡量詳細,並更改一些缺點。

  最近裝了sublime text 3 3083 ,有想安裝的可以看看,參考一下,不對的請指點

首先版本是   sublime text 3 3083


註冊 help->license 輸入註冊碼

—– BEGIN LICENSE —–
Andrew Weber
Single User License
EA7E-855605
813A03DD 5E4AD9E6 6C0EEB94 BC99798F
942194A6 02396E98 E62C9979 4BB979FE
91424C9D A45400BF F6747D88 2FB88078
90F5CC94 1CDC92DC 8457107A F151657B
1D22E383 A997F016 42397640 33F41CFC
E1D0AE85 A0BBD039 0E9C8D55 E1B89D5D
5CDB7036 E56DE1C0 EFCC0840 650CD3A6
B98FC99C 8FAC73EE D2B95564 DF450523
—— END LICENSE ——



安裝 Package Control


複製


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())


通過快捷鍵 ctrl+` 或者 View > Show Console 菜單打開控制檯


Ctrl+V粘貼,回車。




中文設置
點擊Preferences/Package Control,然後點擊Package Control:Install Package,(第一次運行可以要幾秒鐘,因爲要下載Package Control裏面存在的包"花名冊"),然後在彈出的命令界面,輸入Chinese,選擇ChineseLocalization(回車或者鼠標單擊擊)。
切換語言,幫助(H)/Language/簡體中文,繁體中文,日本語,English。



快捷鍵設置(我的一些個人設置,你自己也可以更改,網上快捷鍵大全啊 什麼的很多,就不贅述了)

首選項->按鍵綁定-默認(不建議修改),裏面是默認的 ,有什麼快捷鍵 你可以上裏面查,複製到  首選項->按鍵綁定-用戶修改

首選項->按鍵綁定-用戶

[
//代碼提示
{ "keys": ["alt+/"], "command":"auto_complete" },
{ "keys": ["alt+/"], "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 }
]
},
//上下切換位置
{ "keys": ["alt+up"], "command": "swap_line_up" },
{ "keys": ["alt+down"], "command": "swap_line_down" },
// 複製選中行到行後
{ "keys": ["ctrl+alt+down"], "command":"duplicate_line" },
//刪除當前行
{ "keys": ["alt+d"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },


]



相關插件 

(正在研究中,可以搜一下別人的,http://www.imjeff.cn/blog/146/) 


1. sftp  

這個插件支持 sftp/ftp 

安裝好插件後點擊菜單 File -> SFTP/FTP -> Setup Server來生成一個配置文件(配置文件很簡單 ),修改好服務器、用戶名、密碼等 。

保存,保存位置要注意,要不然找不到  自己搜索吧  在安裝目錄下  有個 sftp_servers 文件夾 放在這裏面!!!

點擊菜單 File -> SFTP/FTP -> Browse Serve… 來連接遠程服務器。


其實 這樣切換目錄很繁瑣和麻煩 可以把服務器的路徑掛載到本地

下載安裝windows版本的工具
要先裝依賴:dokan library -->DokanInstall_0.6.0.exe(http://dokan-dev.net/wp-content/uploads/DokanInstall_0.6.0.exe)
在安裝sshfs本身:win-sshfs-0.0.1.5-setup.exe (https://win-sshfs.googlecode.com/files/win-sshfs-0.0.1.5-setup.exe)
啓動、配置指定host、port、username、password、directory等內容後將目錄掛載到本地,之後便可以使用sublime隨心所欲的編輯了。


2.ftpsync 

這個插件好像只能 鏈接 ftp的別的不能鏈接

新建一個項目 在你的項目上面 右擊 選擇  FTPSync ->Setup FTPSync in this folder 配置相關文件保存就好了

FTPSync-> Downloa,將下載文件到本地 ,打開文件修改時候將同步到服務器


3.FindKeyConflicts  用於找出鍵值映射(Key Mapping)衝突的插件。

這個插件可以通過運行指定命令在命令面板。按字母順序列出的命令,

ctrl+shift+p打開命令面板 輸入


FindKeyConflicts: All Key Maps to Quick Panel

查詢所有快捷鍵

FindKeyConflicts: (Direct) Conflicts to Quick Panel

查詢所有衝突按鍵


下面是文檔 自己翻譯吧

`FindKeyConflicts: All Key Maps to Quick Panel`:


Displays all key mappings in a quick panel. Selecting an entry will open a buffer with additional details about the key binding.


`FindKeyConflicts: All Key Maps to Buffer`:


Displays all key mappings in a buffer.


`FindKeyConflicts: (Direct) Conflicts to Quick Panel`:


This command finds all direct key conflicts, and displays them on the quick panel. The last package listed under the command is the source for the command being run, if it is not limited by context. Selecting a particular entry will open a buffer with details about that key binding.


`FindKeyConflicts: (Direct) Conflicts to Buffer`:


Display key direct conflicts in a view. Using this will give a better idea of how commands conflict, as the context for the commands will be included in the output. The last package listed for a particular binding is the command that is used, if it is not limited by context.


`FindKeyConflicts: Overlap Conflicts`:


Displays key bindings that overlap with mutli part key bindings in a buffer. For example, if `["ctrl+t"]` exists as one binding and `["ctrl+t", "t"]`, exists as another binding, this will be displayed.


`FindKeyConflicts: All Conflicts`:


Displays all conflicts in a buffer. This option will include both direct and overlapping conflicts.


`FindKeyConflicts: Single Package Conflicts`:


Displays conflicts that involve the selected package.


`FindKeyConflicts: Multiple Package Conflicts`:


Displays conflicts that involve the selected packages. Select `(Done)` when you are done selecting packages. You may use `(View Selected)` and `(View Packages)` to view the selected packages and the package list respsectively.  Also, you may remove packages from the selected list by pressing `enter` when viewing the selected packages list.


`FindKeyConflicts: Command Search`:


Display a list of the packages containing keymap files. After selecting a package, a list of commands will be displayed in the quick panel. Selecting a command from the subsequent list will run the command.



4。ColorPicker  (插件衝突問題 ) 這個插件可以很方便地調用你本機的調色板應用

相關的介紹,應該有很多 我就不介紹了 我只說一下調用;

默認按鍵是ctrl+shift+c 但是因爲我裝了CSScomb 之間存在熱鍵衝突 所以調不出來,ColorPicker  的快捷鍵我不會改只能改CSScomb 了,誰知道的給我說啊  如果你的調不出來,應該是其他插件的快捷鍵衝突了

5. emmet  emmet的使用方法也非常簡單 直接在編輯器中輸入HTML或CSS的代碼的縮寫,然後按tab鍵就可以拓展爲完整的代碼片段 

語法:

後代:>

縮寫:nav>ul>li

<nav>
    <ul>
        <li></li>
    </ul>
</nav>

兄弟:+

縮寫:div+p+bq

<div></div>
<p></p>
<blockquote></blockquote>

上級:^

縮寫:div+div>p>span+em^bq

<div></div>
<div>
    <p><span></span><em></em></p>
    <blockquote></blockquote>
</div>

縮寫:div+div>p>span+em^^bq

<div></div>
<div>
    <p><span></span><em></em></p>
</div>
<blockquote></blockquote>

分組:()

縮寫:div>(header>ul>li*2>a)+footer>p

<div>
    <header>
        <ul>
            <li><a href=""></a></li>
            <li><a href=""></a></li>
        </ul>
    </header>
    <footer>
        <p></p>
    </footer>
</div>

縮寫:(div>dl>(dt+dd)*3)+footer>p

<div>
    <dl>
        <dt></dt>
        <dd></dd>
        <dt></dt>
        <dd></dd>
        <dt></dt>
        <dd></dd>
    </dl>
</div>
<footer>
    <p></p>
</footer>

乘法:*

縮寫:ul>li*5

<ul>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
</ul>

自增符號:$

縮寫:ul>li.item$*5

<ul>
    <li class="item1"></li>
    <li class="item2"></li>
    <li class="item3"></li>
    <li class="item4"></li>
    <li class="item5"></li>
</ul>

縮寫:h$[title=item$]{Header $}*3

<h1 title="item1">Header 1</h1>
<h2 title="item2">Header 2</h2>
<h3 title="item3">Header 3</h3>

縮寫:ul>li.item$$$*5

<ul>
    <li class="item001"></li>
    <li class="item002"></li>
    <li class="item003"></li>
    <li class="item004"></li>
    <li class="item005"></li>
</ul>

縮寫:ul>li.item$@-*5

<ul>
    <li class="item5"></li>
    <li class="item4"></li>
    <li class="item3"></li>
    <li class="item2"></li>
    <li class="item1"></li>
</ul>

縮寫:ul>li.item$@3*5

<ul>
    <li class="item3"></li>
    <li class="item4"></li>
    <li class="item5"></li>
    <li class="item6"></li>
    <li class="item7"></li>
</ul>

ID和類屬性

縮寫:#header

<div id="header"></div>

縮寫:.title

<div class="title"></div>

縮寫:form#search.wide

<form id="search" class="wide"></form>

縮寫:p.class1.class2.class3

<p class="class1 class2 class3"></p>

自定義屬性

縮寫:p[title="Hello world"]

<p title="Hello world"></p>

縮寫:td[rowspan=2 colspan=3 title]

<td rowspan="2" colspan="3" title=""></td>

縮寫:[a='value1' b="value2"]

<div a="value1" b="value2"></div>

文本:{}

縮寫:a{Click me}

<a href="">Click me</a>

縮寫:p>{Click }+a{here}+{ to continue}

<p>Click <a href="">here</a> to continue</p>

隱式標籤

縮寫:.class

<div class="class"></div>

縮寫:em>.class

<em><span class="class"></span></em>

縮寫:ul>.class

<ul>
    <li class="class"></li>
</ul>

縮寫:table>.row>.col

<table>
    <tr class="row">
        <td class="col"></td>
    </tr>
</table>

HTML

所有未知的縮寫都會轉換成標籤,例如,foo → <foo></foo>

縮寫:!

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>

</body>
</html>

縮寫:a

<a href=""></a>

縮寫:a:link

<a href="http://"></a>

縮寫:a:mail

<a href="mailto:"></a>

縮寫:abbr

<abbr title=""></abbr>

縮寫:acronym

<acronym title=""></acronym>

縮寫:base

<base href="" />

縮寫:basefont

<basefont />

縮寫:br

<br />

縮寫:frame

<frame />

縮寫:hr

<hr />

縮寫:bdo

<bdo dir=""></bdo>

縮寫:bdo:r

<bdo dir="rtl"></bdo>

縮寫:bdo:l

<bdo dir="ltr"></bdo>

縮寫:col

<col />

縮寫:link

<link rel="stylesheet" href="" />

縮寫:link:css

<link rel="stylesheet" href="style.css" />

縮寫:link:print

<link rel="stylesheet" href="print.css" media="print" />

縮寫:link:favicon

<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />

縮寫:link:touch

<link rel="apple-touch-icon" href="favicon.png" />

縮寫:link:rss

<link rel="alternate" type="application/rss+xml" title="RSS" href="rss.xml" />

縮寫:link:atom

<link rel="alternate" type="application/atom+xml" title="Atom" href="atom.xml" />

縮寫:meta

<meta />

縮寫:meta:utf

<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />

縮寫:meta:win

<meta http-equiv="Content-Type" content="text/html;charset=windows-1251" />

縮寫:meta:vp

<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />

縮寫:meta:compat

<meta http-equiv="X-UA-Compatible" content="IE=7" />

縮寫:style

<style></style>

縮寫:script

<script></script>

縮寫:script:src

<script src=""></script>

縮寫:img

<img src="" alt="" />

縮寫:iframe

<iframe src="" frameborder="0"></iframe>

縮寫:embed

<embed src="" type="" />

縮寫:object

<object data="" type=""></object>

縮寫:param

<param name="" value="" />

縮寫:map

<map name=""></map>

縮寫:area

<area shape="" coords="" href="" alt="" />

縮寫:area:d

<area shape="default" href="" alt="" />

縮寫:area:c

<area shape="circle" coords="" href="" alt="" />

縮寫:area:r

<area shape="rect" coords="" href="" alt="" />

縮寫:area:p

<area shape="poly" coords="" href="" alt="" />

縮寫:form

<form action=""></form>

縮寫:form:get

<form action="" method="get"></form>

縮寫:form:post

<form action="" method="post"></form>

縮寫:label

<label for=""></label>

縮寫:input

<input type="text" />

縮寫:inp

<input type="text" name="" id="" />

縮寫:input:hidden

別名:input[type=hidden name]

<input type="hidden" name="" />

縮寫:input:h

別名:input:hidden

<input type="hidden" name="" />

縮寫:input:text, input:t

別名:inp

<input type="text" name="" id="" />

縮寫:input:search

別名:inp[type=search]

<input type="search" name="" id="" />

縮寫:input:email

別名:inp[type=email]

<input type="email" name="" id="" />

縮寫:input:url

別名:inp[type=url]

<input type="url" name="" id="" />

縮寫:input:password

別名:inp[type=password]

<input type="password" name="" id="" />

縮寫:input:p

別名:input:password

<input type="password" name="" id="" />

縮寫:input:datetime

別名:inp[type=datetime]

<input type="datetime" name="" id="" />

縮寫:input:date

別名:inp[type=date]

<input type="date" name="" id="" />

縮寫:input:datetime-local

別名:inp[type=datetime-local]

<input type="datetime-local" name="" id="" />

縮寫:input:month

別名:inp[type=month]

<input type="month" name="" id="" />

縮寫:input:week

別名:inp[type=week]

<input type="week" name="" id="" />

縮寫:input:time

別名:inp[type=time]

<input type="time" name="" id="" />

縮寫:input:number

別名:inp[type=number]

<input type="number" name="" id="" />

縮寫:input:color

別名:inp[type=color]

<input type="color" name="" id="" />

縮寫:input:checkbox

別名:inp[type=checkbox]

<input type="checkbox" name="" id="" />

縮寫:input:c

別名:input:checkbox

<input type="checkbox" name="" id="" />

縮寫:input:radio

別名:inp[type=radio]

<input type="radio" name="" id="" />

縮寫:input:r

別名:input:radio

<input type="radio" name="" id="" />

縮寫:input:range

別名:inp[type=range]

<input type="range" name="" id="" />

縮寫:input:file

別名:inp[type=file]

<input type="file" name="" id="" />

縮寫:input:f

別名:input:file

<input type="file" name="" id="" />

縮寫:input:submit

<input type="submit" value="" />

縮寫:input:s

別名:input:submit

<input type="submit" value="" />

縮寫:input:image

<input type="image" src="" alt="" />

縮寫:input:i

別名:input:image

<input type="image" src="" alt="" />

縮寫:input:button

<input type="button" value="" />

縮寫:input:b

別名:input:button

<input type="button" value="" />

縮寫:isindex

<isindex />

縮寫:input:reset

別名:input:button[type=reset]

<input type="reset" value="" />

縮寫:select

<select name="" id=""></select>

縮寫:option

<option value=""></option>

縮寫:textarea

<textarea name="" id="" cols="30" rows="10"></textarea>

縮寫:menu:context

別名:menu[type=context]>

<menu type="context"></menu>

縮寫:menu:c

別名:menu:context

<menu type="context"></menu>

縮寫:menu:toolbar

別名:menu[type=toolbar]>

<menu type="toolbar"></menu>

縮寫:menu:t

別名:menu:toolbar

<menu type="toolbar"></menu>

縮寫:video

<video src=""></video>

縮寫:audio

<audio src=""></audio>

縮寫:html:xml

<html xmlns="http://www.w3.org/1999/xhtml"></html>

縮寫:keygen

<keygen />

縮寫:command

<command />

縮寫:bq

別名:blockquote

<blockquote></blockquote>

縮寫:acr

別名:acronym

<acronym title=""></acronym>

縮寫:fig

別名:figure

<figure></figure>

縮寫:figc

別名:figcaption

<figcaption></figcaption>

縮寫:ifr

別名:iframe

<iframe src="" frameborder="0"></iframe>

縮寫:emb

別名:embed

<embed src="" type="" />

縮寫:obj

別名:object

<object data="" type=""></object>

縮寫:src

別名:source

<source></source>

縮寫:cap

別名:caption

<caption></caption>

縮寫:colg

別名:colgroup

<colgroup></colgroup>

縮寫:fst, fset

別名:fieldset

<fieldset></fieldset>

縮寫:btn

別名:button

<button></button>

縮寫:btn:b

別名:button[type=button]

<button type="button"></button>

縮寫:btn:r

別名:button[type=reset]

<button type="reset"></button>

縮寫:btn:s

別名:button[type=submit]

<button type="submit"></button>
上文中演示代碼來自於官網API:http://docs.emmet.io/cheat-sheet/



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章