Skip to content

Instantly share code, notes, and snippets.

@elmogallen
Last active December 15, 2023 13:04
Show Gist options
  • Save elmogallen/47363ba7526bce5798bd to your computer and use it in GitHub Desktop.
Save elmogallen/47363ba7526bce5798bd to your computer and use it in GitHub Desktop.
My user settings for ZeroBrane Studio: makes it closer to Sublime Text and Lua Glider, keeps shortcut keys consistent as I go back and forth from Windows to OS X, adjusts the default settings, adds a "well" for the line numbers and code folding arrows, and generally makes some UI elements more subtle (code folding, indent guides).
--[[--
Use this file to specify User preferences.
Review [examples](+/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/cfg/user-sample.lua) or check [online documentation](http://studio.zerobrane.com/documentation.html) for details.
--]]--
editor.fontsize = 14
editor.usewrap = false
editor.tabwidth = 4
editor.indentguide = true
editor.fold = true
editor.foldtype = 'arrow'
editor.foldcompact = true
editor.caretline = false -- don't highlight the current line
editor.saveallonrun = false -- like Visual Studio
filetree.fontsize = 13
outline.showmethodindicator = true
outline.showonefile = true
outline.sort = true
outputshell.fontsize = 13
-- Don't stop on the first line when debugging starts; stop at first breakpoint
debugger.runonstart = true
local G = ...
styles = G.loadfile('cfg/tomorrow.lua')('Molokai') -- Molokai background: {27, 29, 30}
stylesoutshell = styles -- apply the same scheme to Output/Console windows
styles.auxwindow = styles.text -- apply text colors to auxiliary windows
styles.calltip = styles.text -- apply text colors to tooltips
styles.indicator.fncall = nil
styles.indicator.varlocal = nil
styles.indicator.varmasking = {fg = {255,0,0}};
styles.indicator.varmasked = {fg = {255,0,0}};
styles.indicator.varglobal = { st = wxstc.wxSTC_INDIC_DOTS, fg = {82,80,80} };
styles.fold = {fg = {42,43,44}, bg = {32,33,34} } -- fold color
styles.indent.fg = {48, 49, 50} -- indent color
styles.linenumber = { fg = {98,99,100}, bg = {32,33,34} }
-- Make the comment shortcut key the same as other Lua editors
keymap[G.ID_COMMENT] = "Ctrl-/"
-- I never use the CTRL+O shortcut to open anything, so I'm remapping it to turn on/off the Output/Console pane
keymap[G.ID_VIEWOUTPUT] = "Ctrl-O"
-- enable move word left/move word right like on Windows
editor.keymap[#editor.keymap+1] = {wxstc.wxSTC_KEY_LEFT, wxstc.wxSTC_SCMOD_CTRL, wxstc.wxSTC_CMD_WORDLEFT, "Macintosh"}
editor.keymap[#editor.keymap+1] = {wxstc.wxSTC_KEY_RIGHT, wxstc.wxSTC_SCMOD_CTRL, wxstc.wxSTC_CMD_WORDRIGHTEND, "Macintosh"}
editor.keymap[#editor.keymap+1] = {wxstc.wxSTC_KEY_LEFT, wxstc.wxSTC_SCMOD_CTRL+wxstc.wxSTC_SCMOD_SHIFT, wxstc.wxSTC_CMD_WORDLEFTEXTEND, "Macintosh"}
editor.keymap[#editor.keymap+1] = {wxstc.wxSTC_KEY_RIGHT, wxstc.wxSTC_SCMOD_CTRL+wxstc.wxSTC_SCMOD_SHIFT, wxstc.wxSTC_CMD_WORDRIGHTENDEXTEND, "Macintosh"}
@simxas
Copy link

simxas commented Feb 23, 2018

Thank you for this. Really nice.

@kafi1986
Copy link

kafi1986 commented Jan 3, 2020

Thank you very much. It was very helpful ^_^ to use those settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment