Sambee 2.0

Text File Support and Syntax Highlighting

Use this reference to check which files open in the text editor and which language labels you can use in Markdown code blocks. Sambee uses the same syntax highlighting for the text editor, Markdown source, and code blocks in Markdown previews.

Text File Support

Files with an extension or special filename listed below open in the text editor by default, with two exceptions: .md and .markdown open in the Markdown viewer, and .svg opens in the image viewer. A saved viewer preference or the file’s MIME type can override the filename-based choice.

The filename also selects the highlighting language:

  • Special filenames take priority over extensions. Their case rules vary: Dockerfile requires that spelling, while nginx.conf matches in any case.
  • Extensions aren’t case-sensitive. Only the final suffix counts, so project.cmake.in uses Properties highlighting through .in, not CMake.
  • Shared extensions select one language: .m uses Mathematica, .sig uses PGP, and .v uses SystemVerilog.

Plain-text formats such as .txt and .log open in the text editor without highlighting. Unmatched files don’t automatically open as text, but you can choose the text editor from the viewer picker; without a language match, they use plain text.

For images, PDFs, archives, and other supported formats, see Supported File Formats .

Editing and Read-Only Access

Text files open directly in the editor. Sambee checks write access, reserves an edit lock, and reloads the saved file before enabling changes. Opening a file doesn’t save anything; use the save icon or Ctrl + S to save.

If another tab or user holds the lock, or the connection temporarily fails, the file stays readable. A toast explains why editing isn’t available and stays visible for 15 seconds. For files locked by another editor, the message includes the same retry icon used in the toolbar. The Read only badge and Retry editing toolbar icon remain available after the toast disappears. Click that icon or press Ctrl + R to retry editing; the shortcut is available only when editing can be retried and no retry is already pending. Detailed retry errors stay visible until dismissed or resolved. Files on read-only connections, files without write permission, archive members, and files above the configured editing limit stay read-only. Find, selection, copying, wrapping, and download remain available; Save and Replace require write access.

If the edit lock is lost, Sambee stops changes and retains your draft. On retry, if the saved file has changed, choose Use saved file to discard your draft or Keep my draft to retain it against the new saved version. Keeping the draft doesn’t write it; review it before saving.

Click Close or press Esc to return directly to the file list. Escape closes an open search panel first. If you have unsaved changes, Close, Back, and navigation offer Save, Discard, or Cancel. A failed Save keeps the editor open with your draft. Markdown’s rendered viewer and separate edit mode are unchanged.

Markdown Code Block Languages

Put a language label immediately after the opening three backticks. For example, py selects Python:

```py
def greet(name):
	return f"Hello, {name}!"
```

Labels aren’t case-sensitive. Labels on the same table row are interchangeable, so python works just like py. Sambee reads only the first whitespace-separated word after the opening fence; a language’s full name works only if it’s listed as a label.

Unlabelled blocks and unknown labels use plain text. To request plain text explicitly, use text, txt, plaintext, plain, or none. Very large code blocks can also remain plain text without losing their contents.

File and Language Reference

Use the file column to look up a file and the Markdown column to choose a code block label. None in the file or viewer column means the language is available only in Markdown code blocks. None in the Markdown column means there’s no accepted code block label for that format. Viewer choices assume no MIME-type or saved-preference override.

