Skip to content

Instantly share code, notes, and snippets.

Avatar

Peter Vasil ptrv

View GitHub Profile
View fish_prompt.fish
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
#!/bin/sh
if [ "$(pidof emacs)" ] ; then
emacsclient "$@" &
else
emacs -mm --no-bitmap-icon "$@" &
fi
@ptrv
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.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 Dec 7, 2016
lldb support for gud.el
View lldb-gud.patch
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 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
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
View keybase.md

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 Dec 20, 2015
Tags generation for c++ with ctags
View ctags_cpp.sh
#!/usr/bin/bash
ctags -R --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ -e
@ptrv
ptrv / etags_lua.sh
Created Dec 19, 2015
generate Emacs tags file for lua files
View etags_lua.sh
#!/usr/bin/bash
etags --language=lua --regex='/.*\([^. \t]\)*[ \t]*=[ \t]*function/\1/' \
--regex='/.*\(local\|\)[ \t][ \t]*function[ \t]\([^ \t(]*\)[ \t]*(/\2/' **/*lua
You can’t perform that action at this time.