Bred is an Electron-based code editor that supports multiple editing backends (currently only CodeMirror 6). It is designed as a modern, extensible editor with features commonly found in Emacs-style editors, such as advanced navigation, multiple panes, and customizable key bindings.
The codebase is organized into several categories:
- Core application files that handle initialization and main functionality
- Editor backend implementations for different editing engines
- Electron process communication files for secure context isolation
- Main process file system operations
- Main process specialized functionality (browser, LSP, shell)
- User interface management files (panes, tabs, windows)
- Configuration and utility files
- Extension system files
- Version control integration
- Prompt and execution systems
- Directory and file browsing functionality
Main Electron process entry point that initializes the application window and handles inter-process communication.
Functions:
version()- Returns application versionos()- Returns operating system informationinitPackages(backend, cb)- Initializes application packagesinitDoc(devtools)- Initializes document renderinginitMouse()- Sets up mouse handlingmakeScratch(p, cb)- Creates a scratch bufferinitCmds()- Initializes command handlersinitSearch(vfind, spec)- Initializes search functionalityinitDivSearch()- Initializes div-based searchinitBindings()- Initializes keyboard and mouse bindingsinitHandlers()- Sets up event handlersinitTest()- Initializes test buffer functionalityinitEvalLine()- Initializes line evaluationinitRecent()- Initializes recent files functionalityinitFontSize()- Sets initial font sizeinitDivMode()- Initializes div modestart1(data, start2)- Initial startup functionstart2(devtools, frames)- Secondary startup functionstart3(tab)- Tertiary startup functioninitShared()- Initializes shared resourcesinit()- Main initialization functioninitNewWindow()- Initializes a new window
Main frontend initialization module that sets up the editor environment.
Functions:
version()- Returns application versionos()- Returns operating system informationinitSearch(vfind, spec)- Initializes search functionality with backendpatchModeKey()- Returns patch mode keymakeMlDir(dir)- Creates directory markupsetMlDir(buf, dir)- Sets buffer directory markupsetIcon(buf, css, name, run)- Sets buffer iconinitTheme(theme)- Initializes editor themegetCTag(name)- Gets a ctag by nameaddCTags(file)- Adds ctags from a fileinitCTags()- Initializes ctagsinitModeFns(mo)- Initializes mode functionstokenAt(x, y)- Gets token at coordinatesmakeDecor(spec)- Creates a decorationvforLines(view, cb)- Iterates through lines in a viewvwordForward(view, u)- Moves word forward in a viewsave(fn, cb)- Saves a fileenable(u, name)- Enables/disables an optionenableBuf(u, name)- Enables/disables a buffer optioninit(backend, cb)- Main initialization functionfindLang(id)- Finds a language by IDregister(spec)- Registers a componentcode(el, langId, text)- Renders code in an elementfill(view, col)- Fills paragraph to column width
DOM utility functions for creating and manipulating HTML elements.
Functions:
create(nodeName, content, classesOrAttrs, attrs)- Creates an HTML elementappend(parent, ...args)- Appends content to a parent elementprepend(parent, ...children)- Prepends content to a parent elementdiv(content, classes, attrs)- Creates a div elementdivId(id, content, classes, attrs)- Creates a div with an IDdivCl(classes, content, attrs)- Creates a div with classesdivIdCl(id, classes, content, attrs)- Creates a div with ID and classesspan(content, classes, attrs)- Creates a span elementimg(src, alt, classes, attrs)- Creates an image elementbutton(content, classes, attrs)- Creates a button element
Command system for handling editor commands and key bindings.
Functions:
init()- Initializes command systemlast()- Returns last executed commandlastFlag(name)- Returns last flag valueflagLast(name, val)- Sets a flag valueuniversal(cmd)- Gets universal argument multipliersetUniversal()- Sets universal argumentgetMo(name, modeKey)- Gets a command for a modeget(name, buf)- Gets a commandgetAll(buf)- Gets all commandsexec(name, buf, universalArg, we, ...args)- Executes a commandrun(name, buf, universalArg, we, ...args)- Runs a command without recordingrunMo(name, mo, universalArg, we, ...args)- Runs a command in a modecanon(name)- Canonicalizes command nameadd(name, cb, mo)- Adds a commandremove(name)- Removes a command
Mode system for different editing modes and contexts.
Functions:
add(key, spec)- Adds a new moderemove(key)- Removes a modeget(key)- Gets a mode by keygetOrAdd(key)- Gets or adds a modeforEach(cb)- Iterates through all modesfind(cb)- Finds a modemap(cb)- Maps over all modes
Buffer management for handling text documents and their views.
Functions:
shared()- Returns shared buffer storagegetRing()- Gets buffer ringcapitalize(string)- Capitalizes a stringprepDir(dir)- Prepares a directory pathsavePoss()- Saves buffer positionsmake(spec)- Creates a new bufferadd(name, modeKey, content, dir, spec)- Adds a bufferqueue(buf)- Moves buffer to top of ringtop(buf)- Gets top bufferafter(buf)- Gets buffer after specified bufferclear(buf)- Clears buffer contentfind(fn)- Finds a buffermap(fn)- Maps over buffersfilter(fn)- Filters buffersforEach(fn)- Iterates through buffersview(buf, spec, cb)- Creates a buffer viewprint()- Prints buffer debug informationregister(spec)- Registers buffer-related functionality
CodeMirror backend implementation (main module).
Functions:
version()- Returns CodeMirror versionviewFromState(state)- Gets view from editor statefindLang(id)- Finds a language by IDregister(spec)- Registers a componentmakeBep(view, row, col)- Creates a backend positionlineAtBep(view, bep)- Gets line at backend positionlineAt(view, pos)- Gets line at positionvsetPos(view, pos, reveal)- Sets position in viewvgetPos(view)- Gets position from viewvsetBepSpec(view, bep, spec)- Sets backend position with optionsensurePointVisible(view)- Ensures point is visibleposRow(pos)- Gets row from positionposCol(pos)- Gets column from positionvgetBep(view)- Gets backend positionbepGt(bep1, bep2)- Checks if bep1 > bep2bepGtEq(bep1, bep2)- Checks if bep1 >= bep2bepLt(bep1, bep2)- Checks if bep1 < bep2bepLtEq(bep1, bep2)- Checks if bep1 <= bep2bepRow(view, bep)- Gets row from backend positionrowLen(view, row)- Gets row lengthbepCol(view, bep)- Gets column from backend positionvgetBepEnd(view)- Gets end backend positionvsetBep(view, bep, reveal, keepSelection)- Sets backend positionvbepIncr(view, bep)- Increments backend positionvbepEq(bep1, bep2)- Checks if backend positions are equalbepRightOverSpace(view, bep)- Moves position right over spacevgotoLine(view, num)- Goes to a linevlen(view)- Gets line countmakePsn(view, bep)- Makes a position objectvregion(view)- Gets current regioninitModeFns(mo)- Initializes mode functionsvforward(v, u)- Moves forward in viewforward(u)- Moves forwardbackward(u)- Moves backwardwordForward(u)- Moves word forwardwordBackward(u)- Moves word backwardgroupForward(u)- Moves group forwardgroupBackward(u)- Moves group backwardsyntaxForward(u)- Moves syntax forwardsyntaxBackward(u)- Moves syntax backwardprevLine(v, u)- Moves to previous linenextLine(v, u)- Moves to next lineprevBoundary(v, u)- Moves to previous boundarynextBoundary(v, u)- Moves to next boundaryclearSelection(view)- Clears selectionsetMark(u)- Sets a markactivateMark()- Activates markexchange()- Exchanges point and marklineStart(view)- Goes to line startlineEnd(view)- Goes to line endvbufEnd(v)- Goes to buffer endvbufStart(v)- Goes to buffer startbufferStart()- Goes to buffer startbufferEnd()- Goes to buffer endscrollUp()- Scrolls upscrollDown()- Scrolls downtoggleOverwrite()- Toggles overwrite modeselectAll()- Selects alltopLevelStart(extras)- Goes to top level starttopLevelEnd(extras)- Goes to top level endtopOfPane()- Goes to top of panebottomOfPane()- Goes to bottom of panerecenter(view)- Recenters viewcancel()- Cancels current operationvsaveAs(view, cb)- Saves asvsave(view, cb)- Saves viewundo()- Undoes last actionredo()- Redoes last actionsetDecorMatch(decorParent, view, range)- Sets match decorationsetDecorAll(decorParent, view, needle)- Sets all decorationsvinsertAt(v, bep, u, text, setBep, to)- Inserts text at positionvreplaceAt(view, range, text, more)- Replaces text at rangevreplaceAtAll(view, range, text, more)- Replaces text at all rangesselfInsert(u, we)- Self-inserts characterquotedInsert(u)- Inserts quoted charactercaseWord(cb)- Cases wordcapitalizeWord()- Capitalizes wordnewline()- Inserts newlinenewlineAndIndent()- Inserts newline and indentsinsertSlash(u)- Inserts slashopenLine()- Opens linedelPrevChar()- Deletes previous characterdelNextChar()- Deletes next charactercutLine()- Cuts linedelNextWordBound(n)- Deletes next word boundarysuggest()- Shows suggestionsnextSuggest()- Shows next suggestionprevSuggest()- Shows previous suggestioncommentRegion(u)- Comments/uncomments regionindentLine()- Indents lineindentRegion()- Indents regionindentBuffer()- Indents buffersortLines()- Sorts linesinsertTwoSpaces()- Inserts two spacestransposeChars()- Transposes characterstrim()- Trims whitespaceyank()- Yanks textyankRoll()- Rolls yankcut()- Cuts selectioncopy()- Copies selectionopenLint()- Opens lint panelfirstDiagnostic(u, we)- Shows first diagnosticfind(st)- Finds textreplace(st, all, search)- Replaces textvgoXY(view, x, y)- Goes to X,Y coordinatesvforLines(view, cb)- Iterates through linesvwordForward(view, u)- Moves word forwardsave(fn, cb)- Saves fileenable(u, name)- Enables optionenableBuf(u, name)- Enables buffer optioninitComplete()- Initializes completionaddMarkAt(view, bep)- Adds mark at positiontopBep(view)- Gets top visible positionbottomBep(view)- Gets bottom visible positionaddMode(lang, spec)- Adds a language modecode(el, langId, text)- Renders codefill(view, col)- Fills to column
Common utilities for CodeMirror backend.
Functions:
bredView()- Returns bred view facetrunOnCursors(view)- Runs cursor callbackssetValue(ed, text, addToHistory)- Sets editor valueinit()- Initializes module
Completion functionality for CodeMirror.
Functions:
init()- Initializes completion
Decoration handling for CodeMirror.
Functions:
markFromDec(dec)- Creates mark from decorationmakeDecor(spec)- Creates a decorationmakeDecorator(spec)- Creates a decoratordecorate(view, mode)- Applies decorations
Search functionality for CodeMirror.
Functions:
vfind(view, needle, decorParent, opts)- Finds text in view
Highlighting system for CodeMirror.
Functions:
highlighters- Highlighter registrystateHighlighters- State field for highlightersinit()- Initializes highlighters
Language support for CodeMirror.
Functions:
langs- Available languagesinit()- Initializes language support
Mode system for CodeMirror.
Functions:
wexts- Wode extensionsmodeFromLang(id)- Gets mode from language IDmodeLang(id)- Gets language from mode IDmodeFor(path)- Determines mode for file pathpatchModeKey()- Returns patch mode keymakeExtsMode(view)- Makes mode extensionsmakeExtsMinors(view)- Makes minor mode extensionsseize(b, mode)- Seizes buffer for modeaddMode(lang, spec)- Adds a language modeinit()- Initializes mode system
Patch mode support for CodeMirror.
Functions:
extPatch- Patch extensionextPatchDecor- Patch decoration extensioninit()- Initializes patch support
Peer collaboration support for CodeMirror.
Functions:
make(id, startVersion)- Creates peer collaboration plugin
Range handling for CodeMirror.
Functions:
make(view, from, to)- Creates a rangefromPoints(view, pos1, pos2)- Creates range from positions
Theme support for CodeMirror.
Functions:
themeExtension- Theme extensionthemeExtensionPart- Theme extension compartmentTheme- Theme objectthemeHighlightingCode- Code theme highlightingthemeExtensionCode- Code theme extensionhandleCustomTags(m)- Handles custom syntax tagsinit()- Initializes theme
View management for CodeMirror.
Functions:
vonChange(view, cb)- Registers change callbackvoffChange(view, cb)- Unregisters change callbackvonFocus(view, cb)- Registers focus callbackvoffFocus(view, cb)- Unregisters focus callbackmakePlaceholder(ph)- Creates placeholderinit(view, spec, whenReady)- Initializes viewreopen(view, lineNum, whenReady)- Reopens viewcopy(to, from, lineNum, whenReady)- Copies viewrevertV(view, spec, whenReady)- Reverts view
File watching for CodeMirror.
Functions:
watch(buf, path)- Watches file for changesinit()- Initializes watcher
High-level editor functionality and utilities.
Functions:
divMl(dir, name, opts)- Creates markup language elementdivW(dir, name, opts)- Creates editor wrappermakePos(row, col)- Creates a position objectposRowDecr(pos)- Decrements position rowposRowIncr(pos)- Increments position rowthemeExtension()- Gets theme extensionlangs()- Gets available languagesmake(p, spec, cb)- Makes an editor instancecharForInsert(we)- Gets character for insertionmtypeFromExt(ext)- Gets MIME type from extensionsupports(mtype)- Checks if MIME type is supportedsupportsExt(ext)- Checks if extension is supportedescapeForRe(s)- Escapes string for regexinitComplete()- Initializes completioninitFlushLines(mo)- Initializes flush linesinitGotoLine(mo)- Initializes goto lineinitQR(mo)- Initializes query replaceinitSearch(mo)- Initializes searchpatchModeKey()- Gets patch mode keymakeMlDir(dir)- Makes markup language directorysetMlDir(buf, dir)- Sets markup language directorysetIcon(buf, css, name, run)- Sets buffer iconinitTheme(theme)- Initializes themesetBackend(be, cb)- Sets editor backendgetCTag(name)- Gets ctag by nameaddCTags(file)- Adds ctags from fileinitCTags()- Initializes ctagsinitModeFns(mo)- Initializes mode functionstokenAt(x, y)- Gets token at coordinatesmakeDecor(spec)- Makes decorationvforLines(view, cb)- Iterates through linesvwordForward(view, u)- Moves word forwardsave(fn, cb)- Saves fileenable(u, name)- Enables optionenableBuf(u, name)- Enables buffer optioninit(backend, cb)- Initializes editorfindLang(id)- Finds language by IDregister(spec)- Registers componentcode(el, langId, text)- Displays codefill(view, col)- Fills paragraphonCursor(cb)- Adds cursor callback
Electron preload script for secure context isolation
Functions:
tron.cmd(name, args)- Invokes a command in the main processtron.acmd(name, args)- Asynchronously invokes a command in the main processtron.send(ch, ...args)- Sends a message to the main processtron.receive(ch, cb)- Receives a one-time response from the main processtron.on(ch, cb)- Registers a listener for messages from the main processtron.off(ch, cb)- Unregisters a listener for messages from the main process
File operation handlers in main process
Functions:
onCp(e, ch, onArgs)- Handles file copy operationsonExists(e, ch, onArgs)- Checks if a file existsonGet(e, ch, onArgs)- Reads a fileonLn(e, ch, onArgs)- Creates symbolic linksonModify(e, ch, onArgs)- Modifies a file with editsonMv(e, ch, onArgs)- Moves filesonPatch(e, ch, onArgs)- Applies a patch to a fileonRm(e, ch, onArgs)- Removes a fileonSave(e, ch, onArgs)- Saves a fileonSaveTmp(e, onArgs)- Saves a temporary fileonStat(e, ch, onArgs)- Gets file statisticsonTouch(e, ch, onArgs)- Updates file access/modify timesonWatch(e, ch, onArgs)- Watches a file for changes
Directory operation handlers in main process
Functions:
onGet(e, ch, dir)- Reads directory contentsonMake(e, ch, dir)- Creates a directoryonRm(e, ch, onArgs)- Removes a directoryonWatch(e, ch, onArgs)- Watches a directory for changes
File browser functionality
Functions:
onOpen(e, ch, onArgs)- Opens a web browser viewonZoom(e, onArgs)- Zooms the browser viewonBack(e, onArgs)- Navigates back in browser historyonClose(e, onArgs)- Closes a browser viewonReload(e, onArgs)- Reloads a browser viewonReopen(e, onArgs)- Reopens a browser viewonPass(e, onArgs)- Passes input events to a browser viewinit()- Initializes the browser module
Language Server Protocol integration
Functions:
setWin(w)- Sets the main window referenceonEdit(e, ch, onArgs)- Handles LSP edit notificationsonReq(e, ch, onArgs)- Handles LSP requestsmake(lang, dir)- Creates an LSP client for a language
Shell command execution
Functions:
on(e, ch, onArgs, ctx)- Executes shell commands with default settingsonRun(e, ch, onArgs, ctx)- Executes shell commands with custom settingsonOpen(e, ch, onArgs)- Opens URLs in external applicationsonShow(e, ch, onArgs)- Shows files in system file manager
Pane management and layout
Functions:
init()- Initializes the pane systemcurrent(frame)- Gets the current pane in a framefocusView(view, skipEd, skipEle)- Focuses a pane containing a viewadd(frame, b, lineNum)- Adds a new panenextOrSplit()- Gets the next pane or creates a new splitsplit()- Splits the current panemax()- Maximizes the current paneholding(el)- Gets the pane containing an elementholdingView(view)- Gets the pane containing a viewbury(pane)- Buries the buffer in a paneclearBuf(buf)- Clears a buffer from all panescancel()- Cancels current operationrecenter()- Recenters the current viewopenFile(path, lineNum, whenReady)- Opens a file in the current paneopenDir(path)- Opens a directory in the current paneopen(path, lineNum, whenReady)- Opens a file or directorylength()- Gets the number of panes in the current frametop(frame)- Gets the top pane in a frameforEach(cb)- Iterates through all panes
Tab management and navigation
Functions:
init()- Initializes the tab systemadd(area, options)- Adds a new tabget(area, id)- Gets a tab by IDgetByIndex(area, i)- Gets a tab by indexcurrent(area)- Gets the current tab in an areaforEach(area, cb)- Iterates through tabs in an areaevery(area, cb)- Checks if all tabs in an area satisfy a condition
Window management
Functions:
add(window, spec)- Adds a new windowcurrent()- Gets the current windowforEach(cb)- Iterates through all windowsroot()- Checks if this is the root windowshared()- Gets shared window datainit()- Initializes the window system
Option and configuration management
Functions:
load(cb)- Loads options from storagecheck(name)- Validates option name formatdeclare(name, type, value)- Declares an option with type and default valueget(name)- Gets an option valueset(name, value)- Sets an option valuetoggle(name)- Toggles a boolean optiontype(name)- Gets an option typeonSet1(name, cb)- Registers a callback for when an option changesonSet(nameOrArray, cb)- Registers callbacks for when options changeonSetBuf1(name, cb)- Registers a callback for when a buffer option changesonSetBuf(nameOrArray, cb)- Registers callbacks for when buffer options changeforEach(cb)- Iterates through all optionsmap(cb)- Maps over all optionssort()- Returns sorted option entriesbuf(buffer)- Creates buffer-specific options interfacemode()- Creates mode-specific options interfaceinit()- Initializes the options system
Messaging system for displaying messages to the user.
Functions:
log(...args)- Logs a messagesay(...args)- Displays a messagewarn(...args)- Displays a warningyell(...args)- Displays an errorecho(...args)- Echoes a messageechoMore(...args)- Echoes additional messagetrace(...args)- Logs a trace
CSS manipulation utilities.
Functions:
add(ele, classes)- Adds classes to elementremove(ele, classes)- Removes classes from elementtoggle(ele, classes)- Toggles classes on elementhas(ele, classes)- Checks if element has classesenable(ele)- Enables elementdisable(ele)- Disables elementshow(ele)- Shows elementhide(ele)- Hides elementexpand(ele)- Expands elementretract(ele)- Retracts elementinitCss(cb)- Initializes CSS
General utility functions.
Functions:
homeSet(h)- Sets the home directoryhome()- Gets the home directoryarrRm1(arr, pred)- Removes an element from an arraystripFilePrefix(path)- Strips file:// prefix from pathstripAnsi(str)- Strips ANSI escape codes from stringbool(x)- Converts value to booleandefined(arg)- Checks if argument is definedurlAt(l, pos)- Gets URL at position in lineincludes(text, needle, foldCase)- Checks if text includes needleuse()- Utility function to prevent warnings about unused arguments
Extension management system
Functions:
load(dir, name, cb)- Loads an extensionloadAll()- Loads all extensionsget(name)- Gets an extension by nameinit()- Initializes the extension system
Version control integration (Git)
Functions:
initStash()- Initializes stash functionalityinitCommit()- Initializes commit functionalityapplyHunkTooPrecise(view, hunk)- Applies a precise hunkinitEqual()- Initializes diff/patch viewinginitLog()- Initializes Git log viewinginitAnnotate()- Initializes Git annotate (blame) functionalityinit()- Initializes the VC system
Command execution interface
Functions:
divW()- Creates execution windowinit()- Initializes the execution system
Prompt system for user input
Functions:
callerView()- Gets the caller viewyn(content, spec, cb)- Shows yes/no promptchoose(content, choices, spec, cb)- Shows choice promptdemand(em, co)- Shows a demand promptdemandBuf(w, spec)- Shows a demand bufferclose()- Closes the promptask(spec, cb)- Shows an ask promptdir(spec)- Shows directory promptfile(spec)- Shows file promptinit()- Initializes the prompt system
Directory browsing and file management
Functions:
nav(path, run)- Creates navigation elementsformatTime(date, tz, timeFormat, includeSeconds)- Formats a timegetMarked(b)- Gets marked filesadd(p, dir, initialFile)- Adds a directory bufferinit()- Initializes directory functionality
Web browsing functionality
Functions:
browse(href)- Opens a web browserinit()- Initializes browsing functionality
About/help system
Functions:
initDescribeKey()- Initializes key description functionalityinitDescribeCmd()- Initializes command description functionalityinitDescribeWord()- Initializes word description functionalityinit()- Initializes the about/help system
APT package management interface
Functions:
run(cmd)- Runs an APT commandinit()- Initializes APT functionality
UI area management
Functions:
add(win, name)- Adds an areacurrent(win)- Gets the current areagetByName(win, name)- Gets an area by namehide(win, name)- Hides an areashow(win, name)- Shows an areaforEach(cb)- Iterates through areas
Cut/copy/paste functionality
Functions:
nth(i)- Gets nth cut itemadd(str)- Adds a string to cut bufferclear()- Clears cut buffer
Emacs-style key binding system
Functions:
init()- Initializes key binding systemon(key, cmd, modeKey)- Registers a key bindingreplace(em)- Replaces current keymapmake(prefix)- Creates a new keymapseq(cmd, buf)- Gets key sequence for commandlook(wes, nth, buf, cb)- Looks up a key sequence
Frame management (subdivisions of areas)
Functions:
add(tab, spec)- Adds a framecurrent(tab)- Gets current framefind(cb)- Finds a frameforEach(cb)- Iterates through frames
History management
Functions:
ensure(name)- Ensures a history existsadd(name, item)- Adds an item to historyget(name)- Gets history by nameforEach(cb)- Iterates through histories
Icon management
Functions:
path(name)- Gets icon pathalt(name)- Gets icon alt textmode(name)- Gets mode iconmodePath(name)- Gets mode icon path
Language Server Protocol client
Functions:
init()- Initializes LSP client
Manual page viewer
Functions:
init()- Initializes manual page viewer
Menu system
Functions:
make(win)- Creates a menuinit()- Initializes menu system
File opening functionality
Functions:
init()- Initializes file opening functionality
Panel management
Functions:
add(spec)- Adds a panelget(name)- Gets a panel by nameforEach(cb)- Iterates through panels
Cursor/point management
Functions:
make(elePane, ele)- Creates a pointinit()- Initializes point system
Recent files management
Functions:
add(path, type)- Adds a file to recent listget()- Gets recent filesinit()- Initializes recent files system
Scrolling functionality
Functions:
redraw(view, spec, cb)- Redraws scrollable contentshow(surf, numLines)- Shows scrollable content
Shell command execution
Functions:
run(dir, sc, args, spec)- Runs a shell commandrunToString(dir, sc, args, multi, cb)- Runs shell command and captures outputspawn1(sc, args, spec, cb)- Spawns a shell commandshell1(cmd, spec, cb)- Runs a shell command with default settingsedit()- Edits current filenextErr(nth)- Moves to next errorinit()- Initializes shell functionality
Debugging/stepping functionality
Functions:
init()- Initializes stepping functionality
Switch/choice interface
Functions:
divW(choices, spec)- Creates switch windowinit()- Initializes switch functionality
View management
Functions:
make(b, spec, cb)- Creates a view
View mode functionality
Functions:
init()- Initializes view mode
Welcome screen
Functions:
init()- Initializes welcome screen
Solarized theme implementation
Functions:
toX(r)- Converts to hextoHex(c)- Converts color to hexinit(name, clrs, meanings, filterMeanings)- Initializes theme
Solarized dark theme
Functions:
init()- Initializes dark theme
Solarized light theme
Functions:
init()- Initializes light theme
Contains CSS stylesheets for the application UI:
bred.css- Main application stylesbrowse.css- Browser component stylesbuffers.css- Buffer-related stylescut.css- Cut/copy/paste stylesdescribe-cmd.css- Command description stylesdescribe-key.css- Key description stylesdir.css- Directory browsing stylesed.css- Editor component stylesexec.css- Execution interface stylesexts.css- Extension management styleslang.css- Language-specific styleslangs.css- Language list stylesmanpage.css- Manual page stylesmess.css- Messaging system stylesoptions.css- Options/preferences stylesrecent.css- Recent files stylesswitch.css- Switch/choice interface stylestest-buffer.css- Test buffer stylesvc.css- Version control stylesweb.css- Web browsing styles
Contains SVG and PNG icons used throughout the application:
- Application icons (logo, bred.svg)
- UI element icons (x.svg, plus.svg, split.svg, etc.)
- File type icons (csv.svg)
- Action icons (calendar.svg, restart.svg, etc.)
- Navigation icons (up.svg, down.svg, open.svg, etc.)
Contains third-party libraries and dependencies:
@babel/- Babel JavaScript compiler@codemirror/- CodeMirror editor components@lezer/- Lezer parser libraryace/- ACE editor components- Various utility libraries (diff.js, crelt.js, style-mod.js, etc.)
- Language server protocol implementation
- Type definitions and JSON data files
Contains miscellaneous files:
shot.png- Screenshotsingle.bashrc- Bash configuration for single command executionswab.xcf- GIMP image file
Contains extension modules that can be added to enhance functionality:
- Extension-specific JavaScript and CSS files
- Configuration files for each extension
Contains executable scripts and utilities:
- Git-related scripts (git-stash-apply, git-stash-drop, etc.)
- System integration scripts
- Utility scripts for various operations