sublime text 提示

來源:互聯網
上載者:User

1.修改游標大小      

喜好設定--使用者佈建裡添加如下代碼:

       "caret_extra_top":0,
       "caret_extra_bottom":0,
       "caret_extra_width":1

        需要添加表元素分隔字元;

2.自訂程式碼片段(代碼補全)

官方文檔

<snippet>

<content><![CDATA[Type your snippet here]]></content>

<!-- Optional: Tab trigger to activate the snippet -->

<tabTrigger>xyzzy</tabTrigger>

<!-- Optional: Scope the tab trigger will be active in -->

<scope>source.python</scope>

<!-- Optional: Description to show in the menu -->

<description>My Fancy Snippet</description>

</snippet>

<content></content>內容標籤, <![CDATA[內容]]>

<tabTrigger></tabTrigger>觸發標誌,打出後按Table後Enter鍵自動補全

<scope></scope>作用範圍,檔案名稱

<description>0</description>該程式碼片段的描述

eg: (修改選中目標)

<content><![CDATA[Clog("${1:}",${2:10});]]></content>

<tabTrigger>log</tabTrigger>

輸入log補全至Clog("",10);

游標停留在""內,按table鍵切至10 ,也可用$1改游標停留

$PARAM1, $PARAM2…

Arguments passed to the insert_snippet command. (Not covered here.)

$SELECTION

The text that was selected when the snippet was triggered.

$TM_CURRENT_LINE

Content of the line the cursor was in when the snippet was triggered.

$TM_CURRENT_WORD

Current word under the cursor when the snippet was triggered.

$TM_FILENAME

File name of the file being edited including extension.

$TM_FILEPATH

File path to the file being edited.//所在檔案路徑

$TM_FULLNAME

User's user name.

$TM_LINE_INDEX

Column the snippet is being inserted at, 0 based.

$TM_LINE_NUMBER

Row the snippet is being inserted at, 1 based.//所在行號

$TM_SELECTED_TEXT

An alias for $SELECTION.

$TM_SOFT_TABS

YES if translate_tabs_to_spaces is true, otherwise NO.

$TM_TAB_SIZE

Spaces per-tab (controlled by the tab_size option).

效果:

====================================

USER NAME: $TM_FULLNAME

FILE NAME: $TM_FILENAME                --所在檔案名稱

TAB SIZE: $TM_TAB_SIZE    

SOFT TABS: $TM_SOFT_TABS

====================================

   

# Output:

====================================

USER NAME: guillermo

FILE NAME: test.txt

TAB SIZE: 4

SOFT TABS: YES

====================================

 3.添加lua編譯系統luaJit

1、下載http://luajit.org/download.htm,
在LuaJIT-2.0.3\src目錄下有個msvcbuild.bat批次檔,需要先把luajit.exe這個東西給編譯出來。
2、開啟visual studio的命令列工具
3、用vs的命令列工具cd到luajit的src目錄
4、執行msvcbuild.bat批次檔,編譯出luajit.exe

Packages 中添加 lua.sublime-build  {     "cmd": ["d:/LuaJIT-2.0.3/src/luajit.exe", "$file"],     "file_regex": "^(?:lua:)?[\t ](...*?):([0-9]*):?([0-9]*)",     "selector": "d:/test/main.lua" }

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.