I work a lot with bash scripts and some of them can get pretty lengthy. Up until now, I've been using BBEdit as my editor of choice because of the way it handles locked files and permissions. But … BBEdit doesn't support code folding. Xcode does, but it seems to only allow code folding in Obj-C and Swift. Is there any way to enable code folding for Bash scripts? If not, is there any app out there that can fold code in a bash script (preferably with syntax highlighting too)?
Is it possible to enable Code Folding in Xcode for Bash scripts
bashtext-editorxcode
Related Question
- MacOS – Writing bash scripts for changing Mac OS / OSX settings
- IOS – Use a Mac mini as a remote build server for an iOS game
- “bash” command runs scripts in version 3.2, not 4.4
- IPhone – great text editor for iPhone and/or iPad with BBEdit-style text filters and PCRE search/replace
- MacOS – cron queueing bash and python scripts
Best Answer
I haven't found a way to enable code folding for bash script in Xcode.
But here is an alternative: UltraEdit.
UE allows code folding for bash scripts after tweaking a file.
In the example below i have added
to the file ~/Library/Application Support/UltraEdit/wordfiles/bash.uew
Depending on your needs you may add other strings of course.