sublime text中使用cmd+B執行shell的設定
sublime text中使用cmd+B執行shell的設定
https://blog.csdn.net/fengmm521/article/details/78446514
tools/build system/new build system,
新建的執行設定,複製下邊內容到這個檔案,並儲存:
{
“cmd”: [“sh”,”$file”],
“selector”: “source.shell”
}
檔名可以隨便起,我就叫:
shell.sublime-build
放在你的sublime text的設定preferences/browser包目錄/user下新建一個shell資料夾裡面放這個檔案(任意取名也可以);
然後編寫.sh檔案指令碼時,使用.sh字尾。
在檔案的第一行加上:
!bin/bash
像這樣:
這時就可以在sublime text環境下按cmd + B來直接執行shell指令碼了.
相關推薦
sublime text中使用cmd+B執行shell的設定
sublime text中使用cmd+B執行shell的設定 https://blog.csdn.net/fengmm521/article/details/78446514 tools/build system/new build system, 新建的執行設定,複製下邊內容到
Sublime Text中安裝插件來實現px與rem間的換算
all 通過 logs read 今天 else cnblogs 16px 相關 今天在群裏無意中看到了群友分享的一篇關於移動端的文章。裏面其他內容我倒不大感興趣,反而是rem讓我提起了興趣。 首先來談一下rem,rem是CSS3中新增加的一個單位值,它和em單位
sublime text 3 ctrl+b瀏覽器啟動html
1-1 cmd png google text 插件 技術分享 文件 sys sublime text 2 和3 都可以快速設置瀏覽器啟動,本人在這裏介紹如何不下插件啟動瀏覽器。第一步:打開Tool-->build system ---> new build
如何在sublime text中快速運行瀏覽web/html頁面
tool ide efault bin album googl sublime 菜單欄 ont 安裝View In Browser插件 快捷鍵 Ctrl+Shift+P(菜單欄Tools->Command Paletter),輸入 pcip選中Install Pac
Windows下 Sublime Text 3配置java執行環境
配置java環境步驟: 下載java最新版的SDK。JDK官網下載地址 下載Sublime Text 3, 根據電腦選擇32位或64位版本,下載完成後安裝。Sublime Text 3官網下載地址 配置java環境變數,在環境變數中新建JAVA_HOME,
Sublime Text 中安裝失敗的解決
一般是輸入的程式碼問題 更新後的程式碼: import urllib.request,os,hashlib; h = ‘6f4c264a24d933ce70df5dedcf1dcaeeebe013ee18cced0ef93d5f746d80ef60’; pf = ‘Package Contr
Sublime text 3 c++ 編譯執行報錯
解決方法: 新增一個新的build system: { "encoding": "utf-8", "working_dir": "$file_path", "shell_cmd": "g++ -Wall -std=c++11 \"$file_name\" -o \"$
Sublime Text 3直接編譯執行C/C++程式
1 工作環境 (1)PC system:Ubuntu12.04LTS。 (2)編輯器版本:Sublime Text 3 2 實現目的 背景就是自己最近開始使用Sublime Text 3編輯程式碼,發現非常好用,也被它強大的外掛功能所吸引。但是,自己在編
配置Sublime Text 2 的Python執行環境
Sublime Text 2作為一款輕量級的編輯器,特點鮮明,方便使用,愈發受到普羅大眾的喜愛,我個人最近也開始用了起來。同時,我近段時間還在學習Python的相關東西,所以開始用ST2來寫Python,所以把配置方法略微總結一下。 1. 在工具欄點選Preferenc
golang中sublime text中配置goimports
原生態go對於import包無法自動新增或者刪除,對於某些使用者來說很不適應.在sublime text中利用gosublime+goimports很好的解決了這一問題. 1首先確認sublime text安裝了Gosublime(安裝方法這裡不在贅述); 2下載goimp
Sublime Text 3 配置java執行環境
網上有很多在Sublime Text 中配置java執行環境的文章,但是有很多不好用;下面是我東拼西湊整理出來的兩種方法,僅供參考: 提示:在使用一下兩種方法時,最好先把Sublime Text關閉,避免不必要的麻煩和錯誤。 方法一: 1.安裝JDK並配置
為執行緒池中的每個執行緒設定UncaughtExceptionHandler
參考了《java併發程式設計實戰》P134內容 每當執行緒池需要建立一個執行緒時,都是通過呼叫執行緒工廠方法來完成的,預設的執行緒工廠方法將建立一個新的、非守護的執行緒,並且不包好特殊的配置資訊。 如果你希望線上程執行之前、之後、或者執行中如果發生異常等情況作一些人工干預
ubuntu 系統在 Sublime Text 中不能輸入中文的解決辦法
本人親測的系統為ubuntu14.04 和ubuntu16.04 輸入法使用的是:搜狗輸入法 具體步驟如下: 1 在~目錄下建立 sublime-imfix.c 檔案,並將下面的程式碼拷貝進去儲存. /* sublime-imfix.c Use LD_PRELOAD to
為什麼在A執行緒中呼叫B執行緒的join方法會導致A執行緒阻塞?
觀看原始碼可以瞭解到,Thread的join方法利用的是等待/喚醒機制實現的。join中的程式碼片段:if (millis == 0) { while (isAlive()) { wait(0);
Android中使用程式碼執行shell命令
一、方法 /** * 執行一個shell命令,並返回字串值 * * @param cmd * 命令名稱&引數組成的陣列(例如:{"/system/bin/cat", "/proc/version"}) * @param workdirectory * 命令執行路徑(例如:"system/
Sublime text 中 Package Control 的安裝與使用方法
1. 程式碼方式安裝: 從選單 View - Show Console 或者 ctrl + ~ 快捷鍵,調出 console。將以下 Python 程式碼貼上進去並 enter 執行,不出意外即完成安裝。以下是text 2跟text 3的安裝程式碼: Sub
sublime text 3 設定在不同瀏覽器中執行的快捷方式
自從遇到sublime text 後,一下子就喜歡上了這款軟體,強大的外掛支援功能,真的讓人愛不釋手!可是,不得不說,它有一個小缺點,就是隻能在預設的瀏覽器中開啟(貌似也沒有外掛可以解決這個問題(個人拙見))。。不知道別人怎麼想,反正強迫症的我是有些容忍不了
Sublime Text 3中編譯執行java 控制檯中文GBK編碼亂碼
方法一:開啟Sublime Text 3,依次點選Tool,Build System,New Build System..., 然後用文字編譯器開啟,貼上下面的程式碼並儲存為JavaC.sublime-build,最後關閉檔案。 或者是開啟Sublime Text 3,依次點選Pref
【安裝】快捷鍵設定sublime text 3的HTML在設定的瀏覽器中開啟
第一步:快捷鍵按Ctrl +Shift + P,開啟然後輸入install package,並點選第一個。 第二步,在新出現的文字框中輸入SideBarEnhancements,然後點選它。 如果在首選項——package settings中出現了Side Bar,則表示已經安裝成功。
Qt 中執行cmd命令失敗,無許可權,需要提升程式以管理員執行 vs2013設定
程式中有些 地方 需要執行windows cmd 命令, 如 taskkill 程序命令 (QString c = "taskkill /im osk.exe /f";m_pProcess->execute(c);) 這種 命令是需要管理員身份的, 因此程式必須以管理員身份執行