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'
@ptrv
ptrv / e
Created December 29, 2016 11:36
#!/bin/sh
if [ "$(pidof emacs)" ] ; then
emacsclient "$@" &
else
emacs -mm --no-bitmap-icon "$@" &
fi
@ptrv
ptrv / .lldbinit
Last active December 12, 2016 17:23
lldbinit for lldb-gud.el
settings set frame-format frame #${frame.index}: ${frame.pc}{ ${module.file.basename}{`${function.name}${function.pc-offset}}}{ at ${line.file.fullpath}:${line.number}}\n
settings set thread-format thread #${thread.index}: tid = ${thread.id}{, ${frame.pc}}{ ${module.file.basename}{`${function.name}${function.pc-offset}}}{ at ${line.file.fullpath}:${line.number}}{, stop reason = ${thread.stop-reason}}\n
@ptrv
ptrv / lldb-gud.patch
Last active December 7, 2016 22:58
lldb support for gud.el
This diff is retrieved from http://lists.gnu.org/archive/html/emacs-devel/2015-02/msg00274.html
And traces its origin back to https://gitorious.org/lldb/lldb/commit/40e4dbf
It's also present on Apple's OS site:
http://www.opensource.apple.com/source/lldb/lldb-76/utils/emacs/
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 42c5b20..7f2e9c0 100644
@ptrv
ptrv / init.el
Last active December 2, 2016 00:06
Starter Emacs init file
(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))
(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
ptrv / smerge-hydra.el
Last active October 23, 2016 08:12
Hydra for smerge
(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 (https://keybase.io/ptrv) on keybase.
  • I have a public key ASB87M_yu8qOUDVnc6Iz9dZJp6gXaveWyXr4_r9SoYVGhwo

To claim this, I am signing this object:

@ptrv
ptrv / ctags_cpp.sh
Last active December 20, 2015 15:59
Tags generation for c++ with ctags
#!/usr/bin/bash
ctags -R --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ -e
@ptrv
ptrv / etags_lua.sh
Created December 19, 2015 23:57
generate Emacs tags file for lua files
#!/usr/bin/bash
etags --language=lua --regex='/.*\([^. \t]\)*[ \t]*=[ \t]*function/\1/' \
--regex='/.*\(local\|\)[ \t][ \t]*function[ \t]\([^ \t(]*\)[ \t]*(/\2/' **/*lua