Syntax Highlighting for your Code
Return to support library
As in GitHub Markdown Dialect, Bear supports code blocks and syntax highlighting for over 250 languages (listed below). You simply need to specify the programming language after the first block marker.
An example:
How to paste code snippets
If you are looking for a quick way to insert a code snippet with syntax highlighting into Bear, you can use this quick trick:
- Copy the lines of code
- Select a note in Bear
- Select the Paste From Code functionality, see below
Mac
Right click and select Paste From
→ Code
.
iOS
Tap on the note and select Paste From...
→ From Code
on the edit menu.
Some of the supported languages for syntax highlighting and their abbreviations:
- ABAP
- ActionScript
- ADA
- Apache
- APL
- AppleScript
- Arduino
- ARFF
- AsciiDoc
- ASP.NET - aspnet
- AutoHotkey
- AutoIt
- Bash
- BASIC
- Batch
- Bison
- Brainfuck
- Bro
- C / C++
- C# - csharp
- CoffeeScript - coffee
- Clojure - clj
- Crystal
- CSP
- CSS
- D
- Dart
- Diff
- Django/Jinja2 - django
- Docker
- Eiffel
- Elixir
- Elm
- ERB
- Erlang
- F# - fsharp
- Flow
- Fortran
- Fountain
- GEDCOM
- Gherkin
- Git
- GLSL
- GraphQL
- Groovy
- GO - golang
- Haml
- Handlebars
- Haskell
- Haxe
- HTTP
- HTML
- Icon
- Inform 7 - inform7
- Ini
- Io
- J
- Java
- Javascript - js
- JSON
- Julia
- Keyman
- Kotlin
- Less
- Liquid
- Livescript
- LOLCODE
- Lua
- Makefile
- Markdown - md
- MATLAB - mat
- MEL
- Mizar
- Monkey
- NAJS
- NASM
- ngnix
- nim
- nix
- Objective-C - objc
- Ocam
- OpenCL
- Oz
- Pascal
- Perl
- PHP
- PL/SQL - sql plsql
- PowerShell
- Prolog
- Pug
- Puppet
- Pure
- Python - py
- Q
- Qore - qore
- R
- React JSX - jsx
- Ren’py - renpy
- reST - rest
- Ruby
- Rust
- SAS
- SASS
- Scala - sc
- SCSS
- Scheme
- Shell - sh
- SmallTalk
- Smarty
- Swift
- TAP
- Tcl
- Textile
- Tex/Latex - latex
- Twig
- TypeScript
- VB.NET - vbnet
- Velocity
- Verilog
- VHDL
- vim
- Visual Basic - visual-basic
- WebAssembly - wasm
- Wiki markup - wiki
- Xeora
- Xojo
- XQuery
- XML
- YAML