Skip to content

Instantly share code, notes, and snippets.

Tom Pretty TomPretty

  • Oxford, UK
View GitHub Profile
View init.vim
let mapleader=','
let maplocalleader='\\'
set textwidth=79
set tabstop=2
set expandtab
set shiftwidth=2
set autoindent
set smartindent
View pairing_exercise.py
import random
from collections import Counter
# - 1 point: E, A, I, O, N, R, T, L, S, U
# - 2 points: D, G
# - 3 points: B, C, M, P
# - 4 points: F, H, V, W, Y
# - 5 points: K
# - 8 points: J, X
# - 10 points: Q, Z
@TomPretty
TomPretty / init.vim
Created Oct 9, 2019
Neovim init file
View init.vim
let mapleader=','
set textwidth=79
set tabstop=2
set expandtab
set shiftwidth=2
set autoindent
set smartindent
filetype on
View .vimrc
set nocompatible " required
filetype off " required
let mapleader = ","
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
@TomPretty
TomPretty / .tmux.conf
Last active Jun 17, 2020
tmux config
View .tmux.conf
# prefix
unbind C-b
set -g prefix C-s
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
You can’t perform that action at this time.