Language or formatFile extensions or namesMarkdown labelsDefault viewer
APL.dyalog, .aplaplText
ASN.1.asn, .asn1asn.1Text
Asteriskextensions.confasteriskText
Brainfuck.b, .bfbrainfuckText
C.c, .h, .inocText
C#.cscs, csharp, c#Text
C++.cpp, .c++, .cc, .cxx, .hpp, .h++, .hh, .hxxcpp, c++Text
Clojure.clj, .cljc, .cljxclojureText
ClojureScript.cljsclojurescriptText
Closure Stylesheets (GSS).gssNoneText
CMake.cmake, CMakeLists.txtcmakeText
COBOL.cob, .cpycobolText
CoffeeScript.coffeecoffee, coffee-script, coffeescriptText
Common Lisp.cl, .lisp, .ellispText
CQL (Cassandra).cqlcql, cassandraText
Crystal.crcrystalText
CSS.csscssText
Cypher.cyp, .cyphercypherText
Cython.pyx, .pxd, .pxicythonText
D.ddText
Dart.dartdartText
Diff.diff, .patchdiffText
DockerfileDockerfiledocker, dockerfileText
DTD.dtddtdText
Dylan.dylan, .dyl, .intrdylanText
EBNFNoneebnfNone
ECL.ecleclText
edn.ednednText
Eiffel.eeiffelText
Elm.elmelmText
Erlang.erlerlangText
EsperNoneesperNone
F#.fsfsharp, f#Text
Factor.factorfactorText
FCLNonefclNone
Forth.forth, .fth, .4thforthText
Fortran.f, .for, .f77, .f90, .f95fortranText
Gas (GNU assembler).sgasText
Gherkin.featuregherkinText
Go.gogoText
Groovy.groovy, .gradle, JenkinsfilegroovyText
Haskell.hshaskellText
Haxe.hxhaxeText
HTML.html, .htm, .handlebars, .hbshtml, htm, xhtmlText
HTTPNonehttpNone
HXML.hxmlhxmlText
IDL.proidlText
Java.javajavaText
JavaScript.js, .mjs, .cjsjs, javascript, ecmascript, nodeText
Jinja.j2, .jinja, .jinja2jinjaText
JSON.json, .mapjson, json5Text
JSON-LD.jsonldjsonld, json-ldText
JSX.jsxjsxText
Julia.jljuliaText
Kotlin.kt, .ktskt, kotlinText
LaTeX.text, .ltx, .textex, latexText
LESS.lesslessText
Liquid.liquidliquidText
LiveScript.lsls, livescriptText
Lua.lualuaText
MariaDB SQLNonemariadbNone
Markdown.md, .markdownmd, markdownMarkdown
Markdown source.mkdmd, markdownText
Mathematica.m, .nb, .wl, .wlsmathematicaText
Mbox.mboxmboxText
mIRC.mrcmircText
Modelica.momodelicaText
MS SQLNonemssqlNone
MscGen.mscgen, .mscin, .mscmscgenText
MsGenny.msgennymsgennyText
MUMPS.mpsmumpsText
MySQLNonemysqlNone
NginxNames ending in .conf that contain nginx, such as nginx.confnginxText
NSIS.nsh, .nsinsisText
NTriples.nt, .nqntriplesText
Objective-CNoneobjective-c, objcNone
Objective-C++.mmobjective-c++, objc++Text
OCaml.ml, .mli, .mll, .mlyocamlText
OctaveNoneoctaveNone
Oz.ozozText
Pascal.p, .paspascalText
Perl.pl, .pmperlText
PGP.asc, .pgp, .sigpgp, asciiarmorText
PHP.php, .php3, .php4, .php5, .php7, .phtmlphpText
Pig.pigpigText
Plain text (no highlighting).txt, .conf, .log, .env, .bat, .cmdtext, txt, plaintext, plain, noneText
PLSQL.plsplsqlText
PostgreSQLNonepostgresqlNone
PowerShell.ps1, .psd1, .psm1ps1, powershellText
Properties files.properties, .ini, .inini, propertiesText
ProtoBuf.protoprotobufText
Pug.pug, .jadejade, pugText
Puppet.pppuppetText
Python.build, .bzl, .py, .pyw, BUCK, BUILDpy, pythonText
Q.qqText
R.rr, rscriptText
RPM Spec.specNoneText
Ruby.rb, Gemfile, Rakefilerb, ruby, jruby, macruby, rake, rbxText
Rust.rsrs, rustText
SAS.sassasText
Sass.sasssassText
Scala.scalascalaText
Scheme.scm, .ssschemeText
SCSS.scssscssText
Shell.sh, .ksh, .bash, PKGBUILDsh, bash, zsh, shell, shellsession, consoleText
Sieve.siv, .sievesieveText
Smalltalk.stsmalltalkText
SML.sml, .fun, .smackspecsmlText
SolrNonesolrNone
SPARQL.rq, .sparqlsparql, sparulText
SpreadsheetNoneexcel, formula, spreadsheetNone
SQL.sqlsqlText
SQLiteNonesqliteNone
Squirrel.nutsquirrelText
sTeXNonestexNone
Stylus.stylstylusText
SVG (XML highlighting).svgxml, rss, wsdl, xsdImage
Swift.swiftswiftText
SystemVerilog.v, .sv, .svhsystemverilogText
Tcl.tcltclText
Textile.textiletextileText
TiddlyWikiNonetiddlywikiNone
TOML.tomltomlText
Troff.1, .2, .3, .4, .5, .6, .7, .8, .9troffText
TSX.tsxtsxText
TTCN.ttcn, .ttcn3, .ttcnppttcnText
TTCN_CFG.cfgttcn_cfgText
Turtle.ttlturtleText
TypeScript.ts, .mts, .ctsts, typescriptText
VB.NET.vbvb.netText
VBScript.vbsvbscriptText
Velocity.vtlvelocityText
VerilogNoneverilogNone
VHDL.vhd, .vhdlvhdlText
Vue.vuevueText
Web IDL.webidlNoneText
WebAssembly.wat, .wastwebassemblyText
XML.xml, .xsl, .xsdxml, rss, wsdl, xsdText
XQuery.xy, .xquery, .xq, .xqm, .xqyxqueryText
Xù.xuxùText
Yacas.ysyacasText
YAML.yaml, .ymlyaml, ymlText
Z80.z80z80Text