Skip to content

Instantly share code, notes, and snippets.

View dbakker's full-sized avatar

Daan Bakker dbakker

  • Amsterdam, The Netherlands
View GitHub Profile
@dbakker
dbakker / grepsnip.py
Created October 30, 2014 14:56
Shorten grep/ag/ack results to look nicer in Vim
#!/usr/bin/env python2
# Extracted from the "Vim-Holmes" plugin by Daan Bakker
# Example: ag --column function | ./grepsnip.py
import fileinput
import re
import os
GUESS_SIZE = 10
COLUMNS = os.environ.get('COLUMNS', 120)
" hardmode.vim - Vim: HARD MODE!!!
" Authors: Matt Parrott <parrott.matt@gmail.com>, Xeross <contact@xeross.me>
" Version: 1.0
if exists('g:HardMode_loaded')
finish
endif
let g:HardMode_loaded = 1
if !exists('g:HardMode_currentMode')