學以致用:讓visualstudio愛上sublime

jopen 10年前發布 | 11K 次閱讀 .NET開發

前言:
       經常在vs中工作,但是一些編輯工作卻非常喜歡sublime的方式,如果你也是,那我們來當媒婆吧,哈哈.
準備:
       Visualstudio一枚

       Sublime一枚

       版本都隨意,我這里以vs2010舉例.

開始:

       打開工具-->外部工具

       

        點擊增加:

        

      其中標題隨你,

      命令選擇你的sublime的位置

      參數輸入: $(ItemPath):$(CurLine):$(CurCol)

      這個的意思是: 文件名:當前行號:當前列號,這個參數方式對所有工具都有效,我這里列出完整的參數參考.

          Usage: subl [arguments] [files]         edit the given files

   or: subl [arguments] [directories]   open the given directories

   or: subl [arguments] -               edit stdin
</blockquote>

 

Arguments:

  --project <project>: Load the given project

  --command <command>: Run the given command

  -n or --new-window:  Open a new window

  -a or --add:         Add folders to the current window

  -w or --wait:        Wait for the files to be closed before returning

  -b or --background:  Don't activate the application

  -s or --stay:        Keep the application activated after closing the file

  -h or --help:        Show help (this message) and exit

  -v or --version:     Show version and exit

 

--wait is implied if reading from stdin. Use --stay to not switch back

to the terminal when a file is closed (only relevant if waiting for a file).

 

Filenames may be given a :line or :line:column suffix to open at a specific

location.

這樣就可以點擊工具-->sublime來啟動sublime編輯了,編輯完保存關閉,vs會提示文件有修改,是否加載,點擊是即可.


如何能夠更加快捷的使用呢,那就設置快捷鍵吧.

打開工具-->選項

找到Tools.ExternalCommand3,數字3是看你在外部工具列表排的位置

</blockquote> 設置一個你要的快捷鍵,我設置的Ctrl+E,Ctrl+E</span> </blockquote>

確定就好了,這樣我們需要編輯就Ctrl+E,Ctrl+E,然后編輯,完成后Ctrl+s,alt+f4即可.

來自: http://my.oschina.net/iyf/blog/552651

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!