Files
slides/examples/code_blocks.md

750 B

Code blocks

Slides allows you to execute code blocks directly inside your slides!

Just press ctrl+e and the result of the code block will be displayed as virtual text in your slides.

Currently supported languages:

  • bash
  • elixir
  • go
  • javascript
  • python
  • ruby
  • perl

Bash

ls

Elixir

IO.puts "Hello, world!"

Go

package main

import "fmt"

func main() {
  fmt.Println("Hello, world!")
}

Javascript

console.log("Hello, world!")

Lua

print("Hello, World!")

Python

print("Hello, world!")

Ruby

puts "Hello, world!"

Perl

print ("hello, world");