Skip to content

Instantly share code, notes, and snippets.

@Gavinok
Gavinok / navigating_between_multiple_files.vim
Last active February 27, 2024 14:41
Confuguration used for navigating between files in vim.
" File: video.vim
" Maintainer: Gavin Jaeger-Freeborn <[email protected]>
" Created: Tue 25 Aug 2020 09:24:20 PM
" License:
" Copyright (c) Gavin Jaeger-Freeborn. Distributed under the same terms as Vim itself.
" See :help license
"
" Description:
" This is a list of useful mappings for vim
@Gavinok
Gavinok / toc_for_ms.org
Last active May 12, 2024 17:10
Some notes on using Groff to produce a Table of Contents with the ms macros

Table Of Contents

Example of automatic creating of tables of contents in groff

.NH
method

.XS \" index start
method contents
.XE \" end index
.LP
@Gavinok
Gavinok / pandoc_x_groff.md
Last active September 15, 2020 06:25
Example for creating PDFs out of Markdown files using Groff and Pandoc

Heading Here

hello \Z'Is Some Text'\v'-.25m'\D'l \w'Is Some Text'u 0'\v'.25m' i am gavin

Sub Heading

  • Remember these points:
@Gavinok
Gavinok / chem.rec
Last active January 21, 2024 00:28
Example code used in a video on GNU recutils ( includes both chem.rec and chem.sh)
%rec: periodic_table
%sort: AtomicNumber
# all values came from
# https://pubchem.ncbi.nlm.nih.gov/periodic-table/
AtomicNumber: 1
Symbol: H
Name: Hydrogen
AtomicMass: 1.0080
@Gavinok
Gavinok / groffconceal.vim
Last active October 8, 2020 19:27
add this to your .vim/after/syntax/groff.vim
fun! s:GroffConceal(group,pat,cchar)
exe 'syn match '.a:group." '".a:pat."' contained conceal cchar=".a:cchar
endfun
if exists('g:groff_greek')
call s:GroffConceal('roffGreek' ,'\<alpha\>' ,'α')
call s:GroffConceal('roffGreek' ,'\<beta\>' ,'β')
call s:GroffConceal('roffGreek' ,'\<gamma\>' ,'γ')
call s:GroffConceal('roffGreek' ,'\<delta\>' ,'δ')
call s:GroffConceal('roffGreek' ,'\<epsilon\>' ,'ϵ')
@Gavinok
Gavinok / sqlval.troff
Last active January 29, 2021 23:53
demo tsql a troff preprocessor for using sqlite in troff
.\" cat THISFILE | tsql | tbl | groff -Tpdf > THISFILE.pdf
Store info
.sqldb :memory:
.sqlbeg
create table Fam (
name text,
id integer
primary key
@Gavinok
Gavinok / grap.ms
Last active July 23, 2022 17:03
Example file for using grap with groff and other troff implementations
.ft CW
groff -G -ms -Tpdf grap.ms > grap.pdf
.ft
.NH
Simple example
.LP
.G1
54.2
49.4
@Gavinok
Gavinok / y.tmac
Last active May 24, 2024 18:24
A collection of groff,pic,and eqn macros used in many of my local files. Note that many of these are not my own work and come from a variety of sources.
.defcolor LOCALBLUE rgb 0.1 0.1 0.9
.de NOTE
\m[LOCALBLUE]NOTE\m[]: \\$*
..
.de PROOF
.ft BI
PROOF
.ft
..
.defcolor LOCALRED rgb 1 0.0 0.0
@Gavinok
Gavinok / config.py
Last active April 5, 2025 11:06
This is a simplified version of my qutebrowser config
import subprocess
import os
from qutebrowser.api import interceptor
"""
qutebrowser settings for video
for more settings check out
https://qutebrowser.org/doc/help/settings.html
"""
@Gavinok
Gavinok / .zshrc
Last active January 26, 2021 14:57
my current .zshrc as of Mon 30 Nov 2020
## HISTORY
HISTFILE="${XDG_CACHE_HOME}/zsh_history"
HISTSIZE=1000
SAVEHIST=1000
#go to the directory without using cd
setopt autocd
export NNN_OPENER='open'
# Reclaim CTRL-S for use, e.g., with Vim (see: man stty)