Skip to content

Instantly share code, notes, and snippets.

class ExitError(Exception):
def __init__(self, trace=False):
self.trace = trace
def error(msg, trace=True):
print(msg)
raise ExitError(trace=trace)
// vim: set ft=java:
import java.util.*;
class Vector2f {
public float x, y;
public Vector2f(float x, float y) {
this.x = x;
this.y = y;
// vim: set ft=java:
import java.util.*;
class Vector2f {
public float x, y;
public Vector2f(float x, float y) {
this.x = x;
this.y = y;
//vim: set ft=java
import java.util.*;
class Vector2f {
public float x, y;
public Vector2f(float x, float y) {
this.x = x;
this.y = y;
}

Synopsis

A quite common thing I see beginners do is put as many plugins as possible into their vim config.

I don't blame them, I did that too.

However, even vanilla vim is extremely capable.

NOTE: When I say vim, I refer to NeoVim, because I firmly believe it's the replacement for Vim.

src = """
(def echo (fn (x) (println x)))
(defn hi (x) (println "hi" x))
(hi "world")
(echo "Hello, World!")
(if (== (+ 2 2) (* 2 2)) (echo "Eq works") (echo "Wtf"))
(if (== (+ 0 1) (+ 1 1)) (echo "No, no.") (echo "1 != 2"))
(echo (/ 2 (* 3 2)))
(loop (x 0) (<= x 5) (println x) (recr (+ x 1)))
(echo (input))
(setq gc-cons-threshold (* (expt 1024 3) 1)) ; 1 GB
(setq read-process-output-max (* (expt 1024 2) 1)) ; 1 MB
(add-to-list 'load-path "~/.emacs.d/lazy-load/org-mode/lisp")
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes")
(load-theme 'dracula t)
(tool-bar-mode -1)
UsePAM yes
Banner none
AddressFamily any
Port 22
#! /nix/store/a54wrar1jym1d8yvlijq0l2gghmy8szz-bash-5.1-p12/bin/bash
set -o errexit -o nounset
PATH=/nix/store/l6f4z8mmcnnxba8w004xn28y0vr4gdkf-coreutils-9.0/bin
export LC_ALL=C
export LOCALE_ARCHIVE=/nix/store/imsdp94kfmdj2hwfgzh0pxxln3nhbm4c-glibc-locales-2.33-56/lib/locale/locale-archive
# Enter local state directory.
REAL_HOME=$HOME
TBB_HOME=${TBB_HOME:-$REAL_HOME/.local/share/tor-browser}
(setq gc-cons-threshold (* (expt 1024 3) 1)) ; 1 GB
(setq read-process-output-max (* (expt 1024 2) 1)) ; 1 MB
(recentf-mode -1)
(setq recentf-mode nil)
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes")
(load-theme 'dracula t)
(tool-bar-mode -1)