├── quick ├── mute ├── ed ├── ek ├── ec ├── lock ├── todo ├── capture ├── agenda ├── standby ├── hibernate ├── toggle-touchpad └── toggle-bluetooth ├── vim ├── xpt │ ├── ftplugin │ │ ├── _func │ │ │ ├── ecma.xpt.vim │ │ │ └── c.like.xpt.vim │ │ ├── _loops │ │ │ ├── foreach.xpt.vim │ │ │ ├── java.for.like.xpt.vim │ │ │ ├── c.while.like.xpt.vim │ │ │ ├── c.for.like.xpt.vim │ │ │ └── for.xpt.vim │ │ ├── xhtml │ │ │ └── xhtml.xpt.vim │ │ ├── unknown │ │ │ └── unknown.xpt.vim │ │ ├── _comment │ │ │ ├── xml.xpt.vim │ │ │ ├── c.like.xpt.vim │ │ │ ├── cpp.like.xpt.vim │ │ │ ├── singleSign.xpt.vim │ │ │ ├── doubleSign.xpt.vim │ │ │ ├── singleDouble.xpt.vim │ │ │ └── pattern.xpt.vim │ │ ├── html │ │ │ ├── eruby.xpt.vim │ │ │ ├── php.xpt.vim │ │ │ └── html.ftdetect.vim │ │ ├── eruby │ │ │ ├── eruby.xpt.vim │ │ │ └── eruby.ftdetect.vim │ │ ├── _common │ │ │ ├── personal_example.xpt.vim │ │ │ └── cmn.counter.xpt.vim │ │ ├── module │ │ │ └── module.javascript.xpt.vim │ │ ├── haskell │ │ │ └── wrapt.xpt.vim │ │ ├── help │ │ │ └── help.xpt.vim │ │ ├── _condition │ │ │ ├── lisp.like.xpt.vim │ │ │ └── ecma.xpt.vim │ │ ├── actionscript │ │ │ └── actionscript.xpt.vim │ │ ├── lex │ │ │ └── lex.xpt.vim │ │ ├── _structures │ │ │ └── c.like.xpt.vim │ │ ├── yacc │ │ │ └── yacc.xpt.vim │ │ ├── xml │ │ │ └── xml.xpt.vim │ │ ├── cabal │ │ │ └── cabal.xpt.vim │ │ ├── tcl │ │ │ └── tcl.xpt.vim │ │ ├── _preprocessor │ │ │ └── c.like.xpt.vim │ │ ├── make │ │ │ └── make.xpt.vim │ │ ├── scheme │ │ │ └── scheme.xpt.vim │ │ └── php │ │ │ ├── php.xpt.vim │ │ │ └── php.ftdetect.vim │ ├── plugin │ │ ├── SnippetScope.class.vim │ │ ├── mapstack.vim │ │ ├── xpclass.vim │ │ ├── FiletypeScope.class.vim │ │ └── SettingSwitch.class.vim │ ├── ftdetect │ │ └── xptemplate.detect.vim │ └── autoload │ │ ├── XPpum.vim │ │ └── XPT.vim ├── templates │ └── ftplugin │ │ ├── cpp │ │ ├── .cpp.xpt.vim.swp │ │ └── cpp.xpt.vim │ │ ├── scheme │ │ └── scheme.xpt.vim │ │ └── java │ │ └── java.xpt.vim ├── vcs-common ├── mailrc ├── java ├── vim │ ├── doc │ │ ├── xpt.snippet.tutor.txt │ │ └── xpt-function.txt │ ├── syntax │ │ ├── htmljinja.vim │ │ ├── vcscommit.vim │ │ ├── SCCSAnnotate.vim │ │ ├── SVNAnnotate.vim │ │ ├── HGAnnotate.vim │ │ ├── SVKAnnotate.vim │ │ ├── CVSAnnotate.vim │ │ └── gitAnnotate.vim │ ├── plugin │ │ └── sherlock.vim │ └── colors │ │ └── lightcolors.vim ├── hg ├── git └── gvimrc ├── yasnippets ├── html-mode │ ├── .yas-make-groups │ ├── .yas-parents │ ├── br │ ├── hr │ ├── p │ ├── li │ ├── td │ ├── th │ ├── header │ │ ├── h1 │ │ ├── h2 │ │ ├── h3 │ │ ├── h4 │ │ ├── h5 │ │ └── h6 │ ├── div │ ├── ol │ ├── span │ ├── tr │ ├── ul │ ├── name │ ├── tag.1l │ ├── href │ ├── pre │ ├── title │ ├── body │ ├── code │ ├── head │ ├── img │ ├── table │ ├── tag.2l │ ├── input │ ├── quote │ ├── form │ ├── meta │ │ ├── meta │ │ ├── doctype │ │ ├── doctype.xhtml1_strict │ │ └── doctype.xhtml1_transitional │ ├── link │ ├── style │ └── html ├── c-mode │ ├── .yas-parents │ ├── fopen │ └── printf ├── c++-mode │ ├── .yas-parents │ ├── ns │ ├── beginend │ ├── template │ ├── using │ ├── parameter in doc.snippet │ ├── debug print line.snippet │ ├── class │ └── function documentation.snippet ├── cc-mode │ ├── .yas-parents │ ├── do │ ├── else │ ├── inc │ ├── elif │ ├── incs │ ├── case │ ├── enum │ ├── if │ ├── tenum │ ├── struct │ ├── tstruct │ ├── ife │ ├── for │ ├── switch │ ├── main │ └── once ├── java-mode │ ├── .yas-parents │ ├── if │ ├── case │ ├── for │ ├── foreach │ ├── def │ ├── switch │ └── defdoc ├── latex-mode │ ├── .yas-parents │ ├── frac.snippet │ ├── use.yasnippet │ ├── chastar.yasnippet │ ├── secstar.yasnippet │ ├── substar.yasnippet │ ├── ssubstar.yasnippet │ ├── bib.yasnippet │ ├── url.yasnippet │ ├── graphics.yasnippet │ ├── item.yasnippet │ ├── enum.yasnippet │ ├── desc.yasnippet │ ├── cha.yasnippet │ ├── eq.yasnippet │ ├── minipage.yasnippet │ ├── sec.yasnippet │ ├── matrix.snippet │ ├── par.yasnippet │ ├── sub.yasnippet │ ├── doc.yasnippet │ ├── ssub.yasnippet │ ├── subfig.yasnippet │ ├── begin.yasnippet │ ├── fig.yasnippet │ ├── eql.snippet │ └── table.yasnippet ├── rst-mode │ ├── .yas-parents │ ├── img.snippet │ ├── dashed.snippet │ ├── equals.snippet │ ├── numbered-item.snippet │ ├── tilded.snippet │ ├── footnote.snippet │ ├── double-equals.snippet │ └── definition.snippet ├── clojure-mode │ ├── .yas-parents │ ├── lambda │ ├── bp │ └── defn ├── emacs-lisp-mode │ ├── .yas-parents │ ├── Autoload cookie.snippet │ ├── define-key.snippet │ ├── defmap.snippet │ ├── file header.snippet │ └── skeleton.snippet ├── markdown-mode │ ├── .yas-parents │ ├── _ │ ├── __ │ ├── ` │ ├── + │ ├── - │ ├── img │ ├── link │ ├── rlink │ ├── h1.1 │ ├── h3 │ ├── h4 │ ├── h5 │ ├── hr.2 │ ├── rimg │ ├── h2.1 │ ├── h6 │ ├── hr.1 │ ├── rlb │ ├── h1.2 │ ├── h2.2 │ └── ol ├── snippet-mode │ ├── .yas-parents │ ├── field │ ├── mirror │ └── vars ├── python-mode │ ├── .yas-parents │ ├── __ │ ├── no_coverage.snippet │ ├── testcase.snippet │ ├── while │ ├── Function_Parameter.snippet │ ├── unittest_setup.snippet │ ├── unittest_teardown.snippet │ ├── unittest_test.snippet │ ├── ifmain │ ├── unittest2-test.snippet │ ├── exception.snippet │ ├── for │ ├── fors │ ├── bp │ ├── shebang │ ├── defm │ ├── def │ └── class ├── text-mode │ ├── ISO Date.snippet │ ├── name.snippet │ ├── email.snippet │ ├── time.snippet │ ├── itime.snippet │ └── ename.snippet └── lua-mode │ ├── function │ ├── for │ ├── forp │ └── fori ├── emacs.d ├── completion-dicts │ ├── ac-l-dict │ │ ├── user-commands │ │ ├── user-arguments │ │ ├── platex-commands │ │ ├── tabularx-c-t-* │ │ ├── color-c-c-* │ │ ├── longtable-a-t-* │ │ ├── paralist-c-*-* │ │ ├── colortbl-c-t-* │ │ ├── latexsym-c-m-* │ │ ├── booktabs-c-t-* │ │ ├── graphicx-c-g-* │ │ ├── array-c-t-* │ │ ├── platex-arguments │ │ ├── longtable-c-t-* │ │ ├── paralist-a-*-* │ │ ├── graphicx-a-g-* │ │ ├── listings-c-*-3 │ │ ├── ptex-primitives │ │ ├── amsmath-a-a-* │ │ ├── hyperref-c-h-* │ │ ├── fancybox-c-*-* │ │ ├── color-a-c-* │ │ ├── basic-arguments │ │ ├── hyperref-a-h-* │ │ └── textcomp-c-f-4 │ ├── c-mode │ ├── java-mode │ ├── php-mode │ ├── c++-mode │ ├── python-mode │ ├── javascript-mode │ └── ruby-mode └── config │ ├── cofi-prolog.el │ ├── cofi-scala.el │ ├── cofi-flymake.el │ ├── cofi-haskell.el │ ├── cofi-tags.el │ ├── cofi-java.el │ ├── cofi-workgroups.el │ ├── cofi-ess.el │ ├── cofi-elisp.el │ ├── cofi-shell.el │ ├── cofi-lua.el │ ├── cofi-xml.el │ ├── cofi-c.el │ ├── cofi-color.el │ ├── cofi-desktop.el │ ├── cofi-project.el │ ├── cofi-ediff.el │ ├── cofi-cedet.el │ └── cofi-mail.el ├── bin ├── gnus ├── org-agenda ├── org-capture ├── git-changes ├── git-addremove ├── rn ├── git-up ├── browser ├── keymap ├── git-reup ├── appt-file ├── git-publish ├── unpack ├── git-incoming ├── git-outgoing ├── master_volume └── pack ├── gitattributes ├── elisp └── ghc-mod │ ├── ghc-pkg.el │ ├── ghc-indent.el │ ├── Makefile │ ├── ghc-command.el │ └── ghc-ins-mod.el ├── gitexcludes ├── zathurarc ├── zsh ├── dirhash ├── colors ├── auto_rehash ├── bindkey ├── style └── prompt ├── .gitignore ├── xinitrc ├── vimenv_setup ├── README ├── hgrc ├── mailcap ├── Makefile ├── xmobar ├── default ├── desktop └── laptop ├── newsbeuterconfig └── tmux.conf /quick/mute: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | pads mute 3 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/_func/ecma.xpt.vim: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vim/xpt/plugin/SnippetScope.class.vim: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vim/xpt/plugin/mapstack.vim: -------------------------------------------------------------------------------- 1 | finish 2 | -------------------------------------------------------------------------------- /vim/xpt/plugin/xpclass.vim: -------------------------------------------------------------------------------- 1 | finish 2 | -------------------------------------------------------------------------------- /yasnippets/html-mode/.yas-make-groups: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /quick/ed: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | emacs --daemon 3 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/_loops/foreach.xpt.vim: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /yasnippets/c-mode/.yas-parents: -------------------------------------------------------------------------------- 1 | cc-mode 2 | -------------------------------------------------------------------------------- /emacs.d/completion-dicts/ac-l-dict/user-commands: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /yasnippets/c++-mode/.yas-parents: -------------------------------------------------------------------------------- 1 | cc-mode 2 | -------------------------------------------------------------------------------- /yasnippets/cc-mode/.yas-parents: -------------------------------------------------------------------------------- 1 | text-mode 2 | -------------------------------------------------------------------------------- /yasnippets/html-mode/.yas-parents: -------------------------------------------------------------------------------- 1 | text-mode 2 | -------------------------------------------------------------------------------- /yasnippets/java-mode/.yas-parents: -------------------------------------------------------------------------------- 1 | text-mode 2 | -------------------------------------------------------------------------------- /yasnippets/latex-mode/.yas-parents: -------------------------------------------------------------------------------- 1 | text-mode 2 | -------------------------------------------------------------------------------- /yasnippets/rst-mode/.yas-parents: -------------------------------------------------------------------------------- 1 | text-mode 2 | -------------------------------------------------------------------------------- /emacs.d/completion-dicts/ac-l-dict/user-arguments: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /yasnippets/clojure-mode/.yas-parents: -------------------------------------------------------------------------------- 1 | text-mode 2 | -------------------------------------------------------------------------------- /yasnippets/emacs-lisp-mode/.yas-parents: -------------------------------------------------------------------------------- 1 | text-mode 2 | -------------------------------------------------------------------------------- /yasnippets/markdown-mode/.yas-parents: -------------------------------------------------------------------------------- 1 | text-mode 2 | -------------------------------------------------------------------------------- /yasnippets/snippet-mode/.yas-parents: -------------------------------------------------------------------------------- 1 | text-mode 2 | -------------------------------------------------------------------------------- /bin/gnus: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | emacs --name 'Gnus Mail' -comm 3 | -------------------------------------------------------------------------------- /quick/ek: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | emacsclient -e '(save-kill-emacs)' 3 | -------------------------------------------------------------------------------- /yasnippets/python-mode/.yas-parents: -------------------------------------------------------------------------------- 1 | text-mode 2 | rst-mode 3 | -------------------------------------------------------------------------------- /yasnippets/c++-mode/ns: -------------------------------------------------------------------------------- 1 | #name : namespace ... 2 | # -- 3 | namespace -------------------------------------------------------------------------------- /yasnippets/python-mode/__: -------------------------------------------------------------------------------- 1 | #name : __...__ 2 | # -- 3 | __${init}__ -------------------------------------------------------------------------------- /bin/org-agenda: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | emacsclient -c -e '(cofi/agenda-frame)' 3 | -------------------------------------------------------------------------------- /quick/ec: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | emacsclient -c --alternate-editor="" "$@" 3 | -------------------------------------------------------------------------------- /bin/org-capture: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | emacsclient -c -e '(cofi/capture-frame)' 3 | -------------------------------------------------------------------------------- /gitattributes: -------------------------------------------------------------------------------- 1 | *.py diff=python 2 | *.lisp diff=lisp 3 | *.el diff=lisp 4 | -------------------------------------------------------------------------------- /quick/lock: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | qdbus org.freedesktop.ScreenSaver /ScreenSaver Lock 4 | -------------------------------------------------------------------------------- /quick/todo: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | emacsclient -c --alternate-editor="" -e "(org-todo-list 0)" 3 | -------------------------------------------------------------------------------- /yasnippets/c++-mode/beginend: -------------------------------------------------------------------------------- 1 | #name : v.begin(), v.end() 2 | # -- 3 | ${1:v}.begin(), $1.end -------------------------------------------------------------------------------- /bin/git-changes: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | git log --pretty=format:'%an <%ae>' $1 | sort | uniq -c 4 | -------------------------------------------------------------------------------- /quick/capture: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | emacsclient -c --alternate-editor="" -e "(cofi/capture-frame)" 3 | -------------------------------------------------------------------------------- /vim/xpt/ftdetect/xptemplate.detect.vim: -------------------------------------------------------------------------------- 1 | au BufRead,BufNewFile *.xpt.vim set filetype=xpt.vim 2 | -------------------------------------------------------------------------------- /yasnippets/c++-mode/template: -------------------------------------------------------------------------------- 1 | #name : template 2 | # -- 3 | template -------------------------------------------------------------------------------- /yasnippets/c++-mode/using: -------------------------------------------------------------------------------- 1 | #name : using namespace ... 2 | # -- 3 | using namespace ${std}; 4 | $0 -------------------------------------------------------------------------------- /emacs.d/completion-dicts/ac-l-dict/platex-commands: -------------------------------------------------------------------------------- 1 | gtfamily 2 | mathgt 3 | mathmc 4 | textgt 5 | textmc -------------------------------------------------------------------------------- /elisp/ghc-mod/ghc-pkg.el: -------------------------------------------------------------------------------- 1 | (define-package 2 | "ghc" 3 | 2.0.0 4 | "Sub mode for Haskell mode" 5 | nil) 6 | -------------------------------------------------------------------------------- /emacs.d/completion-dicts/ac-l-dict/tabularx-c-t-*: -------------------------------------------------------------------------------- 1 | endtabularx 2 | tabularx 3 | tabularxcolumn 4 | tracingtabularx -------------------------------------------------------------------------------- /vim/xpt/ftplugin/xhtml/xhtml.xpt.vim: -------------------------------------------------------------------------------- 1 | XPTemplate priority=lang- 2 | 3 | XPTinclude 4 | \ html/html 5 | 6 | 7 | -------------------------------------------------------------------------------- /yasnippets/c-mode/fopen: -------------------------------------------------------------------------------- 1 | #name : FILE *fp = fopen(..., ...); 2 | # -- 3 | FILE *${fp} = fopen(${"file"}, "${r}"); 4 | -------------------------------------------------------------------------------- /yasnippets/cc-mode/do: -------------------------------------------------------------------------------- 1 | #name : do { ... } while (...) 2 | # -- 3 | do 4 | { 5 | $0 6 | } while (${1:condition}); -------------------------------------------------------------------------------- /yasnippets/cc-mode/else: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : else 3 | # key : else 4 | # -- 5 | else { 6 | $0 7 | } -------------------------------------------------------------------------------- /yasnippets/cc-mode/inc: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : Include local 3 | # key: inc 4 | # -- 5 | #include "$0" -------------------------------------------------------------------------------- /emacs.d/completion-dicts/ac-l-dict/color-c-c-*: -------------------------------------------------------------------------------- 1 | color 2 | colorbox 3 | definecolor 4 | fcolorbox 5 | pagecolor 6 | textcolor -------------------------------------------------------------------------------- /emacs.d/completion-dicts/ac-l-dict/longtable-a-t-*: -------------------------------------------------------------------------------- 1 | errorshow 2 | final 3 | longtable 4 | pausing 5 | set 6 | LTchunksize -------------------------------------------------------------------------------- /yasnippets/cc-mode/elif: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : elif 3 | # key : elif 4 | # -- 5 | else if { 6 | $0 7 | } -------------------------------------------------------------------------------- /yasnippets/cc-mode/incs: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : Include system header 3 | # key : incs 4 | # -- 5 | #include <$0> -------------------------------------------------------------------------------- /yasnippets/markdown-mode/_: -------------------------------------------------------------------------------- 1 | #name : Emphasis 2 | #contributor: Peng Deng 3 | # -- 4 | _${1:Text}_ $0 5 | -------------------------------------------------------------------------------- /yasnippets/markdown-mode/__: -------------------------------------------------------------------------------- 1 | #name : Strong 2 | #contributor: Peng Deng 3 | # -- 4 | **${1:Text}** $0 5 | -------------------------------------------------------------------------------- /bin/git-addremove: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | git add -A 4 | for FILE in `git ls-files --deleted` 5 | { 6 | git rm "${FILE}" 7 | } 8 | -------------------------------------------------------------------------------- /yasnippets/cc-mode/case: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : case 3 | # key : case 4 | # -- 5 | case $1: 6 | $0 7 | break; -------------------------------------------------------------------------------- /yasnippets/html-mode/br: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name:
3 | # key: br 4 | # -- 5 |
-------------------------------------------------------------------------------- /yasnippets/html-mode/hr: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name:
3 | # key: hr 4 | # -- 5 |
-------------------------------------------------------------------------------- /yasnippets/markdown-mode/`: -------------------------------------------------------------------------------- 1 | #name : Inline Code 2 | #contributor: Peng Deng 3 | # -- 4 | \`${1:Code}\` $0 5 | -------------------------------------------------------------------------------- /emacs.d/config/cofi-prolog.el: -------------------------------------------------------------------------------- 1 | (add-major-mode "\\.plg$" 'prolog-mode) 2 | (setq prolog-system 'swi) 3 | 4 | (provide 'cofi-prolog) 5 | -------------------------------------------------------------------------------- /gitexcludes: -------------------------------------------------------------------------------- 1 | *.elc 2 | 3 | *.pyc 4 | *.pyd 5 | *.pyo 6 | 7 | *.o 8 | 9 | *.class 10 | 11 | *.aux 12 | *.toc 13 | *.out 14 | -------------------------------------------------------------------------------- /vim/templates/ftplugin/cpp/.cpp.xpt.vim.swp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cofi/dotfiles/HEAD/vim/templates/ftplugin/cpp/.cpp.xpt.vim.swp -------------------------------------------------------------------------------- /yasnippets/c++-mode/parameter in doc.snippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: parameter in doc 3 | # key: par 4 | # -- 5 | @param $0 -------------------------------------------------------------------------------- /yasnippets/html-mode/p: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name:

...

3 | # key: p 4 | # -- 5 |

$1

