Skip to content
TerminalPoet
Go back

My terminal setup

Updated:

Placeholder content. It shows how a typical how-to post renders.

Table of contents

Open Table of contents

Shell

A few small functions do most of the work:

# jump to a project and open the editor
work() {
  cd ~/dev/"$1" && nvim .
}~/.zshrc

Highlighting lines

Mark a line with a [!code highlight] comment:

export function greet(name: string) {
  const message = `Hello, ${name}!`; 
  return message;
}greet.ts

Showing a diff

Use [!code --] and [!code ++] to show what changed:

export function greet(name: string) {
  return "Hello, " + name; 
  return `Hello, ${name}!`; 
}

Wrapping up

That’s the whole setup. The code-block features above come from Shiki transformers configured in astro.config.ts.


Share this post on:

Previous Post
Hello, world
Next Post
TIL: pnpm blocks dependency build scripts