學以致用:讓visualstudio愛上sublime


前言:
       經常在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
 
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是看你在外部工具列表排的位置

設置一個你要的快捷鍵,我設置的Ctrl+E,Ctrl+E
確定就好了,這樣我們需要編輯就Ctrl+E,Ctrl+E,然后編輯,完成后Ctrl+s,alt+f4即可.


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM