Skip to content

Instantly share code, notes, and snippets.

@miguelgrinberg
miguelgrinberg / .vimrc
Last active Aug 7, 2022
My .vimrc configuration for working in Python with vim
View .vimrc
" plugins
let need_to_install_plugins = 0
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
let need_to_install_plugins = 1
endif
call plug#begin()
Plug 'tpope/vim-sensible'
@cramja
cramja / ctest_diff.py
Last active Aug 12, 2016
usage: ctest -R your_test > test.out && python ctest_diff.py test.out
View ctest_diff.py
#!/usr/bin/env python
import sys
import re
import os
# regex for useful parts of the diff file
re_start_digits = re.compile(ur'^\d+: ', re.MULTILINE)
re_test_name = re.compile(ur'TRACE,"executing (.*mdp)",', re.MULTILINE)
re_actual = re.compile(ur'TRACE,"Actual:', re.MULTILINE)