I just installed Cygwin and would like to use that for ST3's build system instead of CMD. I can't seem to find good documentation about it. Anyone have any ideas?
1 Answer
I just had the same question and solved it with reading some related Question-Thread on Stackoverflow, which I listed at the End of my answer.
Overview of what I answer:
1. Create shell-script file SublimeTextBuildScript.sh
#!/usr/bin/bash -l
cd "/cygdrive/x/cheatsheet-template"
ls -lha
make
1.1 Optional: Switch the line-ending
Solves: Troubles while executing the shell-script with Line-endings. I saw some error-messages with "\r" in the message while testing.
1.2 Helpfully: Mintty Command Line Options
2. (Test-)Command for SublimeText Custom Build System:
D:\Applications\cygwin64\bin\mintty.exe -h always /cygdrive/d/Applications/Hochguertel/bin/SublimeTextBuildScript.sh
2.1 Testing result
3. Put it all together
3.1 Create an Build System
Sublime Text -> Tools -> Build-System -> New Build System...
3.2 Configure the Build System
{
"shell_cmd": "D:\\Applications\\cygwin64\\bin\\mintty.exe -h always
/cygdrive/d/Applications/Hochguertel/bin/SublimeTextBuildScript.sh"
}
3.3 Save the configurated Build System
File-Extension: .sublime-build
Filename: Cheatsheet Build.sublime-build
3.4 Activating the created Build System
Sublime Text -> Tools -> Build System -> "Cheatsheet Build"
4.0 Testing the Cygwin Environment Build System via Sublime Text
Sublime Text -> Tools -> Build
Working Cygwin Build System Solution with Sublime Text:
Sources of information (Stackoverflow Links)
- Fixing Sublime Text 2 line endings?
- how to automate cygwin and mintty
- How do i start Mintty and run a script file?
HTH