Skip to content

Instantly share code, notes, and snippets.

set normal (set_color normal)
set magenta (set_color magenta)
set yellow (set_color yellow)
set green (set_color green)
set red (set_color red)
set gray (set_color -o black)
# Fish git prompt
set __fish_git_prompt_showdirtystate 'yes'
set __fish_git_prompt_showstashstate 'yes'
View e
if [ "$(pidof emacs)" ] ; then
emacsclient "$@" &
emacs -mm --no-bitmap-icon "$@" &
ptrv / .lldbinit
Last active Dec 12, 2016
lldbinit for lldb-gud.el
View .lldbinit
settings set frame-format frame #${frame.index}: ${frame.pc}{ ${module.file.basename}{`${}${function.pc-offset}}}{ at ${line.file.fullpath}:${line.number}}\n
settings set thread-format thread #${thread.index}: tid = ${}{, ${frame.pc}}{ ${module.file.basename}{`${}${function.pc-offset}}}{ at ${line.file.fullpath}:${line.number}}{, stop reason = ${thread.stop-reason}}\n
ptrv / lldb-gud.patch
Last active Dec 7, 2016
lldb support for gud.el
View lldb-gud.patch
This diff is retrieved from
And traces its origin back to
It's also present on Apple's OS site:
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 42c5b20..7f2e9c0 100644
ptrv / init.el
Last active Dec 2, 2016
Starter Emacs init file
View init.el
(require 'cl)
(unless (fboundp 'helm-mode)
(ido-mode t)
(setq ido-enable-flex-matching t))
(menu-bar-mode -1)
(when (fboundp 'tool-bar-mode)
(tool-bar-mode -1))
(when (fboundp 'scroll-bar-mode)
(scroll-bar-mode -1))
View smartparens-hydra.el
(defhydra ptrv/smartparens (:hint nil)
Sexps (quit with _q_)
^Nav^ ^Barf/Slurp^ ^Depth^
_f_: forward _→_: slurp forward _R_: splice
_b_: backward _←_: barf forward _r_: raise
_u_: backward ↑ _C-<right>_: slurp backward _↑_: raise backward
_d_: forward ↓ _C-<left>_: barf backward _↓_: raise forward
_p_: backward ↓
ptrv / smerge-hydra.el
Last active Oct 23, 2016
Hydra for smerge
View smerge-hydra.el
(defhydra hydra-smerge
(:color red :hint nil
:pre (smerge-mode 1))
^Move^ ^Keep^ ^Diff^ ^Pair^
_n_ext _b_ase _R_efine _<_: base-mine
_p_rev _m_ine _E_diff _=_: mine-other
^ ^ _o_ther _C_ombine _>_: base-other
^ ^ _a_ll _r_esolve

Keybase proof

I hereby claim:

  • I am ptrv on github.
  • I am ptrv ( on keybase.
  • I have a public key ASB87M_yu8qOUDVnc6Iz9dZJp6gXaveWyXr4_r9SoYVGhwo

To claim this, I am signing this object:

ptrv /
Last active Dec 20, 2015
Tags generation for c++ with ctags
ctags -R --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ -e
ptrv /
Created Dec 19, 2015
generate Emacs tags file for lua files
etags --language=lua --regex='/.*\([^. \t]\)*[ \t]*=[ \t]*function/\1/' \
--regex='/.*\(local\|\)[ \t][ \t]*function[ \t]\([^ \t(]*\)[ \t]*(/\2/' **/*lua