Skip to content

Instantly share code, notes, and snippets.

@jecolasurdo
jecolasurdo / promptoptions.go
Created December 4, 2021 05:27
A function for CLI prompt options
package clistuff
import (
"bufio"
"fmt"
"net/url"
"os"
"strings"
)
## This help screen
help:
printf "Available targets\n\n"
awk '/^[a-zA-Z\-\_0-9]+:/ { \
helpMessage = match(lastLine, /^## (.*)/); \
if (helpMessage) { \
helpCommand = substr($$1, 0, index($$1, ":")-1); \
helpMessage = substr(lastLine, RSTART + 3, RLENGTH); \
printf "%-15s %s\n", helpCommand, helpMessage; \
} \
@jecolasurdo
jecolasurdo / INSTRUCTIONS.md
Last active April 9, 2026 01:38
Neovim config: live markdown preview with auto-prompt on file open

Neovim Live Markdown Preview

Whenever you open a .md file, Neovim will prompt you to open a live preview in your browser. The preview syncs to your buffer as you type.

Requirements

  • Neovim 0.12+
  • Git
  • Node.js