Sharing Code Snippets
What are Code Snippets?
Code snippets are small pieces of code, hence "snippets" of code, that can be shared while commenting.
With FastComments, simply pasting a snippet of code should automatically be detected and formatted.
When commenting, the code snippet will be wrapped in <code>
blocks, and the formatting happens
after you submit your comment.
The wrapping in <code>
blocks is automatic when pasting a snippet of code, in many languages.
Alternatively, you can highlight a piece of text and click the Code
button in the toolbar.
Coding Communities
Code Snippet Sharing is useful for communities where sharing code is likely to happen.
This makes shared pieces of code easier to read with little effort from your users.
We hope that this feature makes FastComments an ideal choice for programming related sites and applications.
Programming Languages Supported
When sharing code snippets, FastComments does its best to automatically determine which programming language the code snippet is in to automatically format and apply syntax highlighting.
FastComments syntax highlighting currently supports 39 common languages:
- .properties
- Apache
- config
- Bash
- C
- C#
- C++
- CSS
- CoffeeScript
- Diff
- Go
- HTML, XML
- HTTP
- JSON
- Java
- JavaScript
- Kotlin
- Less
- Lua
- Makefile
- Markdown
- Nginx
- config
- Objective-C
- PHP
- PHP Template
- Perl
- Plain text
- Python
- Python REPL
- R
- Ruby
- Rust
- SCSS
- SQL
- Shell
- Session
- Swift
- TOML and INI
- TypeScript
- Visual Basic .NET
- YAML
When sharing a code snippet in a language we don't support, it will still be rendered like code - but no syntax highlighting or reformatting will be applied.