Skip to content

Instantly share code, notes, and snippets.

View spiiph's full-sized avatar

Henrik Leijon spiiph

  • Sogeti
  • Sweden
View GitHub Profile
% © 2016 Henrik Öhman
% Distributed under the CC BY-SA 4.0 license
\documentclass{article}
\usepackage{unicode-math}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{luacode}
\usepackage[pdfborder={0 0 0}]{hyperref}
%=== ./latexmkrc
add_cus_dep('mp', '1', 0, 'mpost');
sub mpost {
my $file = $_[0];
my $return = system "mpost $file" ;
return $return;
}
%=== ./Makefile
ggf: feyn_ggf.tex
@spiiph
spiiph / gist:3691241
Created September 10, 2012 14:47
Some examples using tags to find files
" Improved goto file {{{2
" echo the full path of the file name under the cursor
nmap <silent> <Leader>gf :call <SID>FindFilesByTag(expand("<cfile>"))<CR>
" go to the file name under the cursor
nnoremap <expr> gf empty(taglist(fnamemodify(expand('<cfile>'), ":t"))) ? "gf" : ":tj <C-r><C-f><CR>"
nnoremap <expr> <C-w>f empty(taglist(fnamemodify(expand('<cfile>'), ":t"))) ? "\<C-w>f" : ":stj <C-r><C-f><CR>"
function! s:FindFilesByTag(file) " {{{2
for f in taglist(expand(a:file))
echo f["filename"]
@spiiph
spiiph / csmod.vim
Created September 6, 2012 12:58
Vim colorscheme modification after load
au ColorScheme *
\ if g:colors_name == "inkpot" |
\ hi Comment ctermfg=172 |
\ endif