-------------------------------------------------------------------------------- /yasnippets/markdown-mode/+: -------------------------------------------------------------------------------- 1 | #name : Unordered List 2 | #contributor: Peng Deng 3 | # -- 4 | + ${1:Text} 5 | +$0 6 | -------------------------------------------------------------------------------- /yasnippets/markdown-mode/-: -------------------------------------------------------------------------------- 1 | #name : Unordered List 2 | #contributor: Peng Deng 3 | # -- 4 | - ${1:Text} 5 | -$0 6 | -------------------------------------------------------------------------------- /yasnippets/python-mode/no_coverage.snippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: no coverage 3 | # key: nocov 4 | # -- 5 | # pragma: no cover -------------------------------------------------------------------------------- /emacs.d/completion-dicts/ac-l-dict/paralist-c-*-*: -------------------------------------------------------------------------------- 1 | pointedenum 2 | pointlessenum 3 | setdefaultenum 4 | setdefaultitem 5 | setdefaultleftmargin -------------------------------------------------------------------------------- /quick/agenda: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | emacsclient -c --alternate-editor="" -e "(let ((org-agenda-window-setup 'current-window)) (org-agenda-list))" 3 | -------------------------------------------------------------------------------- /yasnippets/cc-mode/enum: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : enum ... { ... } 3 | # key : enum 4 | # -- 5 | enum ${1:name} { 6 | $0 7 | }; -------------------------------------------------------------------------------- /yasnippets/cc-mode/if: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : if (...) { ... } 3 | # key : if 4 | # -- 5 | if (${1:condition}) { 6 | $0 7 | } -------------------------------------------------------------------------------- /yasnippets/html-mode/li: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name:
  • ...
  • 3 | # key: li 4 | # -- 5 |
  • $1
  • -------------------------------------------------------------------------------- /yasnippets/html-mode/td: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name: ... 3 | # key: td 4 | # -- 5 | $2 -------------------------------------------------------------------------------- /yasnippets/html-mode/th: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name: ... 3 | # key: th 4 | # -- 5 | $2 -------------------------------------------------------------------------------- /yasnippets/markdown-mode/img: -------------------------------------------------------------------------------- 1 | #name : Image 2 | #contributor: Peng Deng 3 | # -- 4 | ![${1:Alt Text}](${2:URL} $3) $0 5 | -------------------------------------------------------------------------------- /yasnippets/markdown-mode/link: -------------------------------------------------------------------------------- 1 | #name : Link 2 | #contributor: Peng Deng 3 | # -- 4 | [${1:Link Text}](${2:URL} $3) $0 5 | -------------------------------------------------------------------------------- /yasnippets/markdown-mode/rlink: -------------------------------------------------------------------------------- 1 | #name : Reference Link 2 | #contributor: Peng Deng 3 | # -- 4 | [${1:Link Text}][$2] $0 5 | -------------------------------------------------------------------------------- /yasnippets/python-mode/testcase.snippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: testcase 3 | # key: tcase 4 | # -- 5 | def test_$1(self): 6 | $0 -------------------------------------------------------------------------------- /yasnippets/cc-mode/tenum: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : Typed enum 3 | # key : tenum 4 | # -- 5 | typedef enum ${1:name} { 6 | $0 7 | } $1; -------------------------------------------------------------------------------- /yasnippets/emacs-lisp-mode/Autoload cookie.snippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: Autoload cookie 3 | # key: cookie 4 | # -- 5 | ;;;###autoload -------------------------------------------------------------------------------- /yasnippets/html-mode/header/h1: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name:

    ...

    3 | # key: h1 4 | # -- 5 |

    $1

    -------------------------------------------------------------------------------- /yasnippets/html-mode/header/h2: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name:

    ...

    3 | # key: h2 4 | # -- 5 |

    $1

    -------------------------------------------------------------------------------- /yasnippets/html-mode/header/h3: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name:

    ...

    3 | # key: h3 4 | # -- 5 |

    $1

    -------------------------------------------------------------------------------- /yasnippets/html-mode/header/h4: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name:

    ...

    3 | # key: h4 4 | # -- 5 |

    $1

    -------------------------------------------------------------------------------- /yasnippets/html-mode/header/h5: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name:
    ...
    3 | # key: h5 4 | # -- 5 |
    $1
    -------------------------------------------------------------------------------- /yasnippets/html-mode/header/h6: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name:
    ...
    3 | # key: h6 4 | # -- 5 |
    $1
    -------------------------------------------------------------------------------- /yasnippets/markdown-mode/h1.1: -------------------------------------------------------------------------------- 1 | #name : Header 1 (#) 2 | #contributor: Peng Deng 3 | # -- 4 | # ${1:Header 1} # 5 | 6 | $0 7 | -------------------------------------------------------------------------------- /yasnippets/markdown-mode/h3: -------------------------------------------------------------------------------- 1 | #name : Header 3 2 | #contributor: Peng Deng 3 | # -- 4 | ### ${1:Header 3} ### 5 | 6 | $0 7 | -------------------------------------------------------------------------------- /yasnippets/markdown-mode/h4: -------------------------------------------------------------------------------- 1 | #name : Header 4 2 | #contributor: Peng Deng 3 | # -- 4 | #### ${1:Header 4} #### 5 | 6 | $0 7 | -------------------------------------------------------------------------------- /yasnippets/markdown-mode/h5: -------------------------------------------------------------------------------- 1 | #name : Header 5 2 | #contributor: Peng Deng 3 | # -- 4 | ##### ${1:Header 5} ##### 5 | 6 | $0 7 | -------------------------------------------------------------------------------- /yasnippets/markdown-mode/hr.2: -------------------------------------------------------------------------------- 1 | #name : Horizontal Rule (*) 2 | #contributor: Peng Deng 3 | # -- 4 | 5 | ******* 6 | 7 | $0 8 | -------------------------------------------------------------------------------- /yasnippets/markdown-mode/rimg: -------------------------------------------------------------------------------- 1 | #name : Referenced Image 2 | #contributor: Peng Deng 3 | # -- 4 | ![${1:Alt Text}][$2] $0 5 | -------------------------------------------------------------------------------- /yasnippets/python-mode/while: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : while ... : ... 3 | # key: while 4 | # -- 5 | while ${condition}: 6 | $0 7 | -------------------------------------------------------------------------------- /zathurarc: -------------------------------------------------------------------------------- 1 | map + zoom in 2 | map - zoom out 3 | map = zoom 0.0 4 | map fullscreen 5 | map quit 6 | map > scroll full_up 7 | -------------------------------------------------------------------------------- /yasnippets/cc-mode/struct: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : struct ... { ... } 3 | # key : struct 4 | # -- 5 | struct ${1:name} { 6 | $0 7 | }; -------------------------------------------------------------------------------- /yasnippets/html-mode/div: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name: ... 3 | # key: div 4 | # -- 5 | $0 -------------------------------------------------------------------------------- /yasnippets/html-mode/ol: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name:
      ...
    3 | # key: ol 4 | # -- 5 |
      6 | $0 7 |
    -------------------------------------------------------------------------------- /yasnippets/html-mode/span: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name: ... 3 | # key: span 4 | # -- 5 | $1 -------------------------------------------------------------------------------- /yasnippets/html-mode/tr: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name: ... 3 | # key: tr 4 | # -- 5 | 6 | $0 7 | -------------------------------------------------------------------------------- /yasnippets/html-mode/ul: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name:
      ...
    3 | # key: ul 4 | # -- 5 |
      6 | $0 7 |
    -------------------------------------------------------------------------------- /yasnippets/markdown-mode/h2.1: -------------------------------------------------------------------------------- 1 | #name : Header 2 (##) 2 | #contributor: Peng Deng 3 | # -- 4 | ## ${1:Header 1} ## 5 | 6 | $0 7 | -------------------------------------------------------------------------------- /yasnippets/markdown-mode/h6: -------------------------------------------------------------------------------- 1 | #name : Header 6 2 | #contributor: Peng Deng 3 | # -- 4 | ###### ${1:Header 6} ###### 5 | 6 | $0 7 | -------------------------------------------------------------------------------- /yasnippets/markdown-mode/hr.1: -------------------------------------------------------------------------------- 1 | #name : Horizontal Rule (-) 2 | #contributor: Peng Deng 3 | # -- 4 | 5 | ---------- 6 | 7 | $0 8 | -------------------------------------------------------------------------------- /yasnippets/python-mode/Function_Parameter.snippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: Function Parameter 3 | # key: param 4 | # -- 5 | :param $1:$0 6 | -------------------------------------------------------------------------------- /yasnippets/python-mode/unittest_setup.snippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: unittest setup 3 | # key: setup 4 | # -- 5 | def setUp(self): 6 | $0 -------------------------------------------------------------------------------- /yasnippets/text-mode/ISO Date.snippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: ISO Date 3 | # key: idate 4 | # -- 5 | `(format-time-string "%Y-%m-%d")`$0 6 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/unknown/unknown.xpt.vim: -------------------------------------------------------------------------------- 1 | XPTemplate priority=lang 2 | 3 | let s:f = g:XPTfuncs() 4 | 5 | 6 | XPTinclude 7 | \ _common/common 8 | 9 | -------------------------------------------------------------------------------- /yasnippets/cc-mode/tstruct: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : type struct 3 | # key : tstruct 4 | # -- 5 | typedef struct ${1:name} { 6 | $0 7 | } $1; -------------------------------------------------------------------------------- /yasnippets/html-mode/name: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name: 3 | # key: name 4 | # -- 5 | -------------------------------------------------------------------------------- /yasnippets/html-mode/tag.1l: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name: ... 3 | # key: tag 4 | # -- 5 | <${1:tag}>$2$0 -------------------------------------------------------------------------------- /yasnippets/markdown-mode/rlb: -------------------------------------------------------------------------------- 1 | #name : Reference Label 2 | #contributor: Peng Deng 3 | # -- 4 | [${1:Reference}]: ${2:URL} $3 5 | $0 6 | -------------------------------------------------------------------------------- /yasnippets/snippet-mode/field: -------------------------------------------------------------------------------- 1 | # name : ${ ... } field 2 | # contributor : joaotavora 3 | # key : $f 4 | # -- 5 | \${${1:${2:n}:}$3${4:\$(${5:lisp-fn})}\}$0 -------------------------------------------------------------------------------- /yasnippets/snippet-mode/mirror: -------------------------------------------------------------------------------- 1 | # name : ${n:$(...)} mirror 2 | # key : $m 3 | # contributor : joaotavora 4 | # -- 5 | \${${2:n}:${4:\$(${5:reflection-fn})}\}$0 -------------------------------------------------------------------------------- /emacs.d/completion-dicts/ac-l-dict/colortbl-c-t-*: -------------------------------------------------------------------------------- 1 | arrayrulecolor 2 | cellcolor 3 | columncolor 4 | doublerulesepcolor 5 | hhline 6 | minrowclearance 7 | rowcolor -------------------------------------------------------------------------------- /yasnippets/cc-mode/ife: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : if (...) { ... } 3 | # key : if 4 | # -- 5 | if (${1:condition}) { 6 | $0 7 | } else { 8 | 9 | } -------------------------------------------------------------------------------- /yasnippets/html-mode/href: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name: ... 3 | # key: href 4 | # -- 5 | $2 -------------------------------------------------------------------------------- /yasnippets/html-mode/pre: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name:
    ...
    3 | # key: pre 4 | # -- 5 |
    6 |   $0
    7 | 
    -------------------------------------------------------------------------------- /yasnippets/html-mode/title: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name: ... 3 | # key: title 4 | # -- 5 | $1 -------------------------------------------------------------------------------- /yasnippets/lua-mode/function: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet; require-final-newline: nil -*- 2 | # name: function 3 | # key: fun 4 | # -- 5 | function $1($2) 6 | $0 7 | end -------------------------------------------------------------------------------- /emacs.d/completion-dicts/ac-l-dict/latexsym-c-m-*: -------------------------------------------------------------------------------- 1 | leadsto 2 | lhd 3 | mho 4 | rhd 5 | sqsubset 6 | sqsupset 7 | unlhd 8 | unrhd 9 | Box 10 | Diamond 11 | Join -------------------------------------------------------------------------------- /yasnippets/c++-mode/debug print line.snippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: debug print line 3 | # key: debug 4 | # -- 5 | std::cout << $0 << std::endl; // debug -------------------------------------------------------------------------------- /yasnippets/html-mode/body: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name: ... 3 | # key: body 4 | # -- 5 | 6 | $0 7 | -------------------------------------------------------------------------------- /yasnippets/html-mode/code: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name: ... 3 | # key: code 4 | # -- 5 | 6 | $0 7 | -------------------------------------------------------------------------------- /yasnippets/html-mode/head: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name: ... 3 | # key: head 4 | # -- 5 | 6 | $0 7 | -------------------------------------------------------------------------------- /yasnippets/python-mode/unittest_teardown.snippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: unittest teardown 3 | # key: teardown 4 | # -- 5 | def tearDown(self): 6 | $0 -------------------------------------------------------------------------------- /yasnippets/python-mode/unittest_test.snippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: unittest test 3 | # key: test 4 | # -- 5 | class $1Test(unittest.TestCase): 6 | $0 -------------------------------------------------------------------------------- /emacs.d/completion-dicts/ac-l-dict/booktabs-c-t-*: -------------------------------------------------------------------------------- 1 | addlinespace 2 | bottomrule 3 | cmidrule 4 | futurenonspacelet 5 | midrule 6 | morecmidrules 7 | specialrule 8 | toprule -------------------------------------------------------------------------------- /yasnippets/html-mode/img: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name: ... 3 | # key: img 4 | # -- 5 | $2 -------------------------------------------------------------------------------- /yasnippets/html-mode/table: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name: ...
    3 | # key: table 4 | # -- 5 | 6 | $0 7 |
    -------------------------------------------------------------------------------- /yasnippets/html-mode/tag.2l: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name: \n...\n 3 | # key: tag 4 | # -- 5 | <${1:tag}> 6 | $2 7 | $0 -------------------------------------------------------------------------------- /yasnippets/python-mode/ifmain: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : if __name__ == '__main__': ... 3 | # key: ifmain 4 | # -- 5 | if __name__ == '__main__': 6 | $0 7 | -------------------------------------------------------------------------------- /yasnippets/python-mode/unittest2-test.snippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: unittest2 Test 3 | # key: test2 4 | # -- 5 | class $1Test(unittest2.TestCase): 6 | $0 -------------------------------------------------------------------------------- /yasnippets/html-mode/input: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name: 3 | # key: input 4 | # -- 5 | -------------------------------------------------------------------------------- /yasnippets/cc-mode/for: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : for (...; ...; ...) { ... } 3 | # key: for 4 | # -- 5 | for (${1:int i = 0}; ${2:i < N}; ${3:++i}) { 6 | $0 7 | } 8 | -------------------------------------------------------------------------------- /yasnippets/cc-mode/switch: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : switch 3 | # key : switch 4 | # -- 5 | switch ($1) { 6 | case $2: 7 | $0 8 | break; 9 | default: 10 | } -------------------------------------------------------------------------------- /yasnippets/clojure-mode/lambda: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : lambda 3 | # key : fn 4 | # contributor : Michael Markert 5 | # -- 6 | (fn [$1] $0) -------------------------------------------------------------------------------- /yasnippets/java-mode/if: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : if 3 | # contributor : Michael Markert 4 | # -- 5 | if (${1:cond}) { 6 | ${0} 7 | } -------------------------------------------------------------------------------- /yasnippets/latex-mode/frac.snippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Michael Markert 3 | # key: frac 4 | # name: \frac 5 | # -- 6 | \frac{$1}{$2}$0 -------------------------------------------------------------------------------- /yasnippets/python-mode/exception.snippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: create new Exception 3 | # key: exception 4 | # -- 5 | class $1Error(Exception): 6 | ${0:pass} 7 | -------------------------------------------------------------------------------- /yasnippets/cc-mode/main: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: int main(argc, argv) { ... } 3 | # key: main 4 | # -- 5 | int main(int argc, char* argv[]) { 6 | $0 7 | return 0; 8 | } -------------------------------------------------------------------------------- /yasnippets/clojure-mode/bp: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: Breakpoint 3 | # key: bp 4 | # contributor : Michael Markert 5 | # -- 6 | (swank.core/break) -------------------------------------------------------------------------------- /yasnippets/python-mode/for: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : for ... in ... (expression) 3 | # key: for 4 | # condition: (cofi/snippet-in-code) 5 | # -- 6 | for ${var} in ${collection} -------------------------------------------------------------------------------- /yasnippets/python-mode/fors: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : for statement 3 | # key: fors 4 | # condition: (cofi/snippet-in-code) 5 | # -- 6 | for ${var} in ${collection}: 7 | $0 -------------------------------------------------------------------------------- /emacs.d/completion-dicts/ac-l-dict/graphicx-c-g-*: -------------------------------------------------------------------------------- 1 | graphicspath 2 | includegraphics 3 | reflectbox 4 | resizebox 5 | rotatebox 6 | scalebox 7 | DeclareGraphicsExtensions 8 | DeclareGraphicsRule -------------------------------------------------------------------------------- /yasnippets/html-mode/quote: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name:
    ...
    3 | # key: quote 4 | # -- 5 |
    6 | $1 7 |
    -------------------------------------------------------------------------------- /yasnippets/latex-mode/use.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Mads D. Kristensen 3 | # key: use 4 | # name: \usepackage 5 | # -- 6 | \usepackage[$2]{$1}$0 -------------------------------------------------------------------------------- /yasnippets/markdown-mode/h1.2: -------------------------------------------------------------------------------- 1 | #name : Header 1 (=) 2 | #contributor: Peng Deng 3 | # -- 4 | ${1:Header 1} 5 | ${1:$(make-string (string-width text) ?\=)} 6 | 7 | $0 8 | -------------------------------------------------------------------------------- /yasnippets/markdown-mode/h2.2: -------------------------------------------------------------------------------- 1 | #name : Header 2 (-) 2 | #contributor: Peng Deng 3 | # -- 4 | ${1:Header 2} 5 | ${1:$(make-string (string-width text) ?\-)} 6 | 7 | $0 8 | -------------------------------------------------------------------------------- /yasnippets/lua-mode/for: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet; require-final-newline: nil -*- 2 | # name: for 3 | # key: for 4 | # condition: (cofi/snippet-in-code) 5 | # -- 6 | for $1 in $2 do 7 | $0 8 | end 9 | -------------------------------------------------------------------------------- /yasnippets/markdown-mode/ol: -------------------------------------------------------------------------------- 1 | #name : Ordered List 2 | #contributor: Peng Deng 3 | # -- 4 | ${1:1}. ${2:Text} 5 | ${1:$(number-to-string (1+ (string-to-number text)))}. $0 6 | -------------------------------------------------------------------------------- /yasnippets/python-mode/bp: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: Breakpoint 3 | # key: bp 4 | # contributor : Michael Markert 5 | # -- 6 | import ipdb; ipdb.set_trace() -------------------------------------------------------------------------------- /bin/rn: -------------------------------------------------------------------------------- 1 | #! /bin/zsh -f 2 | # Rename file, but keep suffix 3 | 4 | OLD="$1" 5 | NEW="$2" 6 | 7 | SUFFIX=${OLD#*.} 8 | 9 | DIR=$(dirname $OLD) 10 | 11 | mv ${OLD} $DIR/${NEW}.${SUFFIX} 12 | -------------------------------------------------------------------------------- /yasnippets/c++-mode/class: -------------------------------------------------------------------------------- 1 | #name : class ... { ... } 2 | # -- 3 | class ${1:Name} 4 | { 5 | public: 6 | ${1:$(yas/substr text "[^: ]*")}($2); 7 | virtual ~${1:$(yas/substr text "[^: ]*")}(); 8 | }; -------------------------------------------------------------------------------- /yasnippets/java-mode/case: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : case 3 | # key : case 4 | # contributor : Michael Markert 5 | # -- 6 | case ${1:cond} : ${2:block}; break;$0 -------------------------------------------------------------------------------- /yasnippets/latex-mode/chastar.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key : cha* 4 | # name : \chapter* 5 | # -- 6 | \chapter*{${1:name}} 7 | $0 -------------------------------------------------------------------------------- /yasnippets/latex-mode/secstar.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key : sec* 4 | # name : \section* 5 | # -- 6 | \section*{${1:name}} 7 | $0 -------------------------------------------------------------------------------- /bin/git-up: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Shows log and diffstat of pulled commits 3 | 4 | HEAD=$(git rev-parse HEAD) 5 | git pull "$@" 6 | git log --pretty=format:"%Cred%ae %Creset- %C(yellow)%s %Creset(%ar)" $HEAD.. 7 | -------------------------------------------------------------------------------- /emacs.d/completion-dicts/ac-l-dict/array-c-t-*: -------------------------------------------------------------------------------- 1 | array 2 | arraybackslash 3 | endarray 4 | extrarowheight 5 | extratabsurround 6 | firsthline 7 | lasthline 8 | newcolumn 9 | newcolumntype 10 | showcols -------------------------------------------------------------------------------- /yasnippets/latex-mode/substar.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key: sub* 4 | # name : \subsection* 5 | # -- 6 | \subsection*{${1:name}} 7 | $0 -------------------------------------------------------------------------------- /yasnippets/html-mode/form: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | #name :
    3 | # key: form 4 | # -- 5 |
    6 | $0 7 |
    -------------------------------------------------------------------------------- /yasnippets/html-mode/meta/meta: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name: 3 | # key: meta 4 | # -- 5 | -------------------------------------------------------------------------------- /yasnippets/lua-mode/forp: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet; require-final-newline: nil -*- 2 | # name: for pairs 3 | # key: forp 4 | # condition: (cofi/snippet-in-code) 5 | # -- 6 | for $1 in pairs($2) do 7 | $0 8 | end 9 | -------------------------------------------------------------------------------- /zsh/dirhash: -------------------------------------------------------------------------------- 1 | # -*- mode: sh -*- 2 | 3 | function add_hash() { 4 | test -d "$1" && hash -d $2="$1" 5 | } 6 | 7 | while read line; do 8 | eval add_hash "$line" 9 | done < ~/config/diralias 10 | -------------------------------------------------------------------------------- /emacs.d/completion-dicts/ac-l-dict/platex-arguments: -------------------------------------------------------------------------------- 1 | disablejfam 2 | jarticle 3 | jbook 4 | jreport 5 | jsarticle 6 | jsbook 7 | mentuke 8 | tarticle 9 | tbook 10 | tombo 11 | tombow 12 | treport 13 | zh 14 | zw -------------------------------------------------------------------------------- /yasnippets/clojure-mode/defn: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: defn 3 | # key: defn 4 | # contributor: Michael Markert 5 | # -- 6 | (defun ${1:name} 7 | "$2" 8 | [$3] 9 | ($0)) -------------------------------------------------------------------------------- /yasnippets/latex-mode/ssubstar.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key: ssub* 4 | # name : \subsubsection* 5 | # -- 6 | \subsubsection*{${1:name}} 7 | $0 -------------------------------------------------------------------------------- /yasnippets/lua-mode/fori: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet; require-final-newline: nil -*- 2 | # name: for ipairs 3 | # key: fori 4 | # condition: (cofi/snippet-in-code) 5 | # -- 6 | for $1 in ipairs($2) do 7 | $0 8 | end 9 | -------------------------------------------------------------------------------- /quick/standby: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # dbus-send --type=method_call --dest=org.freedesktop.ScreenSaver /ScreenSaver org.freedesktop.ScreenSaver.Lock 3 | # qdbus org.freedesktop.ScreenSaver /ScreenSaver Lock 4 | sudo pm-suspend 5 | -------------------------------------------------------------------------------- /yasnippets/java-mode/for: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : for 3 | # key : for 4 | # contributor : Michael Markert 5 | # -- 6 | for (${1:int i = 0}; ${2:cond}; ${3:i++}) { 7 | $0 8 | } -------------------------------------------------------------------------------- /yasnippets/latex-mode/bib.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Mads D. Kristensen 3 | # key: bib 4 | # name: \bibliography 5 | # -- 6 | \bibliographystyle{plain} 7 | \bibliography{$1}$0 -------------------------------------------------------------------------------- /emacs.d/config/cofi-scala.el: -------------------------------------------------------------------------------- 1 | (add-to-loadpath "~/.elisp/vendor/scala-mode2/") 2 | (add-to-list 'auto-mode-alist '("\\.scala\\'" . scala-mode)) 3 | (autoload 'scala-mode "scala-mode2" nil t) 4 | 5 | (provide 'cofi-scala) 6 | -------------------------------------------------------------------------------- /yasnippets/c-mode/printf: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : printf 3 | # contributor : joaotavora 4 | # -- 5 | printf ("${1:%s}\\n"${1:$(if (string-match "%" text) "," "\);") 6 | }$2${1:$(if (string-match "%" text) "\);" "")} -------------------------------------------------------------------------------- /yasnippets/java-mode/foreach: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: for each 3 | # contributor: Michael Markert 4 | # key: foreach 5 | # -- 6 | for(${1:type} ${2:name} : ${3:coll}) { 7 | $0 8 | } -------------------------------------------------------------------------------- /yasnippets/latex-mode/url.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Mads D. Kristensen 3 | # key: url 4 | # name: \url 5 | # -- 6 | \url{${1:$$(yas/choose-value '("http" "ftp"))}://${2:address}}$0 -------------------------------------------------------------------------------- /yasnippets/text-mode/name.snippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Michael Markert 3 | # key: name_ 4 | # name: Fullname 5 | # condition: 'force-in-comment 6 | # -- 7 | `user-full-name`$0 -------------------------------------------------------------------------------- /quick/hibernate: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | #dbus-send --type=method_call --dest=org.freedesktop.ScreenSaver /ScreenSaver org.freedesktop.ScreenSaver.Lock 3 | # qdbus org.freedesktop.ScreenSaver /ScreenSaver Lock 4 | sync 5 | sudo pm-hibernate 6 | -------------------------------------------------------------------------------- /yasnippets/html-mode/link: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name: 3 | # key: link 4 | # -- 5 | -------------------------------------------------------------------------------- /yasnippets/html-mode/style: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name: 3 | # key: style 4 | # -- 5 | -------------------------------------------------------------------------------- /yasnippets/latex-mode/graphics.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key : graphics 4 | # name : \includegraphics 5 | # -- 6 | \includegraphics[width=${1:\linewidth}]{${2:file}} -------------------------------------------------------------------------------- /yasnippets/text-mode/email.snippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Michael Markert 3 | # key: email 4 | # name: (user's email) 5 | # condition: 'force-in-comment 6 | # -- 7 | `user-mail-address`$0 -------------------------------------------------------------------------------- /yasnippets/text-mode/time.snippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Michael Markert 3 | # key: time_ 4 | # name : (current time) 5 | # condition: 'force-in-comment 6 | # -- 7 | `(current-time-string)` -------------------------------------------------------------------------------- /emacs.d/config/cofi-flymake.el: -------------------------------------------------------------------------------- 1 | ;; check only after save 2 | (setq flymake-no-changes-timeout 9999 3 | flymake-start-syntax-check-on-newline nil) 4 | (require 'flymake) 5 | (require 'flymake-cursor) 6 | 7 | (provide 'cofi-flymake) 8 | -------------------------------------------------------------------------------- /yasnippets/latex-mode/item.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key : item 4 | # name : \begin{itemize} ... \end{itemize} 5 | # -- 6 | \begin{itemize} 7 | \item $0 8 | \end{itemize} -------------------------------------------------------------------------------- /yasnippets/python-mode/shebang: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: shebang 3 | # contributor: Michael Markert 4 | # key: sb 5 | # -- 6 | #!/usr/bin/env python 7 | # -*- coding: `buffer-file-coding-system` -*- -------------------------------------------------------------------------------- /bin/browser: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | if_running="firefox" 3 | alternative="conkeror" 4 | 5 | pgrep ${if_running} > /dev/null 2>&1 6 | 7 | if [ $? -eq 0 ]; then 8 | exec ${if_running} "$@" 9 | else 10 | exec ${alternative} "$@" 11 | fi 12 | -------------------------------------------------------------------------------- /vim/vcs-common: -------------------------------------------------------------------------------- 1 | iabbr d [Doc] 2 | iabbr f [Fix] 3 | iabbr r [Refactor] 4 | iabbr a [Add] 5 | iabbr c [Clean] 6 | iabbr fo [Format] Formatted codebase. 7 | 8 | imap q :wqall 9 | nnoremap q :wqall 10 | 11 | -------------------------------------------------------------------------------- /yasnippets/html-mode/html: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name: ... 3 | # key: html 4 | # -- 5 | 6 | $0 7 | -------------------------------------------------------------------------------- /yasnippets/html-mode/meta/doctype: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name: DocType XHTML 1.1 3 | # key: doctype 4 | # -- 5 | -------------------------------------------------------------------------------- /yasnippets/java-mode/def: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 mode: snippet -*- 2 | # name: Define method with javadoc 3 | # key: def 4 | # contributor: Michael Markert 5 | # -- 6 | ${1:void} ${2:name}(${3:arg}) { 7 | $0 8 | } -------------------------------------------------------------------------------- /yasnippets/latex-mode/enum.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key: enum 4 | # name : \begin{enumerate} ... \end{enumerate} 5 | # -- 6 | \begin{enumerate} 7 | \item $0 8 | \end{enumerate} -------------------------------------------------------------------------------- /yasnippets/text-mode/itime.snippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Michael Markert 3 | # key: itime 4 | # name: ISO-8601 Time 5 | # condition: 'force-in-comment 6 | # -- 7 | `(format-time-string "%Y-%m-%d %T %z")`$0 -------------------------------------------------------------------------------- /yasnippets/c++-mode/function documentation.snippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: function documentation 3 | # key: fdoc 4 | # -- 5 | /** 6 | * $1 7 | * 8 | * @return $0 9 | * 10 | * @author `user-full-name` <`user-mail-address`> 11 | */ -------------------------------------------------------------------------------- /yasnippets/latex-mode/desc.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key : desc 4 | # name : \begin{description} ... \end{description} 5 | # -- 6 | \begin{description} 7 | \item[$0] 8 | \end{description} -------------------------------------------------------------------------------- /yasnippets/rst-mode/img.snippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : Image 3 | # key : img 4 | # condition: (or (eq major-mode 'rst-mode) (not (cofi/snippet-in-code))) 5 | # contributor : Michael Markert 6 | # -- 7 | .. image:: $0 -------------------------------------------------------------------------------- /yasnippets/text-mode/ename.snippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Michael Markert 3 | # key: ename 4 | # name: Fullname with email 5 | # condition: 'force-in-comment 6 | # -- 7 | `user-full-name` <`user-mail-address`>$0 -------------------------------------------------------------------------------- /bin/keymap: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | BASE="setxkbmap -model evdev -option compose:ralt,ctrl:nocaps" 4 | us="$BASE -layout us" 5 | de="$BASE -layout de" 6 | 7 | case $1 in 8 | de) eval $de ;; 9 | us) eval $us ;; 10 | *) eval $us ;; 11 | esac 12 | -------------------------------------------------------------------------------- /yasnippets/cc-mode/once: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : Include once 3 | # key: once 4 | # -- 5 | #ifndef ${1:_`(upcase (file-name-nondirectory (file-name-sans-extension (buffer-file-name))))`_H_} 6 | #define $1 7 | 8 | $0 9 | 10 | #endif /* $1 */ -------------------------------------------------------------------------------- /yasnippets/rst-mode/dashed.snippet: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 mode: snippet -*- 2 | #name : Section title 3 | #key: -- 4 | # condition: (or (eq major-mode 'rst-mode) (not (cofi/snippet-in-code))) 5 | # -- 6 | ${1:sec} 7 | ${1:$(make-string (string-width text) ?-)} 8 | 9 | $0 -------------------------------------------------------------------------------- /emacs.d/config/cofi-haskell.el: -------------------------------------------------------------------------------- 1 | (add-to-loadpath "~/.elisp/ghc-mod/") 2 | (add-to-hook 'haskell-mode-hook '(ghc-init 3 | haskell-doc-mode 4 | haskell-indentation-mode)) 5 | 6 | (provide 'cofi-haskell) 7 | -------------------------------------------------------------------------------- /yasnippets/rst-mode/equals.snippet: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 mode: snippet -*- 2 | #name : Chapter title 3 | #key: == 4 | # condition: (or (eq major-mode 'rst-mode) (not (cofi/snippet-in-code))) 5 | # -- 6 | ${1:chap} 7 | ${1:$(make-string (string-width text) ?=)} 8 | 9 | $0 -------------------------------------------------------------------------------- /yasnippets/java-mode/switch: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : Switch 3 | # key : switch 4 | # contributor : Michael Markert 5 | # expand-env : ((yas-triggers-in-field t)) 6 | # -- 7 | switch (${1:cond}) { 8 | case$0 9 | } 10 | -------------------------------------------------------------------------------- /yasnippets/rst-mode/numbered-item.snippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : Numbered List item 3 | # key : #. 4 | # condition: (or (eq major-mode 'rst-mode) (not (cofi/snippet-in-code))) 5 | # contributor : Michael Markert 6 | # -- 7 | ${1:#}. $0 -------------------------------------------------------------------------------- /bin/git-reup: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Shows log and diffstat of pulled commits (using rebase) 3 | 4 | HEAD=$(git rev-parse HEAD) 5 | git pull --rebase "$@" 6 | git --no-pager diff --color --stat $HEAD.. 7 | git log --pretty=format:"%Cred%ae %Creset- %C(yellow)%s %Creset(%ar)" $HEAD.. 8 | -------------------------------------------------------------------------------- /yasnippets/html-mode/meta/doctype.xhtml1_strict: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name: DocType XHTML 1.0 Strict 3 | # key: doctype 4 | # -- 5 | -------------------------------------------------------------------------------- /yasnippets/rst-mode/tilded.snippet: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 mode: snippet -*- 2 | #name : Tilded section 3 | #key: ~~ 4 | # condition: (or (eq major-mode 'rst-mode) (not (cofi/snippet-in-code))) 5 | # -- 6 | ${1:sec} 7 | ${1:$(make-string (string-width text) ?~)} 8 | 9 | $0 10 | -------------------------------------------------------------------------------- /emacs.d/completion-dicts/ac-l-dict/longtable-c-t-*: -------------------------------------------------------------------------------- 1 | endfirsthead 2 | endfoot 3 | endhead 4 | endlastfoot 5 | endlongtable 6 | longtable 7 | setlongtables 8 | tablename 9 | tabularnewline 10 | LTcapwidth 11 | LTchunksize 12 | LTleft 13 | LTmulticolumn 14 | LTpost 15 | LTpre 16 | LTright -------------------------------------------------------------------------------- /yasnippets/emacs-lisp-mode/define-key.snippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Michael Markert 3 | # name: (define-key ...) 4 | # key: defkey 5 | # -- 6 | (${1:$$(yas/choose-value '("define-key" "global-set-key" "local-set-key"))} (kbd "$2") '$3)$0 -------------------------------------------------------------------------------- /yasnippets/rst-mode/footnote.snippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : Footnote 3 | # key : fn 4 | # condition: (or (eq major-mode 'rst-mode) (not (cofi/snippet-in-code))) 5 | # contributor : Michael Markert 6 | # -- 7 | [${1:#}]_$0 8 | 9 | 10 | .. [$1] $2 -------------------------------------------------------------------------------- /yasnippets/latex-mode/cha.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key : cha 4 | # name : \chapter 5 | # -- 6 | \chapter{${1:name}} 7 | \label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}} 8 | $0 -------------------------------------------------------------------------------- /yasnippets/latex-mode/eq.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Michael Markert 3 | # key: eq 4 | # name: \begin{equation} ... \end{equation} 5 | # -- 6 | \begin{${1:$$(yas/choose-value '("equation" "gather" "align" "multline"))}${2:*}} 7 | $0 8 | \end{$1$2} -------------------------------------------------------------------------------- /yasnippets/latex-mode/minipage.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Mads D. Kristensen 3 | # key: minipage 4 | # name: \begin{minipage}[position][width] ... \end{minipage} 5 | # -- 6 | \begin{minipage}[${1:htbp}]{${2:1.0}${3:\linewidth}} 7 | $0 8 | \end{minipage} -------------------------------------------------------------------------------- /yasnippets/latex-mode/sec.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key : sec 4 | # name : \section 5 | # -- 6 | \section{${1:name}} 7 | \label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}} 8 | $0 -------------------------------------------------------------------------------- /yasnippets/html-mode/meta/doctype.xhtml1_transitional: -------------------------------------------------------------------------------- 1 | # contributor: Anders Bach Nielsen 2 | # name: DocType XHTML 1.0 Transitional 3 | # key: doctype 4 | # -- 5 | -------------------------------------------------------------------------------- /yasnippets/latex-mode/matrix.snippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Michael Markert 3 | # key: matrix 4 | # name: \begin{matrix} ... \end{matrix} 5 | # -- 6 | \begin{${1:$$(yas/choose-value '("pmatrix" "bmatrix" "Bmatrix" "vmatrix" "Vmatrix"))}} 7 | $0 8 | \end{$1} -------------------------------------------------------------------------------- /yasnippets/latex-mode/par.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key: par 4 | # name : \paragraph 5 | # -- 6 | \paragraph{${1:name}} 7 | \label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}} 8 | $0 -------------------------------------------------------------------------------- /yasnippets/latex-mode/sub.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key: sub 4 | # name : \subsection 5 | # -- 6 | \subsection{${1:name}} 7 | \label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}} 8 | $0 -------------------------------------------------------------------------------- /yasnippets/snippet-mode/vars: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : Snippet header 3 | # contributor : joaotavora 4 | # contributor : Michael Markert 5 | # -- 6 | # -*- mode: snippet -*- 7 | # name : $1 8 | # key : ${2:trigger-key} 9 | # contributor : $3 10 | # -- 11 | $0 -------------------------------------------------------------------------------- /emacs.d/config/cofi-tags.el: -------------------------------------------------------------------------------- 1 | (add-hook 'c-mode-common-hook #'ggtags-mode) 2 | 3 | (eval-after-load "ggtags" 4 | '(fill-keymap ggtags-mode-map 5 | "C-c ." 'ggtags-find-tag-dwim 6 | "C-c ," 'ggtags-find-tag-resume 7 | "C-c /" 'ggtags-navigation-mode-done)) 8 | 9 | (provide 'cofi-tags) 10 | -------------------------------------------------------------------------------- /yasnippets/latex-mode/doc.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Mads D. Kristensen 3 | # key: doc 4 | # name: \documentclass 5 | # -- 6 | \documentclass[$2]{${1:$$(yas/choose-value '("article" "report" "book" "letter"))}} 7 | 8 | \begin{document} 9 | $0 10 | \end{document} -------------------------------------------------------------------------------- /yasnippets/latex-mode/ssub.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key: ssub 4 | # name : \subsubsection 5 | # -- 6 | \subsubsection{${1:name}} 7 | \label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}} 8 | $0 -------------------------------------------------------------------------------- /quick/toggle-touchpad: -------------------------------------------------------------------------------- 1 | #! /bin/zsh -f 2 | 3 | FORCE_OFF=$1 4 | 5 | if [ "$FORCE_OFF" = 1 ]; then 6 | synclient TouchpadOff=1 7 | else 8 | if synclient -l | grep 'TouchpadOff.*1$' > /dev/null ; then 9 | synclient TouchpadOff=0 10 | else 11 | synclient TouchpadOff=1 12 | fi 13 | fi 14 | -------------------------------------------------------------------------------- /yasnippets/latex-mode/subfig.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key: subfig 4 | # name : \subfigure 5 | # -- 6 | \subfigure[${1:caption}]{ 7 | \label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}} 8 | $0 9 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.elc 2 | *~ 3 | \#*\# 4 | emacs.d/ac-comphist.dat 5 | emacs.d/auto-save-list/ 6 | emacs.d/private.el 7 | emacs.d/.emacs.desktop* 8 | vim/vim/.netrwhist 9 | emacs.d/url/ 10 | emacs.d/elpa/ 11 | emacs.d/custom.el 12 | emacs.d/semanticdb 13 | emacs.d/session.* 14 | emacs.d/var/pcache/ 15 | emacs.d/newsticker/ 16 | -------------------------------------------------------------------------------- /emacs.d/config/cofi-java.el: -------------------------------------------------------------------------------- 1 | (add-to-loadpath "~/.elisp/vendor/emacs-eclim" 2 | "~/.elisp/vendor/emacs-eclim/vendor/") 3 | 4 | (setq eclim-auto-save t 5 | eclim-use-yasnippet nil) 6 | (autoload 'eclim-mode "eclim" nil t) 7 | (add-hook 'java-mode-hook 'eclim-mode) 8 | 9 | (provide 'cofi-java) 10 | -------------------------------------------------------------------------------- /yasnippets/emacs-lisp-mode/defmap.snippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Michael Markert 3 | # name: define map 4 | # key: defmap 5 | # -- 6 | (let ((map (make-sparse-keymap))) 7 | $0 8 | (${1:$$(yas/choose-value '("define-key" "global-set-key" "local-set-key"))} (kbd "$2") map)) 9 | -------------------------------------------------------------------------------- /yasnippets/rst-mode/double-equals.snippet: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 mode: snippet -*- 2 | #name : Document title 3 | #key: === 4 | # condition: (or (eq major-mode 'rst-mode) (not (cofi/snippet-in-code))) 5 | # -- 6 | ${1:$(make-string (string-width text) ?\=)} 7 | ${1:title} 8 | ${1:$(make-string (string-width text) ?\=)} 9 | 10 | $0 -------------------------------------------------------------------------------- /bin/appt-file: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # with arguments write arguments to appt-file, else output appt-file 3 | APPT_FILE_PATH=$HOME/var/appt-file 4 | if [ ${1-""} = "-clear" ]; then 5 | echo > $APPT_FILE_PATH 6 | exit 7 | fi 8 | if [ $# -gt 0 ]; then 9 | echo $@ > $APPT_FILE_PATH 10 | else 11 | cat $APPT_FILE_PATH 12 | fi 13 | -------------------------------------------------------------------------------- /yasnippets/rst-mode/definition.snippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : Definition 3 | # key : def 4 | # contributor : Michael Markert 5 | # condition: (or (not (string-match-p "^[ \t].*" (buffer-substring (point-at-bol) (point-at-eol)))) 6 | # (not (cofi/snippet-in-code))) 7 | # -- 8 | $1 9 | $0 -------------------------------------------------------------------------------- /emacs.d/completion-dicts/ac-l-dict/paralist-a-*-*: -------------------------------------------------------------------------------- 1 | fminipage 2 | landfloat 3 | BVerbatim 4 | Bcenter 5 | Bdescription 6 | Benumerate 7 | Beqnarray 8 | Bflushleft 9 | Bflushright 10 | Bitemize 11 | FramedEqn 12 | FramedTable 13 | FramedVerb 14 | LVerbatim 15 | LandScape 16 | Landscape 17 | SaveVerbatim 18 | Sbox 19 | Verbatim 20 | VerbatimOut -------------------------------------------------------------------------------- /xinitrc: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | setxkbmap -model evdev -layout us -option compose:ralt,ctrl:nocaps 3 | xrdb -merge .Xresources 4 | 5 | urxvtd -q -f -o & 6 | 7 | [ -e ~/.bin_local/xinit.local.sh ] && ~/.bin_local/xinit.local.sh 8 | 9 | export GTK_IM_MODULE=xim 10 | export QT_IM_MODULE=xim 11 | export GDK_NATIVE_WINDOWS=true 12 | 13 | exec startkde 14 | -------------------------------------------------------------------------------- /yasnippets/latex-mode/begin.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Mads D. Kristensen 3 | # contributor : Bjorn Reese 4 | # key: begin 5 | # name: \begin{environment} ... \end{environment} 6 | # -- 7 | \begin{${1:$$(yas/choose-value (mapcar 'car (LaTeX-environment-list)))}} 8 | $0 9 | \end{$1} -------------------------------------------------------------------------------- /zsh/colors: -------------------------------------------------------------------------------- 1 | # -*- mode: sh -*- 2 | 3 | autoload -U colors 4 | export COLORTERM=yes 5 | 6 | if [[ -f ~/.dircolors ]] { 7 | if [[ ${TERM} == screen* ]] { 8 | eval $( TERM=screen dircolors ~/.dircolors ) 9 | } else { 10 | eval $( dircolors ~/.dircolors ) 11 | } 12 | } else { 13 | eval $( dircolors -b ) 14 | } 15 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/_comment/xml.xpt.vim: -------------------------------------------------------------------------------- 1 | " NOTE: You can include this file into which uses XML comment format. But It is 2 | " recommended to include _comment/doubleSign (or singleSign, 3 | " singleDouble) directly. 4 | XPTemplate priority=spec 5 | 6 | XPTvar $CL 8 | 9 | 10 | XPTinclude 11 | \ _comment/doubleSign 12 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/_comment/c.like.xpt.vim: -------------------------------------------------------------------------------- 1 | " NOTE: You can include this file into which uses C comment format. But It is 2 | " recommended to include _comment/doubleSign (or singleSign, 3 | " singleDouble) directly. 4 | XPTemplate priority=like 5 | 6 | XPTvar $CL /* 7 | XPTvar $CM * 8 | XPTvar $CR */ 9 | 10 | XPTinclude 11 | \ _comment/doubleSign 12 | -------------------------------------------------------------------------------- /vimenv_setup: -------------------------------------------------------------------------------- 1 | let vimdir = expand("~/.vim") 2 | let vimlocal_dir = expand("~/.vim_local") 3 | let &runtimepath = vimdir . '/vim' 4 | let &runtimepath = &runtimepath . ',$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,' 5 | let &runtimepath = &runtimepath . vimdir . '/templates,' . vimdir . '/xpt' 6 | let &runtimepath = &runtimepath . ',' . vimlocal_dir 7 | exec "source " . vimdir . "/vimrc" 8 | -------------------------------------------------------------------------------- /emacs.d/completion-dicts/ac-l-dict/graphicx-a-g-*: -------------------------------------------------------------------------------- 1 | angle 2 | bb 3 | bbllx 4 | bblly 5 | bburx 6 | bbury 7 | clip 8 | command 9 | demo 10 | draft 11 | ext 12 | final 13 | graphicx 14 | height 15 | hiderotate 16 | hidesbb 17 | hidescale 18 | hiresbb 19 | keepaspectratio 20 | natheight 21 | natwidth 22 | origin 23 | read 24 | scale 25 | totalheight 26 | trim 27 | type 28 | viewport 29 | width -------------------------------------------------------------------------------- /vim/mailrc: -------------------------------------------------------------------------------- 1 | setlocal textwidth=72 2 | setlocal spell 3 | 4 | nmap sc :w:!aspell -e -c "%":e 5 | 6 | iabbr mfg Mit freundlichen Grüßen, 7 | iabbr vg Viele Grüße, 8 | iabbr sgdh Sehr geehrte Damen und Herren, 9 | iabbr sgf Sehr geehrte Frau 10 | iabbr sgh Sehr geehrter Herr 11 | 12 | iabbr s Sincerely, 13 | iabbr r Regards, 14 | iabbr dsom Dear Sir or Madam, 15 | -------------------------------------------------------------------------------- /emacs.d/completion-dicts/ac-l-dict/listings-c-*-3: -------------------------------------------------------------------------------- 1 | lstDeleteShortInline 2 | lstMakeShortInline 3 | lstalias 4 | lstaspectfiles 5 | lstdefinelanguage 6 | lstdefinestyle 7 | lstinline 8 | lstinputlisting 9 | lstlanguagefiles 10 | lstlgrindeffile 11 | lstlistingname 12 | lstlistlistingname 13 | lstlistoflistings 14 | lstloadlanguages 15 | lstname 16 | lstnewenvironment 17 | lstset 18 | thelstlisting -------------------------------------------------------------------------------- /yasnippets/latex-mode/fig.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key : fig 4 | # name : \begin{figure} ... \end{figure} 5 | # -- 6 | \begin{figure}[htbp] 7 | \centering 8 | $0 9 | \caption{${1:caption}} 10 | \label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}} 11 | \end{figure} -------------------------------------------------------------------------------- /vim/xpt/ftplugin/_comment/cpp.like.xpt.vim: -------------------------------------------------------------------------------- 1 | " NOTE: You can include this file into which uses CPP comment format. But It 2 | " is recommended to include _comment/doubleSign (or singleSign, 3 | " singleDouble) directly. 4 | XPTemplate priority=like- 5 | 6 | XPTvar $CL /* 7 | XPTvar $CM * 8 | XPTvar $CR */ 9 | 10 | XPTvar $CS // 11 | 12 | XPTinclude 13 | \ _comment/singleDouble 14 | -------------------------------------------------------------------------------- /yasnippets/latex-mode/eql.snippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor: Michael Markert 3 | # key: eql 4 | # name: \begin{equation} ...\label{...} ...\end{equation} 5 | # -- 6 | \begin{${1:$$(yas/choose-value '("equation" "gather" "align" "multline"))}${2:*}} 7 | \label{${3:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}} 8 | $0 9 | \end{$1$2} -------------------------------------------------------------------------------- /emacs.d/completion-dicts/ac-l-dict/ptex-primitives: -------------------------------------------------------------------------------- 1 | autospacing 2 | autoxspacing 3 | euc 4 | inhibitxspcode 5 | jcharwindowpenalty 6 | jfam 7 | jfont 8 | jis 9 | kanjiskip 10 | kansuji 11 | kansujichar 12 | kuten 13 | noautospacing 14 | noautoxspacing 15 | postbreakpenalty 16 | prebreakpenalty 17 | showmode 18 | sjis 19 | tate 20 | tbaselineshift 21 | tfont 22 | xkanjiskip 23 | xspcode 24 | ybaselineshift 25 | yoko -------------------------------------------------------------------------------- /emacs.d/completion-dicts/c-mode: -------------------------------------------------------------------------------- 1 | auto 2 | _Bool 3 | break 4 | case 5 | char 6 | _Complex 7 | const 8 | continue 9 | default 10 | do 11 | double 12 | else 13 | enum 14 | extern 15 | float 16 | for 17 | goto 18 | if 19 | _Imaginary 20 | inline 21 | int 22 | long 23 | register 24 | restrict 25 | return 26 | short 27 | signed 28 | sizeof 29 | static 30 | struct 31 | switch 32 | typedef 33 | union 34 | unsigned 35 | void 36 | volatile 37 | while 38 | -------------------------------------------------------------------------------- /emacs.d/config/cofi-workgroups.el: -------------------------------------------------------------------------------- 1 | (add-to-loadpath "~/.elisp/vendor/workgroups/") 2 | 3 | (setq wg-mode-line-on nil 4 | wg-mode-line-left-brace "{" 5 | wg-mode-line-right-brace "} " 6 | wg-query-for-save-on-emacs-exit nil 7 | wg-file (cofi/var-file "emacs/wg") 8 | wg-morph-on nil) 9 | 10 | (require 'workgroups) 11 | (defun wg-mode-line-add-display ()) 12 | (workgroups-mode 1) 13 | 14 | (provide 'cofi-workgroups) 15 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/html/eruby.xpt.vim: -------------------------------------------------------------------------------- 1 | " These snippets work only in html context of a eruby file 2 | if &filetype != 'eruby' 3 | finish 4 | endif 5 | 6 | XPTemplate priority=lang- 7 | 8 | XPTemplateDef 9 | 10 | XPT ruby hint=<%\ ... 11 | <% 12 | `cursor^ 13 | %> 14 | 15 | 16 | XPT r hint=<%\ ...\ %> 17 | <% `cursor^ %> 18 | 19 | 20 | XPT re hint=<%=\ ... 21 | <%= `expr^ %> 22 | 23 | 24 | XPT rc hint=<%#\ ... 25 | <%# `cursor^ %> 26 | -------------------------------------------------------------------------------- /yasnippets/latex-mode/table.yasnippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # contributor : Mads D. Kristensen 3 | # key: table_ 4 | # name : \begin{table} ... \end{table} 5 | # -- 6 | \begin{table}[htbp] 7 | \centering 8 | \begin{tabular}{${3:format}} 9 | $0 10 | \end{tabular} 11 | \caption{${1:caption}} 12 | \label{${2:"waiting for reftex-label call..."$(unless yas/modified-p (reftex-label nil 'dont-insert))}} 13 | \end{table} -------------------------------------------------------------------------------- /vim/xpt/ftplugin/html/php.xpt.vim: -------------------------------------------------------------------------------- 1 | " These snippets work only in html context of php file 2 | if &filetype != 'php' 3 | finish 4 | endif 5 | 6 | XPTemplate priority=lang-2 7 | 8 | XPTemplateDef 9 | 10 | 11 | XPT shebang hint=#!/usr/bin/env\ php 12 | #!/usr/bin/env php 13 | 14 | ..XPT 15 | 16 | XPT sb alias=shebang 17 | 18 | 19 | XPT php hint= 20 | 21 | 22 | XPT pe hint= 23 | 24 | 25 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | External dependencies: 2 | Emacs: 3 | optional: 4 | `private.el` in loadpath 5 | Zsh: 6 | optional: 7 | `$LOCALDIR/pre` - will be loaded before most of zsh config. 8 | `$LOCALDIR/post` - will be loaded after zsh config. 9 | 10 | make [refresh] : Update byte-compiled Emacs files. 11 | make compile : Compile all Emacs files. 12 | make deploy : Deploy all files (using symbolic links). 13 | make all : compile and deploy. 14 | -------------------------------------------------------------------------------- /emacs.d/completion-dicts/ac-l-dict/amsmath-a-a-*: -------------------------------------------------------------------------------- 1 | align 2 | alignat 3 | aligned 4 | alignedat 5 | amsmath 6 | amssymb 7 | bmatrix 8 | cases 9 | centertags 10 | flalign 11 | fleqn 12 | gather 13 | gathered 14 | intlimits 15 | leqno 16 | matrix 17 | multline 18 | namelimits 19 | nointlimits 20 | nonamelimits 21 | nosumlimits 22 | pmatrix 23 | reqno 24 | smallmatrix 25 | split 26 | subarray 27 | subequations 28 | sumlimits 29 | tbtags 30 | vmatrix 31 | Bmatrix 32 | MaxMatrixCols 33 | Vmatrix -------------------------------------------------------------------------------- /emacs.d/config/cofi-ess.el: -------------------------------------------------------------------------------- 1 | (setq ess-pdf-viewer-pref "kde-open") 2 | (setq ess-ps-viewer-pref "kde-open") 3 | (setq ess-ask-for-ess-directory nil) 4 | 5 | (add-to-hooks #'eldoc-mode '(ess-mode-hook 6 | inferior-ess-mode-hook)) 7 | 8 | (add-to-hooks #'smartparens-mode '(ess-mode-hook 9 | inferior-ess-mode-hook)) 10 | 11 | (add-to-hooks #'auto-complete-mode '(ess-mode-hook 12 | inferior-ess-mode-hook)) 13 | 14 | (provide 'cofi-ess) 15 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/eruby/eruby.xpt.vim: -------------------------------------------------------------------------------- 1 | XPTemplate priority=lang- 2 | 3 | XPTinclude 4 | \ _common/common 5 | \ html/html 6 | \ html/eruby 7 | 8 | XPTembed 9 | \ ruby/ruby 10 | \ javascript/javascript 11 | \ css/css 12 | 13 | " ========================= Function and Variables ============================= 14 | 15 | " ================================= Snippets =================================== 16 | XPTemplateDef 17 | 18 | 19 | 20 | 21 | " ================================= Wrapper =================================== 22 | 23 | -------------------------------------------------------------------------------- /vim/java: -------------------------------------------------------------------------------- 1 | setlocal foldmethod=syntax 2 | 3 | inoremap ;; ; 4 | nnoremap d :JavaDocComment 5 | nnoremap co :JavaCorrect 6 | nnoremap im :JavaImportMissing 7 | nnoremap ic :JavaImportClean 8 | nnoremap gs :JavaGetSet 9 | nnoremap ag :JavaGet 10 | nnoremap as :JavaSet 11 | nnoremap j :Java 12 | 13 | noremap ; A; 14 | nnoremap f :%!astyle --style=java "%" 15 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/_common/personal_example.xpt.vim: -------------------------------------------------------------------------------- 1 | " Move me to your own fptlugin/_common, and config your personal information 2 | " 3 | " Here is the place to set personal preference 4 | " "priority=personal" is the highest which overrides any other XPTvar setting 5 | " 6 | " You also set personal varaibles with 'g:xptemplate_vars'. 7 | XPTemplate priority=personal 8 | 9 | 10 | " XPTvar $author you have not yet set $author variable 11 | " XPTvar $email you have not yet set $email variable 12 | 13 | XPTemplateDef 14 | XPT yoursnippet " tips here 15 | bla bla 16 | 17 | -------------------------------------------------------------------------------- /elisp/ghc-mod/ghc-indent.el: -------------------------------------------------------------------------------- 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2 | ;;; 3 | ;;; ghc-indent.el 4 | ;;; 5 | 6 | ;; Author: Kazu Yamamoto 7 | ;; Created: Feb 28, 2012 8 | 9 | ;;; Code: 10 | 11 | (defvar ghc-indent-offset 4) 12 | 13 | (defun ghc-make-indent-shallower (beg end) 14 | (interactive "r") 15 | (indent-rigidly (region-beginning) (region-end) (- ghc-indent-offset))) 16 | 17 | (defun ghc-make-indent-deeper (beg end) 18 | (interactive "r") 19 | (indent-rigidly (region-beginning) (region-end) ghc-indent-offset)) 20 | 21 | (provide 'ghc-indent) 22 | -------------------------------------------------------------------------------- /emacs.d/completion-dicts/java-mode: -------------------------------------------------------------------------------- 1 | abstract 2 | assert 3 | boolean 4 | break 5 | byte 6 | case 7 | catch 8 | char 9 | class 10 | const 11 | continue 12 | default 13 | do 14 | double 15 | else 16 | enum 17 | extends 18 | final 19 | finally 20 | float 21 | for 22 | goto 23 | if 24 | implements 25 | import 26 | instanceof 27 | int 28 | interface 29 | long 30 | native 31 | new 32 | package 33 | private 34 | protected 35 | public 36 | return 37 | short 38 | static 39 | strictfp 40 | super 41 | switch 42 | synchronized 43 | this 44 | throw 45 | throws 46 | transient 47 | try 48 | void 49 | volatile 50 | while 51 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/_loops/java.for.like.xpt.vim: -------------------------------------------------------------------------------- 1 | XPTemplate priority=like- 2 | 3 | " containers 4 | let s:f = g:XPTfuncs() 5 | 6 | XPTvar $TRUE true 7 | XPTvar $FALSE false 8 | XPTvar $NULL null 9 | XPTvar $BRif 10 | XPTvar $VOID_LINE /* void */; 11 | 12 | " ================================= Snippets =================================== 13 | XPTemplateDef 14 | 15 | XPT for hint=for\ i++ 16 | for (`int^ `i^ = `0^; `i^ < `len^; ++`i^) `$BRif^{ 17 | `cursor^ 18 | } 19 | 20 | XPT forr hint=for\ i-- 21 | for (`int^ `i^ = `n^; `i^ >`=^ `end^; --`i^) `$BRif^{ 22 | `cursor^ 23 | } 24 | 25 | -------------------------------------------------------------------------------- /hgrc: -------------------------------------------------------------------------------- 1 | [ui] 2 | username = Michael Markert 3 | 4 | [extensions] 5 | extdiff= 6 | pager= 7 | fetch= 8 | rebase= 9 | transplant= 10 | graphlog = 11 | hgext.bookmarks = 12 | 13 | [merge-tools] 14 | kdiff3.executable = /usr/bin/kdiff3 15 | kdiff3.gui = True 16 | 17 | [extdiff] 18 | cmd.kdiff = kompare 19 | cmd.wdiff = cwdiff 20 | opts.wdiff = --diff --ab 21 | 22 | [pager] 23 | attend = diff, log, df 24 | ignore = l1, l5 25 | 26 | [alias] 27 | ps = push 28 | ad = add 29 | adr = addremove 30 | df = diff 31 | pl = pl 32 | pr = pull --rebase 33 | ft = fetch 34 | l1 = log --limit 1 35 | l5 = log --limit 5 36 | -------------------------------------------------------------------------------- /vim/vim/doc/xpt.snippet.tutor.txt: -------------------------------------------------------------------------------- 1 | *xpt-snippet-tutorial* 2 | 3 | XPTemplate Snippet Tutorial 4 | 5 | by drdr.xp 6 | drdr.xp@gmail.com 7 | ============================================================================== 8 | 9 | |xpt-tutor-hello| 10 | *xpt-tutor-hello* 11 | NOTE: TODO!!!! 12 | 13 | 1. Create snippet file 14 | 15 | 1.0 Prepare 16 | Find out where is your runtime path 17 | Create new runtime path 18 | 19 | Create snippet file 20 | snippet file template 21 | or xpt 22 | 2. 23 | 24 | 25 | 26 | 27 | " vim:tw=78:ts=8:sw=8:sts=8:noet:ft=help:norl: 28 | -------------------------------------------------------------------------------- /bin/git-publish: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | remote=$1 4 | current_branch="$(git branch | grep '^*' | sed s/\*\ //)" 5 | branch=${2:-$current_branch} 6 | 7 | if [ -z $remote ]; then 8 | echo "need at least remote to publish to" 9 | echo "usage: git publish remote [remote-branch]" 10 | exit 1 11 | fi 12 | 13 | if [ -d ".git" ] && [ ! -d ".git/refs/remotes/$remote" ]; then 14 | echo "remote $remote is not configured; try git remote add $remote \$THE-URL" 15 | exit 1 16 | fi 17 | 18 | git push $remote $branch && \ 19 | git config branch.$current_branch.remote $remote && \ 20 | git config branch.$current_branch.merge $branch 21 | -------------------------------------------------------------------------------- /emacs.d/completion-dicts/ac-l-dict/hyperref-c-h-*: -------------------------------------------------------------------------------- 1 | appendixautorefname 2 | autoref 3 | chapterautorefname 4 | equationautorefname 5 | figureautorefname 6 | footnoteautorefname 7 | href 8 | hyperbaseurl 9 | hyperdef 10 | hyperimage 11 | hyperlink 12 | hyperref 13 | hypersetup 14 | hypertarget 15 | itemautorefname 16 | nolinkurl 17 | pageautorefname 18 | paragraphautorefname 19 | partautorefname 20 | sectionautorefname 21 | subparagraphautorefname 22 | subsectionautorefname 23 | subsubsectionautorefname 24 | tableautorefname 25 | texorpdfstring 26 | theoremautorefname 27 | url 28 | Acrobatmenu 29 | AMSautorefname 30 | Hfootnoteautorefname 31 | Itemautorefname -------------------------------------------------------------------------------- /vim/hg: -------------------------------------------------------------------------------- 1 | "View the commit you are about to commit as diff 2 | function! HgViewCommit(browse) 3 | rightbelow new 4 | silent! setlocal filetype=diff bufhidden=delete nobackup noswapfile nobuflisted nowrap buftype=nofile 5 | exec "normal :%! hg diff\r" 6 | setlocal nomodifiable 7 | noremap q :bwipeout 8 | if ! a:browse 9 | wincmd p "Move to edit 10 | endif 11 | endfunction 12 | 13 | exec "source" . vimdir . "/vcs-common" 14 | 15 | nnoremap vd :call HgViewCommit(0) 16 | nnoremap bd :call HgViewCommit(1) 17 | nnoremap dq :wincmd j:bwipeout 18 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/module/module.javascript.xpt.vim: -------------------------------------------------------------------------------- 1 | " Note: disabled 2 | finish 3 | 4 | 5 | 6 | 7 | fun! s:SID() 8 | return matchstr(expand(''), '\d\+_\zeSID$') 9 | endfunction 10 | 11 | fun! s:ModPath() 12 | return b:GetCurNameByPath() 13 | endfunction 14 | call DefTemplateFunc("modPath", s:SID()."ModPath") 15 | 16 | "call XPTdefineSnippet("module_javascript", "mod", ' 17 | call XPTdefineSnippet("mod", {}, ' 18 | \new Module(\"`modPath^\", [\n 19 | \],function ($t, $n, $p, $g, $r, $c){\n 20 | \/* private */\n 21 | \return {\n 22 | \/* public */\n 23 | \`cursor^\n 24 | \}});\n 25 | \') 26 | -------------------------------------------------------------------------------- /emacs.d/completion-dicts/ac-l-dict/fancybox-c-*-*: -------------------------------------------------------------------------------- 1 | boxput 2 | doublebox 3 | fancyoval 4 | fancyput 5 | ovalbox 6 | shadowbox 7 | shadowsize 8 | thisfancyput 9 | BUseVerbatim 10 | BVerbatimInput 11 | EveryVerb 12 | EveryVerbCodes 13 | EveryVerbOutCodes 14 | EveryVerbOutLine 15 | EveryVerbatim 16 | EveryVerbatimCodes 17 | EveryVerbatimLine 18 | LUseVerbatim 19 | LVerbatimInput 20 | Ovalbox 21 | SaveVerb 22 | TheSbox 23 | ThisVerb 24 | ThisVerbCodes 25 | UseVerb 26 | UseVerbatim 27 | Verb 28 | VerbBox 29 | VerbFont 30 | VerbSpace 31 | VerbTab 32 | VerbatimEnvironment 33 | VerbatimFont 34 | VerbatimFootnotes 35 | VerbatimFuzz 36 | VerbatimInput 37 | VerbatimSpace 38 | VerbatimTaby -------------------------------------------------------------------------------- /vim/git: -------------------------------------------------------------------------------- 1 | "View the commit you are about to commit as diff 2 | function! GitViewCommit(browse) 3 | rightbelow new 4 | silent! setlocal filetype=diff bufhidden=delete nobackup noswapfile nobuflisted nowrap buftype=nofile 5 | exec "normal :%! git diff -p --stat --cached \r" 6 | setlocal nomodifiable 7 | noremap q :bwipeout 8 | if ! a:browse 9 | wincmd p "Move to edit 10 | endif 11 | endfunction 12 | 13 | exec "source" . vimdir . "/vcs-common" 14 | 15 | nnoremap vd :call GitViewCommit(0) 16 | nnoremap bd :call GitViewCommit(1) 17 | nnoremap dq :wincmd j:bwipeout 18 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/haskell/wrapt.xpt.vim: -------------------------------------------------------------------------------- 1 | XPTemplate priority=lang mark=`~ 2 | 3 | let s:f = g:XPTfuncs() 4 | 5 | XPTvar $TRUE 1 6 | XPTvar $FALSE 0 7 | XPTvar $NULL NULL 8 | XPTvar $UNDEFINED NULL 9 | XPTvar $VOID_LINE /* void */; 10 | XPTvar $BRif \n 11 | 12 | XPTinclude 13 | \ _common/common 14 | 15 | 16 | " ========================= Function and Variables ============================= 17 | 18 | 19 | " ================================= Snippets =================================== 20 | XPTemplateDef 21 | 22 | 23 | XPT str_ hint="SEL" 24 | "`wrapped~" 25 | 26 | XPT cmt_ hint={-\ SEL\ -} 27 | {- 28 | `wrapped~ 29 | -} 30 | 31 | XPT p_ hint=(\ SEL\ ) 32 | (`wrapped~) 33 | 34 | -------------------------------------------------------------------------------- /vim/vim/syntax/htmljinja.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: Jinja HTML template 3 | " Maintainer: Armin Ronacher 4 | " Last Change: 2007 Apr 8 5 | 6 | " For version 5.x: Clear all syntax items 7 | " For version 6.x: Quit when a syntax file was already loaded 8 | if version < 600 9 | syntax clear 10 | elseif exists("b:current_syntax") 11 | finish 12 | endif 13 | 14 | if !exists("main_syntax") 15 | let main_syntax = 'html' 16 | endif 17 | 18 | if version < 600 19 | so :p:h/jinja.vim 20 | so :p:h/html.vim 21 | else 22 | runtime! syntax/jinja.vim 23 | runtime! syntax/html.vim 24 | unlet b:current_syntax 25 | endif 26 | 27 | let b:current_syntax = "htmljinja" 28 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/help/help.xpt.vim: -------------------------------------------------------------------------------- 1 | XPTemplate priority=lang 2 | 3 | 4 | " containers 5 | let s:f = g:XPTfuncs() 6 | 7 | " inclusion 8 | XPTinclude 9 | \ _common/common 10 | 11 | " ========================= Function and Variables ============================= 12 | 13 | " ================================= Snippets =================================== 14 | XPTemplateDef 15 | 16 | XPT ln hint=\ ========... 17 | ============================================================================== 18 | 19 | 20 | XPT fmt hint=vim:\ options... 21 | vim:tw=78:ts=8:sw=8:sts=8:noet:ft=help:norl: 22 | 23 | 24 | XPT q hint=:\ >\ ...\ < 25 | : > 26 | `cursor^ 27 | < 28 | 29 | 30 | XPT r hint=|...| 31 | |`content^| 32 | 33 | -------------------------------------------------------------------------------- /zsh/auto_rehash: -------------------------------------------------------------------------------- 1 | # -*- mode: sh -*- 2 | 3 | emulate -L zsh 4 | 5 | rehash_preexec() { 6 | case "$1" in 7 | # debian 8 | *apt-get*|*aptitude*) 9 | ;& # fall through 10 | # python 11 | *pip*|*workon*|"source *activate*") 12 | ;& # fall through 13 | # hakell 14 | *cabal*) 15 | __rehash=1 16 | ;; 17 | esac 18 | } 19 | 20 | rehash_precmd() { 21 | if [[ -n __rehash ]]; then 22 | rehash 23 | unset __rehash 24 | fi 25 | } 26 | typeset -ga preexec_functions 27 | typeset -ga precmd_functions 28 | preexec_functions+=rehash_preexec 29 | precmd_functions+=rehash_precmd 30 | -------------------------------------------------------------------------------- /yasnippets/java-mode/defdoc: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 mode: snippet -*- 2 | # name: Define method with javadoc 3 | # key: defdoc 4 | # contributor: Michael Markert 5 | # -- 6 | /** 7 | * 8 | * ${3:$(let ((docsep "\n * ") 9 | (args (mapcar 'cadr 10 | (mapcar (lambda (x) 11 | (split-string x " " t)) 12 | (split-string text "," t))))) 13 | (mapconcat (lambda (x) 14 | (format "@param %s" x)) 15 | args 16 | docsep)) 17 | } 18 | ${1:$(when (not (string= text "void")) " * @returns \n")} */ 19 | ${1:void} ${2:name}(${3:arg}) { 20 | $0 21 | } -------------------------------------------------------------------------------- /emacs.d/completion-dicts/php-mode: -------------------------------------------------------------------------------- 1 | and 2 | array 3 | as 4 | break 5 | case 6 | catch 7 | cfunction 8 | class 9 | clone 10 | const 11 | continue 12 | declare 13 | default 14 | die 15 | do 16 | echo 17 | else 18 | elseif 19 | empty 20 | enddeclare 21 | endfor 22 | endforeach 23 | endif 24 | endswitch 25 | endwhile 26 | eval 27 | exit 28 | extends 29 | final 30 | for 31 | foreach 32 | function 33 | global 34 | goto 35 | if 36 | implements 37 | include 38 | include_once 39 | instanceof 40 | interface 41 | isset 42 | list 43 | namespace 44 | new 45 | old_function 46 | or 47 | print 48 | private 49 | protected 50 | public 51 | require 52 | require_once 53 | return 54 | static 55 | switch 56 | throw 57 | try 58 | unset 59 | use 60 | var 61 | while 62 | xor 63 | -------------------------------------------------------------------------------- /emacs.d/config/cofi-elisp.el: -------------------------------------------------------------------------------- 1 | (require 'paredit) 2 | (add-to-loadpath "~/.elisp/vendor/macrostep/") 3 | (require 'macrostep) 4 | (add-hook 'emacs-lisp-mode-hook 5 | (lambda () 6 | (setq mode-name "eL"))) 7 | 8 | (cofi/set-key read-expression-map "TAB" 'lisp-complete-symbol) 9 | 10 | (add-hook 'emacs-lisp-mode-hook 11 | (gen-local-fill-keymap-hook "C-c C-c" 'eval-buffer 12 | "C-c C-r" 'ielm 13 | "C-c e" 'macrostep-expand 14 | "M-TAB" 'helm-lisp-completion-at-point 15 | [remap completion-at-point] 'helm-lisp-completion-at-point)) 16 | 17 | (add-hook 'ielm-mode-hook 'eldoc-mode) 18 | 19 | (provide 'cofi-elisp) 20 | -------------------------------------------------------------------------------- /yasnippets/python-mode/defm: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 mode: snippet -*- 2 | # name: Method with sphinx doc 3 | # key: defm 4 | # contributor: Michael Markert 5 | # -- 6 | def ${1:name}(self, $2): 7 | """$3 8 | ${2:$(let ((indent (concat "\n" (make-string (current-column) 32))) 9 | (args (mapcar 'car 10 | (mapcar '(lambda (x) (split-string x "=")) 11 | (split-string (replace-regexp-in-string "[[:blank:]]*" "" text) 12 | "," t))))) 13 | (mapconcat (lambda (x) 14 | (format ":param %s:" x)) 15 | args 16 | indent)) 17 | } 18 | :returns: $4 19 | :rtype: $5 20 | """ 21 | $0 22 | -------------------------------------------------------------------------------- /yasnippets/python-mode/def: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 mode: snippet -*- 2 | # name: Function with sphinx doc 3 | # key: def 4 | # contributor: Michael Markert 5 | # -- 6 | def ${1:name}($2): 7 | """$3 8 | ${2:$(let ((indent (concat "\n" (make-string (current-column) 32))) 9 | (args (mapcar 'car 10 | (mapcar '(lambda (x) (split-string x "=")) 11 | (split-string (replace-regexp-in-string "[[:blank:]]*" "" text) 12 | "," t))))) 13 | (mapconcat (lambda (x) 14 | (format ":param %s:%s:type %s:" x indent x)) 15 | args 16 | 17 | indent)) 18 | } 19 | :returns: $4 20 | :rtype: $5 21 | """ 22 | $0 23 | -------------------------------------------------------------------------------- /emacs.d/completion-dicts/c++-mode: -------------------------------------------------------------------------------- 1 | and 2 | and_eq 3 | asm 4 | auto 5 | bitand 6 | bitor 7 | bool 8 | break 9 | case 10 | catch 11 | char 12 | class 13 | compl 14 | const 15 | const_cast 16 | continue 17 | default 18 | delete 19 | do 20 | double 21 | dynamic_cast 22 | else 23 | enum 24 | explicit 25 | export 26 | extern 27 | false 28 | float 29 | for 30 | friend 31 | goto 32 | if 33 | inline 34 | int 35 | long 36 | mutable 37 | namespace 38 | new 39 | not 40 | not_eq 41 | operator 42 | or 43 | or_eq 44 | private 45 | protected 46 | public 47 | register 48 | reinterpret_cast 49 | return 50 | short 51 | signed 52 | sizeof 53 | static 54 | static_cast 55 | struct 56 | switch 57 | template 58 | this 59 | throw 60 | true 61 | try 62 | typedef 63 | typeid 64 | typename 65 | union 66 | unsigned 67 | using 68 | virtual 69 | void 70 | volatile 71 | wchar_t 72 | while 73 | xor 74 | xor_eq 75 | -------------------------------------------------------------------------------- /emacs.d/config/cofi-shell.el: -------------------------------------------------------------------------------- 1 | (setq ansi-color-for-comint-mode t) 2 | (setq comint-prompt-read-only nil) 3 | 4 | (require-and-exec 'shell-command 5 | (shell-command-completion-mode)) 6 | 7 | (setq dirtrack-list '("[a-zA-Z@]+ \\(~.*?\\) %>" 1)) 8 | (add-all-to-hook'shell-mode-hook 9 | (gen-local-fill-keymap-hook 10 | "" 'comint-bol) 11 | #'dirtrack-mode) 12 | 13 | (add-hook 'comint-mode-hook 14 | (gen-local-fill-keymap-hook 15 | "C-p" 'comint-previous-input 16 | "M-p" 'comint-previous-matching-input-from-input 17 | "C-n" 'comint-next-input 18 | "M-n" 'comint-next-matching-input-from-input)) 19 | 20 | (add-hook 'term-mode-hook 21 | (gen-local-fill-keymap-hook 22 | "C-" 'term-send-backward-kill-word)) 23 | 24 | (provide 'cofi-shell) 25 | -------------------------------------------------------------------------------- /quick/toggle-bluetooth: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Bluetooth enable/disable script 3 | 4 | FORCE_OFF=$1 5 | if [ "$FORCE_OFF" = 1 ]; then 6 | rfkill block bluetooth 7 | [ -f /etc/init.d/bluetooth ] && /etc/init.d/bluetooth start > /dev/null 8 | else 9 | if (! test -x /usr/sbin/rfkill) 10 | then 11 | logger "Error: Please install package rfkill to enable toggling of wireless devices." 12 | exit 0 13 | fi 14 | 15 | rfkill list | sed -n -e'/tpacpi_bluetooth_sw/,/^[0-9]/p' | grep -q 'Soft blocked: yes' 16 | bluetooth_state=$? 17 | if [ "$bluetooth_state" = 0 ]; then 18 | rfkill unblock bluetooth 19 | [ -f /etc/init.d/bluetooth ] && /etc/init.d/bluetooth start > /dev/null 20 | else 21 | rfkill block bluetooth 22 | [ -f /etc/init.d/bluetooth ] && /etc/init.d/bluetooth stop > /dev/null 23 | fi 24 | fi 25 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/_condition/lisp.like.xpt.vim: -------------------------------------------------------------------------------- 1 | XPTemplate priority=like 2 | 3 | let s:f = g:XPTfuncs() 4 | 5 | XPTvar $TRUE 1 6 | XPTvar $FALSE 0 7 | XPTvar $NULL NULL 8 | XPTvar $UNDEFINED NULL 9 | XPTvar $VOID_LINE /* void */; 10 | XPTvar $BRif \n 11 | 12 | XPTinclude 13 | \ _common/common 14 | 15 | 16 | " ========================= Function and Variables ============================= 17 | 18 | 19 | " ================================= Snippets =================================== 20 | XPTemplateDef 21 | 22 | 23 | 24 | XPT if hint=(if\ (then)\ (else)) 25 | (if [`condition^] 26 | (`then^) 27 | `else...{{^(`cursor^)`}}^) 28 | 29 | XPT when hint=(when\ cond\ ..) 30 | (when (`cond^) 31 | (`todo0^)` `...^ 32 | (`todon^)` `...^) 33 | 34 | 35 | XPT unless hint=(unless\ cond\ ..) 36 | (unless (`cond^) 37 | (`todo0^)` `...^ 38 | (`todon^)` `...^) 39 | 40 | -------------------------------------------------------------------------------- /vim/vim/doc/xpt-function.txt: -------------------------------------------------------------------------------- 1 | 2 | *S()* *xpt-substitute* 3 | S({pattern},{replace},[{flag}]) 4 | Substitute typed content with pattern and replace. Just like 5 | |substitute()|. 6 | 7 | *C()* 8 | C() 9 | Get function context, see |xpt-snippet-function-ctx|. 10 | 11 | *E({expr})* 12 | E({expr}) 13 | Equals to |expand()|. 14 | 15 | *N()* 16 | N() 17 | Current edited item name. Valid only to |xpt-snippet-post-filter|. 18 | 19 | *V()* 20 | V() 21 | Current typed text. Valid only to |xpt-snippet-post-filter|. 22 | 23 | *R({name})* 24 | R({name}) 25 | Reference to history item. Get value by name. 26 | 27 | *S({expr},{pat},{sub},{flags})* 28 | S({expr},{pat},{sub},{flags}) 29 | Equals to |substitute()|. 30 | 31 | *SV()* 32 | SV() 33 | Equals to S(V(),{pat},{sub},{flag}). 34 | 35 | " vim:tw=78:ts=8:sw=8:sts=8:noet:ft=help:norl: 36 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/_loops/c.while.like.xpt.vim: -------------------------------------------------------------------------------- 1 | XPTemplate priority=like 2 | 3 | 4 | 5 | XPTvar $TRUE 1 6 | XPTvar $FALSE 0 7 | XPTvar $NULL NULL 8 | 9 | XPTvar $BRloop ' ' 10 | 11 | 12 | " ================================= Snippets =================================== 13 | XPTemplateDef 14 | 15 | 16 | XPT while hint=while\ \(\ ...\ ) 17 | while (`condition^)`$BRloop^{ 18 | `cursor^ 19 | } 20 | 21 | XPT do hint=do\ {\ ..\ }\ while\ (..) 22 | do`$BRloop^{ 23 | `cursor^ 24 | }`$BRloop^while (`condition^); 25 | 26 | 27 | XPT while0 alias=do hint=do\ {\ ..\ }\ while\ ($FALSE) 28 | XSET condition|def=Embed( $FALSE ) 29 | 30 | 31 | XPT while1 alias=while hint=while\ ($TRUE)\ {\ ..\ } 32 | XSET condition|def=Embed( $TRUE ) 33 | 34 | 35 | XPT whilenn alias=while hint=while\ \(\ $NULL\ !=\ var\ )\ {\ ..\ } 36 | XSET condition|def=Embed( $NULL . ' != `var^' ) 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /bin/unpack: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | file=$(readlink -f "$1") 4 | directory=$2 5 | 6 | if [ -n "$directory" ] ; then 7 | mkdir -p "$directory" 8 | cd "$directory" 9 | fi 10 | 11 | if [ -f "$file" ]; then 12 | case "$file" in 13 | *.tar*|*.tbz|*.tgz) 14 | tar -xvaf "$file" ;; 15 | *.bz2) 16 | bunzip2 "$file" ;; 17 | *.gz) 18 | gunzip "$file" ;; 19 | *.zip) 20 | unzip "$file" ;; 21 | *.rar) 22 | unrar x "$file" ;; 23 | *.deb) 24 | dpkg-deb -X "$file" ;; 25 | *.lzma) 26 | unlzma -k "$file" ;; 27 | *.xz) 28 | unxz -k "$file" ;; 29 | *) 30 | echo "$file Error. Please go away" ;; 31 | esac 32 | else 33 | echo "$1 is not a valid file" 34 | fi 35 | -------------------------------------------------------------------------------- /bin/git-incoming: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | emulate zsh 4 | 5 | CURRENT_BRANCH="$(git branch | grep '^*' | sed s/\*\ //)" 6 | 7 | if [[ "${CURRENT_BRANCH}" != "" ]] { 8 | TRACKED_REPOSITORY="$(git config branch.${CURRENT_BRANCH}.remote)" 9 | 10 | if [[ "${TRACKED_REPOSITORY}" != "" ]] { 11 | REMOTE_BRANCH="$(git config branch.${CURRENT_BRANCH}.merge | cut -d"/" -f3)" 12 | 13 | if [[ "${REMOTE_BRANCH}" != "" ]] { 14 | TARGET="${TRACKED_REPOSITORY}/${REMOTE_BRANCH}" 15 | git fetch ${TRACKED_REPOSITORY} ${REMOTE_BRANCH} 16 | 17 | git log ..${TARGET} 18 | } else { 19 | echo "Current branch has no corresponding remote repository." 20 | echo 'Try setting branch.$CurrentBranch.merge' 21 | } 22 | } else { 23 | echo "Current branch doesn't track any repository." 24 | echo 'Try setting branch.$CurrentBranch.remote' 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /bin/git-outgoing: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | emulate zsh 4 | 5 | CURRENT_BRANCH="$(git branch | grep '^*' | sed s/\*\ //)" 6 | 7 | if [[ "${CURRENT_BRANCH}" != "" ]] { 8 | TRACKED_REPOSITORY="$(git config branch.${CURRENT_BRANCH}.remote)" 9 | 10 | if [[ "${TRACKED_REPOSITORY}" != "" ]] { 11 | REMOTE_BRANCH="$(git config branch.${CURRENT_BRANCH}.merge | cut -d"/" -f3)" 12 | 13 | if [[ "${REMOTE_BRANCH}" != "" ]] { 14 | TARGET="${TRACKED_REPOSITORY}/${REMOTE_BRANCH}" 15 | git fetch ${TRACKED_REPOSITORY} ${REMOTE_BRANCH} 16 | 17 | git log ${TARGET}.. 18 | } else { 19 | echo "Current branch has no corresponding remote repository." 20 | echo 'Try setting branch.$CurrentBranch.merge' 21 | } 22 | } else { 23 | echo "Current branch doesn't track any repository." 24 | echo 'Try setting branch.$CurrentBranch.remote' 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /emacs.d/config/cofi-lua.el: -------------------------------------------------------------------------------- 1 | (let ((local (expand-file-name "~/doc/lua/manual.html"))) 2 | (setq lua-documentation-url 3 | (or (and (file-readable-p local) 4 | (concat "file://" local)) 5 | "http://www.lua.org/manual/5.3/manual.html"))) 6 | 7 | (defun cofi/lua-send-dwim (pos) 8 | "Send region if region is active and current defun else." 9 | (interactive "d") 10 | (if (region-active-p) 11 | (lua-send-region (region-beginning) (region-end)) 12 | (lua-send-defun pos))) 13 | 14 | (add-all-to-hook 'lua-mode-hook 15 | (gen-local-fill-keymap-hook 16 | "C-c C-c" #'cofi/lua-send-dwim 17 | "C-c C-l" #'lua-send-current-line 18 | "C-c C-f" #'lua-send-buffer 19 | "C-c C-b" #'lua-send-buffer 20 | "C-c C-d" #'lua-search-documentation 21 | )) 22 | 23 | 24 | (provide 'cofi-lua) 25 | -------------------------------------------------------------------------------- /zsh/bindkey: -------------------------------------------------------------------------------- 1 | # -*- mode: sh -*- 2 | 3 | #PgUp/Dn for history completion 4 | bindkey "\e[5~" history-search-backward 5 | bindkey "\e[6~" history-search-forward 6 | 7 | # for command-line editor 8 | autoload -U edit-command-line 9 | zle -N edit-command-line 10 | bindkey "^[e" edit-command-line 11 | 12 | bindkey "\e[A" up-line-or-search # up arrow for back-history-search 13 | bindkey "\e[B" down-line-or-search # down arrow for fwd-history-search 14 | 15 | bindkey " " magic-space # do history expansion on space 16 | 17 | bindkey -M menuselect "+" accept-and-menu-complete 18 | 19 | zmodload zsh/deltochar 20 | bindkey "\ez" zap-to-char 21 | 22 | # kill last directory, breaks on spaces 23 | backward-kill-dir() { 24 | # remove / from word chars 25 | local WORDCHARS="${WORDCHARS:s@/@}" 26 | zle backward-kill-word 27 | } 28 | zle -N backward-kill-dir 29 | bindkey "\ew" backward-kill-dir 30 | 31 | bindkey "\e;" pound-insert # interactive_comments should be set 32 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/_condition/ecma.xpt.vim: -------------------------------------------------------------------------------- 1 | XPTemplate priority=spec 2 | 3 | let s:f = g:XPTfuncs() 4 | 5 | XPTvar $TRUE true 6 | XPTvar $FALSE false 7 | XPTvar $NULL null 8 | XPTvar $UNDEFINED undefined 9 | XPTvar $VOID_LINE /* void */; 10 | XPTvar $BRif \n 11 | 12 | XPTinclude 13 | \ _common/common 14 | \ _condition/c.like 15 | 16 | 17 | " ========================= Function and Variables ============================= 18 | 19 | 20 | " ================================= Snippets =================================== 21 | XPTemplateDef 22 | 23 | 24 | XPT ifu hint=if\ (undefined\ ===\ ..)\ {..} .. 25 | XSET job=$VOID_LINE 26 | if (`$UNDEFINED^ === `var^) { 27 | `job^ 28 | }` 29 | `else...{{^ 30 | else { 31 | `cursor^ 32 | }`}}^ 33 | 34 | 35 | XPT ifnu hint=if\ (undefined\ !==\ ..)\ {..} .. 36 | XSET job=$VOID_LINE 37 | if (`$UNDEFINED^ !== `var^) { 38 | `job^ 39 | }` 40 | `else...{{^ 41 | else { 42 | `cursor^ 43 | }`}}^ 44 | 45 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/_comment/singleSign.xpt.vim: -------------------------------------------------------------------------------- 1 | XPTemplate priority=all- 2 | 3 | 4 | " snippets for language whose comment sign is only 1 sign, like perl:"#" 5 | " 6 | " assuming only $CM defined 7 | " 8 | " TODO friendly cursor place holder 9 | 10 | 11 | XPTinclude 12 | \ _comment/common 13 | 14 | 15 | " ========================= Function and Variables ============================= 16 | 17 | 18 | " ================================= Snippets =================================== 19 | XPTemplateDef 20 | 21 | XPT comment hint=$CS\ ... 22 | `$CS^ `cursor^ 23 | 24 | 25 | XPT commentBlock hint=$CS\ ... 26 | `$CS^ `cursor^ 27 | `$CS^ 28 | 29 | 30 | XPT commentDoc hint=$CS\ ... 31 | `$CS^ 32 | `$CS^ `cursor^ 33 | `$CS^ 34 | 35 | XPT commentLine hint=$CS\ ... 36 | `$CS^ `cursor^ 37 | 38 | " ================================= Wrapper =================================== 39 | 40 | XPT comment_ hint=$CS\ ... 41 | `$CS^ `wrapped^ 42 | 43 | XPT commentLine_ hint=$CS\ ... 44 | `$CS^ `wrapped^ 45 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/_loops/c.for.like.xpt.vim: -------------------------------------------------------------------------------- 1 | XPTemplate priority=like 2 | 3 | let s:f = g:XPTfuncs() 4 | 5 | XPTvar $TRUE 1 6 | XPTvar $FALSE 0 7 | XPTvar $NULL NULL 8 | XPTvar $UNDEFINED NULL 9 | 10 | XPTvar $VOID_LINE /* void */; 11 | XPTvar $CURSOR_PH /* cursor */ 12 | 13 | XPTvar $BRif ' ' 14 | XPTvar $BRloop ' ' 15 | XPTvar $BRloop ' ' 16 | XPTvar $BRstc ' ' 17 | 18 | 19 | 20 | 21 | " ========================= Function and Variables ============================= 22 | 23 | 24 | " ================================= Snippets =================================== 25 | XPTemplateDef 26 | 27 | 28 | XPT for hint=for\ (..;..;++) 29 | for (`i^ = `0^; `i^ < `len^; ++`i^)`$BRloop^{ 30 | `cursor^ 31 | } 32 | 33 | 34 | XPT forr hint=for\ (..;..;--) 35 | for (`i^ = `n^; `i^ >`=^ `end^; --`i^)`$BRloop^{ 36 | `cursor^ 37 | } 38 | 39 | 40 | XPT forever hint=for\ (;;)\ .. 41 | XSET body=$CL void $CR; 42 | for (;;) `body^ 43 | 44 | 45 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/_common/cmn.counter.xpt.vim: -------------------------------------------------------------------------------- 1 | XPTemplate priority=all- 2 | 3 | let s:f = g:XPTfuncs() 4 | 5 | 6 | " ========================= Function and Variables ============================= 7 | 8 | " draft increment implementation 9 | fun! s:f.CntD() "{{{ 10 | let ctx = self._ctx 11 | if !has_key(ctx, '__counter') 12 | let ctx.__counter = {} 13 | endif 14 | return ctx.__counter 15 | endfunction "}}} 16 | 17 | fun! s:f.CntStart(name, ...) "{{{ 18 | let d = self.CntD() 19 | let i = a:0 >= 1 ? 0 + a:1 : 0 20 | let d[a:name] = 0 + i 21 | return "" 22 | endfunction "}}} 23 | 24 | fun! s:f.Cnt(name) "{{{ 25 | let d = self.CntD() 26 | return d[a:name] 27 | endfunction "}}} 28 | 29 | fun! s:f.CntIncr(name, ...)"{{{ 30 | let i = a:0 >= 1 ? 0 + a:1 : 1 31 | let d = self.CntD() 32 | 33 | let d[a:name] += i 34 | return d[a:name] 35 | endfunction"}}} 36 | 37 | " ================================= Snippets =================================== 38 | XPTemplateDef 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /mailcap: -------------------------------------------------------------------------------- 1 | text/html; browser '%s' 2 | application/pdf; /usr/bin/okular '%s' 3 | application/x-bz; /usr/bin/ark '%s' 4 | application/x-bzip2; /usr/bin/ark '%s' 5 | application/x-compress; /usr/bin/ark '%s' 6 | application/x-compressed; /usr/bin/ark '%s' 7 | application/x-gtar; /usr/bin/ark '%s' 8 | application/x-gzip; /usr/bin/ark '%s' 9 | application/x-zip-compressed; /usr/bin/ark '%s' 10 | application/x-tar; /usr/bin/ark '%s' 11 | application/zip; /usr/bin/ark '%s' 12 | multipart/x-zip; /usr/bin/ark '%s' 13 | multipart/x-gzip; /usr/bin/ark '%s' 14 | image/*; /usr/bin/gwenview '%s' 15 | text/plain; /usr/bin/emacsclient -c '%s' 16 | video/*; /usr/bin/smplayer '%s' 17 | audio/*; /usr/bin/smplayer '%s' 18 | application/pgp-keys; /usr/bin/gpg --import --interactive --verbose; needsterminal 19 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/actionscript/actionscript.xpt.vim: -------------------------------------------------------------------------------- 1 | XPTemplate priority=lang 2 | 3 | " XPTvar $TRUE 1 4 | " XPTvar $FALSE 0 5 | " XPTvar $NULL NULL 6 | " XPTvar $UNDEFINED NULL 7 | 8 | 9 | XPTinclude 10 | \ _common/common 11 | 12 | XPTvar $CL /* 13 | XPTvar $CM * 14 | XPTvar $CR */ 15 | XPTvar $CS // 16 | XPTinclude 17 | \ _comment/singleDouble 18 | 19 | XPTinclude 20 | \ _condition/ecma 21 | 22 | " ========================= Function and Variables ============================= 23 | 24 | " ================================= Snippets =================================== 25 | XPTemplateDef 26 | 27 | XPT fun hint=function\ ..(\ ..\ )\ {..} 28 | XSET arg*|post=ExpandIfNotEmpty(', ', 'arg*') 29 | function` `name^ (`arg*^) { 30 | `cursor^ 31 | } 32 | 33 | 34 | 35 | " ================================= Wrapper =================================== 36 | 37 | XPT fun_ hint=function\ ..(\ ..\ )\ {..} 38 | function` `name^ (`param^) { 39 | `wrapped^ 40 | return; 41 | } 42 | -------------------------------------------------------------------------------- /zsh/style: -------------------------------------------------------------------------------- 1 | # -*- mode: sh -*- 2 | 3 | ## 4 | # vcs_info 5 | # 6 | FMT_BRANCH="[ ${PR_BLUE}%b${PR_RESET} %u%c]" # e.g. master!? 7 | FMT_ACTION="(${PR_CYAN}%a${PR_RESET})" # e.g. (rebase-i) 8 | FMT_PATH=" ${PR_MAGENTA}%r/%S${PR_RESET}" # e.g. repo/subdir 9 | 10 | zstyle ':vcs_info:*' enable git hg svn 11 | zstyle ':vcs_info:*:prompt:*' max-exports 3 12 | zstyle ':vcs_info:*:prompt:*' check-for-changes true 13 | zstyle ':vcs_info:*:prompt:*' unstagedstr "${PR_RED}?${PR_RESET} " # display ? if there are unstaged changes 14 | zstyle ':vcs_info:*:prompt:*' stagedstr "${PR_GREEN}!${PR_RESET} " # display ! if there are staged changes 15 | zstyle ':vcs_info:*:prompt:*' actionformats "%s" "${FMT_PATH}" "${FMT_BRANCH}${FMT_ACTION}" 16 | zstyle ':vcs_info:*:prompt:*' formats "%s" "${FMT_PATH}" "${FMT_BRANCH}" 17 | zstyle ':vcs_info:*:prompt:*' nvcsformats "" "" "" 18 | 19 | ## 20 | # ft-complete 21 | # 22 | zstyle ':zle:ft-complete:tilde' widget ft-complete-tilde 23 | zstyle ':zle:ft-complete:empty' action dot-slash-complete 24 | -------------------------------------------------------------------------------- /bin/master_volume: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright (C) 2010 by Michael Markert 3 | # Licensed under MIT/X-License 4 | # http://www.opensource.org/licenses/mit-license.php 5 | 6 | from __future__ import print_function 7 | import alsaaudio 8 | from contextlib import closing 9 | 10 | MUTE_STR = "Muted" 11 | 12 | def get_volume(control): 13 | """Return decorated output of given control. 14 | 15 | control -- String denoting alsa control. 16 | """ 17 | with closing(alsaaudio.Mixer(control)) as mixer: 18 | muted = mixer.getmute()[0] 19 | volumes = set(mixer.getvolume()) 20 | if muted: 21 | return MUTE_STR 22 | else: 23 | return "/".join(map(str, volumes)) + "%" 24 | 25 | 26 | if __name__ == '__main__': 27 | import argparse 28 | parser = argparse.ArgumentParser(description='Print decorated state of alsa control.') 29 | parser.add_argument('control', nargs='?', default='Master') 30 | args = parser.parse_args() 31 | print(get_volume(args.control)) 32 | -------------------------------------------------------------------------------- /emacs.d/completion-dicts/ac-l-dict/color-a-c-*: -------------------------------------------------------------------------------- 1 | black 2 | blue 3 | green 4 | cyan 5 | magenta 6 | red 7 | white 8 | yellow 9 | Apricot 10 | Aquamarine 11 | Bittersweet 12 | Black 13 | Blue 14 | BlueGreen 15 | BlueViolet 16 | BrickRed 17 | Brown 18 | BurntOrange 19 | CadetBlue 20 | CarnationPink 21 | Cerulean 22 | CornflowerBlue 23 | Cyan 24 | Dandelion 25 | DarkOrchid 26 | Emerald 27 | ForestGreen 28 | Fuchsia 29 | Goldenrod 30 | Gray 31 | Green 32 | GreenYellow 33 | JungleGreen 34 | Lavender 35 | LimeGreen 36 | Magenta 37 | Mahogany 38 | Maroon 39 | Melon 40 | MidnightBlue 41 | Mulberry 42 | NavyBlue 43 | OliveGreen 44 | Orange 45 | OrangeRed 46 | Orchid 47 | Peach 48 | Periwinkle 49 | PineGreen 50 | Plum 51 | ProcessBlue 52 | Purple 53 | RawSienna 54 | Red 55 | RedOrange 56 | RedViolet 57 | Rhodamine 58 | RoyalBlue 59 | RoyalPurple 60 | RubineRed 61 | Salmon 62 | SeaGreen 63 | Sepia 64 | SkyBlue 65 | SpringGreen 66 | Tan 67 | TealBlue 68 | Thistle 69 | Turquoise 70 | Violet 71 | VioletRed 72 | WildStrawberry 73 | Yellow 74 | YellowGreen 75 | YellowOrange -------------------------------------------------------------------------------- /emacs.d/config/cofi-xml.el: -------------------------------------------------------------------------------- 1 | 2 | (add-to-list 'auto-mode-alist (cons (gen-extension-re "html" "htm") 'nxml-mode)) 3 | ;;; add html5 schemas 4 | (require-and-exec 'rng-loc 5 | (push (cofi/var-file "schema/schemas.xml") rng-schema-locating-files)) 6 | 7 | (setq nxml-slash-auto-complete-flag t) 8 | 9 | (eval-after-load "nxml-mode" 10 | '(progn 11 | (defun nxml-which-xpath () 12 | (let (path) 13 | (save-excursion 14 | (save-restriction 15 | (widen) 16 | (while (condition-case nil 17 | (progn 18 | (nxml-backward-up-element) 19 | t) 20 | (error nil)) 21 | (push (xmltok-start-tag-local-name) path))) 22 | (concat "/" (mapconcat 'identity path "/"))))) 23 | 24 | (eval-after-load "which-func" 25 | '(pushnew #'nxml-which-xpath which-func-functions)))) 26 | 27 | (defkeymap zencoding-mode-keymap 28 | "C-c C-j" 'zencoding-expand-line) 29 | 30 | (provide 'cofi-xml) 31 | -------------------------------------------------------------------------------- /zsh/prompt: -------------------------------------------------------------------------------- 1 | # -*- mode: sh -*- 2 | 3 | if [ $terminfo[colors] -ge 8 ]; then 4 | colors 5 | for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do 6 | eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}' 7 | eval PR_LIGHT_$color='%{$fg[${(L)color}]%}' 8 | done 9 | PR_RESET="%{$reset_color%}" 10 | fi 11 | 12 | function precmd() { 13 | vcs_info 'prompt' 14 | 15 | VCS_SYS=$vcs_info_msg_0_ 16 | VCS_PATH=$vcs_info_msg_1_ 17 | VCS_BRANCH=$vcs_info_msg_2_ 18 | } 19 | 20 | function vcs_char { 21 | case $VCS_SYS in 22 | git) echo "$PR_CYAN±$PR_RESET" && return ;; 23 | hg) echo "$PR_CYAN☿$PR_RESET" && return ;; 24 | *) echo "$PR_CYAN○$PR_RESET" && return ;; 25 | esac 26 | } 27 | 28 | function login_prompt() { 29 | echo "$PR_GREEN<%U%n@%m%u>$PR_RESET " 30 | } 31 | function dir_prompt() { 32 | echo "$PR_YELLOW%~$PR_RESET" 33 | } 34 | 35 | function set_prompt() { 36 | export PROMPT='╭─ $(vcs_char) $(login_prompt)$(dir_prompt) $VCS_BRANCH 37 | ╰─$VCS_PATH %#> ' 38 | } 39 | 40 | set_prompt 41 | -------------------------------------------------------------------------------- /emacs.d/config/cofi-c.el: -------------------------------------------------------------------------------- 1 | (require 'cofi-util) 2 | (require 'cl-lib) 3 | 4 | (setq-default c-basic-offset 4) 5 | (setq c-default-style '((java-mode . "java") 6 | (awk-mode . "awk") 7 | (c-mode . "linux"))) 8 | 9 | (setq comment-multi-line t) 10 | 11 | (defun cofi-c-line-comments () 12 | (setq comment-start "//" 13 | comment-end "")) 14 | (add-hook 'c-mode-hook 'cofi-c-line-comments) 15 | 16 | (defun cofi/maybe-change-c-to-c++ () 17 | (when (and (buffer-file-name) (ends-with (buffer-file-name) ".h")) 18 | (let* ((name (file-name-sans-extension (file-name-nondirectory (buffer-file-name)))) 19 | (siblings (ls-files "." nil name))) 20 | (when (cl-find-if (lambda (f) 21 | (string-match (gen-extension-re "cc" "c++" "cpp" "cxx") (downcase f))) 22 | siblings) 23 | (c++-mode))))) 24 | 25 | (add-hook 'c-mode-hook #'cofi/maybe-change-c-to-c++) 26 | 27 | (require-and-exec 'c-eldoc 28 | (add-hook 'c-mode-hook 'c-turn-on-eldoc-mode)) 29 | (provide 'cofi-c) 30 | -------------------------------------------------------------------------------- /elisp/ghc-mod/Makefile: -------------------------------------------------------------------------------- 1 | SRCS = ghc.el ghc-func.el ghc-doc.el ghc-comp.el ghc-flymake.el \ 2 | ghc-command.el ghc-info.el ghc-ins-mod.el ghc-indent.el 3 | EMACS = emacs 4 | DETECT = xemacs 5 | 6 | TEMPFILE = temp.el 7 | 8 | all: $(TEMPFILE) ghc.el 9 | $(EMACS) -batch -q -no-site-file -l ./$(TEMPFILE) -f ghc-compile 10 | rm -f $(TEMPFILE) 11 | 12 | detect: $(TEMPFILE) ghc.el 13 | $(EMACS) -batch -q -no-site-file -l ./$(TEMPFILE) -f ghc-compile 14 | rm -f $(DETECT) 15 | 16 | $(TEMPFILE): 17 | @echo '(setq load-path (cons "." load-path))' >> $(TEMPFILE) 18 | @echo '(defun ghc-compile () (mapcar (lambda (x) (byte-compile-file x)) (list ' >> $(TEMPFILE) 19 | @echo $(SRCS)| sed -e 's/\(ghc[^ ]*\.el\)/"\1"/g' >> $(TEMPFILE) 20 | @echo ')))' >> $(TEMPFILE) 21 | 22 | clean: 23 | rm -f *.elc $(TEMPFILE) 24 | 25 | VERSION = `grep version ghc.el | sed -e 's/[^0-9\.]//g'` 26 | 27 | bump: 28 | echo "(define-package\n \"ghc-mod\"\n $(VERSION)\n \"Sub mode for Haskell mode\"\n nil)" > ghc-pkg.el 29 | 30 | archive: 31 | git archive master -o ~/ghc-$(VERSION).tar --prefix=ghc-$(VERSION)/ 32 | -------------------------------------------------------------------------------- /vim/templates/ftplugin/scheme/scheme.xpt.vim: -------------------------------------------------------------------------------- 1 | XPTemplate priority=personal 2 | 3 | let s:f = g:XPTfuncs() 4 | 5 | XPTemplateDef 6 | 7 | XPT contract hint=gdi\ contract 8 | XSET typeargs*|post=ExpandIfNotEmpty( ' ', 'typeargs*' ) 9 | ;; Contract: `fname^ : `typeargs*^ -> `returntype^ 10 | ;; Purpose: `description^ 11 | ;; Example: `example^ 12 | 13 | XPT tests hint=htdp\ tests 14 | XSET args1*|post=ExpandIfNotEmpty( ' ', 'args1*' ) 15 | XSET args2*|post=ExpandIfNotEmpty( ' ', 'args2*' ) 16 | (check-expect (`fname^ `args1*^) `expect1^) 17 | (check-expect (`fname^ `args2*^) `expect2^) 18 | 19 | XPT func hint=func\ definition 20 | XSET typeargs*|post=ExpandIfNotEmpty( ' ', 'typeargs*' ) 21 | XSET args*|post=ExpandIfNotEmpty( ' ', 'args*' ) 22 | XSET args1*|post=ExpandIfNotEmpty( ' ', 'args1*' ) 23 | XSET args2*|post=ExpandIfNotEmpty( ' ', 'args2*' ) 24 | ;; Contract: `fname^ : `typeargs*^ -> `returntype^ 25 | ;; Purpose: `description^ 26 | ;; Example: `example^ 27 | (define (`fname^ `args*^) 28 | `body^) 29 | 30 | (check-expect (`fname^ `args1*^) `expect1^) 31 | (check-expect (`fname^ `args2*^) `expect2^) 32 | -------------------------------------------------------------------------------- /vim/templates/ftplugin/java/java.xpt.vim: -------------------------------------------------------------------------------- 1 | XPTemplate priority=personal 2 | 3 | let s:f = g:XPTfuncs() 4 | 5 | XPTemplateDef 6 | 7 | XPT class hint=class\ ..\ ctor 8 | XSET className=fileRoot() 9 | XSET args*|post=ExpandIfNotEmpty(', ', 'args*') 10 | public class `className^ { 11 | public `className^(`args*^)`$BRfun^{ 12 | `cursor^ 13 | } 14 | } 15 | 16 | XPT main hint=main\ (\ String\ ) 17 | public static void main(String[] args)`$BRfun^{ 18 | `cursor^ 19 | } 20 | 21 | XPT exception hint=class\ ..\ extends Exception 22 | XSET className=fileRoot() 23 | public class `className^ extends Exception {} 24 | 25 | XPT suite hint=junit\ testsuite 26 | XSET className=fileRoot() 27 | import junit.framework.Assert; 28 | import org.junit.*; 29 | 30 | public class `className^ { 31 | `cursor^ 32 | } 33 | 34 | XPT suitesetup hint=junit\ suite\ setup 35 | @BeforeClass 36 | public static void setUpSuite() { 37 | `cursor^ 38 | } 39 | 40 | XPT setup hint=junit\ suite\ setup 41 | @Before 42 | public void setUp() { 43 | `cursor^ 44 | } 45 | 46 | XPT test hint=junit\ testcase 47 | @Test 48 | public void test`Name^() { 49 | `cursor^ 50 | } 51 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/lex/lex.xpt.vim: -------------------------------------------------------------------------------- 1 | XPTemplate priority=lang 2 | 3 | let s:f = g:XPTfuncs() 4 | 5 | XPTvar $TRUE 1 6 | XPTvar $FALSE 0 7 | XPTvar $NULL NULL 8 | XPTvar $UNDEFINED NULL 9 | 10 | XPTvar $VOID_LINE /* void */; 11 | XPTvar $CURSOR_PH cursor 12 | 13 | XPTvar $BRif ' ' 14 | XPTvar $BRel \n 15 | XPTvar $BRloop ' ' 16 | XPTvar $BRstc ' ' 17 | XPTvar $BRfun ' ' 18 | 19 | XPTinclude 20 | \ _common/common 21 | \ c/c 22 | 23 | 24 | " ========================= Function and Variables ============================= 25 | 26 | " ================================= Snippets =================================== 27 | XPTemplateDef 28 | 29 | 30 | XPT lex hint=Basic\ lex\ file 31 | %{ 32 | /* includes */ 33 | %} 34 | /* options */ 35 | %% 36 | /* rules */ 37 | %% 38 | /* C code */ 39 | 40 | 41 | XPT ruleList hint=..\ \ {..}\ ... 42 | `reg^ { `return^ }`...^ 43 | `reg^ { `return^ }`...^ 44 | 45 | 46 | 47 | " ================================= Wrapper =================================== 48 | 49 | XPT rule_ hint=SEL\ \ {\ ...\ } 50 | `wrapped^ { `cursor^ } 51 | 52 | -------------------------------------------------------------------------------- /emacs.d/completion-dicts/ac-l-dict/basic-arguments: -------------------------------------------------------------------------------- 1 | a4paper 2 | a5paper 3 | abstract 4 | alph 5 | arabic 6 | array 7 | article 8 | b4paper 9 | b5paper 10 | book 11 | bottomnumber 12 | bp 13 | center 14 | chapter 15 | cm 16 | dbltopnumber 17 | dd 18 | description 19 | displaymath 20 | document 21 | draft 22 | em 23 | empty 24 | enumerate 25 | enumi 26 | enumii 27 | enumiii 28 | enumiv 29 | eqnarray 30 | equation 31 | evensidemargin 32 | ex 33 | executivepaper 34 | figure 35 | final 36 | fleqn 37 | flushleft 38 | flushright 39 | footnote 40 | headings 41 | htbp 42 | in 43 | itemize 44 | landscape 45 | legalpaper 46 | leqno 47 | letter 48 | letterpaper 49 | list 50 | minipage 51 | mm 52 | mpfootnote 53 | myheadings 54 | notitlepage 55 | onecolumn 56 | oneside 57 | openany 58 | openbib 59 | paragraph 60 | part 61 | pc 62 | picture 63 | plain 64 | pt 65 | quotation 66 | quote 67 | report 68 | roman 69 | secnumdepth 70 | section 71 | subparagraph 72 | subsection 73 | subsubsection 74 | tabbing 75 | table 76 | tabular 77 | thebibliography 78 | theindex 79 | titlepage 80 | tocdepth 81 | topnumber 82 | totalnumber 83 | twocolumn 84 | twoside 85 | verb 86 | verbatim 87 | verse 88 | Alph 89 | Roman -------------------------------------------------------------------------------- /vim/templates/ftplugin/cpp/cpp.xpt.vim: -------------------------------------------------------------------------------- 1 | XPTemplate priority=personal 2 | 3 | 4 | XPTvar $TRUE true 5 | XPTvar $FALSE false 6 | XPTvar $NULL NULL 7 | 8 | XPTvar $IF_BRACKET_STL \n 9 | XPTvar $FOR_BRACKET_STL \n 10 | XPTvar $WHILE_BRACKET_STL \n 11 | XPTvar $STRUCT_BRACKET_STL \n 12 | XPTvar $FUNC_BRACKET_STL \n 13 | 14 | XPTvar $VOID_LINE /* void */; 15 | XPTvar $CURSOR_PH /* cursor */ 16 | 17 | XPTvar $CL /* 18 | XPTvar $CM * 19 | XPTvar $CR */ 20 | 21 | XPTvar $CS // 22 | 23 | 24 | 25 | XPTinclude 26 | \ _common/common 27 | \ _comment/singleDouble 28 | \ _condition/c.like 29 | \ _func/c.like 30 | \ _loops/c.while.like 31 | \ _loops/java.for.like 32 | \ _preprocessor/c.like 33 | \ _structures/c.like 34 | 35 | " ========================= Function and Varaibles ============================= 36 | 37 | 38 | " ================================= Snippets =================================== 39 | XPTemplateDef 40 | 41 | XPT In hint=#include <..> 42 | #include <`include^> 43 | `cursor^ 44 | 45 | XPT in hint=#include <..> 46 | #include "`include^.h" 47 | `cursor^ 48 | 49 | ..XPT 50 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/_comment/doubleSign.xpt.vim: -------------------------------------------------------------------------------- 1 | XPTemplate priority=all- 2 | 3 | 4 | " snippets for language whose comment sign is 2 signs, like c:"/* */" 5 | " TODO friendly cursor place holder 6 | 7 | XPTinclude 8 | \ _common/common 9 | 10 | 11 | " ========================= Function and Variables ============================= 12 | 13 | 14 | " ================================= Snippets =================================== 15 | XPTemplateDef 16 | 17 | 18 | XPT comment hint=$CL\ $CR 19 | `$CL^ `what^ `$CR^ 20 | 21 | 22 | XPT commentBlock hint=$CL\ ... 23 | `$CL^ 24 | `$CM^ `cursor^ 25 | `$CR^ 26 | 27 | 28 | XPT commentDoc hint=$CL$CM\ ... 29 | `$CL^`$CM^ 30 | `$CM^ `cursor^ 31 | `$CR^ 32 | 33 | 34 | XPT commentLine hint=$CL\ ...\ $CR 35 | `$CL^ `what^ `$CR^ 36 | 37 | " ================================= Wrapper =================================== 38 | 39 | XPT comment_ hint=$CL\ $CR 40 | `$CL^ `wrapped^ `$CR^ 41 | 42 | 43 | XPT commentBlock_ hint=$CL\ ... 44 | `$CL^ 45 | `$CM^ `wrapped^ 46 | `$CR^ 47 | 48 | 49 | XPT commentDoc_ hint=$CL$CM\ ... 50 | `$CL^`$CM^ 51 | `$CM^ `wrapped^ 52 | `$CR^ 53 | 54 | 55 | XPT commentLine_ hint=$CL\ ...\ $CR 56 | `$CL^ `wrapped^ `$CR^ 57 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/_comment/singleDouble.xpt.vim: -------------------------------------------------------------------------------- 1 | XPTemplate priority=all- 2 | 3 | 4 | XPTinclude 5 | \ _comment/common 6 | 7 | 8 | " ========================= Function and Variables ============================= 9 | 10 | 11 | " ================================= Snippets =================================== 12 | XPTemplateDef 13 | 14 | 15 | XPT comment hint=$CL\ $CR 16 | `$CL^ `what^ `$CR^ 17 | 18 | 19 | XPT commentBlock hint=$CL\ ... 20 | `$CL^ 21 | `$CM^ `cursor^ 22 | `$CR^ 23 | 24 | 25 | XPT commentDoc hint=$CL$CM\ ... 26 | `$CL^`$CM^ 27 | `$CM^ `cursor^ 28 | `$CR^ 29 | 30 | XPT commentLine hint=$CS\ ... 31 | `$CS^ `cursor^ 32 | 33 | 34 | XPT commentLine2 hint=$CL\ ...\ $CR 35 | `$CL^ `what^ `$CR^ 36 | 37 | 38 | " ================================= Wrapper =================================== 39 | 40 | XPT comment_ hint=$CL\ $CR 41 | `$CL^ `wrapped^ `$CR^ 42 | 43 | 44 | XPT commentBlock_ hint=$CL\ ... 45 | `$CL^ 46 | `$CM^ `wrapped^ 47 | `$CR^ 48 | 49 | 50 | XPT commentDoc_ hint=$CL$CM\ ... 51 | `$CL^`$CM^ 52 | `$CM^ `wrapped^ 53 | `$CR^ 54 | 55 | XPT commentLine_ hint=$CS\ ... 56 | `$CS^ `wrapped^ 57 | 58 | XPT commentLine2_ hint=$CL\ ...\ $CR 59 | `$CL^ `wrapped^ `$CR^ 60 | -------------------------------------------------------------------------------- /vim/xpt/plugin/FiletypeScope.class.vim: -------------------------------------------------------------------------------- 1 | if exists("g:__FILETYPESCOPE_CLASS_VIM__") 2 | finish 3 | endif 4 | let g:__FILETYPESCOPE_CLASS_VIM__ = 1 5 | let s:oldcpo = &cpo 6 | set cpo-=< cpo+=B 7 | let s:proto = { 8 | \} 9 | fun! s:New() dict 10 | let self.filetype = '' 11 | let self.normalTemplates = {} 12 | let self.funcs = { '$CURSOR_PH' : 'CURSOR' } 13 | let self.varPriority = {} 14 | let self.loadedSnipFiles = {} 15 | endfunction 16 | fun! s:IsSnippetLoaded( filename ) dict 17 | return has_key( self.loadedSnipFiles, a:filename ) 18 | endfunction 19 | fun! s:SetSnippetLoaded( filename ) dict 20 | let self.loadedSnipFiles[ a:filename ] = 1 21 | let fn = substitute(a:filename, '\\', '/', 'g') 22 | let shortname = matchstr(fn, '\Vftplugin\/\zs\w\+\/\.\*\ze.xpt.vim') 23 | let self.loadedSnipFiles[shortname] = 1 24 | endfunction 25 | fun! s:CheckAndSetSnippetLoaded( filename ) dict 26 | let loaded = has_key( self.loadedSnipFiles, a:filename ) 27 | call self.SetSnippetLoaded(a:filename) 28 | return loaded 29 | endfunction 30 | exe XPT#let_sid 31 | let g:FiletypeScope = XPT#class( s:sid, s:proto ) 32 | let &cpo = s:oldcpo 33 | -------------------------------------------------------------------------------- /vim/xpt/plugin/SettingSwitch.class.vim: -------------------------------------------------------------------------------- 1 | if exists("g:__SETTINGSAVER_CLASS_VIM__") 2 | finish 3 | endif 4 | let g:__SETTINGSAVER_CLASS_VIM__ = 1 5 | let s:oldcpo = &cpo 6 | set cpo-=< cpo+=B 7 | fun! s:New() dict 8 | let self.settings = [] 9 | let self.saved = [] 10 | endfunction 11 | fun! s:Add( key, value ) dict 12 | if self.saved != [] 13 | throw "settings are already saved and can not be added" 14 | endif 15 | let self.settings += [ [ a:key, a:value ] ] 16 | endfunction 17 | fun! s:AddList( ... ) dict 18 | for item in a:000 19 | call self.Add( item[0], item[1] ) 20 | endfor 21 | endfunction 22 | fun! s:Switch() dict 23 | if self.saved != [] 24 | endif 25 | for [ key, value ] in self.settings 26 | call insert( self.saved, [ key, eval( key ) ] ) 27 | exe 'let ' . key . '=' . string( value ) 28 | endfor 29 | endfunction 30 | fun! s:Restore() dict 31 | if self.saved == [] 32 | return 33 | endif 34 | for setting in self.saved 35 | exe 'let '. setting[0] . '=' . string( setting[1] ) 36 | endfor 37 | let self.saved = [] 38 | endfunction 39 | exe XPT#let_sid 40 | let g:SettingSwitch = XPT#class( s:sid, {} ) 41 | let &cpo = s:oldcpo 42 | -------------------------------------------------------------------------------- /emacs.d/completion-dicts/python-mode: -------------------------------------------------------------------------------- 1 | __import__ 2 | abs 3 | and 4 | any 5 | apply 6 | as 7 | assert 8 | basestring 9 | bin 10 | bool 11 | break 12 | buffer 13 | class 14 | cmp 15 | coerce 16 | complex 17 | continue 18 | def 19 | del 20 | delattr 21 | dict 22 | dir 23 | divmod 24 | elif 25 | else 26 | enumerate 27 | eval 28 | except 29 | exec 30 | execfile 31 | file 32 | filter 33 | finally 34 | float 35 | for 36 | format 37 | from 38 | frozenset 39 | getattr 40 | global 41 | globals 42 | hasattr 43 | hash 44 | help 45 | hex 46 | id 47 | if 48 | import 49 | in 50 | input 51 | int 52 | intern 53 | is 54 | isinstance 55 | issubclass 56 | iter 57 | lambda 58 | len 59 | list 60 | locals 61 | long 62 | map 63 | max 64 | min 65 | next 66 | not 67 | object 68 | oct 69 | open 70 | or 71 | ord 72 | pass 73 | pow 74 | print 75 | print 76 | property 77 | raise 78 | range 79 | raw_input 80 | reduce 81 | reload 82 | repr 83 | return 84 | reversed 85 | round 86 | set 87 | setattr 88 | slice 89 | sorted 90 | staticmethod 91 | str 92 | sum 93 | super 94 | try 95 | tuple 96 | type 97 | unichr 98 | unicode 99 | vars 100 | while 101 | with 102 | xrange 103 | yield 104 | zip 105 | -------------------------------------------------------------------------------- /vim/vim/plugin/sherlock.vim: -------------------------------------------------------------------------------- 1 | "============================================================================= 2 | " File: sherlock.vim 3 | " Author: Frédéric Hardy - http://blog.mageekbox.net 4 | " Date: Thu Aug 6 10:57:14 CEST 2009 5 | " Licence: GPL version 2.0 license 6 | " GetLatestVimScripts: 2731 11146 :AutoInstall: sherlock.vim 7 | "============================================================================= 8 | if (!exists('sherlock#disable') || sherlock#disable == 0) && !exists('sherlock#loaded') 9 | let sherlock#name = 'sherlock' 10 | let sherlock#loaded = 1 11 | 12 | if v:version < 700 13 | echo "Vim version >= 7 is required for sherlock.vim." 14 | else 15 | let s:cpo = &cpo 16 | 17 | setlocal cpo&vim 18 | 19 | if !hasmapto('sherlockCompleteBackward()') 20 | cnoremap esherlock#completeBackward() 21 | endif 22 | 23 | if !hasmapto('sherlock#completeForward()') 24 | cnoremap esherlock#completeForward() 25 | endif 26 | 27 | command -nargs=0 SherlockVimball call sherlock#makeVimball() 28 | 29 | let &cpo= s:cpo 30 | unlet s:cpo 31 | endif 32 | endif 33 | 34 | finish 35 | 36 | " vim:filetype=vim foldmethod=marker shiftwidth=3 tabstop=3 37 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/_comment/pattern.xpt.vim: -------------------------------------------------------------------------------- 1 | " priority is a bit lower than 'spec' 2 | XPTemplate priority=spec+ 3 | 4 | echom "_comment/pattern is deprecated." 5 | 6 | 7 | " XPTvar $CL Warn_$CL_IS_NOT_SET 8 | " XPTvar $CM Warn_$CM_IS_NOT_SET 9 | " XPTvar $CR Warn_$CR_IS_NOT_SET 10 | " XPTvar $CS Warn_$CS_IS_NOT_SET 11 | 12 | " ================================= Snippets =================================== 13 | 14 | if has_key(s:v, '$CL') && has_key(s:v, '$CR') 15 | 16 | call XPTdefineSnippet('cc', {'hint' : '$CL $CR'}, [ '`$CL^ `cursor^ `$CR^' ]) 17 | call XPTdefineSnippet('cc_', {'hint' : '$CL ... $CR'}, [ '`$CL^ `wrapped^ `$CR^' ]) 18 | 19 | " block comment 20 | call XPTdefineSnippet('cb', {'hint' : '$CL ...'}, [ 21 | \'`$CL^', 22 | \' `$CM^ `cursor^', 23 | \' `$CR^' ]) 24 | 25 | " block doc comment 26 | call XPTdefineSnippet('cd', {'hint' : '$CL$CM ...'}, [ 27 | \'`$CL^`$CM^', 28 | \' `$CM^ `cursor^', 29 | \' `$CR^' ]) 30 | 31 | endif 32 | 33 | " line comment 34 | if has_key(s:v, '$CS') 35 | call XPTdefineSnippet('cl', {'hint' : '$CS'}, [ '`$CS^ `cursor^' ]) 36 | 37 | else 38 | call XPTdefineSnippet('cl', {'hint' : '$CL .. $CR'}, [ '`$CL^ `cursor^ `$CR^' ]) 39 | 40 | endif 41 | 42 | 43 | -------------------------------------------------------------------------------- /emacs.d/completion-dicts/ac-l-dict/hyperref-a-h-*: -------------------------------------------------------------------------------- 1 | anchorcolor 2 | backref 3 | baseurl 4 | bookmarks 5 | bookmarksdepth 6 | bookmarksnumbered 7 | bookmarksopen 8 | bookmarksopenlevel 9 | bookmarkstype 10 | breaklinks 11 | citebordercolor 12 | citecolor 13 | colorlinks 14 | debug 15 | dvipdf 16 | dvipdfm 17 | dvips 18 | dvipsone 19 | dviwindo 20 | extension 21 | filebordercolor 22 | filecolor 23 | frenchlinks 24 | hyperfigures 25 | hyperindex 26 | hypertex 27 | hypertexnames 28 | implicit 29 | latex2html 30 | legalpaper 31 | linkbordercolor 32 | linkcolor 33 | linktocpage 34 | menubordercolor 35 | menucolor 36 | naturalnames 37 | nesting 38 | pageanchor 39 | pagebackref 40 | pagebordercolor 41 | pagecolor 42 | pdfauthor 43 | pdfborder 44 | pdfborderstyle 45 | pdfcenterwindow 46 | pdfcreator 47 | pdfescapeform 48 | pdffitwindow 49 | pdfhighlight 50 | pdfkeywords 51 | pdfmenubar 52 | pdfnewwindow 53 | pdfpagelabels 54 | pdfpagelayout 55 | pdfpagemode 56 | pdfpagescrop 57 | pdfpagetransition 58 | pdfproducer 59 | pdfstartpage 60 | pdfstartview 61 | pdfsubject 62 | pdftex 63 | pdftitle 64 | pdftoolbar 65 | pdfview 66 | pdfwindowui 67 | plainpages 68 | ps2pdf 69 | raiselinks 70 | runbordercolor 71 | setpagesize 72 | tex4ht 73 | textures 74 | unicode 75 | urlbordercolor 76 | urlcolor 77 | verbose 78 | vtex -------------------------------------------------------------------------------- /vim/xpt/ftplugin/_structures/c.like.xpt.vim: -------------------------------------------------------------------------------- 1 | XPTemplate priority=like 2 | 3 | 4 | XPTvar $TRUE 1 5 | XPTvar $FALSE 0 6 | XPTvar $NULL NULL 7 | 8 | XPTvar $VOID_LINE /* void */; 9 | 10 | XPTvar $BRstc ' ' 11 | 12 | " containers 13 | let s:f = g:XPTfuncs() 14 | 15 | 16 | 17 | 18 | 19 | " ========================= Function and Variables ============================= 20 | " fun! s:f.c_enum_next(ptn) dict 21 | " let v = self.V() 22 | " if v == a:ptn 23 | " return '' 24 | " else 25 | " return ";\n elt" 26 | " endif 27 | " endfunction 28 | 29 | " ================================= Snippets =================================== 30 | XPTemplateDef 31 | 32 | 33 | XPT enum hint=enum\ {\ ..\ } 34 | XSET postQuoter={,} 35 | enum `name^`$BRstc^{ 36 | `elt^;` 37 | `...{^ 38 | `elt^;` 39 | `...^`}^ 40 | }` `var^; 41 | 42 | 43 | XPT struct hint=struct\ {\ ..\ } 44 | struct `structName^`$BRstc^{ 45 | `type^ `field^;` 46 | `...^ 47 | `type^ `field^;` 48 | `...^ 49 | }` `var^^; 50 | 51 | 52 | XPT bitfield hint=struct\ {\ ..\ :\ n\ } 53 | struct `structName^`$BRstc^{ 54 | `type^ `field^ : `bits^;` 55 | `...^ 56 | `type^ `field^ : `bits^;` 57 | `...^ 58 | }` `var^^; 59 | 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/yacc/yacc.xpt.vim: -------------------------------------------------------------------------------- 1 | XPTemplate priority=lang- 2 | 3 | let s:f = g:XPTfuncs() 4 | 5 | XPTvar $TRUE 1 6 | XPTvar $FALSE 0 7 | XPTvar $NULL NULL 8 | XPTvar $UNDEFINED NULL 9 | 10 | XPTvar $VOID_LINE /* void */; 11 | XPTvar $CURSOR_PH /* cursor */ 12 | 13 | XPTvar $BRif ' ' 14 | XPTvar $BRel \n 15 | XPTvar $BRloop ' ' 16 | XPTvar $BRstc ' ' 17 | XPTvar $BRfun ' ' 18 | 19 | 20 | XPTinclude 21 | \ _common/common 22 | \ c/c 23 | 24 | 25 | " ========================= Function and Variables ============================= 26 | 27 | " ================================= Snippets =================================== 28 | XPTemplateDef 29 | 30 | 31 | XPT yacc hint=Basic\ yacc\ file 32 | %{ 33 | /* includes */ 34 | %} 35 | /* options */ 36 | %% 37 | /* grammar rules */ 38 | %% 39 | /* C code */ 40 | 41 | XPT rule hint=..:\ ..\ |\ ..\ |\ ... 42 | `ruleName^: `pattern^ { `action^ } 43 | ` `...` 44 | {{^ | `pattern^ { `action^ } 45 | ` `...` 46 | ^`}}^ ; 47 | 48 | XPT tok hint=%token\ ... 49 | %token 50 | 51 | XPT prio hint=%left\ ...\ %right\ ... 52 | XSET op*|post=ExpandIfNotEmpty( "' '", 'op*', "" ) 53 | %left '`op*^'` `...^ 54 | %left '`op*^'` `...^ 55 | 56 | 57 | -------------------------------------------------------------------------------- /emacs.d/config/cofi-color.el: -------------------------------------------------------------------------------- 1 | (setq custom-theme-directory "~/.emacs.d/themes/") 2 | 3 | (setq hl-paren-colors '("#F08682" "#E85752" "#E20800" "#BF0303" "#9C0F0F" "#840C0C" "#7A0B0B")) 4 | (defvar cofi/current-colorscheme nil) 5 | (defvar cofi/colorschemes '("cofi-dark" "cofi-light")) 6 | (defun cofi/colorscheme (scheme) 7 | "Move to next colorscheme. If `ARG' is non-nil reload current." 8 | (interactive (list (completing-read "Colorscheme: " cofi/colorschemes))) 9 | (let ((custom-safe-themes t) 10 | (scheme (if (stringp scheme) (intern scheme) scheme))) 11 | (disable-theme cofi/current-colorscheme) 12 | (load-theme scheme) 13 | (setq cofi/current-colorscheme scheme))) 14 | 15 | ;;; additional faces 16 | (defface mode-line-buffer 17 | '((t (:bold t :foreground "#FFAA00"))) 18 | "" 19 | :group 'mode-line-faces) 20 | (defface mode-line-major-mode 21 | '((t (:bold t :foreground "gold"))) 22 | "" 23 | :group 'mode-line-faces) 24 | (defface mode-line-minor-mode 25 | '((t (:foreground "khaki"))) 26 | "" 27 | :group 'mode-line-faces) 28 | 29 | (defface linum-current-line '((t (:bold t :background "#202020" :foreground "yellow"))) 30 | "Face linum uses for the current line" 31 | :group 'linum) 32 | 33 | (cofi/colorscheme 'cofi-dark) 34 | 35 | (provide 'cofi-color) 36 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all emacs-compile elisp-compile deploy 2 | 3 | PWD := `pwd` 4 | LINK_CMD := ln --symbolic --force -T 5 | NORMAL_FILES := `ls -I xmonad.hs -I README -I newsbeuterconfig -I vimenv_setup -I Makefile -I pentadactyl -I zathurarc -I ipy_user_conf.py` 6 | 7 | refresh: 8 | #emacs --batch --no-site-file --eval '(byte-recompile-directory "emacs.d/")' 9 | @emacs --batch --no-site-file --eval '(byte-recompile-directory "elisp/")' 10 | 11 | all: compile deploy 12 | 13 | compile: 14 | #emacs --batch --no-site-file --eval '(byte-recompile-directory "emacs.d/" 0 t)' 15 | @emacs --batch --no-site-file --eval '(byte-recompile-directory "elisp/" 0 t)' 16 | 17 | deploy: 18 | @mkdir -p ~/.xmonad 19 | @mkdir -p ~/.pentadactyl 20 | @mkdir -p ~/.newsbeuter 21 | @mkdir -p ~/.config/zathura/ 22 | @for file in $(NORMAL_FILES); do $(LINK_CMD) $(PWD)/$$file ~/.$$file; done 23 | @$(LINK_CMD) $(PWD)/vimenv_setup ~/.vimrc 24 | @$(LINK_CMD) $(PWD)/newsbeuterconfig ~/.newsbeuter/config 25 | @$(LINK_CMD) $(PWD)/xmonad.hs ~/.xmonad/xmonad.hs 26 | @$(LINK_CMD) $(PWD)/pentadactyl/plugins ~/.pentadactyl/plugins 27 | @$(LINK_CMD) $(PWD)/pentadactyl/colors ~/.pentadactyl/colors 28 | @$(LINK_CMD) $(PWD)/zathurarc ~/.config/zathura/zathurarc 29 | @$(LINK_CMD) $(PWD)/ipy_user_conf.py ~/.ipython/ipy_user_conf.py 30 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/_loops/for.xpt.vim: -------------------------------------------------------------------------------- 1 | " 2 | " standard for( i = 0; i < 10; ++i ) snippets 3 | " 4 | 5 | XPTemplate priority=all- 6 | 7 | let s:f = g:XPTfuncs() 8 | 9 | XPTvar $NULL NULL 10 | XPTvar $CURSOR_PH CURSOR 11 | XPTvar $BRloop ' ' 12 | 13 | XPTvar $VAR_PRE 14 | XPTvar $FOR_SCOPE 15 | 16 | XPTinclude 17 | \ _common/common 18 | 19 | 20 | " ========================= Function and Variables ============================= 21 | 22 | " ================================= Snippets =================================== 23 | XPTemplateDef 24 | 25 | 26 | 27 | XPT for hint=for\ (..;..;++) 28 | for ( `$FOR_SCOPE^`$VAR_PRE^`i^ = `0^; `$VAR_PRE^`i^ < `len^; ++`$VAR_PRE^`i^ )`$BRloop^{ 29 | `cursor^ 30 | } 31 | 32 | 33 | XPT forr hint=for\ (..;..;--) 34 | for ( `$FOR_SCOPE^`$VAR_PRE^`i^ = `0^; `$VAR_PRE^`i^ >`=^ `end^; --`$VAR_PRE^`i^ )`$BRloop^{ 35 | `cursor^ 36 | } 37 | 38 | 39 | XPT fornn hint=for\ \(\ ;\ $NULL\ !=\ var;\ ) 40 | XSET ptrOp=R( 'ptr' ) 41 | for ( `$FOR_SCOPE^`$VAR_PRE^`ptr^ = `init^; `$NULL^ != `$VAR_PRE^`ptr^; `$VAR_PRE^`ptrOp^ )`$BRloop^{ 42 | `cursor^ 43 | } 44 | 45 | 46 | XPT forever hint=for\ (;;)\ .. 47 | XSET body|pre=VoidLine() 48 | for (;;) `body^ 49 | 50 | " ================================= Wrapper =================================== 51 | 52 | 53 | -------------------------------------------------------------------------------- /yasnippets/emacs-lisp-mode/file header.snippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: file header 3 | # -- 4 | ;;; ${1:name}.el --- ${2:description} 5 | 6 | ;; Copyright (C) `(format-time-string "%Y")` `user-full-name` 7 | ;; Author: `(format "%s <%s>" user-full-name user-mail-address)` 8 | ;; Created: `(format-time-string "%Y-%m-%d")` 9 | ;; Version: 10 | ;; Keywords: 11 | ;; URL: 12 | ;; 13 | ;; This file is not part of GNU Emacs. 14 | 15 | ;; This program is free software; you can redistribute it and/or modify 16 | ;; it under the terms of the GNU General Public License as published by 17 | ;; the Free Software Foundation; either version 2 of the License, or 18 | ;; (at your option) any later version. 19 | ;; 20 | ;; This program is distributed in the hope that it will be useful, 21 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 22 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 | ;; GNU General Public License for more details. 24 | ;; 25 | ;; You should have received a copy of the GNU General Public License 26 | ;; along with GNU Emacs; see the file COPYING. If not, write to the 27 | ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, 28 | ;; Boston, MA 02111-1307, USA. 29 | 30 | ;;; Commentary: 31 | 32 | ;;; Code: 33 | 34 | (provide '$1) 35 | ;;; $1.el ends here -------------------------------------------------------------------------------- /xmobar/default: -------------------------------------------------------------------------------- 1 | -- -*- mode: haskell -*- 2 | Config { font = "xft:Dejavu Sans:size=9:antialias=true:hinting=true:hintstyle=hintfull" 3 | , bgColor = "black" 4 | , fgColor = "white smoke" 5 | , position = TopW L 85 6 | , border = NoBorder 7 | , lowerOnStart = False 8 | , commands = [ Run MultiCpu ["-t", "", "-S", "Yes", "-p", "3", "-L","3","-H","50","--low","green","--normal","orange","--high","red"] 60 9 | , Run Memory ["-t","M: %", "-S", "Yes", "-p", "3", "-L", "40", "-H", "70", "--low", "green", "--normal","orange","--high","red"] 60 10 | , Run Swap ["-t", "S: %", "-L", "-S", "Yes", "-p", "3", "40", "-H", "70", "--low", "green", "--normal","orange","--high","red"] 60 11 | , Run Date "%a %b %d %H:%M" "date" 6 12 | , Run Volume "default" "Master" ["-t", "% "] 10 13 | , Run StdinReader 14 | , Run Com "appt-file" [] "appt" 60 15 | ] 16 | , sepChar = "%" 17 | , alignSep = "}{" 18 | , template = "%StdinReader% }{%appt% ✦ %multicpu% ✦ %memory% ✦ ♩ %default:Master% %date%" 19 | } 20 | -------------------------------------------------------------------------------- /elisp/ghc-mod/ghc-command.el: -------------------------------------------------------------------------------- 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2 | ;;; 3 | ;;; ghc-command.el 4 | ;;; 5 | 6 | ;; Author: Kazu Yamamoto 7 | ;; Created: Apr 13, 2010 8 | 9 | ;;; Code: 10 | 11 | (require 'ghc-flymake) 12 | 13 | (defun ghc-insert-template () 14 | (interactive) 15 | (cond 16 | ((bobp) 17 | (ghc-insert-module-template)) 18 | ((ghc-flymake-have-errs-p) 19 | (ghc-flymake-insert-from-warning)) 20 | (t 21 | (message "Nothing to be done")))) 22 | 23 | (defun ghc-insert-module-template () 24 | (let ((mod (file-name-sans-extension (buffer-name)))) 25 | (aset mod 0 (upcase (aref mod 0))) 26 | (insert "module " mod " where\n"))) 27 | 28 | (defun ghc-sort-lines (beg end) 29 | (interactive "r") 30 | (save-excursion 31 | (save-restriction 32 | (narrow-to-region beg end) 33 | (goto-char (point-min)) 34 | (let ((inhibit-field-text-motion t)) 35 | (sort-subr nil 'forward-line 'end-of-line 36 | (lambda () 37 | (re-search-forward "^import\\( *qualified\\)? *" nil t) 38 | nil) 39 | 'end-of-line))))) 40 | 41 | (defun ghc-save-buffer () 42 | (interactive) 43 | (if (buffer-modified-p) 44 | (call-interactively 'save-buffer) 45 | (flymake-start-syntax-check))) 46 | 47 | (provide 'ghc-command) 48 | -------------------------------------------------------------------------------- /newsbeuterconfig: -------------------------------------------------------------------------------- 1 | auto-reload yes 2 | reload-time 45 3 | reload-threads 8 4 | refresh-on-startup yes 5 | 6 | datetime-format "%m-%d %H:%M" 7 | max-items 100 8 | save-path "~/Feed-Articles" 9 | 10 | show-read-feeds no 11 | show-read-articles no 12 | 13 | browser "browser %u" 14 | 15 | feedlist-title-format "Your feeds (%u unread, %t total)%?T? - tag `%T'&?" 16 | articlelist-title-format "Articles in feed %T (%u unread, %t total) - %U" 17 | 18 | feedlist-format "%4i %n %11u %t" 19 | articlelist-format "%4i %f %D %?T?|%-17T| ?%t" 20 | 21 | notify-format "%d new articles (%n unread articles, %f unread feeds)" 22 | notify-beep yes 23 | notify-screen yes 24 | 25 | macro o open-in-browser ; toggle-article-read "read" 26 | 27 | unbind-key l 28 | bind-key L toggle-show-read-feeds 29 | 30 | bind-key h prev-unread-feed 31 | bind-key j down 32 | bind-key k up 33 | bind-key l next-unread-feed 34 | bind-key { pageup 35 | bind-key } pagedown 36 | bind-key c set-tag 37 | bind-key ^C clear-tag 38 | bind-key n toggle-article-read 39 | bind-key N mark-feed-read 40 | 41 | color background white black 42 | color listnormal white black 43 | color listnormal_unread white black 44 | color listfocus white red bold 45 | color listfocus_unread white red bold 46 | color info yellow black bold 47 | color article white black 48 | -------------------------------------------------------------------------------- /tmux.conf: -------------------------------------------------------------------------------- 1 | set -g default-command zsh 2 | set -g status-left-length 60 3 | set -g status-left "#[fg=colour235,bg=colour252,bold] #S #[fg=colour250,bg=colour238,bold] #(whoami)@#H" 4 | set -g status-right "#[fg=yellow,bright]%A %Y-%m-%d %H:%M:%S#[default]" 5 | set -g status-bg black 6 | set -g status-fg green 7 | set -g status-interval 1 8 | set -g status-attr bright 9 | set-window-option -g window-status-current-fg black 10 | set-window-option -g window-status-current-bg white 11 | set -g window-status-current-format "<#I:#W>" 12 | set -g status-justify left 13 | 14 | set -g base-index 1 15 | set -g set-titles on 16 | set -g default-terminal screen-256color 17 | 18 | set-window-option -g mode-keys vi 19 | set -g status-keys vi 20 | 21 | set -g visual-activity on 22 | set -g visual-bell off 23 | 24 | #-j as prefix instead of -b 25 | unbind C-b 26 | set -g prefix C-j 27 | bind j send-prefix 28 | 29 | bind C-a last-window 30 | bind -n C-right next 31 | bind -n C-left prev 32 | 33 | bind m setw monitor-activity 34 | 35 | bind h previous-window 36 | bind j select-pane -t :.+ 37 | bind k select-pane -t :.- 38 | bind l next-window 39 | bind p last-window 40 | 41 | bind / split-window -h 42 | bind | split-window -v 43 | 44 | bind & confirm kill-window 45 | bind \ confirm kill-session 46 | 47 | new 48 | neww 49 | 50 | select-window -t 1 51 | -------------------------------------------------------------------------------- /yasnippets/emacs-lisp-mode/skeleton.snippet: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: skeleton.snippet 3 | # -- 4 | ;;; `(file-name-nondirectory buffer-file-name)` --- $0 5 | 6 | ;; Copyright (C) `(format-time-string "%Y")` `user-full-name` 7 | ;; Author: `(format "%s <%s>" user-full-name user-mail-address)` 8 | ;; Created: `(format-time-string "%Y-%m-%d")` 9 | ;; Version: 10 | ;; Keywords: 11 | ;; URL: 12 | ;; 13 | ;; This file is not part of GNU Emacs. 14 | 15 | ;; This program is free software; you can redistribute it and/or modify 16 | ;; it under the terms of the GNU General Public License as published by 17 | ;; the Free Software Foundation; either version 2 of the License, or 18 | ;; (at your option) any later version. 19 | ;; 20 | ;; This program is distributed in the hope that it will be useful, 21 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 22 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 | ;; GNU General Public License for more details. 24 | ;; 25 | ;; You should have received a copy of the GNU General Public License 26 | ;; along with GNU Emacs; see the file COPYING. If not, write to the 27 | ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, 28 | ;; Boston, MA 02111-1307, USA. 29 | 30 | ;;; Commentary: 31 | 32 | ;;; Code: 33 | 34 | (provide '`(file-name-sans-extension (file-name-nondirectory buffer-file-name))`) 35 | ;;; `(file-name-nondirectory buffer-file-name)` ends here -------------------------------------------------------------------------------- /xmobar/desktop: -------------------------------------------------------------------------------- 1 | -- -*- mode: haskell -*- 2 | Config { font = "xft:Dejavu Sans:size=9:antialias=true:hinting=true:hintstyle=hintfull" 3 | , bgColor = "black" 4 | , fgColor = "white smoke" 5 | , position = TopSize L 85 23 6 | , border = NoBorder 7 | , lowerOnStart = False 8 | , commands = [ Run Wireless "wlan0" ["-t", "( )", "-L", "30", "-H", "70", "--low", "red", "--normal","orange","--high","green"] 60 9 | , Run MultiCpu ["-t", " ", "-S", "Yes", "-p", "3", "-L","3","-H","50","--low","green","--normal","orange","--high","red"] 60 10 | , Run Memory ["-t","M: ", "-S", "Yes", "-p", "3", "-L", "40", "-H", "70", "--low", "green", "--normal","orange","--high","red"] 60 11 | , Run Swap ["-t", "S: ", "-S", "Yes", "-p", "3", "-L", "40", "-H", "70", "--low", "green", "--normal","orange","--high","red"] 60 12 | , Run Date "%a %b %d %H:%M" "date" 60 13 | , Run Volume "default" "Master" ["-t", "% "] 10 14 | , Run StdinReader 15 | , Run Com "appt-file" [] "appt" 60 16 | ] 17 | , sepChar = "%" 18 | , alignSep = "}{" 19 | , template = "%StdinReader% }{%appt% %wlan0wi% ✦ %multicpu% ✦ %memory% ✦ ♩ %default:Master% %date%" 20 | } 21 | -------------------------------------------------------------------------------- /emacs.d/config/cofi-desktop.el: -------------------------------------------------------------------------------- 1 | (defun emacs-process-p (pid) 2 | "Returns t if command of pid is emacs. 3 | Also returns nil if pid is nil." 4 | (when pid 5 | (let* ((attributes (process-attributes pid)) 6 | (comm (cdr (assq 'comm attributes)))) 7 | (or (string= "emacs" comm) 8 | (string= "emacs.exe" comm))))) 9 | 10 | (defadvice desktop-owner (after pry-from-cold-dead-hands activate) 11 | "Don't allow dead emacsen to own the desktop file." 12 | (when (not (emacs-process-p ad-return-value)) 13 | (setq ad-return-value nil))) 14 | 15 | (require-and-exec 'desktop 16 | (require 'desktop-menu)) 17 | 18 | ;; File/path settings 19 | (setq desktop-path `(,(cofi/var-file "emacs/desktop/")) 20 | desktop-dirname (cofi/var-file "emacs/desktop/") 21 | desktop-base-file-name "desktop" 22 | desktop-menu-path `(,(cofi/var-file "emacs/desktop/menu/")) 23 | desktop-menu-directory (cofi/var-file "emacs/desktop/menu/") 24 | desktop-menu-list-file "menu" 25 | desktop-menu-base-filename "menu-desktop") 26 | 27 | (setq desktop-restore-eager nil 28 | ;; default \ filename history 29 | desktop-globals-to-save '(desktop-missing-file-warning 30 | tags-file-name 31 | tags-table-list 32 | search-ring 33 | regexp-search-ring 34 | register-alist)) 35 | (provide 'cofi-desktop) 36 | 37 | -------------------------------------------------------------------------------- /vim/vim/syntax/vcscommit.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: VCS commit file 3 | " Maintainer: Bob Hiestand (bob.hiestand@gmail.com) 4 | " License: 5 | " Copyright (c) 2007 Bob Hiestand 6 | " 7 | " Permission is hereby granted, free of charge, to any person obtaining a copy 8 | " of this software and associated documentation files (the "Software"), to 9 | " deal in the Software without restriction, including without limitation the 10 | " rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 11 | " sell copies of the Software, and to permit persons to whom the Software is 12 | " furnished to do so, subject to the following conditions: 13 | " 14 | " The above copyright notice and this permission notice shall be included in 15 | " all copies or substantial portions of the Software. 16 | " 17 | " THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | " IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | " FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | " AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | " LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | " FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 23 | " IN THE SOFTWARE. 24 | 25 | if exists("b:current_syntax") 26 | finish 27 | endif 28 | 29 | syntax region vcsComment start="^VCS: " end="$" 30 | highlight link vcsComment Comment 31 | let b:current_syntax = "vcscommit" 32 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/xml/xml.xpt.vim: -------------------------------------------------------------------------------- 1 | XPTemplate priority=spec 2 | 3 | let s:f = g:XPTfuncs() 4 | 5 | XPTvar $CURSOR_PH 6 | 7 | XPTinclude 8 | \ _common/common 9 | 10 | XPTvar $CL 13 | XPTinclude 14 | \ _comment/doubleSign 15 | 16 | 17 | " ========================= Function and Variables ============================= 18 | 19 | fun! s:f.xml_att_val() 20 | if self.Phase()=='post' 21 | return '' 22 | endif 23 | 24 | let name = self.ItemName() 25 | return self.Vmatch('\V' . name, '\V\^\s\*\$') 26 | \ ? '' 27 | \ : '="val" ' . name 28 | endfunction 29 | 30 | " ================================= Snippets =================================== 31 | XPTemplateDef 32 | 33 | 34 | XPT < hint=.. 35 | XSET att*|post=BuildIfChanged(V().'="`val^"` `att*^`att*^xml_att_val()^') 36 | <`tag^` `att*^`att*^xml_att_val()^>`content^ 37 | ..XPT 38 | 39 | 40 | XPT ver hint= 42 | 43 | 44 | XPT style hint= 46 | 47 | 48 | XPT cdata hint= 50 | 51 | 52 | 53 | " ================================= Wrapper =================================== 54 | 55 | XPT <_ hint=\ SEL\ 56 | <`tag^` `...{{^ `name^="`val^"` `...^`}}^>`wrapped^ 57 | 58 | 59 | XPT cdata_ hint= 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /yasnippets/python-mode/class: -------------------------------------------------------------------------------- 1 | # -*- utf-8 mode: snippet -*- 2 | # name: Class with sphinx doc 3 | # key: class 4 | # contributor: Orestis Markou 5 | # contributor: Nishio Hirokazu 6 | # contributor: Yasser González Fernández 7 | # contributor: Michael Markert 8 | # -- 9 | class ${1:ClassName}(${2:object}): 10 | """$3 11 | """ 12 | 13 | def __init__(self, $4): 14 | """$5 15 | ${4:$(let ((indent (concat "\n" (make-string (current-column) 32))) 16 | (args (mapcar 'car 17 | (mapcar '(lambda (x) (split-string x "=")) 18 | (split-string (replace-regexp-in-string "[[:blank:]]*" "" text) 19 | "," t))))) 20 | (mapconcat (lambda (x) 21 | (format ":param %s:" x)) 22 | args 23 | indent)) 24 | } 25 | """ 26 | super($1, self).__init__() 27 | ${4:$(let ((indent (concat "\n" (make-string (current-column) 32))) 28 | (args (mapcar 'car 29 | (mapcar '(lambda (x) (split-string x "=")) 30 | (split-string (replace-regexp-in-string "[[:blank:]]*" "" text) 31 | "," t))))) 32 | (mapconcat (lambda (x) 33 | (format "self._%s = %s" x x)) 34 | args 35 | indent)) 36 | } 37 | $0 38 | -------------------------------------------------------------------------------- /vim/xpt/autoload/XPpum.vim: -------------------------------------------------------------------------------- 1 | if exists("g:__XPPUM_VIM__") 2 | finish 3 | endif 4 | let g:__XPPUM_VIM__ = 1 5 | 6 | 7 | 8 | let s:oldcpo = &cpo 9 | set cpo-=< cpo+=B 10 | 11 | 12 | exe XPT#let_sid 13 | 14 | 15 | 16 | fun! XPpum#completeFunc( first, base ) 17 | if !exists( 'b:__xppum' . s:sid ) 18 | if a:first 19 | return col( "." ) 20 | else 21 | return [] 22 | endif 23 | endif 24 | 25 | if a:first 26 | return b:__xppum{s:sid}.col - 1 27 | else 28 | 29 | let &completefunc = b:__xppum{s:sid}.oldcfu 30 | call b:__xppum{s:sid}.onShow() 31 | 32 | let list = b:__xppum{s:sid}.list 33 | 34 | unlet b:__xppum{s:sid} 35 | 36 | return list 37 | endif 38 | endfunction 39 | 40 | fun! XPpum#complete( col, list, onShow ) "{{{ 41 | let b:__xppum{s:sid} = { 'col' : a:col, 'list' : a:list, 'oldcfu' : &completefunc, 'onShow' : a:onShow } 42 | set completefunc=XPpum#completeFunc 43 | 44 | 45 | let keyTriggerUserDefinedPum = "\\" 46 | let keyCleanupPumSetting = "\=" . s:sid . "RestoreCommpletefunc()\" 47 | let keyForceRefresh = "\\" 48 | 49 | return keyTriggerUserDefinedPum 50 | " \ . keyCleanupPumSetting 51 | " \ . keyForceRefresh 52 | 53 | endfunction "}}} 54 | 55 | fun! s:RestoreCommpletefunc() "{{{ 56 | if !exists( 'b:__xppum' . s:sid ) 57 | return '' 58 | endif 59 | 60 | let &completefunc = b:__xppum{s:sid}.oldcfu 61 | unlet b:__xppum{s:sid} 62 | return '' 63 | endfunction "}}} 64 | 65 | let &cpo = s:oldcpo 66 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/cabal/cabal.xpt.vim: -------------------------------------------------------------------------------- 1 | XPTemplate priority=lang 2 | 3 | let s:f = g:XPTfuncs() 4 | 5 | XPTvar $TRUE 1 6 | XPTvar $FALSE 0 7 | XPTvar $NULL NULL 8 | XPTvar $UNDEFINED NULL 9 | XPTvar $VOID_LINE /* void */; 10 | XPTvar $BRif \n 11 | 12 | XPTinclude 13 | \ _common/common 14 | 15 | 16 | " ========================= Function and Variables ============================= 17 | 18 | 19 | " ================================= Snippets =================================== 20 | XPTemplateDef 21 | 22 | 23 | XPT infos hint=Name:\ Version\:\ Synopsys:\ Descr:\ Author:\ ... 24 | XSET Description...|post=\nDescription: `_^ 25 | XSET Author...|post=\nAuthor: `_^ 26 | XSET Maintainer...|post=\nMaintainer: `_^ 27 | Name: `name^ 28 | Version: `version^ 29 | Synopsis: `synop^ 30 | Build-Type: `Simple^ 31 | Cabal-Version: >= `ver^1.2^` 32 | `Description...^` 33 | `Author...^` 34 | `Maintainer...^ 35 | 36 | XPT if hint=if\ ...\ else\ ... 37 | if `cond^ 38 | `what^ 39 | `else...{{^else 40 | `cursor^`}}^ 41 | 42 | 43 | XPT lib hint=library\ Exposed-Modules... 44 | XSET another*|post=ExpandIfNotEmpty( ', ', 'another*' ) 45 | library 46 | Exposed-Modules: `job^` 47 | `more...{{^ 48 | `job^` 49 | `...{{^ 50 | `job^` 51 | `...^`}}^`}}^ 52 | Build-Depends: base >= `ver^2.0^`, `another*^ 53 | 54 | XPT exe hint=Main-Is:\ ..\ Build-Depends 55 | XSET another*|post=ExpandIfNotEmpty( ', ', 'another*' ) 56 | Executable `execName^ 57 | Main-Is: `mainFile^ 58 | Build-Depends: base >= `ver^2.0^`, `another*^ 59 | 60 | -------------------------------------------------------------------------------- /vim/vim/syntax/SCCSAnnotate.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: SCCS annotate output 3 | " Maintainer: Bob Hiestand 4 | " Remark: Used by the vcscommand plugin. 5 | " License: 6 | " Copyright (c) 2007 Vladimir Marek 7 | " based on SVNAnnotate.vim by Bob Hiestand 8 | " 9 | " Permission is hereby granted, free of charge, to any person obtaining a copy 10 | " of this software and associated documentation files (the "Software"), to 11 | " deal in the Software without restriction, including without limitation the 12 | " rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 13 | " sell copies of the Software, and to permit persons to whom the Software is 14 | " furnished to do so, subject to the following conditions: 15 | " 16 | " The above copyright notice and this permission notice shall be included in 17 | " all copies or substantial portions of the Software. 18 | " 19 | " THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | " IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | " FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | " AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | " LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 24 | " FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 25 | " IN THE SOFTWARE. 26 | 27 | if exists("b:current_syntax") 28 | finish 29 | endif 30 | 31 | syn match sccsVer /^\d\+\%(\.\d\+\)\{1,3}/ 32 | 33 | if !exists("did_sccsannotate_syntax_inits") 34 | let did_sccsannotate_syntax_inits = 1 35 | hi link sccsVer Statement 36 | endif 37 | 38 | let b:current_syntax="SCCSAnnotate" 39 | -------------------------------------------------------------------------------- /emacs.d/config/cofi-project.el: -------------------------------------------------------------------------------- 1 | (add-to-loadpath "~/.elisp/vendor/mk-project") 2 | (require-and-exec 'mk-project 3 | (when (fboundp 'ibuffer) 4 | (defun mk/proj-buffer-p (b) 5 | "Is the buffer `b' part of the project?" 6 | (and mk-proj-name 7 | (or (mk-proj-buffer-p b) 8 | (string= (buffer-name b) mk-proj-fib-name) 9 | (string= (buffer-file-name b) mk-proj-tags-file)))) 10 | 11 | (define-ibuffer-column mk-proj-col 12 | (:name "P") 13 | (if (mk/proj-buffer-p buffer) "p" "")) 14 | 15 | (push 16 | '(mark modified read-only mk-proj-col " " 17 | (name 18 18 :left :elide) 18 | " " 19 | (size 9 -1 :right) 20 | " " 21 | (mode 16 16 :left :elide) 22 | " " filename-and-process) 23 | ibuffer-formats) 24 | 25 | (push 26 | '(mark modified read-only mk-proj-col git-status-mini " " 27 | (name 18 18 :left :elide) 28 | " " 29 | (size 9 -1 :right) 30 | " " 31 | (mode 16 16 :left :elide) 32 | " " 33 | (git-status 8 8 :left) 34 | " " filename-and-process) 35 | ibuffer-formats) 36 | 37 | (define-ibuffer-filter project 38 | "Toggle current view to buffers in the defined mk-project." 39 | (:description "mk-project") 40 | (mk/proj-buffer-p buf)) 41 | 42 | (define-key ibuffer-mode-map (kbd "/ k") 'ibuffer-filter-by-project)) 43 | 44 | (setq mk-proj-use-ido-selection t) 45 | 46 | (when (boundp 'cofi-project-files) 47 | (mapc (lambda (filename) 48 | (load filename 'noerror)) 49 | cofi-project-files)) 50 | ) 51 | (provide 'cofi-project) 52 | -------------------------------------------------------------------------------- /vim/gvimrc: -------------------------------------------------------------------------------- 1 | "Set Font 2 | set guifont=Inconsolata\ 10 3 | 4 | "Disable clutter 5 | set guioptions=cai 6 | 7 | "No visual bell 8 | set t_vb= 9 | 10 | "set initial size to 55x90 11 | set columns=90 12 | set lines=55 13 | 14 | set mousehide 15 | 16 | set guitabtooltip=%!InfoGuiTooltip() 17 | set guitablabel=%N/\ %t/\ %M 18 | set ballooneval 19 | set balloondelay=400 20 | set balloonexpr=FoldSpellBalloon() 21 | 22 | function! FoldSpellBalloon() 23 | let foldStart = foldclosed(v:beval_lnum ) 24 | let foldEnd = foldclosedend(v:beval_lnum) 25 | let lines = [] 26 | " Detect if we are in a fold 27 | if foldStart < 0 28 | " Detect if we are on a misspelled word 29 | let lines = spellsuggest( spellbadword(v:beval_text)[ 0 ], 5, 0 ) 30 | else 31 | " we are in a fold 32 | let numLines = foldEnd - foldStart + 1 33 | " if we have too many lines in fold, show only the first 14 34 | " and the last 14 lines 35 | if ( numLines > 31 ) 36 | let lines = getline( foldStart, foldStart + 14 ) 37 | let lines += [ '-- Snipped ' . ( numLines - 30 ) . ' lines --' ] 38 | let lines += getline( foldEnd - 14, foldEnd ) 39 | else 40 | "less than 30 lines, lets show all of them 41 | let lines = getline( foldStart, foldEnd ) 42 | endif 43 | endif 44 | " return result 45 | return join( lines, has( "balloon_multiline" ) ? "\n" : " " ) 46 | endfunction 47 | 48 | function! InfoGuiTooltip() 49 | "get window count 50 | let wincount = tabpagewinnr(tabpagenr(),'$') 51 | let bufferlist = '' 52 | "get name of active buffers in windows 53 | for i in tabpagebuflist() 54 | let bufferlist .= '['.fnamemodify(bufname(i),':t').'] ' 55 | endfor 56 | return bufname($).' windows: '.wincount.' '.bufferlist.' ' 57 | endfunction 58 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/tcl/tcl.xpt.vim: -------------------------------------------------------------------------------- 1 | XPTemplate priority=lang mark=~^ 2 | 3 | let s:f = g:XPTfuncs() 4 | 5 | XPTvar $TRUE 1 6 | XPTvar $FALSE 0 7 | XPTvar $NULL NULL 8 | XPTvar $UNDEFINED NULL 9 | XPTvar $VOID_LINE /* void */; 10 | XPTvar $CURSOR_PH 11 | 12 | XPTvar $BRif \n 13 | 14 | XPTinclude 15 | \ _common/common 16 | 17 | 18 | " ========================= Function and Variables ============================= 19 | 20 | 21 | " ================================= Snippets =================================== 22 | 23 | XPTemplateDef 24 | 25 | 26 | XPT shebang hint=#!/bin/sh\ ..\ exec\ tclsh.. 27 | #!/bin/sh 28 | #\ 29 | exec tclsh "$0" "$@"" 30 | 31 | ..XPT 32 | 33 | XPT sb alias=shebang 34 | 35 | 36 | XPT for hint=for\ {...} 37 | for {set ~i^ ~x^} {$~i^ <= ~len^} {incr ~i^} { 38 | ~cursor^ 39 | } 40 | 41 | 42 | XPT foreach hint=foreach\ i\ var\ {... 43 | foreach ~i^ ~var^ { 44 | ~cursor^ 45 | } 46 | 47 | 48 | XPT while hint=while\ {i\ <=\ ?}\ {... 49 | while {~i^ <= ~len^} { 50 | ~cursor^ 51 | } 52 | 53 | 54 | XPT if hint=if\ {\ ...\ }\ {\ ... 55 | if {~a^} { 56 | ~cursor^ 57 | } 58 | 59 | 60 | XPT elseif hint=elseif\ {... 61 | elseif {~a^} { 62 | ~cursor^ 63 | } 64 | 65 | 66 | XPT else hint=else\ {... 67 | else { 68 | ~cursor^ 69 | } 70 | 71 | 72 | XPT switch hint=switch\ ...\ {... 73 | switch ~var^ { 74 | ~1^ { ~body1^ } 75 | ~2^ { ~body2^ } 76 | ~3^ { ~body3^ } 77 | default { ~body4^ } 78 | } 79 | 80 | 81 | XPT proc hint=proc\ ***\ {... 82 | proc ~name^ {~args^} { 83 | ~cursor^ 84 | } 85 | 86 | 87 | XPT regexp hint=regexp\ ...\ match 88 | regexp ~r^ ~str^ match ~vars^ 89 | 90 | 91 | XPT regsub hint=regsub\ ... 92 | regsub ~in^ ~str^ ~out^ 93 | 94 | 95 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/_preprocessor/c.like.xpt.vim: -------------------------------------------------------------------------------- 1 | XPTemplate priority=like 2 | 3 | let s:f = g:XPTfuncs() 4 | 5 | XPTvar $TRUE 1 6 | XPTvar $FALSE 0 7 | XPTvar $NULL NULL 8 | XPTvar $UNDEFINED NULL 9 | XPTvar $VOID_LINE /* void */; 10 | XPTvar $BRif \n 11 | 12 | 13 | XPTinclude 14 | \ _common/common 15 | 16 | 17 | " ========================= Function and Variables ============================= 18 | 19 | 20 | " ================================= Snippets =================================== 21 | call XPTemplateMark('`', '^') 22 | 23 | XPTemplateDef 24 | 25 | 26 | XPT #inc hint=include\ <> 27 | #include <`^.h> 28 | 29 | 30 | XPT #include_user hint=include\ "" 31 | XSET me=fileRoot() 32 | #include "`me^.h" 33 | 34 | 35 | XPT #ind alias=#include_user 36 | 37 | 38 | XPT #if hint=#if\ ... 39 | #if `0^ 40 | `cursor^ 41 | #endif 42 | 43 | 44 | XPT #ifdef hint=#if\ ... 45 | #ifdef `identifier^ 46 | `cursor^ 47 | #endif 48 | 49 | 50 | XPT #ifndef hint=#ifndef\ .. 51 | XSET symbol=S(fileRoot(),'\.','_','g') 52 | XSET symbol|post=UpperCase(V()) 53 | #ifndef `symbol^ 54 | # define `symbol^ 55 | 56 | `cursor^ 57 | #endif `$CL^ `symbol^ `$CR^ 58 | ..XPT 59 | 60 | 61 | XPT once hint=#ifndef\ ..\ #define\ .. 62 | XSET symbol=headerSymbol() 63 | #ifndef `symbol^ 64 | # define `symbol^ 65 | 66 | `cursor^ 67 | #endif `$CL^ `symbol^ `$CR^ 68 | 69 | 70 | 71 | 72 | " ================================= Wrapper =================================== 73 | 74 | XPT #if_ hint=#if\ ..\ SEL\ #endif 75 | #if `0^ 76 | `wrapped^ 77 | `cursor^ 78 | #endif 79 | 80 | XPT #ifdef_ hint=#if\ ..\ SEL\ #endif 81 | #ifdef `identifier^ 82 | `wrapped^ 83 | `cursor^ 84 | #endif 85 | 86 | XPT #ifndef_ hint=#if\ ..\ SEL\ #endif 87 | #ifndef `identifier^ 88 | `wrapped^ 89 | `cursor^ 90 | #endif 91 | -------------------------------------------------------------------------------- /vim/vim/syntax/SVNAnnotate.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: SVN annotate output 3 | " Maintainer: Bob Hiestand 4 | " Remark: Used by the vcscommand plugin. 5 | " License: 6 | " Copyright (c) 2007 Bob Hiestand 7 | " 8 | " Permission is hereby granted, free of charge, to any person obtaining a copy 9 | " of this software and associated documentation files (the "Software"), to 10 | " deal in the Software without restriction, including without limitation the 11 | " rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 12 | " sell copies of the Software, and to permit persons to whom the Software is 13 | " furnished to do so, subject to the following conditions: 14 | " 15 | " The above copyright notice and this permission notice shall be included in 16 | " all copies or substantial portions of the Software. 17 | " 18 | " THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | " IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | " FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | " AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | " LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | " FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 24 | " IN THE SOFTWARE. 25 | 26 | if exists("b:current_syntax") 27 | finish 28 | endif 29 | 30 | syn match svnName /\S\+/ contained 31 | syn match svnVer /^\s\+\zs\d\+/ contained nextgroup=svnName skipwhite 32 | syn match svnHead /^\s\+\d\+\s\+\S\+/ contains=svnVer,svnName 33 | 34 | if !exists("did_svnannotate_syntax_inits") 35 | let did_svnannotate_syntax_inits = 1 36 | hi link svnName Type 37 | hi link svnVer Statement 38 | endif 39 | 40 | let b:current_syntax="svnAnnotate" 41 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/html/html.ftdetect.vim: -------------------------------------------------------------------------------- 1 | if exists("b:__HTML_FTDETECT_VIM__") 2 | finish 3 | endif 4 | let b:__HTML_FTDETECT_VIM__ = 1 5 | 6 | 7 | " TODO xhtml support 8 | 9 | if &filetype !~ 'html' 10 | finish 11 | endif 12 | 13 | 14 | let s:skipPattern = 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\|comment"' 15 | let s:pattern = { 16 | \ 'javascript' : { 17 | \ 'start' : '\V\c]\*>', 18 | \ 'mid' : '', 19 | \ 'end' : '\V\c', 20 | \ 'skip' : s:skipPattern, 21 | \ }, 22 | \ 'css' : { 23 | \ 'start' : '\V\c]\*>', 24 | \ 'mid' : '', 25 | \ 'end' : '\V\c', 26 | \ 'skip' : s:skipPattern, 27 | \ }, 28 | \} 29 | 30 | fun! XPT_htmlFiletypeDetect() "{{{ 31 | let pos = [ line( "." ), col( "." ) ] 32 | let synName = g:xptutil.XPTgetCurrentOrPreviousSynName() 33 | 34 | if synName == '' 35 | " no character at current position or before curernt position 36 | return &filetype 37 | 38 | else 39 | 40 | for [ name, ftPattern ] in items( s:pattern ) 41 | let pos = searchpairpos( ftPattern.start, ftPattern.mid, ftPattern.end, 'nbW', ftPattern.skip ) 42 | if pos != [0, 0] 43 | return name 44 | endif 45 | endfor 46 | 47 | if synName =~ '^\cjavascript' 48 | return 'javascript' 49 | elseif synName =~ '^\ccss' 50 | return 'css' 51 | endif 52 | 53 | return &filetype 54 | 55 | endif 56 | 57 | endfunction "}}} 58 | 59 | let b:XPTfiletypeDetect = function( 'XPT_htmlFiletypeDetect' ) 60 | 61 | -------------------------------------------------------------------------------- /vim/xpt/autoload/XPT.vim: -------------------------------------------------------------------------------- 1 | if exists("g:__XPT_VIM__") 2 | finish 3 | endif 4 | let g:__XPT_VIM__ = 1 5 | 6 | 7 | 8 | let s:oldcpo = &cpo 9 | set cpo-=< cpo+=B 10 | 11 | let XPT#let_sid = 'map xsid |let s:sid=matchstr(maparg("xsid"), "\\d\\+_")|unmap xsid' 12 | 13 | 14 | fun! XPT#getCmdOutput( cmd ) "{{{ 15 | let l:a = "" 16 | 17 | redir => l:a 18 | exe a:cmd 19 | redir END 20 | 21 | return l:a 22 | endfunction "}}} 23 | 24 | fun! XPT#getIndentNr( ln, col ) "{{{ 25 | let line = matchstr( getline(a:ln), '\V\^\s\*' ) 26 | let line = a:col == 1 ? '' : line[ : a:col - 1 ] 27 | 28 | let sts = &l:softtabstop 29 | let ts = &l:tabstop 30 | 31 | if 0 == sts 32 | let sts = ts 33 | endif 34 | 35 | let tabspaces = repeat( ' ', ts ) 36 | 37 | return len( substitute( line, ' ', tabspaces, 'g' ) ) 38 | 39 | 40 | endfunction "}}} 41 | 42 | 43 | 44 | fun! XPT#class( sid, proto ) "{{{ 45 | let clz = deepcopy( a:proto ) 46 | 47 | let funcs = split( XPT#getCmdOutput( 'silent function /' . a:sid ), "\n" ) 48 | call map( funcs, 'matchstr( v:val, "' . a:sid . '\\zs.*\\ze(" )' ) 49 | 50 | for name in funcs 51 | if name !~ '\V\^_' 52 | let clz[ name ] = function( '' . a:sid . name ) 53 | endif 54 | endfor 55 | 56 | " wrapper 57 | let clz.__init__ = get( clz, 'New', function( 'XPT#classVoidInit' ) ) 58 | let clz.New = function( 'XPT#classNew' ) 59 | 60 | return clz 61 | endfunction "}}} 62 | 63 | fun! XPT#classNew( ... ) dict "{{{ 64 | let inst = copy( self ) 65 | call call( inst.__init__, a:000, inst ) 66 | let inst.__class__ = self 67 | return inst 68 | endfunction "}}} 69 | 70 | fun! XPT#classVoidInit( ... ) dict "{{{ 71 | endfunction "}}} 72 | 73 | 74 | let &cpo = s:oldcpo 75 | -------------------------------------------------------------------------------- /vim/vim/syntax/HGAnnotate.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: Mercurial annotate output 3 | " Maintainer: Bob Hiestand 4 | " Remark: Used by the vcscommand plugin. 5 | " License: 6 | " Copyright (c) 2007 Vladimir Marek 7 | " based on SVNAnnotate.vim by Bob Hiestand 8 | " 9 | " Permission is hereby granted, free of charge, to any person obtaining a copy 10 | " of this software and associated documentation files (the "Software"), to 11 | " deal in the Software without restriction, including without limitation the 12 | " rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 13 | " sell copies of the Software, and to permit persons to whom the Software is 14 | " furnished to do so, subject to the following conditions: 15 | " 16 | " The above copyright notice and this permission notice shall be included in 17 | " all copies or substantial portions of the Software. 18 | " 19 | " THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | " IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | " FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | " AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | " LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 24 | " FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 25 | " IN THE SOFTWARE. 26 | 27 | if exists("b:current_syntax") 28 | finish 29 | endif 30 | 31 | syn match hgVer /\d\+/ contained 32 | syn match hgName /^\s*\zs\S\+/ contained nextgroup=hgVer skipwhite 33 | syn match hgHead /^\s*\S\+\s\+\d\+/ contains=hgName,hgVer 34 | 35 | if !exists("did_hgannotate_syntax_inits") 36 | let did_hgannotate_syntax_inits = 1 37 | hi link hgName Type 38 | hi link hgVer Statement 39 | endif 40 | 41 | let b:current_syntax="hgAnnotate" 42 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/make/make.xpt.vim: -------------------------------------------------------------------------------- 1 | XPTemplate priority=lang 2 | 3 | let s:f = g:XPTfuncs() 4 | 5 | XPTvar $TRUE 1 6 | XPTvar $FALSE 0 7 | XPTvar $NULL NULL 8 | XPTvar $UNDEFINED NULL 9 | 10 | XPTvar $VOID_LINE # void 11 | XPTvar $CURSOR_PH # cursor 12 | 13 | XPTvar $CS # 14 | 15 | XPTinclude 16 | \ _common/common 17 | \ _comment/singleSign 18 | 19 | 20 | " ========================= Function and Variables ============================= 21 | 22 | 23 | " ================================= Snippets =================================== 24 | XPTemplateDef 25 | 26 | XPT addprefix hint=$(addprefix\ ...) 27 | $(addprefix `prefix^, `elemList^) 28 | 29 | 30 | XPT addsuffix hint=$(addsuffix\ ...) 31 | $(addsuffix `suffix^, `elemList^) 32 | 33 | 34 | XPT filterout hint=$(filter-out\ ...) 35 | $(filter-out `toRemove^, `elemList^) 36 | 37 | 38 | XPT patsubst hint=$(patsubst\ ...) 39 | $(patsubst `sourcePattern^%.c^, `destPattern^%.o^, `list^) 40 | 41 | 42 | XPT shell hint=$(shell\ ...) 43 | $(shell `command^) 44 | 45 | 46 | XPT subst hint=$(subst\ ...) 47 | $(subst `sourceString^, `destString^, `string^) 48 | 49 | 50 | XPT wildcard hint=$(wildcard\ ...) 51 | $(wildcard `globpattern^) 52 | 53 | 54 | XPT ifneq hint=ifneq\ ...\ else\ ...\ endif 55 | ifneq (`what^, `with^) 56 | `job^ 57 | ``else...` 58 | {{^else 59 | `cursor^ 60 | `}}^endif 61 | 62 | 63 | XPT ifeq hint=ifneq\ ...\ else\ ...\ endif 64 | XSET job=$CS job 65 | ifeq (`what^, `with^) 66 | `job^ 67 | ``else...` 68 | {{^else 69 | `cursor^ 70 | `}}^endif 71 | 72 | 73 | XPT basevar hint=CC\ ...\ CFLAG\ .. 74 | `lang^C^C := `compiler^gcc^ 75 | `lang^C^FLAGS := `switches^-Wall -Wextra^ 76 | 77 | 78 | " ================================= Wrapper =================================== 79 | 80 | XPT var_ hint=$(SEL) 81 | $(`wrapped^) 82 | -------------------------------------------------------------------------------- /xmobar/laptop: -------------------------------------------------------------------------------- 1 | -- -*- mode: haskell -*- 2 | Config { font = "xft:Dejavu Sans:size=8:antialias=true:hinting=true:hintstyle=hintfull" 3 | , bgColor = "black" 4 | , fgColor = "white smoke" 5 | , position = TopSize L 85 23 6 | , border = NoBorder 7 | , lowerOnStart = False 8 | , commands = [ Run Wireless "wlan0" ["-t", "( )", "-L", "30", "-H", "70", "--low", "red", "--normal","orange","--high","green"] 60 9 | , Run ThermalZone 0 ["-t", "°C", "-L", "40", "-H", "60", "--low", "green", "--normal","orange","--high","red"] 60 10 | , Run MultiCpu ["-t", " ", "-S", "Yes", "-p", "3", "-L","3","-H","50","--low","green","--normal","orange","--high","red"] 60 11 | , Run Battery ["-t", " ", "-S", "Yes", "-p", "3", "-L", "40", "-H", "70", "--low", "red", "--normal","orange","--high", "green"] 60 12 | , Run Memory ["-t","M: ", "-S", "Yes", "-p", "3", "-L", "40", "-H", "70", "--low", "green", "--normal","orange","--high","red"] 60 13 | , Run Swap ["-t", "S: ", "-S", "Yes", "-p", "3", "-L", "40", "-H", "70", "--low", "green", "--normal","orange","--high","red"] 60 14 | , Run Date "%a %b %d %H:%M" "date" 60 15 | , Run Com "pads" ["info"] "vol" 10 16 | , Run StdinReader 17 | , Run Com "appt-file" [] "appt" 60 18 | ] 19 | , sepChar = "%" 20 | , alignSep = "}{" 21 | , template = "%StdinReader% }{%appt% %wlan0wi% ✦ %thermal0% ✦ %multicpu% ✦ %memory% ✦ ⚡ %battery% ✦ ♩ %vol% %date%" 22 | } 23 | -------------------------------------------------------------------------------- /bin/pack: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | emulate -L zsh 3 | ename=$0 4 | usage () { 5 | cat << EOF 6 | Usage: $ename [-f format] [-o output] file,[file,[...]] 7 | -h Show this message. 8 | -f Specify format. Default to xz 9 | Legal formats: gz, bz2, lzma, xz, zip 10 | -o Output file (format is appended). 11 | EOF 12 | } 13 | 14 | format= 15 | output= 16 | 17 | while getopts "hf:o:" option; do 18 | case "$option" in 19 | h) 20 | usage 21 | exit 1 ;; 22 | f) 23 | format="$OPTARG" ;; 24 | o) 25 | output="$OPTARG" ;; 26 | esac 27 | done 28 | shift $((OPTIND-1)) 29 | 30 | # default to xz format 31 | format=${format:-xz} 32 | 33 | # Use first file as output if none is specified 34 | output=${output:-$1} 35 | 36 | # check for missing files 37 | if [[ ${#@} -eq 0 ]]; then 38 | usage 39 | exit 1 40 | fi 41 | 42 | complete= 43 | # tar files if necessary 44 | if [[ ${#@} -gt 1 || -d "$@" ]]; then 45 | case "$format" in 46 | zip) ;; 47 | gz) 48 | tar -acf "${output}.tar.gz" "$@" 49 | complete=1;; 50 | bzip2) 51 | tar -acf "${output}.tar.bzip2" "$@" 52 | complete=1;; 53 | lzma) 54 | tar -acf "${output}.tar.lzma" "$@" 55 | complete=1;; 56 | xz) 57 | tar -acf "${output}.tar.xz" "$@" 58 | complete=1;; 59 | *) 60 | output="${output}.tar" 61 | tar -cf "$output" "$@" 62 | ;; 63 | esac 64 | fi 65 | 66 | if [[ -n "$complete" ]]; then; exit 0; fi 67 | 68 | case "$format" in 69 | gz) 70 | gzip -rc "$@" > "${output}.gz";; 71 | bzip2) 72 | bzip2 -kz "$@" ;; 73 | lzma) 74 | lzma -zk "$@" ;; 75 | xz) 76 | xz -zk "$@" ;; 77 | zip) 78 | zip -r "${output}" "$@" ;; 79 | esac 80 | -------------------------------------------------------------------------------- /emacs.d/config/cofi-ediff.el: -------------------------------------------------------------------------------- 1 | (defvar ediff-after-quit-hook nil) 2 | 3 | (defadvice ediff-quit (after ediff-after-quit-hooks activate) 4 | (run-hooks 'ediff-after-quit-hook)) 5 | 6 | (defvar ediff-git-emacsclient-active nil) 7 | (defvar ediff-git-previous-frames nil) 8 | (defvar ediff-git-previous-windows nil) 9 | (defvar ediff-git-clean-frame nil) 10 | 11 | (defun ediff-git-merge-before-setup () 12 | (setq ediff-git-previous-frames (current-frame-configuration)) 13 | (setq ediff-git-previous-windows (current-window-configuration)) 14 | (if ediff-git-emacsclient-active 15 | (raise-frame))) 16 | (add-hook 'ediff-before-setup-hook 'ediff-git-merge-before-setup) 17 | 18 | (defun ediff-git-merge (local remote base merged) 19 | (if (file-readable-p base) 20 | (ediff-merge-files-with-ancestor local remote base nil merged) 21 | (ediff-merge-files local remote nil merged))) 22 | 23 | (defun ediff-git-merge-emacsclient (local remote base merged &optional clean-frame) 24 | "CLEAN-FRAME' should be non-nil if call created a new frame and should be cleaned." 25 | (setq ediff-git-emacsclient-active t) 26 | (setq ediff-git-clean-frame clean-frame) 27 | (ediff-git-merge local remote base merged) 28 | ;; keep emacsclient from returning 29 | (recursive-edit)) 30 | 31 | ;;; clean recursive edit 32 | (add-hook 'ediff-after-quit-hook 'exit-recursive-edit) 33 | (add-hook 'ediff-after-quit-hook (lambda () (when ediff-git-clean-frame 34 | (setq ediff-git-clean-frame nil) 35 | (delete-frame)))) 36 | 37 | ;;; restore windows and frames 38 | (add-to-hooks (lambda () 39 | (set-window-configuration ediff-git-previous-windows) 40 | (set-frame-configuration ediff-git-previous-frames)) 41 | '(ediff-quit-hook ediff-suspend-hook)) 42 | 43 | (provide 'cofi-ediff) 44 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/scheme/scheme.xpt.vim: -------------------------------------------------------------------------------- 1 | XPTemplate priority=lang 2 | 3 | let s:f = g:XPTfuncs() 4 | 5 | XPTvar $TRUE 1 6 | XPTvar $FALSE 0 7 | XPTvar $NULL NULL 8 | XPTvar $UNDEFINED NULL 9 | XPTvar $VOID_LINE /* void */; 10 | XPTvar $BRif \n 11 | 12 | XPTinclude 13 | \ _common/common 14 | \ _condition/lisp.like 15 | 16 | " ========================= Function and Variables ============================= 17 | 18 | " ================================= Snippets =================================== 19 | XPTemplateDef 20 | XPT begin hint=(begin\ ..\ ) 21 | (begin 22 | (`todo0^) `...^ 23 | (`todon^)`...^) 24 | 25 | 26 | XPT case hint=(case\ (of)\ ((match)\ (expr))\ ..) 27 | (case (`of^) 28 | ({`match^} `expr1^) `...^ 29 | ({`matchn^} `exprn^)`...^ 30 | `else...^\(else \`cursor\^\)^^) 31 | 32 | 33 | 34 | XPT cond hint=(cond\ ([condi]\ (expr))\ ..) 35 | (cond ([`condition^] `expr1^) `...^ 36 | ([`condition^] `exprn^)`...^ 37 | `else...^\(else \`cursor\^\)^^) 38 | 39 | 40 | XPT let hint=(let\ [(var\ (val))\ ..]\ (body)) 41 | (let [(`newVar^ `value^ `...^) 42 | (`newVarn^ `valuen^`...^)] 43 | (`cursor^)) 44 | 45 | 46 | XPT letrec hint=(letrec\ [(var\ (val))\ ..]\ (body)) 47 | (letrec [(`newVar^ `value^ `...^) 48 | (`newVarn^ `valuen^`...^)] 49 | (`cursor^)) 50 | 51 | 52 | XPT lambda hint=(lambda\ [params]\ (body)) 53 | (lambda [`params^] 54 | (`cursor^)) 55 | 56 | 57 | XPT defun hint=(define\ var\ (lambda\ ..)) 58 | (define `funName^ 59 | (lambda [`params^] 60 | (`cursor^)) 61 | ) 62 | 63 | 64 | XPT def hint=(define\ var\ (ex)) 65 | (define `varName^ `cursor^) 66 | 67 | 68 | XPT do hint=(do\ ..) 69 | (do {(`var1^ `init1^ `step1^) `...0^ 70 | (`varn^ `initn^ `stepn^)`...0^} 71 | ([`test^] `exprs^ `...1^ `exprs^`...1^^) 72 | (`command0^) `...2^^ 73 | (`command1^)`...2^) 74 | 75 | 76 | -------------------------------------------------------------------------------- /vim/vim/syntax/SVKAnnotate.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: SVK annotate output 3 | " Maintainer: Bob Hiestand 4 | " Remark: Used by the vcscommand plugin. 5 | " License: 6 | " Copyright (c) 2007 Bob Hiestand 7 | " 8 | " Permission is hereby granted, free of charge, to any person obtaining a copy 9 | " of this software and associated documentation files (the "Software"), to 10 | " deal in the Software without restriction, including without limitation the 11 | " rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 12 | " sell copies of the Software, and to permit persons to whom the Software is 13 | " furnished to do so, subject to the following conditions: 14 | " 15 | " The above copyright notice and this permission notice shall be included in 16 | " all copies or substantial portions of the Software. 17 | " 18 | " THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | " IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | " FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | " AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | " LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | " FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 24 | " IN THE SOFTWARE. 25 | 26 | if exists("b:current_syntax") 27 | finish 28 | endif 29 | 30 | syn match svkDate /\d\{4}-\d\{1,2}-\d\{1,2}/ skipwhite contained 31 | syn match svkName /(\s*\zs\S\+/ contained nextgroup=svkDate skipwhite 32 | syn match svkVer /^\s*\d\+/ contained nextgroup=svkName skipwhite 33 | syn region svkHead start=/^/ end="):" contains=svkVer,svkName,svkDate oneline 34 | 35 | if !exists("did_svkannotate_syntax_inits") 36 | let did_svkannotate_syntax_inits = 1 37 | hi link svkName Type 38 | hi link svkDate Comment 39 | hi link svkVer Statement 40 | endif 41 | 42 | let b:current_syntax="svkAnnotate" 43 | -------------------------------------------------------------------------------- /vim/xpt/ftplugin/php/php.xpt.vim: -------------------------------------------------------------------------------- 1 | XPTemplate priority=lang 2 | 3 | let s:f = g:XPTfuncs() 4 | 5 | XPTvar $TRUE true 6 | XPTvar $FALSE false 7 | XPTvar $NULL null 8 | XPTvar $UNDEFINED null 9 | 10 | XPTvar $VOID_LINE /* void */; 11 | XPTvar $CURSOR_PH /* cursor */ 12 | 13 | XPTvar $BRif ' ' 14 | XPTvar $BRel \n 15 | XPTvar $BRloop ' ' 16 | XPTvar $BRstc ' ' 17 | XPTvar $BRfun ' ' 18 | 19 | XPTinclude 20 | \ _common/common 21 | 22 | XPTvar $CL /* 23 | XPTvar $CM * 24 | XPTvar $CR */ 25 | XPTinclude 26 | \ _comment/doubleSign 27 | 28 | XPTvar $VAR_PRE $ 29 | XPTvar $FOR_SCOPE 30 | XPTinclude 31 | \ _loops/for 32 | 33 | XPTinclude 34 | \ _condition/c.like 35 | \ _loops/c.while.like 36 | 37 | XPTembed 38 | \ html/html 39 | \ html/php* 40 | 41 | 42 | 43 | if exists( 'php_noShortTags' ) 44 | XPTvar $PHP_TAG php 45 | else 46 | XPTvar $PHP_TAG 47 | endif 48 | 49 | " ========================= Function and Variables ============================= 50 | 51 | " ================================= Snippets =================================== 52 | XPTemplateDef 53 | 54 | XPT html hint= 55 | ?>`html^', 19 | \ 'skip' : s:skipPattern, 20 | \ }, 21 | \ 'javascript' : { 22 | \ 'start' : '\V\c]\*>', 23 | \ 'mid' : '', 24 | \ 'end' : '\V\c', 25 | \ 'skip' : s:skipPattern, 26 | \ }, 27 | \ 'css' : { 28 | \ 'start' : '\V\c]\*>', 29 | \ 'mid' : '', 30 | \ 'end' : '\V\c', 31 | \ 'skip' : s:skipPattern, 32 | \ }, 33 | \} 34 | 35 | let s:topFT = 'eruby' 36 | 37 | fun! XPT_erubyFiletypeDetect() "{{{ 38 | let pos = [ line( "." ), col( "." ) ] 39 | 40 | let synName = g:xptutil.XPTgetCurrentOrPreviousSynName() 41 | 42 | if synName == '' 43 | " top level ft is html 44 | return s:topFT 45 | 46 | else 47 | 48 | for [ name, ftPattern ] in items( s:pattern ) 49 | let pos = searchpairpos( ftPattern.start, ftPattern.mid, ftPattern.end, 'nbW', ftPattern.skip ) 50 | if pos != [0, 0] 51 | return name 52 | endif 53 | endfor 54 | 55 | if synName =~ '^\cjavascript' 56 | return 'javascript' 57 | elseif synName =~ '^\ccss' 58 | return 'css' 59 | endif 60 | 61 | return s:topFT 62 | 63 | endif 64 | 65 | endfunction "}}} 66 | 67 | let b:XPTfiletypeDetect = function( 'XPT_erubyFiletypeDetect' ) 68 | 69 | -------------------------------------------------------------------------------- /vim/vim/syntax/CVSAnnotate.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: CVS annotate output 3 | " Maintainer: Bob Hiestand 4 | " Remark: Used by the cvscommand plugin. Originally written by Mathieu 5 | " Clabaut 6 | " License: 7 | " Copyright (c) 2007 Bob Hiestand 8 | " 9 | " Permission is hereby granted, free of charge, to any person obtaining a copy 10 | " of this software and associated documentation files (the "Software"), to 11 | " deal in the Software without restriction, including without limitation the 12 | " rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 13 | " sell copies of the Software, and to permit persons to whom the Software is 14 | " furnished to do so, subject to the following conditions: 15 | " 16 | " The above copyright notice and this permission notice shall be included in 17 | " all copies or substantial portions of the Software. 18 | " 19 | " THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | " IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | " FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | " AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | " LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 24 | " FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 25 | " IN THE SOFTWARE. 26 | 27 | if version < 600 28 | syntax clear 29 | elseif exists("b:current_syntax") 30 | finish 31 | endif 32 | 33 | syn match cvsDate /\d\d-...-\d\d/ contained 34 | syn match cvsName /(\S* /hs=s+1,he=e-1 contained nextgroup=cvsDate 35 | syn match cvsVer /^\d\+\(\.\d\+\)\+/ contained nextgroup=cvsName 36 | syn region cvsHead start="^\d\+\.\d\+" end="):" contains=cvsVer,cvsName,cvsDate 37 | 38 | if !exists("did_cvsannotate_syntax_inits") 39 | let did_cvsannotate_syntax_inits = 1 40 | hi link cvsDate Comment 41 | hi link cvsName Type 42 | hi link cvsVer Statement 43 | endif 44 | 45 | let b:current_syntax="CVSAnnotate" 46 | -------------------------------------------------------------------------------- /vim/vim/syntax/gitAnnotate.vim: -------------------------------------------------------------------------------- 1 | " Vim syntax file 2 | " Language: git annotate output 3 | " Maintainer: Bob Hiestand 4 | " Remark: Used by the vcscommand plugin. 5 | " License: 6 | " Copyright (c) 2009 Bob Hiestand 7 | " 8 | " Permission is hereby granted, free of charge, to any person obtaining a copy 9 | " of this software and associated documentation files (the "Software"), to 10 | " deal in the Software without restriction, including without limitation the 11 | " rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 12 | " sell copies of the Software, and to permit persons to whom the Software is 13 | " furnished to do so, subject to the following conditions: 14 | " 15 | " The above copyright notice and this permission notice shall be included in 16 | " all copies or substantial portions of the Software. 17 | " 18 | " THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | " IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | " FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | " AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | " LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | " FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 24 | " IN THE SOFTWARE. 25 | 26 | if exists("b:current_syntax") 27 | finish 28 | endif 29 | 30 | syn region gitName start="(\@<=" end="\( \d\d\d\d-\)\@=" contained 31 | syn match gitCommit /^\x\+/ contained 32 | syn match gitDate /\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d [+-]\d\d\d\d/ contained 33 | syn match gitLineNumber /\d\+)\@=/ contained 34 | syn region gitAnnotation start="^" end=") " oneline keepend contains=gitCommit,gitLineNumber,gitDate,gitName 35 | 36 | if !exists("did_gitannotate_syntax_inits") 37 | let did_gitannotate_syntax_inits = 1 38 | hi link gitName Type 39 | hi link gitCommit Statement 40 | hi link gitDate Comment 41 | hi link gitLineNumber Label 42 | endif 43 | 44 | let b:current_syntax="gitAnnotate" 45 | -------------------------------------------------------------------------------- /emacs.d/config/cofi-cedet.el: -------------------------------------------------------------------------------- 1 | (require 'semantic) 2 | (require 'semantic/db-file) 3 | (require 'semantic/idle) 4 | (require 'semantic/ia) 5 | (global-semantic-highlight-func-mode 1) 6 | (setq semanticdb-default-save-directory (cofi/var-file "emacs/semanticdb")) 7 | 8 | (setq semantic-new-buffer-setup-functions 9 | (cl-remove-if (lambda (pair) (member (car pair) '(python-mode))) 10 | semantic-new-buffer-setup-functions)) 11 | 12 | (setq semantic-default-submodes '(global-semantic-idle-scheduler-mode 13 | global-semanticdb-minor-mode 14 | global-semantic-decoration-mode 15 | global-semantic-idle-breadcrumbs-mode 16 | global-semantic-idle-local-symbol-highlight-mode 17 | global-semantic 18 | )) 19 | 20 | ;;; decoration 21 | (require 'semantic/decorate/mode) 22 | (semantic-toggle-decoration-style "semantic-decoration-on-private-members" t) 23 | (semantic-toggle-decoration-style "semantic-decoration-on-protected-members" t) 24 | 25 | (setq semantic-idle-breadcrumbs-format-tag-list-function 26 | #'semantic-idle-breadcrumbs--format-innermost-first) 27 | 28 | ;;; tags 29 | (dolist (mode '(c-mode c++-mode java-mode)) 30 | (semanticdb-enable-gnu-global-databases mode)) 31 | 32 | (add-hook 'c-mode-common-hook #'semantic-mode) 33 | (add-hook 'c-mode-common-hook (gen-local-fill-keymap-hook 34 | "C-c c ?" 'semantic-documentation-for-tag 35 | "C-c c t" 'semantic-analyze-proto-impl-toggle 36 | "C-c c s" 'semantic-ia-show-summary 37 | "C-c c g" 'semantic-ia-fast-jump 38 | "C-c c j" 'semantic-complete-jump-local 39 | "C-c c J" 'semantic-complete-jump 40 | "C-c c c" 'semantic-ia-describe-class)) 41 | 42 | (provide 'cofi-cedet) 43 | -------------------------------------------------------------------------------- /vim/vim/colors/lightcolors.vim: -------------------------------------------------------------------------------- 1 | 2 | " By asmanian 3 | 4 | hi clear 5 | if exists("syntax_on") 6 | syntax reset 7 | endif 8 | 9 | let colors_name = "lightcolors" 10 | 11 | " blue #2A3F82 12 | " light blue #5555ff 13 | " cyan #4b909e 14 | " light cyan #55cbff 15 | " grey #CCC0B7 16 | " dark grey #555555 17 | " green #4E9A06 18 | " red #AA2100 19 | " orange/brown #c18216 20 | " violet #702589 21 | 22 | hi Title guifg=#000000 gui=bold 23 | 24 | hi Normal guifg=#000000 guibg=#f0f0f0 25 | hi NonText guifg=#808080 guibg=#e0e0e0 26 | hi SpecialKey guibg=#e0e0e0 guifg=#a0a0a0 27 | 28 | hi LineNr guifg=#555555 guibg=#ccc0b7 gui=italic 29 | hi StatusLine guifg=#2A3F82 guibg=#ffffff 30 | hi StatusLineNC guifg=#4A5Fa2 guibg=#ccc0b7 31 | hi VertSplit guifg=#4a5fa2 guibg=#4a5fa2 32 | 33 | hi Comment guifg=#2a3f82 gui=italic 34 | hi Todo guifg=#2a3f82 guibg=#f0f0f0 gui=italic,bold 35 | 36 | " D: private, int 37 | hi Type guifg=#4e9a06 gui=none 38 | hi StorageClass guifg=#4e9a06 gui=italic 39 | hi Typedef guifg=#4e9a06 gui=underline 40 | 41 | 42 | " D: class 43 | hi Structure guifg=#4e9a06 guibg=#ceea96 gui=underline 44 | hi Function guifg=#4b909e gui=bold 45 | ",underline 46 | "guibg=#d0e0ff 47 | hi Underlined guifg=#000000 gui=underline 48 | 49 | " lua: standard functions 50 | hi Identifier guifg=#4b909e gui=none 51 | 52 | hi Statement guifg=#555555 gui=italic 53 | "hi Label 54 | "hi Operator 55 | "hi Keyword 56 | "hi Exception 57 | hi Conditional guifg=#c18216 gui=underline 58 | "guibg=#ffccaa gui=none 59 | hi Repeat guifg=#663300 gui=underline 60 | 61 | 62 | hi PreProc guifg=#702589 gui=underline 63 | hi Include guifg=#702589 gui=underline 64 | hi Define guifg=#702589 gui=underline 65 | hi Macro guifg=#702589 gui=underline 66 | hi PreConduit guifg=#702589 gui=underline 67 | 68 | " Constants 69 | hi Constant guifg=#aa2100 gui=italic 70 | hi String guifg=#aa2100 71 | hi Special guifg=#800000 72 | hi Number guifg=#6a2120 73 | hi Float guifg=#aa2160 74 | "guibg=#e0e0a0 75 | 76 | 77 | hi Pmenu guibg=#ccc0b7 gui=italic 78 | hi PmenuSel guifg=#ffffff guibg=#555555 gui=italic 79 | 80 | 81 | -------------------------------------------------------------------------------- /elisp/ghc-mod/ghc-ins-mod.el: -------------------------------------------------------------------------------- 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2 | ;;; 3 | ;;; ghc-ins-mod.el 4 | ;;; 5 | 6 | ;; Author: Kazu Yamamoto 7 | ;; Created: Dec 27, 2011 8 | 9 | ;;; Code: 10 | 11 | (defvar ghc-hoogle-command "hoogle") 12 | 13 | (defun ghc-insert-module () 14 | (interactive) 15 | (if (not (executable-find ghc-hoogle-command)) 16 | (message "\"%s\" not found" ghc-hoogle-command) 17 | (let* ((expr0 (ghc-things-at-point)) 18 | (expr (ghc-read-expression expr0))) 19 | (let ((mods (ghc-function-to-modules expr))) 20 | (if (null mods) 21 | (message "No module guessed") 22 | (let* ((first (car mods)) 23 | (mod (if (= (length mods) 1) 24 | first 25 | (completing-read "Module name: " mods nil t first)))) 26 | (save-excursion 27 | (ghc-goto-module-position) 28 | (insert "import " mod "\n")))))))) 29 | 30 | (defun ghc-goto-module-position () 31 | (goto-char (point-max)) 32 | (if (re-search-backward "^import" nil t) 33 | (ghc-goto-empty-line) 34 | (if (re-search-backward "^module" nil t) 35 | (ghc-goto-empty-line) 36 | (goto-char (point-min))))) 37 | 38 | (defun ghc-goto-empty-line () 39 | (unless (re-search-forward "^$" nil t) 40 | (forward-line))) 41 | 42 | ;; To avoid Data.Functor 43 | (defvar ghc-applicative-operators '("<$>" "<$" "<*>" "<**>" "<*" "*>" "<|>")) 44 | 45 | (defun ghc-function-to-modules (fn) 46 | (if (member fn ghc-applicative-operators) 47 | '("Control.Applicative") 48 | (ghc-function-to-modules-hoogle fn))) 49 | 50 | (defun ghc-function-to-modules-hoogle (fn) 51 | (with-temp-buffer 52 | (let* ((fn1 (if (string-match "^[a-zA-Z0-9'_]+$" fn) 53 | fn 54 | (concat "(" fn ")"))) 55 | (regex (concat "^\\([a-zA-Z0-9.]+\\) " fn1 " ")) 56 | ret) 57 | (call-process ghc-hoogle-command nil t nil "search" fn1) 58 | (goto-char (point-min)) 59 | (while (re-search-forward regex nil t) 60 | (setq ret (cons (match-string 1) ret))) 61 | (nreverse ret)))) 62 | 63 | (provide 'ghc-ins-mod) 64 | -------------------------------------------------------------------------------- /emacs.d/completion-dicts/ac-l-dict/textcomp-c-f-4: -------------------------------------------------------------------------------- 1 | textacutedbl 2 | textasciiacute 3 | textasciibreve 4 | textasciicaron 5 | textasciidieresis 6 | textasciigrave 7 | textasciimacron 8 | textasteriskcentered 9 | textbaht 10 | textbardbl 11 | textbigcircle 12 | textblank 13 | textborn 14 | textbrokenbar 15 | textbullet 16 | textcelsius 17 | textcent 18 | textcentoldstyle 19 | textcircledP 20 | textcolonmonetary 21 | textcopyleft 22 | textcopyright 23 | textcurrency 24 | textdagger 25 | textdaggerdbl 26 | textdblhyphen 27 | textdblhyphenchar 28 | textdegree 29 | textdied 30 | textdiscount 31 | textdiv 32 | textdivorced 33 | textdollar 34 | textdollaroldstyle 35 | textdong 36 | textdownarrow 37 | texteightoldstyle 38 | textestimated 39 | texteuro 40 | textfiveoldstyle 41 | textflorin 42 | textfouroldstyle 43 | textfractionsolidus 44 | textgravedbl 45 | textguarani 46 | textinterrobang 47 | textinterrobangdown 48 | textlangle 49 | textlbrackdbl 50 | textleaf 51 | textleftarrow 52 | textlira 53 | textlnot 54 | textlquill 55 | textmarried 56 | textmho 57 | textminus 58 | textmu 59 | textmusicalnote 60 | textnaira 61 | textnineoldstyle 62 | textnumero 63 | textohm 64 | textonehalf 65 | textoneoldstyle 66 | textonequarter 67 | textonesuperior 68 | textopenbullet 69 | textordfeminine 70 | textordmasculine 71 | textparagraph 72 | textperiodcentered 73 | textpertenthousand 74 | textperthousand 75 | textpeso 76 | textpilcrow 77 | textpm 78 | textquotesingle 79 | textquotestraightbase 80 | textquotestraightdblbase 81 | textrangle 82 | textrbrackdbl 83 | textrecipe 84 | textreferencemark 85 | textregistered 86 | textrightarrow 87 | textrquill 88 | textsection 89 | textservicemark 90 | textsevenoldstyle 91 | textsixoldstyle 92 | textsterling 93 | textsurd 94 | textthreeoldstyle 95 | textthreequarters 96 | textthreequartersemdash 97 | textthreesuperior 98 | texttildelow 99 | texttimes 100 | texttrademark 101 | texttwelveudash 102 | texttwooldstyle 103 | texttwosuperior 104 | textuparrow 105 | textwon 106 | textyen 107 | textzerooldstyle -------------------------------------------------------------------------------- /vim/xpt/ftplugin/php/php.ftdetect.vim: -------------------------------------------------------------------------------- 1 | if exists("b:__PHP_FTDETECT_VIM__") 2 | finish 3 | endif 4 | let b:__PHP_FTDETECT_VIM__ = 1 5 | 6 | 7 | if &filetype !~ 'php' 8 | finish 9 | endif 10 | 11 | 12 | 13 | let s:skipPattern = 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\|comment"' 14 | let s:pattern = { 15 | \ 'php' : { 16 | \ 'start' : '\V\c\)\?', 17 | \ 'mid' : '', 18 | \ 'end' : '\V\c?>', 19 | \ 'skip' : s:skipPattern, 20 | \ }, 21 | \ 'javascript' : { 22 | \ 'start' : '\V\c]\*>', 23 | \ 'mid' : '', 24 | \ 'end' : '\V\c', 25 | \ 'skip' : s:skipPattern, 26 | \ }, 27 | \ 'css' : { 28 | \ 'start' : '\V\c]\*>', 29 | \ 'mid' : '', 30 | \ 'end' : '\V\c', 31 | \ 'skip' : s:skipPattern, 32 | \ }, 33 | \} 34 | 35 | if exists( 'php_noShortTags' ) 36 | let s:pattern.php.start = '\V\c' 37 | endif 38 | 39 | let s:topFT = 'html' 40 | 41 | fun! XPT_phpFiletypeDetect() "{{{ 42 | let pos = [ line( "." ), col( "." ) ] 43 | 44 | let synName = g:xptutil.XPTgetCurrentOrPreviousSynName() 45 | 46 | if synName == '' 47 | " top level ft is html 48 | return s:topFT 49 | 50 | else 51 | 52 | for [ name, ftPattern ] in items( s:pattern ) 53 | let pos = searchpairpos( ftPattern.start, ftPattern.mid, ftPattern.end, 'nbW', ftPattern.skip ) 54 | if pos != [0, 0] 55 | return name 56 | endif 57 | endfor 58 | 59 | if synName =~ '^\cjavascript' 60 | return 'javascript' 61 | elseif synName =~ '^\ccss' 62 | return 'css' 63 | endif 64 | 65 | return s:topFT 66 | 67 | endif 68 | 69 | endfunction "}}} 70 | 71 | let b:XPTfiletypeDetect = function( 'XPT_phpFiletypeDetect' ) 72 | 73 | -------------------------------------------------------------------------------- /emacs.d/config/cofi-mail.el: -------------------------------------------------------------------------------- 1 | (add-to-loadpath "~/.elisp/vendor/gnus/lisp") 2 | (require 'gnus-load) 3 | 4 | ;;; offlineimap 5 | (setq offlineimap-command "timeout -k 30s 8m offlineimap -u MachineUI") 6 | 7 | (defun mail-attachment-check () 8 | "Check if attachment is mentioned but not included" 9 | (interactive) 10 | (let ((attachment-regexp "^[^>].*\\(:?[Aa]ttachment\\|[Aa]ttached\\|[Aa]nbei\\|[Bb]eiliegend\\|[Aa]anhang\\|angeh\\(ae\\|ä\\)ngt\\)")) 11 | (save-excursion 12 | (goto-char 0) 13 | (unless (or (re-search-forward "^Content-Disposition: attachment" nil t) 14 | (re-search-forward "disposition=attachment" nil t)) 15 | (goto-char 0) 16 | (when ;; Check for mentioned attachments 17 | (re-search-forward attachment-regexp nil t) 18 | (unless (y-or-n-p "Attachment maybe missing. Send? ") 19 | (error "Abort."))))))) 20 | 21 | (defun mail-subject-check () 22 | "Check if subject is missing." 23 | (let ((subject-found 24 | (cofi/with-restrict-to-header 25 | (goto-char (point-min)) 26 | (re-search-forward "^Subject: \\(.*\\)$" nil 'noerror)))) 27 | (unless (or (and subject-found 28 | (> (length (match-string 1)) 1)) 29 | (y-or-n-p "Subject missing. Send? ")) 30 | (error "Abort.")))) 31 | 32 | (defmacro cofi/with-restrict-to-header (&rest body) 33 | "Restrict buffer to mail headers of messages before executing body. 34 | Also wraps in `save-excursion' and `save-restriction'." 35 | `(save-excursion 36 | (save-restriction 37 | (goto-char (point-min)) 38 | (when (re-search-forward "^--text follows this line--$" nil 'noerror) 39 | (narrow-to-region (point-min) (point)) 40 | ,@body)))) 41 | 42 | (setq mail-user-agent 'gnus-user-agent) 43 | 44 | ;;; for manual setting mail config 45 | (defun cofi/write-mail () 46 | (interactive) 47 | (setq make-backup-files nil) 48 | (setq fill-column 72) 49 | (auto-fill-mode) 50 | (auto-complete-mode) 51 | (yas-minor-mode) 52 | (auto-dictionary-mode) 53 | (mail-abbrevs-mode) 54 | (flyspell-mode)) 55 | 56 | (provide 'cofi-mail) 57 | -------------------------------------------------------------------------------- /emacs.d/completion-dicts/ruby-mode: -------------------------------------------------------------------------------- 1 | $! 2 | $" 3 | $$ 4 | $& 5 | $' 6 | $* 7 | $+ 8 | $, 9 | $-0 10 | $-F 11 | $-I 12 | $-K 13 | $-a 14 | $-d 15 | $-i 16 | $-l 17 | $-p 18 | $-v 19 | $-w 20 | $. 21 | $/ 22 | $0 23 | $1 24 | $10 25 | $11 26 | $2 27 | $3 28 | $4 29 | $5 30 | $6 31 | $7 32 | $8 33 | $9 34 | $: 35 | $; 36 | $< 37 | $= 38 | $> 39 | $? 40 | $@ 41 | $DEBUG 42 | $FILENAME 43 | $KCODE 44 | $LOADED_FEATURES 45 | $LOAD_PATH 46 | $PROGRAM_NAME 47 | $SAFE 48 | $VERBOSE 49 | $\ 50 | $_ 51 | $` 52 | $deferr 53 | $defout 54 | $stderr 55 | $stdin 56 | $stdout 57 | $~ 58 | ARGF 59 | ARGV 60 | Array 61 | BEGIN 62 | DATA 63 | END 64 | ENV 65 | FALSE 66 | Float 67 | Integer 68 | NIL 69 | PLATFORM 70 | RELEASE_DATE 71 | RUBY_COPYRIGHT 72 | RUBY_DESCRIPTION 73 | RUBY_PATCHLEVEL 74 | RUBY_PLATFORM 75 | RUBY_RELEASE_DATE 76 | RUBY_VERSION 77 | SCRIPT_LINES__ 78 | STDERR 79 | STDIN 80 | STDOUT 81 | String 82 | TOPLEVEL_BINDING 83 | TRUE 84 | VERSION 85 | __method__ 86 | ` 87 | abort 88 | alias 89 | and 90 | at_exit 91 | autoload 92 | autoload? 93 | begin 94 | binding 95 | block_given 96 | break 97 | callcc 98 | caller 99 | case 100 | catch 101 | chomp 102 | chomp! 103 | chop 104 | chop 105 | class 106 | def 107 | defined? 108 | do 109 | else 110 | elsif 111 | end 112 | ensure 113 | eval 114 | exec 115 | exit 116 | exit! 117 | fail 118 | false 119 | for 120 | fork 121 | format 122 | getc 123 | gets 124 | global_variables 125 | gsub 126 | gsub! 127 | if 128 | in 129 | iterator? 130 | lambda 131 | load 132 | local_varaibles 133 | loop 134 | module 135 | next 136 | nil 137 | not 138 | open 139 | or 140 | p 141 | printf 142 | proc 143 | putc 144 | puts 145 | raise 146 | rand 147 | readline 148 | readlines 149 | redo 150 | require 151 | require_relative 152 | rescue 153 | retry 154 | return 155 | scan 156 | select 157 | self 158 | set_trace_func 159 | sleep 160 | split 161 | sprintf 162 | srand 163 | sub 164 | sub! 165 | super 166 | syscall 167 | system 168 | test 169 | then 170 | throw 171 | trace_var 172 | trap 173 | true 174 | undef 175 | unless 176 | until 177 | untrace_var 178 | warn 179 | when 180 | while 181 | yield 182 | --------------------------------------------------------------------------------