├── .ctags ├── .dir_colors ├── .elisp ├── ac-dabbrev.el ├── anything-config.el ├── anything-cscope.el ├── anything-dabbrev-expand.el ├── anything.el ├── auto-complete.el ├── auto-save-buffers-enhanced.el ├── auto-save-buffers.el ├── conf │ ├── init-anything.el │ ├── init-auto-complete.el │ ├── init-autosave.el │ ├── init-flymake.el │ ├── init-gauche.el │ ├── init-gdb.el │ ├── init-gtags.el │ ├── init-jaspace.el │ ├── init-js2.el │ ├── init-nav.el │ ├── init-perl.el │ ├── init-physical-move.el │ ├── init-python.el │ ├── init-revive.el │ ├── init-shell.el │ ├── init-skk.el │ ├── init-spell.el │ ├── init-view.el │ └── init-yasnippet.el ├── cperl-mode.el ├── egg.el ├── gtags.el ├── html-helper-mode.el ├── html-helper-mode.elc ├── html-tt.el ├── html-tt.elc ├── install-elisp.el ├── jaspace.el ├── js2.el ├── key-chord.el ├── less.el ├── mic-paren.el ├── nav-test.el ├── nav.el ├── physical-line.el ├── pod-mode.el ├── revive.el ├── set-perl5lib.el ├── skk-autoloads.el ├── smart-compile.el ├── snippets │ └── text-mode │ │ ├── cc-mode │ │ ├── REP │ │ ├── c++-mode │ │ │ ├── beginend │ │ │ ├── class │ │ │ ├── ns │ │ │ ├── template │ │ │ └── using │ │ ├── c-mode │ │ │ └── fopen │ │ ├── csharp-mode │ │ │ ├── attrib │ │ │ ├── attrib.1 │ │ │ ├── attrib.2 │ │ │ ├── class │ │ │ ├── comment │ │ │ ├── comment.1 │ │ │ ├── comment.2 │ │ │ ├── comment.3 │ │ │ ├── method │ │ │ ├── namespace │ │ │ ├── prop │ │ │ ├── region │ │ │ ├── using │ │ │ ├── using.1 │ │ │ └── using.2 │ │ ├── do │ │ ├── for │ │ ├── if │ │ ├── inc │ │ ├── inc.1 │ │ ├── main │ │ ├── objc-mode │ │ │ └── prop │ │ ├── once │ │ └── struct │ │ ├── css-mode │ │ ├── bg │ │ ├── bg.1 │ │ ├── bor │ │ ├── cl │ │ ├── disp.block │ │ ├── disp.inline │ │ ├── disp.none │ │ ├── ff │ │ ├── fs │ │ ├── mar.bottom │ │ ├── mar.left │ │ ├── mar.mar │ │ ├── mar.margin │ │ ├── mar.right │ │ ├── mar.top │ │ ├── pad.bottom │ │ ├── pad.left │ │ ├── pad.pad │ │ ├── pad.padding │ │ ├── pad.right │ │ └── pad.top │ │ ├── email │ │ ├── erlang-mode │ │ ├── after │ │ ├── begin │ │ ├── beh │ │ ├── case │ │ ├── compile │ │ ├── def │ │ ├── exp │ │ ├── fun │ │ ├── if │ │ ├── ifdef │ │ ├── ifndef │ │ ├── imp │ │ ├── inc │ │ ├── inc.lib │ │ ├── loop │ │ ├── mod │ │ ├── rcv │ │ ├── rcv.after │ │ ├── rec │ │ ├── try │ │ └── undef │ │ ├── f90-mode │ │ ├── au │ │ ├── bd │ │ ├── c │ │ ├── ch │ │ ├── cx │ │ ├── dc │ │ ├── do │ │ ├── dp │ │ ├── eq │ │ ├── ib │ │ ├── ic │ │ ├── ich │ │ ├── if │ │ ├── ii │ │ ├── il │ │ ├── in │ │ ├── inc │ │ ├── intr │ │ ├── ir │ │ ├── l │ │ ├── pa │ │ ├── pr │ │ ├── re │ │ ├── st │ │ ├── su │ │ └── wr │ │ ├── html-mode │ │ ├── body │ │ ├── br │ │ ├── code │ │ ├── code.class │ │ ├── dd │ │ ├── div │ │ ├── div.class │ │ ├── div.id │ │ ├── div.id-class │ │ ├── dl │ │ ├── dl.id │ │ ├── doctype │ │ ├── doctype.xhml1 │ │ ├── doctype.xhtml1_1 │ │ ├── doctype.xhtml1_strict │ │ ├── doctype.xhtml1_transitional │ │ ├── dt │ │ ├── form │ │ ├── h1 │ │ ├── h2 │ │ ├── h3 │ │ ├── h4 │ │ ├── h5 │ │ ├── h6 │ │ ├── head │ │ ├── hr │ │ ├── href │ │ ├── html │ │ ├── html.xmlns │ │ ├── img │ │ ├── input │ │ ├── li │ │ ├── li.class │ │ ├── link.stylesheet │ │ ├── link.stylesheet-ie │ │ ├── mailto │ │ ├── meta │ │ ├── meta.http-equiv │ │ ├── ol │ │ ├── ol.class │ │ ├── ol.id │ │ ├── p │ │ ├── pre │ │ ├── quote │ │ ├── script.javascript │ │ ├── script.javascript-src │ │ ├── span │ │ ├── span.class │ │ ├── span.id │ │ ├── style │ │ ├── table │ │ ├── td │ │ ├── textarea │ │ ├── th │ │ ├── title │ │ ├── tr │ │ ├── ul │ │ ├── ul.class │ │ └── ul.id │ │ ├── latex-mode │ │ └── begin │ │ ├── markdown-mode │ │ ├── + │ │ ├── - │ │ ├── _ │ │ ├── __ │ │ ├── ` │ │ ├── h1.1 │ │ ├── h1.2 │ │ ├── h2.1 │ │ ├── h2.2 │ │ ├── h3 │ │ ├── h4 │ │ ├── h5 │ │ ├── h6 │ │ ├── hr.1 │ │ ├── hr.2 │ │ ├── img │ │ ├── link │ │ ├── ol │ │ ├── rimg │ │ ├── rlb │ │ └── rlink │ │ ├── nxml-mode │ │ ├── body │ │ ├── br │ │ ├── code │ │ ├── div │ │ ├── doctype │ │ ├── doctype.xhtml1_strict │ │ ├── doctype.xhtml1_transitional │ │ ├── form │ │ ├── h1 │ │ ├── h2 │ │ ├── h3 │ │ ├── h4 │ │ ├── h5 │ │ ├── h6 │ │ ├── head │ │ ├── hr │ │ ├── href │ │ ├── html │ │ ├── img │ │ ├── input │ │ ├── li │ │ ├── link │ │ ├── meta │ │ ├── name │ │ ├── ol │ │ ├── p │ │ ├── pre │ │ ├── quote │ │ ├── span │ │ ├── style │ │ ├── table │ │ ├── tag.1l │ │ ├── tag.2l │ │ ├── td │ │ ├── th │ │ ├── title │ │ ├── tr │ │ └── ul │ │ ├── perl-mode │ │ ├── eval │ │ ├── for │ │ ├── fore │ │ ├── if │ │ ├── ife │ │ ├── ifee │ │ ├── sub │ │ ├── unless │ │ ├── while │ │ ├── xfore │ │ ├── xif │ │ ├── xunless │ │ └── xwhile │ │ ├── python-mode │ │ ├── __ │ │ ├── class │ │ ├── def │ │ ├── defm │ │ ├── for │ │ ├── ifmain │ │ ├── propg │ │ ├── propsg │ │ └── while │ │ ├── rst-mode │ │ ├── chap │ │ ├── sec │ │ └── tit │ │ ├── ruby-mode │ │ ├── =b │ │ ├── Comp │ │ ├── all │ │ ├── am │ │ ├── any │ │ ├── app │ │ ├── bm │ │ ├── case │ │ ├── cla │ │ ├── classify │ │ ├── cls │ │ ├── collect │ │ ├── dee │ │ ├── deli │ │ ├── det │ │ ├── dow │ │ ├── ea │ │ ├── eac │ │ ├── eai │ │ ├── eav │ │ ├── eawi │ │ ├── forin │ │ ├── if │ │ ├── ife │ │ ├── inject │ │ ├── mm │ │ ├── r │ │ ├── rb │ │ ├── reject │ │ ├── req │ │ ├── rreq │ │ ├── rw │ │ ├── select │ │ ├── tim │ │ ├── until │ │ ├── upt │ │ ├── w │ │ ├── when │ │ ├── while │ │ ├── y │ │ └── zip │ │ ├── scala-mode │ │ ├── act │ │ ├── act.arg │ │ ├── actor │ │ ├── ano │ │ ├── app │ │ ├── arr.new │ │ ├── arr.val-new │ │ ├── asof │ │ ├── ass │ │ ├── ass.true │ │ ├── at.author │ │ ├── at.param │ │ ├── at.return │ │ ├── at.version │ │ ├── bang │ │ ├── case │ │ ├── case.match-all │ │ ├── cast │ │ ├── cc │ │ ├── cl │ │ ├── cl.abs │ │ ├── cl.abs-arg │ │ ├── cl.arg │ │ ├── clof │ │ ├── co │ │ ├── cons │ │ ├── cons.nil │ │ ├── def.arg │ │ ├── def.arg-body │ │ ├── def.arg-ret │ │ ├── def.arg-ret-body │ │ ├── def.body │ │ ├── def.ret │ │ ├── def.ret-body │ │ ├── def.simple │ │ ├── doc.class │ │ ├── doc.def │ │ ├── doc.file │ │ ├── doc.file-scala │ │ ├── doc.file-scala-api │ │ ├── doc.scaladoc │ │ ├── expect │ │ ├── ext │ │ ├── for.extract │ │ ├── for.if │ │ ├── for.loop │ │ ├── for.multi │ │ ├── foreach │ │ ├── hmap.new │ │ ├── hmap.val-new │ │ ├── hset.new │ │ ├── hset.val-new │ │ ├── if │ │ ├── if.else │ │ ├── imp │ │ ├── intercept │ │ ├── isof │ │ ├── ls.new │ │ ├── ls.val-new │ │ ├── main │ │ ├── map │ │ ├── map.new │ │ ├── match │ │ ├── match.can │ │ ├── match.option │ │ ├── mix │ │ ├── ob │ │ ├── pac │ │ ├── pr.newline │ │ ├── pr.simple │ │ ├── pr.string │ │ ├── pr.trace │ │ ├── pri │ │ ├── pri.param │ │ ├── pro │ │ ├── pro.param │ │ ├── suite │ │ ├── test │ │ ├── throw │ │ ├── tr │ │ ├── tr.ext │ │ ├── tr.ext-with │ │ ├── tr.with │ │ ├── try │ │ ├── try.catch-finally │ │ ├── try.finally │ │ ├── tup.arrow │ │ ├── tup.paren │ │ ├── val │ │ ├── val.new │ │ ├── val.ret │ │ ├── var │ │ ├── var.new │ │ ├── var.ret │ │ ├── whi │ │ └── with │ │ ├── sql-mode │ │ ├── column │ │ ├── constraint │ │ ├── constraint.1 │ │ ├── create │ │ ├── create.1 │ │ └── references │ │ └── time ├── tuareg │ ├── COPYING │ ├── HISTORY │ ├── LISEZMOI │ ├── README │ ├── append-tuareg.el │ ├── camldebug.el │ ├── custom-tuareg.el │ ├── sym-lock.el │ └── tuareg.el ├── whizzytex.el ├── xcscope.el ├── yasnippet-bundle.el └── yasnippet.el ├── .emacs.el ├── .gdbinit ├── .gemrc ├── .gitconfig ├── .gitignore ├── .inputrc ├── .irbrc ├── .percol.d └── rc.py ├── .pryrc ├── .rdebugrc ├── .sbtconfig ├── .screenrc ├── .tmux.conf ├── .tmux.conf.osx ├── .vim ├── README ├── dict │ ├── c.dict │ ├── cpp.dict │ ├── java.dict │ ├── javascript.dict │ ├── lua.dict │ ├── ocaml.dict │ ├── perl.dict │ ├── php.dict │ ├── scheme.dict │ └── vim.dict ├── plugins_list.rst ├── snippets │ ├── rails.snip │ └── rspec.snip └── syntax │ └── rspec-result.vim ├── .vimrc ├── .vimrc.apperance ├── .vimrc.basic ├── .vimrc.bundle ├── .vimrc.colors ├── .vimrc.completion ├── .vimrc.completion.autocomplpop ├── .vimrc.completion.neocomplcache ├── .vimrc.editing ├── .vimrc.encoding ├── .vimrc.gitlogviewer ├── .vimrc.indent ├── .vimrc.misc ├── .vimrc.moving ├── .vimrc.plugins_setting ├── .vimrc.search ├── .vimrc.statusline ├── .vimrc.tags ├── .vimrc.window ├── .vrapperrc ├── .zsh ├── cheat-sheet ├── incr-0.2.zsh ├── percol-sources │ ├── git-issue.zsh │ └── select-history.zsh └── percol.zsh ├── .zshrc ├── .zshrc.alias ├── .zshrc.custom ├── .zshrc.linux ├── .zshrc.osx ├── README.txt ├── bin ├── cscope-indexer ├── epylint.py ├── git-back ├── git-follow ├── git-switch ├── git-風呂 ├── gsta ├── gstd ├── gstv ├── loadaverage ├── platex2pdf ├── pre-commit.keyword-check.sample ├── socks-proxy ├── track_all_branches ├── up_all_branches └── used-mem ├── import.scala ├── nvim ├── dein.rc.vim ├── dein.toml ├── deinlazy.toml ├── init.vim ├── keymap.rc.vim ├── options.rc.vim └── plugins │ ├── CamelCaseMotion.rc.vim │ ├── airline.rc.vim │ ├── ale.rc.vim │ ├── denite-gtags.rc.vim │ ├── denite-rails.rc.vim │ ├── denite.rc.vim │ ├── deoplete-go.rc.vim │ ├── deoplete.rc.vim │ ├── gen_tags.rc.vim │ ├── gitgutter.rc.vim │ ├── iceberg.rc.vim │ ├── indent-guides.rc.vim │ ├── jellybeans.rc.vim │ ├── lucius.rc.vim │ ├── minibufexpl.rc.vim │ ├── nerdcommenter.rc.vim │ ├── vim-easy-align.rc.vim │ ├── vim-go.post.rc.vim │ ├── vim-go.rc.vim │ ├── vim-surround.rc.vim │ └── yuroyoro256.rc.vim ├── oneliners.txt └── setup.sh /.ctags: -------------------------------------------------------------------------------- 1 | --langdef=scala 2 | --langmap=scala:.scala 3 | --regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[ \t]*)*(private|protected)?[ \t]*class[ \t]+([a-zA-Z0-9_]+)/\4/c,classes/ 4 | --regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[ \t]*)*(private|protected)?[ \t]*object[ \t]+([a-zA-Z0-9_]+)/\4/c,objects/ 5 | --regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[ \t]*)*(private|protected)?[ \t]*case class[ \t]+([a-zA-Z0-9_]+)/\4/c,case classes/ 6 | --regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[ \t]*)*(private|protected)?[ \t]*case object[ \t]+([a-zA-Z0-9_]+)/\4/c,case objects/ 7 | --regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[ \t]*)*(private|protected)?[ \t]*trait[ \t]+([a-zA-Z0-9_]+)/\4/t,traits/ 8 | --regex-scala=/^[ \t]*type[ \t]+([a-zA-Z0-9_]+)/\1/T,types/ 9 | --regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[ \t]*)*def[ \t]+([a-zA-Z0-9_]+)/\3/m,methods/ 10 | --regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[ \t]*)*val[ \t]+([a-zA-Z0-9_]+)/\3/l,constants/ 11 | --regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy)[ \t]*)*var[ \t]+([a-zA-Z0-9_]+)/\3/l,variables/ 12 | --regex-scala=/^[ \t]*package[ \t]+([a-zA-Z0-9_.]+)/\1/p,packages/ 13 | -------------------------------------------------------------------------------- /.elisp/conf/init-anything.el: -------------------------------------------------------------------------------- 1 | (setq woman-cache-filename (expand-file-name "~/woman_cache")) 2 | ;(setq anything-c-adaptive-history-file 3 | ; (expand-file-name "~/dotfiles/.elisp/anything/anything-c-adaptive-history")) 4 | (require 'anything-config) 5 | 6 | ;(defvar anything-c-adaptive-history-file "~/anything-c-adaptive-history" 7 | ; "Path of file where history information is stored.") 8 | 9 | 10 | (global-set-key [?\C-;] 'anything) 11 | 12 | (define-key anything-map "\C-n" 'anything-next-line) 13 | (define-key anything-map "\C-p" 'anything-previous-line) 14 | 15 | 16 | ; auto-complete.elがあればいらないかな 17 | ;(require 'anything-dabbrev-expand) 18 | ;(global-set-key "\C-u" 'anything-dabbrev-expand) 19 | ;(define-key anything-dabbrev-map "\C-u" 'anything-dabbrev-find-all-buffers) 20 | 21 | 22 | ;; (setq anything-c-locate-db-file "/log/home.simple.locatedb") 23 | ;; (setq anything-c-locate-options `("locate" "-d" ,anything-c-locate-db-file "-i" "-r" "--")) 24 | 25 | 26 | 27 | ; cscope? 28 | ; http://d.hatena.ne.jp/tunefs/20070325/p1 29 | ; C-c s c : Calling this function 30 | ; C-c s G : find global definition (and Move!) 31 | ; C-c s d : find global definition 32 | ; C-c s C : find called this function 33 | ; xcscope.el is available from http://cscope.sourceforge.net/#downloads 34 | (require 'anything-cscope) 35 | 36 | (setq anything-sources 37 | (list anything-c-source-buffers 38 | anything-c-source-bookmarks 39 | anything-c-source-cscope-global-definition 40 | anything-c-source-cscope-calling-this-function 41 | ; anything-c-source-file-name-history 42 | ; anything-c-source-file-cache 43 | ; anything-c-source-man-pages 44 | ; anything-c-source-info-pages 45 | anything-c-source-calculation-result 46 | ; anything-c-source-plocate 47 | ; anything-c-source-locate 48 | ; anything-c-source-mac-spotlight 49 | )) 50 | -------------------------------------------------------------------------------- /.elisp/conf/init-auto-complete.el: -------------------------------------------------------------------------------- 1 | (require 'auto-complete) 2 | (global-auto-complete-mode t) 3 | 4 | (define-key ac-complete-mode-map "\C-n" 'ac-next) 5 | (define-key ac-complete-mode-map "\C-p" 'ac-previous) 6 | (setq ac-auto-start 3) 7 | 8 | ;(define-key ac-complete-mode-map "\t" 'ac-complete) 9 | ;(define-key ac-complete-mode-map "\r" nil) 10 | 11 | ;; (require 'ac-dabbrev) 12 | ;; (setq ac-sources 13 | ;; (list ac-source-dabbrev 14 | ;; )) 15 | 16 | 17 | -------------------------------------------------------------------------------- /.elisp/conf/init-autosave.el: -------------------------------------------------------------------------------- 1 | (require 'auto-save-buffers) 2 | (run-with-idle-timer 0.5 t 'auto-save-buffers) ; アイドル0.5秒で保存 3 | 4 | 5 | -------------------------------------------------------------------------------- /.elisp/conf/init-gauche.el: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuroyoro/dotfiles/36300dc61ac40aa05e7b30469970629075fc0178/.elisp/conf/init-gauche.el -------------------------------------------------------------------------------- /.elisp/conf/init-gdb.el: -------------------------------------------------------------------------------- 1 | ;; Smart-compile & gdb 2 | (setq tc-gdb-buffer-name-head "*gud") 3 | (setq tc-compilation-buffer-name-head "*com") 4 | (setq tc-directory "~/srm") 5 | 6 | (defun gdb-before-refresh-find-buffer (buf-list) 7 | (let ((buf (car buf-list)) 8 | (last-bufs (cdr buf-list))) 9 | (if (or (string-equal tc-gdb-buffer-name-head (substring (buffer-name buf) 0 (length tc-gdb-buffer-name-head))) 10 | (string-equal tc-compilation-buffer-name-head (substring (buffer-name buf) 0 (length tc-compilation-buffer-name-head)))) 11 | buf 12 | (if last-bufs 13 | (gdb-before-refresh-find-buffer last-bufs) 14 | nil)))) 15 | 16 | (defun gdb-before-refresh-find-gdb-window (win-list gdb-buf) 17 | (let ((win (car win-list)) 18 | last-win (cdr win-list)) 19 | (if (eq (window-buffer win) gdb-buf) 20 | win 21 | (if last-win 22 | (gdb-before-refresh-find-gdb-window last-win gdb-buf) 23 | nil)))) 24 | (eq 1 3) 25 | 26 | (defun gdb-before-refresh () 27 | (interactive) 28 | (let ((gdb-buffer (gdb-before-refresh-find-buffer (buffer-list)))) 29 | (progn 30 | (if (and (not (eq (current-buffer) gdb-buffer)) (> (length (window-list)) 1)) 31 | (command-execute 'next-multiframe-window) 32 | nil) 33 | ; (let ((gdb-win (gdb-before-refresh-find-gdb-window (window-list) gdb-buffer))) 34 | ; (if (and (neq gdb-win (selected-window)) (> (length (window-list)) 1)) 35 | ; (command-execute 'next-multiframe-window) 36 | ; nil))) 37 | (if gdb-buffer 38 | (kill-buffer gdb-buffer) 39 | nil) 40 | (cd tc-directory) 41 | (command-execute 'gdb)))) 42 | (define-key global-map "\M-g" 'gdb-before-refresh) 43 | 44 | ;; Override anything-isearch-again 45 | (define-key global-map "\M-c" 'smart-compile) 46 | -------------------------------------------------------------------------------- /.elisp/conf/init-gtags.el: -------------------------------------------------------------------------------- 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2 | ;; GNU GLOBAL(gtags) 3 | ;; http://uguisu.skr.jp/Windows/gtags.html 4 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 5 | 6 | (load "gtags.el") 7 | (autoload 'gtags-mode "gtags" "" t) 8 | (setq gtags-mode-hook 9 | '(lambda () 10 | (local-set-key "\M-t" 'gtags-find-tag) 11 | (local-set-key "\M-r" 'gtags-find-rtag) 12 | (local-set-key "\M-s" 'gtags-find-symbol) 13 | (local-set-key "\C-t" 'gtags-pop-stack) 14 | )) 15 | 16 | (setq c-mode-common-hook 17 | '(lambda () 18 | (gtags-mode 1) 19 | )) -------------------------------------------------------------------------------- /.elisp/conf/init-jaspace.el: -------------------------------------------------------------------------------- 1 | ;; タブ, 全角スペース、改行直前の半角スペースを表示する 2 | (when (require 'jaspace nil t) 3 | (when (boundp 'jaspace-modes) 4 | (setq jaspace-modes (append jaspace-modes 5 | (list 'php-mode 6 | 'yaml-mode 7 | 'javascript-mode 8 | 'ruby-mode 9 | 'text-mode 10 | 'fundamental-mode)))) 11 | (when (boundp 'jaspace-alternate-jaspace-string) 12 | (setq jaspace-alternate-jaspace-string "□")) 13 | (when (boundp 'jaspace-highlight-tabs) 14 | (setq jaspace-highlight-tabs ?^)) 15 | (add-hook 'jaspace-mode-off-hook 16 | (lambda() 17 | (when (boundp 'show-trailing-whitespace) 18 | (setq show-trailing-whitespace nil)))) 19 | (add-hook 'jaspace-mode-hook 20 | (lambda() 21 | (progn 22 | (when (boundp 'show-trailing-whitespace) 23 | (setq show-trailing-whitespace t)) 24 | (face-spec-set 'jaspace-highlight-jaspace-face 25 | '((((class color) (background light)) 26 | (:foreground "blue")) 27 | (t (:foreground "green")))) 28 | (face-spec-set 'jaspace-highlight-tab-face 29 | '((((class color) (background light)) 30 | (:foreground "red" 31 | :background "unspecified" 32 | :strike-through nil 33 | :underline t)) 34 | (t (:foreground "purple" 35 | :background "unspecified" 36 | :strike-through nil 37 | :underline t)))) 38 | (face-spec-set 'trailing-whitespace 39 | '((((class color) (background light)) 40 | (:foreground "red" 41 | :background "unspecified" 42 | :strike-through nil 43 | :underline t)) 44 | (t (:foreground "purple" 45 | :background "unspecified" 46 | :strike-through nil 47 | :underline t)))))))) 48 | -------------------------------------------------------------------------------- /.elisp/conf/init-js2.el: -------------------------------------------------------------------------------- 1 | ;; js2-mode 2 | (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode)) 3 | (setq-default c-basic-offset 4) 4 | 5 | (when (load "js2" t) 6 | (setq js2-cleanup-whitespace nil 7 | js2-mirror-mode nil 8 | js2-bounce-indent-flag t) 9 | 10 | (defun indent-and-back-to-indentation () 11 | (interactive) 12 | (indent-for-tab-command) 13 | (let ((point-of-indentation 14 | (save-excursion 15 | (back-to-indentation) 16 | (point)))) 17 | (skip-chars-forward "\s " point-of-indentation))) 18 | (define-key js2-mode-map "\C-i" 'indent-and-back-to-indentation) 19 | 20 | (define-key js2-mode-map "\C-m" nil) 21 | 22 | (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))) 23 | 24 | -------------------------------------------------------------------------------- /.elisp/conf/init-nav.el: -------------------------------------------------------------------------------- 1 | (setq nav-boring-file-regexps 2 | (list "\\.pyc$" "\\.o$" "~$" "\\.bak$" "^\\./?$" "/\\." "^\\./?$" "^\\.\\./?$")) 3 | 4 | 5 | ;; "^\\./?$" : current directory 6 | ;; "^\\.[^/]" : files which begins with dot, e.g., .emacs.el 7 | ;; "^\\.\\./?$" : parent directory 8 | 9 | -------------------------------------------------------------------------------- /.elisp/conf/init-physical-move.el: -------------------------------------------------------------------------------- 1 | ;; Pysical Move, (not logical move) 2 | (global-set-key "\C-p" 'previous-window-line) 3 | (global-set-key "\C-n" 'next-window-line) 4 | (defun previous-window-line (n) 5 | (interactive "p") 6 | (let ((cur-col 7 | (- (current-column) 8 | (save-excursion (vertical-motion 0) (current-column))))) 9 | (vertical-motion (- n)) 10 | (move-to-column (+ (current-column) cur-col))) 11 | (run-hooks 'auto-line-hook) 12 | ) 13 | (defun next-window-line (n) 14 | (interactive "p") 15 | (let ((cur-col 16 | (- (current-column) 17 | (save-excursion (vertical-motion 0) (current-column))))) 18 | (vertical-motion n) 19 | (move-to-column (+ (current-column) cur-col))) 20 | (run-hooks 'auto-line-hook) 21 | ) 22 | 23 | -------------------------------------------------------------------------------- /.elisp/conf/init-python.el: -------------------------------------------------------------------------------- 1 | 2 | 3 | (add-hook 'python-mode-hook 4 | (lambda () 5 | ; (define-key python-mode-map "\"" 'electric-pair) 6 | ; (define-key python-mode-map "\'" 'electric-pair) 7 | ; (define-key python-mode-map "(" 'electric-pair) 8 | ; (define-key python-mode-map "[" 'electric-pair) 9 | ; (define-key python-mode-map "{" 'electric-pair) 10 | )) 11 | 12 | (defun electric-pair () 13 | "Insert character pair without sournding spaces" 14 | (interactive) 15 | (let (parens-require-spaces) 16 | (insert-pair))) 17 | 18 | 19 | ; Sets environemntal variable PYTHONPATH used in pylint 20 | ; the pythonpath cannot be inherited from zsh. So you need to specify it. 21 | (progn 22 | (setenv "PYTHONPATH" "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/:") 23 | (setenv "PYTHONPATH" (concat "/Users/suztomo/Documents/gae/rss-twit/third_party:" 24 | (getenv "PYTHONPATH"))) 25 | (setenv "PYTHONPATH" (concat "/usr/local/google_appengine/:/usr/local/google_appengine/lib/yaml/lib/:/usr/local/google_appengine/lib/webob/:/usr/local/google_appengine/lib/django/django/:" (getenv "PYTHONPATH"))) 26 | ) 27 | 28 | 29 | ; PythonMode 30 | ; http://www.emacswiki.org/cgi-bin/wiki/PythonMode 31 | ; To enable this flymake configuration, you need to have epylint.py 32 | 33 | (when (load "flymake" t) 34 | (defun flymake-pylint-init () 35 | (let* ((temp-file (flymake-init-create-temp-buffer-copy 36 | 'flymake-create-temp-inplace)) 37 | (local-file (file-relative-name 38 | temp-file 39 | (file-name-directory buffer-file-name)))) 40 | (list "~/dotfiles/bin/epylint.py" (list local-file)))) 41 | 42 | (add-to-list 'flymake-allowed-file-name-masks 43 | '("\\.py\\'" flymake-pylint-init))) 44 | 45 | (add-hook 'python-mode-hook 46 | '(lambda () 47 | (flymake-mode t))) 48 | 49 | (add-hook 'python-mode-hook 50 | '(lambda () (eldoc-mode 1)) t) -------------------------------------------------------------------------------- /.elisp/conf/init-revive.el: -------------------------------------------------------------------------------- 1 | (autoload 'save-current-configuration "revive" "Save status" t) 2 | (autoload 'resume "revive" "Resume Emacs" t) 3 | (autoload 'wipe "revive" "Wipe emacs" t) 4 | (define-key ctl-x-map "R" 'resume) 5 | (define-key ctl-x-map "K" 'wipe) 6 | (add-hook 'kill-emacs-hook 'save-current-configuration) 7 | -------------------------------------------------------------------------------- /.elisp/conf/init-shell.el: -------------------------------------------------------------------------------- 1 | ;; For Shell-Mode (M-x shell) 2 | (autoload 'ansi-color-for-comint-mode-on "ansi-color" 3 | "Set `ansi-color-for-comint-mode' to t." t) 4 | (add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on) 5 | -------------------------------------------------------------------------------- /.elisp/conf/init-skk.el: -------------------------------------------------------------------------------- 1 | ;; skk setup 2 | ;; Add pahts to SKK and APEL 3 | 4 | (defvar system-load-path load-path) 5 | (setq my-load-path '("/usr/share/emacs/22.1/site-lisp/skk" 6 | "/usr/share/emacs/22.1/site-lisp/apel" 7 | "/usr/share/emacs/22.1/site-lisp/emu")) 8 | (setq load-path (append my-load-path system-load-path)) 9 | (require 'skk-autoloads) 10 | 11 | ;; Off AquaSKK 12 | (setq mac-pass-control-to-system nil) 13 | (global-set-key "\C-x\C-j" 'skk-mode) 14 | (global-set-key "\C-xj" 'skk-auto-fill-mode) 15 | 16 | 17 | (setq skk-large-jisyo "~/Library/AquaSKK/SKK-JISYO.L") 18 | 19 | 20 | 21 | ;; ラージ辞書ではなくskkservへ 22 | 23 | (when (eq window-system 'mac) 24 | (add-hook 'window-setup-hook 25 | (lambda () 26 | (progn 27 | (setq skk-large-jisyo nil) 28 | (setq skk-server-host "127.0.0.1") 29 | (setq skk-server-potnum 1178) 30 | (message "SKK serv setup") 31 | ) 32 | 33 | ))) 34 | 35 | (setq skk-kutouten-type 'en) 36 | 37 | ;; 変換時,改行でも確定 38 | (setq skk-egg-like-newline t) 39 | 40 | ;; メッセージは日本語で 41 | (setq skk-japanese-message-and-error t) 42 | 43 | ;;"「"を入力したら"」"も自動で挿入 44 | ;(setq skk-auto-insert-paren nil) 45 | 46 | ;;漢字登録のミスをチェックする 47 | (setq skk-check-okurigana-on-touroku t) 48 | 49 | ;; 変換候補をツールチップに表示 50 | ;; (setq skk-show-tooltip t) 51 | 52 | ;; 変換候補をインラインに表示 53 | (setq skk-show-inline t) 54 | 55 | ;; isearch時にSKKをオフ 56 | (setq skk-isearch-start-mode 'latin) 57 | 58 | ;; 10 分放置すると個人辞書が自動的に保存される設定 59 | ;; (defvar skk-auto-save-jisyo-interval 600) 60 | ;; (defun skk-auto-save-jisyo () 61 | ;; (skk-save-jisyo) 62 | ;; (skk-bayesian-save-history) 63 | ;; (skk-bayesian-corpus-save)) 64 | ;; (run-with-idle-timer skk-auto-save-jisyo-interval 65 | ;; skk-auto-save-jisyo-interval 66 | ;; 'skk-auto-save-jisyo) 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /.elisp/conf/init-spell.el: -------------------------------------------------------------------------------- 1 | (add-hook 'yatex-mode-hook 'flyspell-mode) 2 | 3 | (add-hook 'yatex-mode-hook (function (lambda () (setq ispell-parser 'tex)))) 4 | 5 | (add-hook 'yatex-mode-hook (function (lambda () (command-execute 'flyspell-buffer)))) 6 | 7 | (global-set-key "\M-i" 'ispell-word) 8 | 9 | ;(add-to-list 'ispell-local-dictionary-alist (expand-file-name "~/dotfiles/.elisp/ispell")) 10 | 11 | ;(custom-set-variables 12 | ; '(flyspell-default-dictionary (expand-file-name "~/dotfiles/.elisp/ispell"))) 13 | 14 | ;(custom-set-variables 15 | ; '(flyspell-default-dictionary nil)) 16 | 17 | ; flyspell source code are in following file specially for CarbonEmacs 18 | ; /Applications/Emacs.app/Contents/Resources/lisp/textmodes/flyspell.el 19 | ; How to use aspell 20 | ; http://oku.edu.mie-u.ac.jp/~okumura/texwiki/?Aspell 21 | 22 | (custom-set-variables 23 | '(flyspell-use-global-abbrev-table-p nil)) 24 | 25 | (custom-set-variables 26 | '(flyspell-auto-correct-binding [(control ?\t)])) 27 | -------------------------------------------------------------------------------- /.elisp/conf/init-view.el: -------------------------------------------------------------------------------- 1 | ; Make move easy when it is read-only 2 | ; http://d.hatena.ne.jp/rubikitch/20081104/1225745862 3 | 4 | (setq view-read-only t) 5 | (defvar pager-keybind 6 | `( ;; vi-like 7 | ("h" . backward-word) 8 | ("l" . forward-word) 9 | ("j" . next-window-line) 10 | ("k" . previous-window-line) 11 | (";" . gene-word) 12 | ("b" . scroll-down) 13 | (" " . scroll-up) 14 | ;; w3m-like 15 | ("m" . gene-word) 16 | ("i" . win-delete-current-window-and-squeeze) 17 | ("w" . forward-word) 18 | ("e" . backward-word) 19 | ("(" . point-undo) 20 | (")" . point-redo) 21 | ("J" . ,(lambda () (interactive) (scroll-up 1))) 22 | ("K" . ,(lambda () (interactive) (scroll-down 1))) 23 | ;; bm-easy 24 | ("." . bm-toggle) 25 | ("[" . bm-previous) 26 | ("]" . bm-next) 27 | ;; langhelp-like 28 | ("c" . scroll-other-window-down) 29 | ("v" . scroll-other-window) 30 | )) 31 | (defun define-many-keys (keymap key-table &optional includes) 32 | (let (key cmd) 33 | (dolist (key-cmd key-table) 34 | (setq key (car key-cmd) 35 | cmd (cdr key-cmd)) 36 | (if (or (not includes) (member key includes)) 37 | (define-key keymap key cmd)))) 38 | keymap) 39 | 40 | (defun view-mode-hook0 () 41 | (define-many-keys view-mode-map pager-keybind) 42 | ; (hl-line-mode 1) 43 | (define-key view-mode-map " " 'scroll-up)) 44 | (add-hook 'view-mode-hook 'view-mode-hook0) 45 | 46 | ;; 書き込み不能なファイルはview-modeで開くように 47 | (defadvice find-file 48 | (around find-file-switch-to-view-file (file &optional wild) activate) 49 | (if (and (not (file-writable-p file)) 50 | (not (file-directory-p file))) 51 | (view-file file) 52 | ad-do-it)) 53 | 54 | 55 | ;; 書き込み不能な場合はview-modeを抜けないように 56 | (defvar view-mode-force-exit nil) 57 | (defmacro do-not-exit-view-mode-unless-writable-advice (f) 58 | `(defadvice ,f (around do-not-exit-view-mode-unless-writable activate) 59 | (if (and (buffer-file-name) 60 | (not view-mode-force-exit) 61 | (not (file-writable-p (buffer-file-name)))) 62 | (message "File is unwritable, so stay in view-mode.") 63 | ad-do-it))) 64 | 65 | (do-not-exit-view-mode-unless-writable-advice view-mode-exit) 66 | (do-not-exit-view-mode-unless-writable-advice view-mode-disable) 67 | 68 | ;; key-chord 69 | (key-chord-define-global "jk" 'view-mode) 70 | -------------------------------------------------------------------------------- /.elisp/conf/init-yasnippet.el: -------------------------------------------------------------------------------- 1 | ;; Yasnippet 2 | ; http://code.google.com/p/yasnippet/ 3 | ; http://blog.clouder.jp/archives/001037.html 4 | (require 'yasnippet) 5 | (yas/initialize) 6 | (yas/load-directory "~/dotfiles/.elisp/snippets") 7 | 8 | 9 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/cc-mode/REP: -------------------------------------------------------------------------------- 1 | #name : REP (...) { ... } 2 | # -- 3 | REP (${1:i}, ${2:up}) { 4 | $3 5 | } 6 | $4 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/cc-mode/c++-mode/beginend: -------------------------------------------------------------------------------- 1 | #name : v.begin(), v.end() 2 | # -- 3 | ${1:v}.begin(), $1.end -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/cc-mode/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 | }; -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/cc-mode/c++-mode/ns: -------------------------------------------------------------------------------- 1 | #name : namespace ... 2 | # -- 3 | namespace -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/cc-mode/c++-mode/template: -------------------------------------------------------------------------------- 1 | #name : template 2 | # -- 3 | template -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/cc-mode/c++-mode/using: -------------------------------------------------------------------------------- 1 | #name : using namespace ... 2 | # -- 3 | using namespace ${std}; 4 | $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/cc-mode/c-mode/fopen: -------------------------------------------------------------------------------- 1 | #name : FILE *fp = fopen(..., ...); 2 | # -- 3 | FILE *${fp} = fopen(${"file"}, "${r}"); 4 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/cc-mode/csharp-mode/attrib: -------------------------------------------------------------------------------- 1 | #contributor : Alejandro Espinoza Esparza 2 | #name : private attribute ....; 3 | # -- 4 | /// 5 | /// $3 6 | /// 7 | private $1 $2; 8 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/cc-mode/csharp-mode/attrib.1: -------------------------------------------------------------------------------- 1 | #contributor : Alejandro Espinoza Esparza 2 | #name : private attribute ....; public property ... ... { ... } 3 | # -- 4 | /// 5 | /// $3 6 | /// 7 | private $1 $2; 8 | 9 | /// 10 | /// $4 11 | /// 12 | /// $5 13 | public $1 $2 14 | { 15 | get { 16 | return this.$2; 17 | } 18 | set { 19 | this.$2 = value; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/cc-mode/csharp-mode/attrib.2: -------------------------------------------------------------------------------- 1 | #contributor : Alejandro Espinoza Esparza 2 | #name : private _attribute ....; public Property ... ... { ... } 3 | # -- 4 | /// 5 | /// $3 6 | /// 7 | private $1 ${2:$(if (> (length text) 0) (format "_%s%s" (downcase (substring text 0 1)) (substring text 1 (length text))) "")}; 8 | 9 | /// 10 | /// ${3:Description} 11 | /// 12 | /// $1 13 | public ${1:Type} ${2:Name} 14 | { 15 | get { 16 | return this.${2:$(if (> (length text) 0) (format "_%s%s" (downcase (substring text 0 1)) (substring text 1 (length text))) "")}; 17 | } 18 | set { 19 | this.${2:$(if (> (length text) 0) (format "_%s%s" (downcase (substring text 0 1)) (substring text 1 (length text))) "")} = value; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/cc-mode/csharp-mode/class: -------------------------------------------------------------------------------- 1 | #contributor : Alejandro Espinoza Esparza 2 | #name : class ... { ... } 3 | # -- 4 | ${5:public} class ${1:Name} 5 | { 6 | #region Ctor & Destructor 7 | /// 8 | /// ${3:Standard Constructor} 9 | /// 10 | public $1($2) 11 | { 12 | } 13 | 14 | /// 15 | /// ${4:Default Destructor} 16 | /// 17 | public ~$1() 18 | { 19 | } 20 | #endregion 21 | } 22 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/cc-mode/csharp-mode/comment: -------------------------------------------------------------------------------- 1 | #contributor : Alejandro Espinoza Esparza 2 | #name : /// ... 3 | # -- 4 | /// 5 | /// $1 6 | /// 7 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/cc-mode/csharp-mode/comment.1: -------------------------------------------------------------------------------- 1 | #contributor : Alejandro Espinoza Esparza 2 | #name : /// ... 3 | # -- 4 | /// $2 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/cc-mode/csharp-mode/comment.2: -------------------------------------------------------------------------------- 1 | #contributor : Alejandro Espinoza Esparza 2 | #name : /// ... 3 | # -- 4 | /// $1 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/cc-mode/csharp-mode/comment.3: -------------------------------------------------------------------------------- 1 | #contributor : Alejandro Espinoza Esparza 2 | #name : /// ... 3 | # -- 4 | /// $2 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/cc-mode/csharp-mode/method: -------------------------------------------------------------------------------- 1 | #contributor : Alejandro Espinoza Esparza 2 | #name : public void Method { ... } 3 | # -- 4 | /// 5 | /// ${5:Description} 6 | /// ${2:$(if (string= (upcase text) "VOID") "" (format "%s%s%s" "\n/// " text ""))} 7 | ${1:public} ${2:void} ${3:MethodName}($4) 8 | { 9 | $0 10 | } 11 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/cc-mode/csharp-mode/namespace: -------------------------------------------------------------------------------- 1 | #contributor : Alejandro Espinoza Esparza 2 | #name : namespace .. { ... } 3 | # -- 4 | namespace $1 5 | { 6 | $0 7 | } 8 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/cc-mode/csharp-mode/prop: -------------------------------------------------------------------------------- 1 | #contributor : Alejandro Espinoza Esparza 2 | #name : property ... ... { ... } 3 | # -- 4 | /// 5 | /// $5 6 | /// 7 | /// $6 8 | $1 $2 $3 9 | { 10 | get { 11 | return this.$4; 12 | } 13 | set { 14 | this.$4 = value; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/cc-mode/csharp-mode/region: -------------------------------------------------------------------------------- 1 | #contributor : Alejandro Espinoza Esparza 2 | #name : #region ... #endregion 3 | # -- 4 | #region $1 5 | $0 6 | #endregion 7 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/cc-mode/csharp-mode/using: -------------------------------------------------------------------------------- 1 | #contributor : Alejandro Espinoza Esparza 2 | #name : using ...; 3 | # -- 4 | using $1; 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/cc-mode/csharp-mode/using.1: -------------------------------------------------------------------------------- 1 | #contributor : Alejandro Espinoza Esparza 2 | #name : using System; 3 | # -- 4 | using System; 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/cc-mode/csharp-mode/using.2: -------------------------------------------------------------------------------- 1 | #contributor : Alejandro Espinoza Esparza 2 | #name : using System....; 3 | # -- 4 | using System.$1; 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/cc-mode/do: -------------------------------------------------------------------------------- 1 | #name : do { ... } while (...) 2 | # -- 3 | do 4 | { 5 | $0 6 | } while (${1:condition}); -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/cc-mode/for: -------------------------------------------------------------------------------- 1 | #name : for (...; ...; ...) { ... } 2 | # -- 3 | for (int ${1:i = 0}; ${2:i} < (int)${3:N}; ${4:++i}) { 4 | $5 5 | } 6 | $6 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/cc-mode/if: -------------------------------------------------------------------------------- 1 | #name : if (...) { ... } 2 | # -- 3 | if (${1:condition}) 4 | { 5 | $0 6 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/cc-mode/inc: -------------------------------------------------------------------------------- 1 | #name : #include "..." 2 | # -- 3 | #include "$1" 4 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/cc-mode/inc.1: -------------------------------------------------------------------------------- 1 | #name : #include <...> 2 | # -- 3 | #include <$1> 4 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/cc-mode/main: -------------------------------------------------------------------------------- 1 | #name: int main(argc, argv) { ... } 2 | # -- 3 | int main(int argc, char *argv[]) 4 | { 5 | $0 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/cc-mode/objc-mode/prop: -------------------------------------------------------------------------------- 1 | #name : foo { ... } ; setFoo { ... } 2 | # -- 3 | - (${1:id})${2:foo} 4 | { 5 | return $2; 6 | } 7 | 8 | - (void)set${2:$(capitalize text)}:($1)aValue 9 | { 10 | [$2 autorelease]; 11 | $2 = [aValue retain]; 12 | } 13 | $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/cc-mode/once: -------------------------------------------------------------------------------- 1 | #name : #ifndef XXX; #define XXX; #endif 2 | # -- 3 | #ifndef ${1:_`(upcase (file-name-nondirectory (file-name-sans-extension (buffer-file-name))))`_H_} 4 | #define $1 5 | 6 | $0 7 | 8 | #endif /* $1 */ -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/cc-mode/struct: -------------------------------------------------------------------------------- 1 | #name : struct ... { ... } 2 | # -- 3 | struct ${1:name} 4 | { 5 | $0 6 | }; -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/css-mode/bg: -------------------------------------------------------------------------------- 1 | #name : background-color: ... 2 | # -- 3 | background-color: #${1:DDD}; -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/css-mode/bg.1: -------------------------------------------------------------------------------- 1 | #name : background-image: ... 2 | # -- 3 | background-image: url($1); -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/css-mode/bor: -------------------------------------------------------------------------------- 1 | #name : border size style color 2 | # -- 3 | border: ${1:1px} ${2:solid} #${3:999}; -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/css-mode/cl: -------------------------------------------------------------------------------- 1 | #contributor : rejeep 2 | #name : clear: ... 3 | # -- 4 | clear: $1; 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/css-mode/disp.block: -------------------------------------------------------------------------------- 1 | #contributor : rejeep 2 | #name : display: block 3 | # -- 4 | dislpay: block; 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/css-mode/disp.inline: -------------------------------------------------------------------------------- 1 | #contributor : rejeep 2 | #name : display: inline 3 | # -- 4 | dislpay: inline; 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/css-mode/disp.none: -------------------------------------------------------------------------------- 1 | #contributor : rejeep 2 | #name : display: none 3 | # -- 4 | dislpay: none; 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/css-mode/ff: -------------------------------------------------------------------------------- 1 | #contributor : rejeep 2 | #name : font-family: ... 3 | # -- 4 | font-family: $1; 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/css-mode/fs: -------------------------------------------------------------------------------- 1 | #contributor : rejeep 2 | #name : font-size: ... 3 | # -- 4 | font-size: ${12px}; 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/css-mode/mar.bottom: -------------------------------------------------------------------------------- 1 | #contributor : rejeep 2 | #name : margin-bottom: ... 3 | # -- 4 | margin-bottom: $1; 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/css-mode/mar.left: -------------------------------------------------------------------------------- 1 | #contributor : rejeep 2 | #name : margin-left: ... 3 | # -- 4 | margin-left: $1; 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/css-mode/mar.mar: -------------------------------------------------------------------------------- 1 | #contributor : rejeep 2 | #name : margin: ... 3 | # -- 4 | margin: $1; 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/css-mode/mar.margin: -------------------------------------------------------------------------------- 1 | #contributor : rejeep 2 | #name : margin top right bottom left 3 | # -- 4 | margin: ${top} ${right} ${bottom} ${left}; 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/css-mode/mar.right: -------------------------------------------------------------------------------- 1 | #contributor : rejeep 2 | #name : margin-right: ... 3 | # -- 4 | margin-right: $1; 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/css-mode/mar.top: -------------------------------------------------------------------------------- 1 | #contributor : rejeep 2 | #name : margin-top: ... 3 | # -- 4 | margin-top: $1; 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/css-mode/pad.bottom: -------------------------------------------------------------------------------- 1 | #contributor : rejeep 2 | #name : padding-bottom: ... 3 | # -- 4 | padding-bottom: $1; 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/css-mode/pad.left: -------------------------------------------------------------------------------- 1 | #contributor : rejeep 2 | #name : padding-left: ... 3 | # -- 4 | padding-left: $1; 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/css-mode/pad.pad: -------------------------------------------------------------------------------- 1 | #contributor : rejeep 2 | #name : padding: ... 3 | # -- 4 | padding: $1; 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/css-mode/pad.padding: -------------------------------------------------------------------------------- 1 | #contributor : rejeep 2 | #name : padding: top right bottom left 3 | # -- 4 | padding: ${top} ${right} ${bottom} ${left}; 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/css-mode/pad.right: -------------------------------------------------------------------------------- 1 | #contributor : rejeep 2 | #name : padding-right: ... 3 | # -- 4 | padding-right: $1; 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/css-mode/pad.top: -------------------------------------------------------------------------------- 1 | #contributor : rejeep 2 | #name : padding-top: ... 3 | # -- 4 | padding-top: $1; 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/email: -------------------------------------------------------------------------------- 1 | #name : (user's email) 2 | # -- 3 | `user-mail-address` -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/erlang-mode/after: -------------------------------------------------------------------------------- 1 | #name : after ... -> 2 | # -- 3 | after 4 | $1 -> $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/erlang-mode/begin: -------------------------------------------------------------------------------- 1 | #name : begin ... end 2 | # -- 3 | begin 4 | $0 5 | end 6 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/erlang-mode/beh: -------------------------------------------------------------------------------- 1 | #name : -behaviour(...). 2 | # -- 3 | -behaviour(${1:gen_server}). 4 | $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/erlang-mode/case: -------------------------------------------------------------------------------- 1 | #name : case ... of ... end 2 | # -- 3 | case $1 of 4 | $0 5 | end 6 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/erlang-mode/compile: -------------------------------------------------------------------------------- 1 | #name : -compile(...). 2 | # -- 3 | -compile([${1:export_all}]). 4 | $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/erlang-mode/def: -------------------------------------------------------------------------------- 1 | #name : -define(...,...). 2 | # -- 3 | -define($1,$2). 4 | $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/erlang-mode/exp: -------------------------------------------------------------------------------- 1 | #name : -export([]). 2 | #contributor : hitesh 3 | # -- 4 | -export([${1:start/0}]). 5 | $0 6 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/erlang-mode/fun: -------------------------------------------------------------------------------- 1 | #name : fun (...) -> ... end 2 | # -- 3 | fun ($1) -> $0 end 4 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/erlang-mode/if: -------------------------------------------------------------------------------- 1 | #name : if ... -> ... ; true -> ... end 2 | # -- 3 | if 4 | $1 -> $2; 5 | true -> $0 6 | end 7 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/erlang-mode/ifdef: -------------------------------------------------------------------------------- 1 | #name : -ifdef(...). ... -endif. 2 | # -- 3 | -ifdef($1). 4 | $0 5 | -endif. 6 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/erlang-mode/ifndef: -------------------------------------------------------------------------------- 1 | #name : -ifndef(...). ... -endif. 2 | # -- 3 | -ifndef($1). 4 | $0 5 | -endif. 6 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/erlang-mode/imp: -------------------------------------------------------------------------------- 1 | #name : -import([]). 2 | #contributor : hitesh 3 | # -- 4 | -import(${1:lists}, [${2:map/2, sum/1}]). 5 | $0 6 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/erlang-mode/inc: -------------------------------------------------------------------------------- 1 | #name : -include("..."). 2 | # -- 3 | -include("$1"). 4 | $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/erlang-mode/inc.lib: -------------------------------------------------------------------------------- 1 | #name : -include_lib("..."). 2 | # -- 3 | -include_lib("$1"). 4 | $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/erlang-mode/loop: -------------------------------------------------------------------------------- 1 | #name : loop(...) -> receive _ -> loop(...) end. 2 | # -- 3 | ${1:loop}($2) -> 4 | receive 5 | ${3:_} -> 6 | $1($2) 7 | end. 8 | $0 9 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/erlang-mode/mod: -------------------------------------------------------------------------------- 1 | #name : -module(). 2 | #contributor : hitesh 3 | # -- 4 | -module(${1:$(file-name-nondirectory 5 | (file-name-sans-extension (buffer-file-name)))}). 6 | $0 7 | 8 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/erlang-mode/rcv: -------------------------------------------------------------------------------- 1 | #name : receive ... -> ... end 2 | # -- 3 | receive 4 | $1 -> $0 5 | end 6 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/erlang-mode/rcv.after: -------------------------------------------------------------------------------- 1 | #name : receive after ... -> ... end 2 | # -- 3 | receive 4 | after 5 | $1 -> $0 6 | end 7 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/erlang-mode/rec: -------------------------------------------------------------------------------- 1 | #name : -record(...,{...}). 2 | # -- 3 | -record($1,{$2}). 4 | $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/erlang-mode/try: -------------------------------------------------------------------------------- 1 | #name : try ... of ... catch after end 2 | # -- 3 | try $1 of 4 | $0 5 | catch 6 | after 7 | end 8 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/erlang-mode/undef: -------------------------------------------------------------------------------- 1 | #name : -undef(...). 2 | # -- 3 | -undef($1). 4 | $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/f90-mode/au: -------------------------------------------------------------------------------- 1 | #contributor: Li Zhu 2 | #name : automatic 3 | # -- 4 | automatic $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/f90-mode/bd: -------------------------------------------------------------------------------- 1 | #contributor: Li Zhu 2 | #name : block data 3 | # -- 4 | block data $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/f90-mode/c: -------------------------------------------------------------------------------- 1 | #contributor: Li Zhu 2 | #name : continue 3 | # -- 4 | continue $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/f90-mode/ch: -------------------------------------------------------------------------------- 1 | #contributor: Li Zhu 2 | #name : character 3 | # -- 4 | character $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/f90-mode/cx: -------------------------------------------------------------------------------- 1 | #contributor: Li Zhu 2 | #name : complex 3 | # -- 4 | complex $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/f90-mode/dc: -------------------------------------------------------------------------------- 1 | #contributor: Li Zhu 2 | #name : double complex 3 | # -- 4 | double complex $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/f90-mode/do: -------------------------------------------------------------------------------- 1 | #contributor: Li Zhu 2 | #name : do while (...) end do 3 | # -- 4 | do while (${1:condition}) 5 | $0 6 | end do 7 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/f90-mode/dp: -------------------------------------------------------------------------------- 1 | #contributor: Li Zhu 2 | #name : double precision 3 | # -- 4 | double precision $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/f90-mode/eq: -------------------------------------------------------------------------------- 1 | #contributor: Li Zhu 2 | #name : equivalence 3 | # -- 4 | equivalence $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/f90-mode/ib: -------------------------------------------------------------------------------- 1 | #contributor: Li Zhu 2 | #name : implicit byte 3 | # -- 4 | implicit byte $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/f90-mode/ic: -------------------------------------------------------------------------------- 1 | #contributor: Li Zhu 2 | #name : implicit complex 3 | # -- 4 | implicit complex $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/f90-mode/ich: -------------------------------------------------------------------------------- 1 | #contributor: Li Zhu 2 | #name : implicit character 3 | # -- 4 | implicit character $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/f90-mode/if: -------------------------------------------------------------------------------- 1 | #contributor: Li Zhu 2 | #name : if then end if 3 | # -- 4 | if ( ${1:condition} ) then 5 | $0 6 | end if 7 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/f90-mode/ii: -------------------------------------------------------------------------------- 1 | #contributor: Li Zhu 2 | #name : implicit integer 3 | # -- 4 | implicit integer $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/f90-mode/il: -------------------------------------------------------------------------------- 1 | #contributor: Li Zhu 2 | #name : implicit logical 3 | # -- 4 | implicit logical $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/f90-mode/in: -------------------------------------------------------------------------------- 1 | #contributor: Li Zhu 2 | #name : implicit none 3 | # -- 4 | implicit none 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/f90-mode/inc: -------------------------------------------------------------------------------- 1 | #contributor: Li Zhu 2 | #name : include 3 | # -- 4 | include $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/f90-mode/intr: -------------------------------------------------------------------------------- 1 | #contributor: Li Zhu 2 | #name : intrinsic 3 | # -- 4 | intrinsic $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/f90-mode/ir: -------------------------------------------------------------------------------- 1 | #contributor: Li Zhu 2 | #name : implicit real 3 | # -- 4 | implicit real $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/f90-mode/l: -------------------------------------------------------------------------------- 1 | #contributor: Li Zhu 2 | #name : logical 3 | # -- 4 | logical $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/f90-mode/pa: -------------------------------------------------------------------------------- 1 | #contributor: Li Zhu 2 | #name : parameter 3 | # -- 4 | parameter $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/f90-mode/pr: -------------------------------------------------------------------------------- 1 | #contributor: Li Zhu 2 | #name : program ... end program ... 3 | # -- 4 | program ${1:name} 5 | $0 6 | end program ${1:name} 7 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/f90-mode/re: -------------------------------------------------------------------------------- 1 | #contributor: Li Zhu 2 | #name : read (*,*) 3 | # -- 4 | read (${1:*},${2:*}) $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/f90-mode/st: -------------------------------------------------------------------------------- 1 | #contributor: Li Zhu 2 | #name : structure 3 | # -- 4 | structure $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/f90-mode/su: -------------------------------------------------------------------------------- 1 | #contributor: Li Zhu 2 | #name : subroutine 3 | # -- 4 | subroutine $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/f90-mode/wr: -------------------------------------------------------------------------------- 1 | #contributor: Li Zhu 2 | #name : write (*,*) 3 | # -- 4 | write (${1:*},${2:*}) $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/body: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : ... 3 | # -- 4 | 5 | $0 6 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/br: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name :
3 | # -- 4 |
-------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/code: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : ... 3 | # -- 4 | 5 | $0 6 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/code.class: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : ... 3 | # -- 4 | 5 | $0 6 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/dd: -------------------------------------------------------------------------------- 1 | #contributor : Rodrigo Setti 2 | #name :
...
3 | #group : list 4 | # -- 5 |
$1
-------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/div: -------------------------------------------------------------------------------- 1 | #name : ... 2 | # -- 3 | $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/div.class: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name :
...
3 | # -- 4 |
5 | $0 6 |
-------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/div.id: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name :
...
3 | # -- 4 |
5 | $0 6 |
-------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/div.id-class: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name :
...
3 | # -- 4 |
5 | $0 6 |
-------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/dl: -------------------------------------------------------------------------------- 1 | #contributor : Rodrigo Setti 2 | #name :
...
3 | #group : list 4 | # -- 5 |
6 | $0 7 |
8 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/dl.id: -------------------------------------------------------------------------------- 1 | #contributor : Rodrigo Setti 2 | #name :
...
3 | #group : list 4 | # -- 5 |
6 | $0 7 |
-------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/doctype: -------------------------------------------------------------------------------- 1 | #name : Doctype HTML 4.01 Strict 2 | #group : meta 3 | # -- 4 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/doctype.xhml1: -------------------------------------------------------------------------------- 1 | #name : DocType XHTML 1.0 frameset 2 | #group : meta 3 | # -- 4 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/doctype.xhtml1_1: -------------------------------------------------------------------------------- 1 | #name : DocType XHTML 1.1 2 | #group : meta 3 | # -- 4 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/doctype.xhtml1_strict: -------------------------------------------------------------------------------- 1 | #name : DocType XHTML 1.0 Strict 2 | #group : meta 3 | # -- 4 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/doctype.xhtml1_transitional: -------------------------------------------------------------------------------- 1 | #name : DocType XHTML 1.0 Transitional 2 | #group : meta 3 | # -- 4 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/dt: -------------------------------------------------------------------------------- 1 | #contributor : Rodrigo Setti 2 | #name :
...
3 | #group : list 4 | # -- 5 |
$1
-------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/form: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name :
3 | # -- 4 |
5 | $0 6 |
-------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/h1: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name :

...

3 | #group : header 4 | # -- 5 |

$1

-------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/h2: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name :

...

3 | #group : header 4 | # -- 5 |

$1

-------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/h3: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name :

...

3 | #group : header 4 | # -- 5 |

$1

-------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/h4: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name :

...

3 | #group : header 4 | # -- 5 |

$1

-------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/h5: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name :
...
3 | #group : header 4 | # -- 5 |
$1
-------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/h6: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name :
...
3 | #group : header 4 | # -- 5 |
$1
-------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/head: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : ... 3 | # -- 4 | 5 | $0 6 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/hr: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name :
3 | # -- 4 |
5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/href: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : ... 3 | # -- 4 | $2 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/html: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : ... 3 | # -- 4 | 5 | $0 6 | 7 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/html.xmlns: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : ... 3 | # -- 4 | 5 | $0 6 | 7 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/img: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : ... 3 | # -- 4 | $3 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/input: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : 3 | # -- 4 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/li: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name :
  • ...
  • 3 | #group : list 4 | # -- 5 |
  • $1
  • -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/li.class: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name :
  • ...
  • 3 | #group : list 4 | # -- 5 |
  • $2
  • -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/link.stylesheet: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : 3 | # -- 4 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/link.stylesheet-ie: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : 3 | # -- 4 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/mailto: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : ... 3 | # -- 4 | $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/meta: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #group : meta 3 | #name : 4 | # -- 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/meta.http-equiv: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : 3 | #group : meta 4 | # -- 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/ol: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name :
      ...
    3 | #group : list 4 | # -- 5 |
      6 | $0 7 |
    -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/ol.class: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name :
      ...
    3 | #group : list 4 | # -- 5 |
      6 | $0 7 |
    -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/ol.id: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name :
      ...
    3 | #group : list 4 | # -- 5 |
      6 | $0 7 |
    -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/p: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name :

    ...

    3 | # -- 4 |

    $1

    -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/pre: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name :
    ...
    3 | # -- 4 |
    5 |   $0
    6 | 
    -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/quote: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name :
    ...
    3 | # -- 4 |
    5 | $1 6 |
    -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/script.javascript: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : 3 | # -- 4 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/script.javascript-src: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : 3 | # -- 4 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/span: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : ... 3 | # -- 4 | $1 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/span.class: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : ... 3 | # -- 4 | $2 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/span.id: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : ... 3 | # -- 4 | $2 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/style: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : 3 | # -- 4 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/table: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : ...
    3 | #group : table 4 | # -- 5 | 6 | $0 7 |
    -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/td: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : ... 3 | #group : table 4 | # -- 5 | $2 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/textarea: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : 3 | # -- 4 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/th: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : ... 3 | #group : table 4 | # -- 5 | $2 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/title: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : ... 3 | # -- 4 | $1 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/tr: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name : ... 3 | #group : table 4 | # -- 5 | 6 | $0 7 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/ul: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name :
      ...
    3 | #group : list 4 | # -- 5 |
      6 | $0 7 |
    -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/ul.class: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name :
      ...
    3 | #group : list 4 | # -- 5 |
      6 | $0 7 |
    -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/html-mode/ul.id: -------------------------------------------------------------------------------- 1 | #contributor : Jimmy Wu 2 | #name :
      ...
    3 | #group : list 4 | # -- 5 |
      6 | $0 7 |
    -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/latex-mode/begin: -------------------------------------------------------------------------------- 1 | #contributor : Rodrigo Setti 2 | #name : \begin{environment} ... \end{environment} 3 | # -- 4 | 5 | \begin{${1:environment}} 6 | $0 7 | \end{$1} 8 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/markdown-mode/+: -------------------------------------------------------------------------------- 1 | #name : Unordered List 2 | #contributor: Peng Deng 3 | # -- 4 | + ${1:Text} 5 | +$0 6 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/markdown-mode/-: -------------------------------------------------------------------------------- 1 | #name : Unordered List 2 | #contributor: Peng Deng 3 | # -- 4 | - ${1:Text} 5 | -$0 6 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/markdown-mode/_: -------------------------------------------------------------------------------- 1 | #name : Emphasis 2 | #contributor: Peng Deng 3 | # -- 4 | _${1:Text}_ $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/markdown-mode/__: -------------------------------------------------------------------------------- 1 | #name : Strong 2 | #contributor: Peng Deng 3 | # -- 4 | **${1:Text}** $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/markdown-mode/`: -------------------------------------------------------------------------------- 1 | #name : Inline Code 2 | #contributor: Peng Deng 3 | # -- 4 | \`${1:Code}\` $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/markdown-mode/h1.1: -------------------------------------------------------------------------------- 1 | #name : Header 1 (#) 2 | #contributor: Peng Deng 3 | # -- 4 | # ${1:Header 1} # 5 | 6 | $0 7 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/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 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/markdown-mode/h2.1: -------------------------------------------------------------------------------- 1 | #name : Header 2 (##) 2 | #contributor: Peng Deng 3 | # -- 4 | ## ${1:Header 1} ## 5 | 6 | $0 7 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/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 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/markdown-mode/h3: -------------------------------------------------------------------------------- 1 | #name : Header 3 2 | #contributor: Peng Deng 3 | # -- 4 | ### ${1:Header 3} ### 5 | 6 | $0 7 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/markdown-mode/h4: -------------------------------------------------------------------------------- 1 | #name : Header 4 2 | #contributor: Peng Deng 3 | # -- 4 | #### ${1:Header 4} #### 5 | 6 | $0 7 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/markdown-mode/h5: -------------------------------------------------------------------------------- 1 | #name : Header 5 2 | #contributor: Peng Deng 3 | # -- 4 | ##### ${1:Header 5} ##### 5 | 6 | $0 7 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/markdown-mode/h6: -------------------------------------------------------------------------------- 1 | #name : Header 6 2 | #contributor: Peng Deng 3 | # -- 4 | ###### ${1:Header 6} ###### 5 | 6 | $0 7 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/markdown-mode/hr.1: -------------------------------------------------------------------------------- 1 | #name : Horizontal Rule (-) 2 | #contributor: Peng Deng 3 | # -- 4 | 5 | ---------- 6 | 7 | $0 8 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/markdown-mode/hr.2: -------------------------------------------------------------------------------- 1 | #name : Horizontal Rule (*) 2 | #contributor: Peng Deng 3 | # -- 4 | 5 | ******* 6 | 7 | $0 8 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/markdown-mode/img: -------------------------------------------------------------------------------- 1 | #name : Image 2 | #contributor: Peng Deng 3 | # -- 4 | ![${1:Alt Text}](${2:URL} $3) $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/markdown-mode/link: -------------------------------------------------------------------------------- 1 | #name : Link 2 | #contributor: Peng Deng 3 | # -- 4 | [${1:Link Text}](${2:URL} $3) $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/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 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/markdown-mode/rimg: -------------------------------------------------------------------------------- 1 | #name : Referenced Image 2 | #contributor: Peng Deng 3 | # -- 4 | ![${1:Alt Text}][$2] $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/markdown-mode/rlb: -------------------------------------------------------------------------------- 1 | #name : Reference Label 2 | #contributor: Peng Deng 3 | # -- 4 | [${1:Reference}]: ${2:URL} $3 5 | $0 6 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/markdown-mode/rlink: -------------------------------------------------------------------------------- 1 | #name : Reference Link 2 | #contributor: Peng Deng 3 | # -- 4 | [${1:Link Text}][$2] $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/body: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name : ... 3 | # -- 4 | 5 | $0 6 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/br: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name :
    3 | # -- 4 |
    -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/code: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name : ... 3 | # -- 4 | 5 | $0 6 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/div: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name : ... 3 | # -- 4 | $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/doctype: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name : DocType XHTML 1.1 3 | #group : meta 4 | # -- 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/doctype.xhtml1_strict: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name : DocType XHTML 1.0 Strict 3 | #group : meta 4 | # -- 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/doctype.xhtml1_transitional: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name : DocType XHTML 1.0 Transitional 3 | #group : meta 4 | # -- 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/form: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name :
    3 | # -- 4 |
    5 | $0 6 |
    -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/h1: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name :

    ...

    3 | #group : header 4 | # -- 5 |

    $1

    -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/h2: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name :

    ...

    3 | #group : header 4 | # -- 5 |

    $1

    -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/h3: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name :

    ...

    3 | #group : header 4 | # -- 5 |

    $1

    -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/h4: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name :

    ...

    3 | #group : header 4 | # -- 5 |

    $1

    -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/h5: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name :
    ...
    3 | #group : header 4 | # -- 5 |
    $1
    -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/h6: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name :
    ...
    3 | #group : header 4 | # -- 5 |
    $1
    -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/head: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name : ... 3 | # -- 4 | 5 | $0 6 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/hr: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name :
    3 | # -- 4 |
    5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/href: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name : ... 3 | # -- 4 | $2 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/html: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name : ... 3 | # -- 4 | 5 | $0 6 | 7 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/img: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name : ... 3 | # -- 4 | $2 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/input: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name : 3 | # -- 4 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/li: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name :
  • ...
  • 3 | # -- 4 |
  • $1
  • -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/link: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name : 3 | # -- 4 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/meta: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name : 3 | #group : meta 4 | # -- 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/name: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name : 3 | # -- 4 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/ol: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name :
      ...
    3 | # -- 4 |
      5 | $0 6 |
    -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/p: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name :

    ...

    3 | # -- 4 |

    $1

    -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/pre: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name :
    ...
    3 | # -- 4 |
    5 |   $0
    6 | 
    -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/quote: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name :
    ...
    3 | # -- 4 |
    5 | $1 6 |
    -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/span: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name : ... 3 | # -- 4 | $1 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/style: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name : 3 | # -- 4 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/table: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name : ...
    3 | # -- 4 | 5 | $0 6 |
    -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/tag.1l: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name : ... 3 | # -- 4 | <${1:tag}>$2$0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/tag.2l: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name : \n...\n 3 | # -- 4 | <${1:tag}> 5 | $2 6 | $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/td: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name : ... 3 | # -- 4 | $2 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/th: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name : ... 3 | # -- 4 | $2 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/title: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name : ... 3 | # -- 4 | $1 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/tr: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name : ... 3 | # -- 4 | 5 | $0 6 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/nxml-mode/ul: -------------------------------------------------------------------------------- 1 | #contributor : Anders Bach Nielsen 2 | #name :
      ...
    3 | # -- 4 |
      5 | $0 6 |
    -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/perl-mode/eval: -------------------------------------------------------------------------------- 1 | #name : eval { ... } if ($@) { ... } 2 | # -- 3 | eval { 4 | ${1:# do something risky...} 5 | }; 6 | if (\$@) { 7 | ${2:# handle failure...} 8 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/perl-mode/for: -------------------------------------------------------------------------------- 1 | #name : for (...) { ... } 2 | # -- 3 | for (my \$${1:var} = 0; \$$1 < ${2:expression}; \$$1++) { 4 | ${3:# body...} 5 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/perl-mode/fore: -------------------------------------------------------------------------------- 1 | #name : foreach ... { ... } 2 | # -- 3 | foreach my \$${1:x} (@${2:array}) { 4 | ${3:# body...} 5 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/perl-mode/if: -------------------------------------------------------------------------------- 1 | #name : if (...) { ... } 2 | # -- 3 | if ($1) { 4 | $0 5 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/perl-mode/ife: -------------------------------------------------------------------------------- 1 | #name : if (...) { ... } else { ... } 2 | # -- 3 | if ($1) { 4 | $2 5 | } else { 6 | $3 7 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/perl-mode/ifee: -------------------------------------------------------------------------------- 1 | #name : if, elsif, else ... 2 | # -- 3 | if ($1) { 4 | ${2:# body...} 5 | } elsif ($3) { 6 | ${4:# elsif...} 7 | } else { 8 | ${5:# else...} 9 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/perl-mode/sub: -------------------------------------------------------------------------------- 1 | #name : sub ... { ... } 2 | # -- 3 | sub ${1:function_name} { 4 | $0 5 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/perl-mode/unless: -------------------------------------------------------------------------------- 1 | #name : unless (...) { ... } 2 | # -- 3 | unless ($1) { 4 | $0 5 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/perl-mode/while: -------------------------------------------------------------------------------- 1 | #name : while (...) { ... } 2 | # -- 3 | while ($1) { 4 | $0 5 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/perl-mode/xfore: -------------------------------------------------------------------------------- 1 | #name : ... foreach ... 2 | # -- 3 | ${1:expression} foreach @${2:array}; -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/perl-mode/xif: -------------------------------------------------------------------------------- 1 | #name : ... if ... 2 | # -- 3 | ${1:expression} if ${2:condition} -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/perl-mode/xunless: -------------------------------------------------------------------------------- 1 | #name : ... unless ... 2 | # -- 3 | ${1:expression} unless ${2:condition} -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/perl-mode/xwhile: -------------------------------------------------------------------------------- 1 | #name : ... while ... 2 | # -- 3 | ${1:expression} while ${2:condition}; -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/python-mode/__: -------------------------------------------------------------------------------- 1 | #name : __...__ 2 | # -- 3 | __${init}__ -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/python-mode/class: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # name: class 3 | # contributor: Orestis Markou 4 | # contributor: Nishio Hirokazu 5 | # contributor: Yasser González Fernández 6 | # -- 7 | class ${1:ClassName}(${2:object}): 8 | """$3 9 | """ 10 | 11 | def __init__(self, $4): 12 | """$5 13 | ${4:$ 14 | (let* ((indent 15 | (concat "\n" (make-string (current-column) 32))) 16 | (args 17 | (mapconcat 18 | '(lambda (x) 19 | (if (not (string= (nth 0 x) "")) 20 | (concat "- " (char-to-string 96) (nth 0 x) 21 | (char-to-string 96) ":"))) 22 | (mapcar 23 | '(lambda (x) 24 | (mapcar 25 | (lambda (x) 26 | (replace-regexp-in-string "[[:blank:]]*$" "" 27 | (replace-regexp-in-string "^[[:blank:]]*" "" x))) x)) 28 | (mapcar '(lambda (x) (split-string x "=")) 29 | (split-string text ","))) 30 | indent))) 31 | (if (string= args "") 32 | (make-string 3 34) 33 | (mapconcat 34 | 'identity 35 | (list "" "Arguments:" args (make-string 3 34)) 36 | indent))) 37 | } 38 | ${4:$ 39 | (let* ((indent (concat "\n" (make-string (current-column) 32))) 40 | (self-vars (mapconcat 41 | '(lambda (x) 42 | (if (not (string= (nth 0 x) "")) 43 | (concat "self._" (nth 0 x) " = " (nth 0 x)))) 44 | (mapcar 45 | '(lambda (x) 46 | (mapcar 47 | '(lambda (x) 48 | (replace-regexp-in-string "[[:blank:]]*$" "" 49 | (replace-regexp-in-string "^[[:blank:]]*" "" x))) 50 | x)) 51 | (mapcar '(lambda (x) (split-string x "=")) 52 | (split-string text ","))) 53 | (concat indent)))) 54 | (if (string= self-vars "") 55 | indent 56 | self-vars)) 57 | } 58 | $0 59 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/python-mode/def: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # name: def 3 | # contributor: Orestis Markou 4 | # contributor: Yasser González Fernández 5 | # -- 6 | def ${1:name}($2): 7 | """$3 8 | ${2:$ 9 | (let* ((indent 10 | (concat "\n" (make-string (current-column) 32))) 11 | (args 12 | (mapconcat 13 | '(lambda (x) 14 | (if (not (string= (nth 0 x) "")) 15 | (concat "- " (char-to-string 96) (nth 0 x) 16 | (char-to-string 96) ":"))) 17 | (mapcar 18 | '(lambda (x) 19 | (mapcar 20 | '(lambda (x) 21 | (replace-regexp-in-string "[[:blank:]]*$" "" 22 | (replace-regexp-in-string "^[[:blank:]]*" "" x))) 23 | x)) 24 | (mapcar '(lambda (x) (split-string x "=")) 25 | (split-string text ","))) 26 | indent))) 27 | (if (string= args "") 28 | (make-string 3 34) 29 | (mapconcat 30 | 'identity 31 | (list "" "Arguments:" args (make-string 3 34)) 32 | indent))) 33 | } 34 | $0 35 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/python-mode/defm: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # name: defm 3 | # contributor: Yasser Gonz¨¢lez Fern¨¢ndez 4 | # -- 5 | def ${1:name}(self, $2): 6 | """$3 7 | ${2:$ 8 | (let* ((indent 9 | (concat "\n" (make-string (current-column) 32))) 10 | (args 11 | (mapconcat 12 | '(lambda (x) 13 | (if (not (string= (nth 0 x) "")) 14 | (concat "- " (char-to-string 96) (nth 0 x) 15 | (char-to-string 96) ":"))) 16 | (mapcar 17 | '(lambda (x) 18 | (mapcar 19 | '(lambda (x) 20 | (replace-regexp-in-string "[[:blank:]]*$" "" 21 | (replace-regexp-in-string "^[[:blank:]]*" "" x))) 22 | x)) 23 | (mapcar '(lambda (x) (split-string x "=")) 24 | (split-string text ","))) 25 | indent))) 26 | (if (string= args "") 27 | (make-string 3 34) 28 | (mapconcat 29 | 'identity 30 | (list "" "Arguments:" args (make-string 3 34)) 31 | indent))) 32 | } 33 | $0 34 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/python-mode/for: -------------------------------------------------------------------------------- 1 | #name : for ... in ... : ... 2 | # -- 3 | for ${var} in ${collection}: 4 | $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/python-mode/ifmain: -------------------------------------------------------------------------------- 1 | #name : if __name__ == '__main__': ... 2 | # -- 3 | if __name__ == '__main__': 4 | $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/python-mode/propg: -------------------------------------------------------------------------------- 1 | #contributor : Julio Carlos Menendez 2 | #name : _get_foo ... foo=property(...) 3 | # -- 4 | def _get_${1:foo}(self): 5 | return self._$1 6 | 7 | $1 = property(_get_$1) 8 | 9 | $0 10 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/python-mode/propsg: -------------------------------------------------------------------------------- 1 | #contributor : Julio Carlos Menendez 2 | #name : _get_foo ... _set_foo ... foo=property(...) 3 | # -- 4 | def _set_${1:foo}(self, value): 5 | self._$1 = value 6 | 7 | def _get_$1(self): 8 | return self._$1 9 | 10 | $1 = property(_get_$1, _set_$1) 11 | 12 | $0 13 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/python-mode/while: -------------------------------------------------------------------------------- 1 | #name : while ... : ... 2 | # -- 3 | while ${condition}: 4 | $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/rst-mode/chap: -------------------------------------------------------------------------------- 1 | #name : Chapter title 2 | # -- 3 | ${1:Chapter} 4 | ${1:$(make-string (string-width text) ?\=)} 5 | 6 | $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/rst-mode/sec: -------------------------------------------------------------------------------- 1 | #name : Section title 2 | # -- 3 | ${1:Section} 4 | ${1:$(make-string (string-width text) ?\-)} 5 | 6 | $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/rst-mode/tit: -------------------------------------------------------------------------------- 1 | #name : Document title 2 | # -- 3 | ${1:$(make-string (string-width text) ?\=)} 4 | ${1:Title} 5 | ${1:$(make-string (string-width text) ?\=)} 6 | 7 | $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/=b: -------------------------------------------------------------------------------- 1 | #name : =begin rdoc ... =end 2 | #group : general 3 | # -- 4 | =begin rdoc 5 | $0 6 | =end -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/Comp: -------------------------------------------------------------------------------- 1 | #name : include Comparable; def <=> ... end 2 | #group : definitions 3 | # -- 4 | include Comparable 5 | 6 | def <=> other 7 | $0 8 | end -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/all: -------------------------------------------------------------------------------- 1 | #name : all? { |...| ... } 2 | #group : collections 3 | # -- 4 | all? { |${e}| $0 } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/am: -------------------------------------------------------------------------------- 1 | #name : alias_method new, old 2 | #group : definitions 3 | # -- 4 | alias_method :${new_name}, :${old_name} -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/any: -------------------------------------------------------------------------------- 1 | #name : any? { |...| ... } 2 | #group : collections 3 | # -- 4 | any? { |${e}| $0 } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/app: -------------------------------------------------------------------------------- 1 | #name : if __FILE__ == $PROGRAM_NAME ... end 2 | #group : general 3 | # -- 4 | if __FILE__ == $PROGRAM_NAME 5 | $0 6 | end -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/bm: -------------------------------------------------------------------------------- 1 | #name : Benchmark.bmbm(...) do ... end 2 | #group : general 3 | # -- 4 | Benchmark.bmbm(${1:10}) do |x| 5 | $0 6 | end -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/case: -------------------------------------------------------------------------------- 1 | #name : case ... end 2 | #group : general 3 | # -- 4 | case ${1:object} 5 | when ${2:condition} 6 | $0 7 | end -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/cla: -------------------------------------------------------------------------------- 1 | #name : class << self ... end 2 | #group : definitions 3 | # -- 4 | class << ${self} 5 | $0 6 | end -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/classify: -------------------------------------------------------------------------------- 1 | #name : classify { |...| ... } 2 | #group : collections 3 | # -- 4 | classify { |${e}| $0 } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/cls: -------------------------------------------------------------------------------- 1 | #name : class ... end 2 | #contributor : hitesh 3 | #group : definitions 4 | # -- 5 | class ${1:$ 6 | (let ((fn (capitalize (file-name-nondirectory 7 | (file-name-sans-extension 8 | (buffer-file-name)))))) 9 | (cond 10 | ((string-match "_" fn) (replace-match "" nil nil fn)) 11 | (t fn)))} 12 | $0 13 | end 14 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/collect: -------------------------------------------------------------------------------- 1 | #name : collect { |...| ... } 2 | #group : collections 3 | # -- 4 | collect { |${e}| $0 } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/dee: -------------------------------------------------------------------------------- 1 | #name : deep_copy(...) 2 | #group : general 3 | # -- 4 | Marshal.load(Marshal.dump($0)) -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/deli: -------------------------------------------------------------------------------- 1 | #name : delete_if { |...| ... } 2 | #group : collections 3 | # -- 4 | delete_if { |${e} $0 } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/det: -------------------------------------------------------------------------------- 1 | #name : detect { |...| ... } 2 | #group : collections 3 | # -- 4 | detect { |${e}| $0 } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/dow: -------------------------------------------------------------------------------- 1 | #name : downto(...) { |n| ... } 2 | #group : control structure 3 | # -- 4 | downto(${0}) { |${n}| 5 | $0 6 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/ea: -------------------------------------------------------------------------------- 1 | #name : each { |...| ... } 2 | #group : collections 3 | # -- 4 | each { |${e}| $0 } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/eac: -------------------------------------------------------------------------------- 1 | #name : each_cons(...) { |...| ... } 2 | #group : collections 3 | # -- 4 | each_cons(${1:2}) { |${group}| $0 } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/eai: -------------------------------------------------------------------------------- 1 | #name : each_index { |i| ... } 2 | #group : collections 3 | # -- 4 | each_index { |${i}| $0 } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/eav: -------------------------------------------------------------------------------- 1 | #name : each_value { |val| ... } 2 | #group : collections 3 | # -- 4 | each_value { |${val}| $0 } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/eawi: -------------------------------------------------------------------------------- 1 | #name : each_with_index { |e, i| ... } 2 | #group : collections 3 | # -- 4 | each_with_index { |${e}, ${i}| $0 } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/forin: -------------------------------------------------------------------------------- 1 | #name : for ... in ...; ... end 2 | #group : control structure 3 | # -- 4 | for ${1:element} in ${2:collection} 5 | $0 6 | end -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/if: -------------------------------------------------------------------------------- 1 | #name : if ... end 2 | #group : control structure 3 | # -- 4 | if ${1:condition} 5 | $0 6 | end -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/ife: -------------------------------------------------------------------------------- 1 | #name : if ... else ... end 2 | #group : control structure 3 | # -- 4 | if ${1:condition} 5 | $2 6 | else 7 | $3 8 | end -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/inject: -------------------------------------------------------------------------------- 1 | #name : inject(...) { |...| ... } 2 | #group : collections 3 | # -- 4 | inject(${1:0}) { |${2:injection}, ${3:element}| $0 } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/mm: -------------------------------------------------------------------------------- 1 | #name : def method_missing ... end 2 | #group : definitions 3 | # -- 4 | def method_missing(method, *args) 5 | $0 6 | end -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/r: -------------------------------------------------------------------------------- 1 | #name : attr_reader ... 2 | #group : definitions 3 | # -- 4 | attr_reader : -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/rb: -------------------------------------------------------------------------------- 1 | #name : /usr/bin/ruby -wKU 2 | #group : general 3 | # -- 4 | #!/usr/bin/ruby -wKU 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/reject: -------------------------------------------------------------------------------- 1 | #name : reject { |...| ... } 2 | #group : collections 3 | # -- 4 | reject { |${1:element}| $0 } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/req: -------------------------------------------------------------------------------- 1 | #name : require "..." 2 | #group : general 3 | # -- 4 | require "$0" -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/rreq: -------------------------------------------------------------------------------- 1 | #name : require File.join(File.dirname(__FILE__), ...) 2 | #group : general 3 | # -- 4 | require File.join(File.dirname(__FILE__), $0) -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/rw: -------------------------------------------------------------------------------- 1 | #name : attr_accessor ... 2 | #group : definitions 3 | # -- 4 | attr_accessor : -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/select: -------------------------------------------------------------------------------- 1 | #name : select { |...| ... } 2 | #group : collections 3 | # -- 4 | select { |${1:element}| $0 } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/tim: -------------------------------------------------------------------------------- 1 | #name : times { |n| ... } 2 | #group : control structure 3 | # -- 4 | times { |${n}| $0 } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/until: -------------------------------------------------------------------------------- 1 | #name : until ... end 2 | #group: control structure 3 | # -- 4 | until ${condition} 5 | $0 6 | end -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/upt: -------------------------------------------------------------------------------- 1 | #name : upto(...) { |n| ... } 2 | #group : control structure 3 | # -- 4 | upto(${n}) { |${i}| 5 | $0 6 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/w: -------------------------------------------------------------------------------- 1 | #name : attr_writer ... 2 | #group : definitions 3 | # -- 4 | attr_writer : -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/when: -------------------------------------------------------------------------------- 1 | #name : when ... end 2 | #group : control structure 3 | # -- 4 | when ${condition} 5 | $0 6 | end -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/while: -------------------------------------------------------------------------------- 1 | #name : while ... end 2 | #group : control structure 3 | # -- 4 | while ${condition} 5 | $0 6 | end -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/y: -------------------------------------------------------------------------------- 1 | #name : :yields: arguments (rdoc) 2 | #group : general 3 | # -- 4 | :yields: $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/ruby-mode/zip: -------------------------------------------------------------------------------- 1 | #name : zip(...) { |...| ... } 2 | #group : collections 3 | # -- 4 | zip(${enums}) { |${row}| $0 } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/act: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : def act = { ..} 3 | # -- 4 | def act = { 5 | loop { 6 | react { 7 | $0 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/act.arg: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : def act(arg: T) = { ..} 3 | # -- 4 | def act(${1:arg}: ${2:type}) = { 5 | loop { 6 | react { 7 | $0 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/actor: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : val a = actor { ..} 3 | # -- 4 | val a = actor { 5 | loop { 6 | react { 7 | $0 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/ano: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : (args) => ... 3 | # -- 4 | ($1) => ${2:body} $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/app: -------------------------------------------------------------------------------- 1 | #Author : Anders Bach Nielsen 2 | #name : object name extends Application 3 | # -- 4 | object ${1:name} extends Application { 5 | $0 6 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/arr.new: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : Array[T](..) 3 | # -- 4 | Array[${1:value}](${2:args}) $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/arr.val-new: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : val a = Array[T](..) 3 | # -- 4 | val ${1:arr} = Array[${2:value}](${3:args}) $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/asof: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : asInstanceOf[T] 3 | # -- 4 | asInstanceOf[${1:type}] $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/ass: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : assert(x === y) 3 | # -- 4 | assert(${1:x} === ${2:y}) $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/ass.true: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : assert(true) 3 | # -- 4 | assert(true) $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/at.author: -------------------------------------------------------------------------------- 1 | #Author : Anders Bach Nielsen 2 | #name : @author name 3 | # -- 4 | @author ${1:name} $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/at.param: -------------------------------------------------------------------------------- 1 | #Author : Anders Bach Nielsen 2 | #name : @param name description 3 | # -- 4 | @param ${1:name} ${2:description} $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/at.return: -------------------------------------------------------------------------------- 1 | #Author : Anders Bach Nielsen 2 | #name : @return description 3 | # -- 4 | @return ${1:description} $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/at.version: -------------------------------------------------------------------------------- 1 | #Author : Anders Bach Nielsen 2 | #name : @version number 3 | # -- 4 | @version ${1:0.1} $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/bang: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : actor ! message 3 | # -- 4 | ${1:actor} ! ${2:message} $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/case: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : case pattern => 3 | # -- 4 | case ${1:pattern} => $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/case.match-all: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : case _ => 3 | # -- 4 | case _ => $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/cast: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : asInstanceOf[T] 3 | # -- 4 | asInstanceOf[${1:type}] $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/cc: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : case class T(arg: A) 3 | # -- 4 | case class ${1:name}(${2:arg}: ${3:type}) $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/cl: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : class T { .. } 3 | # -- 4 | class ${1:name} { 5 | $0 6 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/cl.abs: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : abstract class T { .. } 3 | # -- 4 | abstract class ${1:name} { 5 | $0 6 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/cl.abs-arg: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : abstract class T(args) { .. } 3 | # -- 4 | abstract class ${1:name}(${2:args}) { 5 | $0 6 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/cl.arg: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : class T(args) { .. } 3 | # -- 4 | class ${1:name}(${2:args}) { 5 | $0 6 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/clof: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : classOf[T] 3 | # -- 4 | classOf[${1:type}] $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/co: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : case object T 3 | # -- 4 | case object ${1:name} $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/cons: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : element1 :: element2 3 | # -- 4 | ${1:element1} :: ${2:element2} $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/cons.nil: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : element1 :: Nil 3 | # -- 4 | ${1:element1} :: Nil $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/def.arg: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : def f(arg: T) = ... 3 | # -- 4 | def ${1:name}(${2:args}) = $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/def.arg-body: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : def f(arg: T) = {...} 3 | # -- 4 | def ${1:name}(${2:args}) = { 5 | $0 6 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/def.arg-ret: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : def f(arg: T): R = ... 3 | # -- 4 | def ${1:name}(${2:args}): ${3:Unit} = $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/def.arg-ret-body: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : def f(arg: T): R = {...} 3 | # -- 4 | def ${1:name}(${2:args}): ${3:Unit} = { 5 | $0 6 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/def.body: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : def f = {...} 3 | # -- 4 | def ${1:name} = { 5 | $0 6 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/def.ret: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : def f: R = ... 3 | # -- 4 | def ${1:name}: ${2:Unit} = $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/def.ret-body: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : def f: R = {...} 3 | # -- 4 | def ${1:name}: ${3:Unit} = { 5 | $0 6 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/def.simple: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : def f = ... 3 | # -- 4 | def ${1:name} = $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/doc.class: -------------------------------------------------------------------------------- 1 | #Author : Anders Bach Nielsen 2 | #name : /** cls/trt/obj name */ 3 | # -- 4 | /** 5 | * `(scala-mode-find-clstrtobj-name-doc)` 6 | * ${1:description} 7 | * $0 8 | */ -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/doc.def: -------------------------------------------------------------------------------- 1 | #Author : Anders Bach Nielsen 2 | #name : /** method name */ 3 | # -- 4 | /** 5 | * `(scala-mode-def-and-args-doc)` 6 | */ -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/doc.file: -------------------------------------------------------------------------------- 1 | #Author : Anders Bach Nielsen 2 | #name : /** file name */ 3 | # -- 4 | /** 5 | * `(scala-mode-file-doc)` 6 | * $0 7 | * @author ${1:name} 8 | * @version ${2:0.1} 9 | */ -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/doc.file-scala: -------------------------------------------------------------------------------- 1 | #Author : Anders Bach Nielsen 2 | #name : /** scala file */ 3 | # -- 4 | /* __ *\ 5 | ** ________ ___ / / ___ Scala $3 ** 6 | ** / __/ __// _ | / / / _ | (c) 2005-`(format-time-string "%Y")` , LAMP/EPFL ** 7 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 8 | ** /____/\___/_/ |_/____/_/ | | ** 9 | ** |/ ** 10 | \* */ 11 | /** 12 | * $0 13 | * @author ${1:name} 14 | * @version ${2:0.1} 15 | * $Id$ 16 | */ -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/doc.file-scala-api: -------------------------------------------------------------------------------- 1 | #Author : Anders Bach Nielsen 2 | #name : /** scala api file */ 3 | # -- 4 | /* __ *\ 5 | ** ________ ___ / / ___ Scala API ** 6 | ** / __/ __// _ | / / / _ | (c) 2005-`(format-time-string "%Y")`, LAMP/EPFL ** 7 | ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** 8 | ** /____/\___/_/ |_/____/_/ | | ** 9 | ** |/ ** 10 | \* */ 11 | /** 12 | * $0 13 | * @author ${1:name} 14 | * @version ${2:0.1} 15 | * $Id$ 16 | */ -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/doc.scaladoc: -------------------------------------------------------------------------------- 1 | #Author : Anders Bach Nielsen 2 | #name : /** ... */ 3 | # -- 4 | /** 5 | * ${1:description} 6 | * $0 7 | */ -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/expect: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : expect(value) { ..} 3 | # -- 4 | expect(${1:reply}) { 5 | $0 6 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/ext: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : extends T 3 | # -- 4 | extends $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/for.extract: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : x <- xs 3 | # -- 4 | ${1:x} <- ${2:xs} -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/for.if: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : for (x <- xs if guard) { ... } 3 | # -- 4 | for (${1:x} <- ${2:xs} if ${3:guard}) { 5 | $0 6 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/for.loop: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : for (x <- xs) { ... } 3 | # -- 4 | for (${1:x} <- ${2:xs}) { 5 | $0 6 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/for.multi: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : for {x <- xs \ y <- ys} { yield } 3 | # -- 4 | for { 5 | ${1:x} <- ${2:xs} 6 | ${3:x} <- ${4:xs} 7 | } { 8 | yield $0 9 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/foreach: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : foreach(x => ..) 3 | # -- 4 | foreach(${1:x} => ${2:body}) $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/hmap.new: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : new HashMap[K, V] 3 | # -- 4 | new HashMap[${1:key}, ${2:value}] $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/hmap.val-new: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : val m = new HashMap[K, V] 3 | # -- 4 | val ${1:m} = new HashMap[${2:key}, ${3:value}] $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/hset.new: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : new HashSet[K] 3 | # -- 4 | new HashSet[${1:key}] $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/hset.val-new: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : val m = new HashSet[K] 3 | # -- 4 | val ${1:m} = new HashSet[${2:key}] $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/if: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : if (cond) { .. } 3 | # -- 4 | if (${1:condition}) { 5 | $0 6 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/if.else: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : if (cond) { .. } else { .. } 3 | # -- 4 | if (${1:condition}) { 5 | $2 6 | } else { 7 | $0 8 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/imp: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : import .. 3 | # -- 4 | import $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/intercept: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : intercept(classOf[T]) { ..} 3 | # -- 4 | intercept(classOf[${1:Exception]}) { 5 | $0 6 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/isof: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : isInstanceOf[T] 3 | # -- 4 | isInstanceOf[${1:type}] $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/ls.new: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : List(..) 3 | # -- 4 | List(${1:args}, ${2:args}) $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/ls.val-new: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : val l = List(..) 3 | # -- 4 | val ${1:l} = List(${2:args}, ${3:args}) $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/main: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name: def main(args: Array[String]) = { ... } 3 | # -- 4 | def main(args: Array[String]) = { 5 | $0 6 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/map: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : map(x => ..) 3 | # -- 4 | map(${1:x} => ${2:body}) $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/map.new: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : Map(key -> value) 3 | # -- 4 | Map(${1:key} -> ${2:value}) $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/match: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : cc match { .. } 3 | # -- 4 | ${1:cc} match { 5 | case ${2:pattern} => $0 6 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/match.can: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : can match { case Full(res) => .. } 3 | # -- 4 | ${1:option} match { 5 | case Full(res) => $0 6 | 7 | case Empty => 8 | 9 | case Failure(msg, _, _) => 10 | 11 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/match.option: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : option match { case None => .. } 3 | # -- 4 | ${1:option} match { 5 | case None => $0 6 | case Some(res) => 7 | 8 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/mix: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : trait T { .. } 3 | # -- 4 | trait ${1:name} { 5 | $0 6 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/ob: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : object name extends T 3 | # -- 4 | object ${1:name} extends ${2:type} $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/pac: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : package .. 3 | # -- 4 | package $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/pr.newline: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : println(..) 3 | # -- 4 | println(${1:obj}) $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/pr.simple: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : print(..) 3 | # -- 4 | print(${1:obj}) $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/pr.string: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : println("..") 3 | # -- 4 | println("${1:msg}") $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/pr.trace: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : println("obj: " + obj) 3 | # -- 4 | println("${1:obj}: " + ${1:obj}) $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/pri: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : private 3 | # -- 4 | private $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/pri.param: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : private[this] 3 | # -- 4 | private[${1:this}] $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/pro: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : protected 3 | # -- 4 | protected $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/pro.param: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : protected[this] 3 | # -- 4 | protected[${1:this}] $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/suite: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : class T extends Suite { .. } 3 | # -- 4 | import org.scalatest._ 5 | 6 | class ${1:name} extends Suite { 7 | $0 8 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/test: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : @Test def testX = ... 3 | # -- 4 | //@Test 5 | def test${1:name} = { 6 | $0 7 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/throw: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : throw new Exception 3 | # -- 4 | throw new ${1:Exception}(${2:msg}) $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/tr: -------------------------------------------------------------------------------- 1 | #Author : Anders Bach Nielsen 2 | #name : trait T { .. } 3 | # -- 4 | trait ${1:name} { 5 | $0 6 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/tr.ext: -------------------------------------------------------------------------------- 1 | #Author : Anders Bach Nielsen 2 | #name : trait T extends C { .. } 3 | # -- 4 | trait ${1:name} extends ${2:class} { 5 | $0 6 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/tr.ext-with: -------------------------------------------------------------------------------- 1 | #Author : Anders Bach Nielsen 2 | #name : trait T1 extends C with T2 { .. } 3 | # -- 4 | trait ${1:name} extends ${2:class} with ${3:trait} { 5 | $0 6 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/tr.with: -------------------------------------------------------------------------------- 1 | #Author : Anders Bach Nielsen 2 | #name : trait T1 with T2 { .. } 3 | # -- 4 | trait ${1:name} with ${2:trait} { 5 | $0 6 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/try: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : try { .. } catch { case e => ..} 3 | # -- 4 | try { 5 | $0 6 | } catch { 7 | case ${1:e}: ${2:Exception} => 8 | ${1:println(\"ERROR: \" + e) // TODO: handle exception}\n} 9 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/try.catch-finally: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : try { .. } catch { case e => ..} finally { ..} 3 | # -- 4 | try { 5 | $0 6 | } catch { 7 | case ${1:e}: ${2:Exception} => 8 | ${1:println(\"ERROR: \" + e) // TODO: handle exception}\n} 9 | } finally { 10 | 11 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/try.finally: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : try { .. } finally { .. } 3 | # -- 4 | try { 5 | 6 | } finally { 7 | $0 8 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/tup.arrow: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : element1 -> element2 3 | # -- 4 | ${1:element1} -> ${2:element2} $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/tup.paren: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : (element1, element2) 3 | # -- 4 | (${1:element1}, ${2:element2}) $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/val: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : val name = .. 3 | # -- 4 | val ${1:name} = ${2:obj} $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/val.new: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : val name = new .. 3 | # -- 4 | val ${1:name} = new ${2:obj} $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/val.ret: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : val name: T = .. 3 | # -- 4 | val ${1:name}: ${2:T} = ${3:obj} $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/var: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : var name = .. 3 | # -- 4 | var ${1:name} = ${2:obj} $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/var.new: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : var name = new .. 3 | # -- 4 | var ${1:name} = new ${2:obj} $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/var.ret: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : var name: T = .. 3 | # -- 4 | var ${1:name}: ${2:T} = ${3:obj} $0 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/whi: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : while(cond) { .. } 3 | # -- 4 | while (${1:condition}) { 5 | $0 6 | } -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/scala-mode/with: -------------------------------------------------------------------------------- 1 | #Author : Jonas Bonèr 2 | #name : with T 3 | # -- 4 | with $0 -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/sql-mode/column: -------------------------------------------------------------------------------- 1 | #contributor : Alejandro Espinoza Esparza 2 | #name : , ColumnName ColumnType NOT NULL... 3 | # -- 4 | , ${1:Name} ${2:Type} ${3:NOT NULL} 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/sql-mode/constraint: -------------------------------------------------------------------------------- 1 | #contributor : Alejandro Espinoza Esparza 2 | #name : CONSTRAINT [..] PRIMARY KEY ... 3 | # -- 4 | CONSTRAINT [${1:PK_Name}] PRIMARY KEY ${2:CLUSTERED} ([${3:ColumnName}]) 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/sql-mode/constraint.1: -------------------------------------------------------------------------------- 1 | #contributor : Alejandro Espinoza Esparza 2 | #name : CONSTRAINT [..] FOREIGN KEY ... 3 | # -- 4 | CONSTRAINT [${1:FK_Name}] FOREIGN KEY ${2:CLUSTERED} ([${3:ColumnName}]) 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/sql-mode/create: -------------------------------------------------------------------------------- 1 | #contributor : Alejandro Espinoza Esparza 2 | #name : create table ... 3 | # -- 4 | CREATE TABLE [${1:dbo}].[${2:TableName}] 5 | ( 6 | ${3:Id} ${4:INT IDENTITY(1,1)} ${5:NOT NULL} 7 | $0 8 | CONSTRAINT [${6:PK_}] PRIMARY KEY ${7:CLUSTERED} ([$3]) 9 | ) 10 | GO 11 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/sql-mode/create.1: -------------------------------------------------------------------------------- 1 | #contributor : Alejandro Espinoza Esparza 2 | #name : create procedure ... 3 | # -- 4 | CREATE PROCEDURE [${1:dbo}].[${2:Name}] 5 | ( 6 | $3 $4 = ${5:NULL} ${6:OUTPUT} 7 | ) 8 | AS 9 | BEGIN 10 | $0 11 | END 12 | GO 13 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/sql-mode/references: -------------------------------------------------------------------------------- 1 | #contributor : Alejandro Espinoza Esparza 2 | #name : REFERENCES ... 3 | # -- 4 | REFERENCES ${1:TableName}([${2:ColumnName}]) 5 | -------------------------------------------------------------------------------- /.elisp/snippets/text-mode/time: -------------------------------------------------------------------------------- 1 | #name : (current time) 2 | # -- 3 | `(current-time-string)` -------------------------------------------------------------------------------- /.elisp/tuareg/HISTORY: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuroyoro/dotfiles/36300dc61ac40aa05e7b30469970629075fc0178/.elisp/tuareg/HISTORY -------------------------------------------------------------------------------- /.elisp/tuareg/LISEZMOI: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuroyoro/dotfiles/36300dc61ac40aa05e7b30469970629075fc0178/.elisp/tuareg/LISEZMOI -------------------------------------------------------------------------------- /.elisp/tuareg/README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuroyoro/dotfiles/36300dc61ac40aa05e7b30469970629075fc0178/.elisp/tuareg/README -------------------------------------------------------------------------------- /.elisp/tuareg/append-tuareg.el: -------------------------------------------------------------------------------- 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2 | ;; append-tuareg.el - Tuareg quick installation: Append this file to .emacs. 3 | 4 | (setq auto-mode-alist (cons '("\\.ml\\w?" . tuareg-mode) auto-mode-alist)) 5 | (autoload 'tuareg-mode "tuareg" "Major mode for editing Caml code" t) 6 | (autoload 'camldebug "camldebug" "Run the Caml debugger" t) 7 | 8 | (if (and (boundp 'window-system) window-system) 9 | (when (string-match "XEmacs" emacs-version) 10 | (if (not (and (boundp 'mule-x-win-initted) mule-x-win-initted)) 11 | (require 'sym-lock)) 12 | (require 'font-lock))) 13 | -------------------------------------------------------------------------------- /.elisp/tuareg/custom-tuareg.el: -------------------------------------------------------------------------------- 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2 | ;; custom-tuareg.el - Tuareg customization example: Append this file to .emacs. 3 | 4 | ;; Here is an example of Tuareg variables customization: 5 | 6 | (add-hook 'tuareg-mode-hook 7 | '(lambda () 8 | (setq tuareg-lazy-= t) 9 | ; indent `=' like a standard keyword 10 | (setq tuareg-lazy-paren t) 11 | ; indent [({ like standard keywords 12 | (setq tuareg-in-indent 0) 13 | ; no indentation after `in' keywords 14 | (auto-fill-mode 1) 15 | ; turn on auto-fill minor mode 16 | (if (featurep 'sym-lock) ; Sym-Lock customization only 17 | (setq sym-lock-mouse-face-enabled nil)) 18 | ; turn off special face under mouse 19 | )) 20 | 21 | ;; If you use Sym-Lock, you could also add some customization code after the 22 | ;; `(require 'sym-lock)' in your `.emacs' 23 | 24 | (if (featurep 'sym-lock) 25 | (setq tuareg-sym-lock-keywords 26 | '(("<-" 0 1 172 nil) ("->" 0 1 174 nil) 27 | ;; (":=" 0 1 220 nil) 28 | ("<=" 0 1 163 nil) (">=" 0 1 179 nil) 29 | ("<>" 0 1 185 nil) ("==" 0 1 186 nil) 30 | ("||" 0 1 218 nil) ("&&" 0 1 217 nil) 31 | ("[^*]\\(\\*\\ nil)\\." 1 8 180 nil) 32 | ("\\(/\\ nil)\\." 1 3 184 nil) 33 | ;; (":>" 0 1 202 nil) 34 | ;; (";;" 0 1 191 nil) 35 | ("\\<_\\>" 0 3 188 nil) ("\\" 0 3 214 nil) 36 | ("\\" 0 3 198 nil) ("\\" 0 3 108 nil) 37 | ("\\" 0 3 218 nil) ("\\" 0 3 216 nil)))) 38 | -------------------------------------------------------------------------------- /.elisp/tuareg/sym-lock.el: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuroyoro/dotfiles/36300dc61ac40aa05e7b30469970629075fc0178/.elisp/tuareg/sym-lock.el -------------------------------------------------------------------------------- /.elisp/tuareg/tuareg.el: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuroyoro/dotfiles/36300dc61ac40aa05e7b30469970629075fc0178/.elisp/tuareg/tuareg.el -------------------------------------------------------------------------------- /.elisp/xcscope.el: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuroyoro/dotfiles/36300dc61ac40aa05e7b30469970629075fc0178/.elisp/xcscope.el -------------------------------------------------------------------------------- /.gdbinit: -------------------------------------------------------------------------------- 1 | set print pretty on 2 | set startup-with-shell off 3 | -------------------------------------------------------------------------------- /.gemrc: -------------------------------------------------------------------------------- 1 | --- 2 | :benchmark: false 3 | gem: --no-rdoc --no-ri 4 | :verbose: true 5 | :sources: 6 | - http://gems.github.com 7 | - http://gems.rubyforge.org 8 | - http://rubygems.org/ 9 | :bulk_threshold: 1000 10 | :backtrace: false 11 | :update_sources: true 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | \#*# 3 | *# 4 | .#* 5 | .*~ 6 | *~ 7 | .DS_Store 8 | *.sw[po] 9 | tags 10 | TAGS 11 | Session.vim 12 | .svn 13 | *.dSYM 14 | *.log 15 | *.dvi 16 | *.aux 17 | *.elc 18 | .zshrc.local 19 | 20 | .vim/bundle/ 21 | .vim/.netrwhist 22 | .vimrc_sample 23 | 24 | -------------------------------------------------------------------------------- /.inputrc: -------------------------------------------------------------------------------- 1 | # viキーバインド 2 | set editing-mode vi 3 | set keymap vi-insert 4 | 5 | # チルダをタブにより展開 6 | set expand-tilde on 7 | 8 | # 日本語関係 9 | set input-meta on 10 | set convert-meta off 11 | set output-meta on 12 | 13 | # タブ補完時、大文字小文字無視 14 | set completion-ignore-case on 15 | 16 | # コンソールの横幅をあふれたとき自動スクロール 17 | set horizontal-scroll-mode on 18 | 19 | # ヒストリー補完機能を Ctrl+N, Ctrl+P に割り当てる 20 | "\C-p": history-search-backward 21 | "\C-n": history-search-forward 22 | 23 | $if Python 24 | "\M-i": " " 25 | "\M-u": "\d\d\d\d" 26 | $endif 27 | -------------------------------------------------------------------------------- /.irbrc: -------------------------------------------------------------------------------- 1 | # load libraries 2 | require 'irb/completion' 3 | require 'rubygems' 4 | require 'wirble' 5 | require 'pp' 6 | require 'readline' 7 | Readline.vi_editing_mode 8 | IRB.conf[:SAVE_HISTORY] = 50000 9 | IRB.conf[:AUTO_INDENT] = true 10 | IRB.conf[:USE_READLINE] = true 11 | 12 | # start wirble (with color) 13 | Wirble.init 14 | Wirble.colorize 15 | -------------------------------------------------------------------------------- /.percol.d/rc.py: -------------------------------------------------------------------------------- 1 | 2 | # prompt 3 | percol.view.PROMPT = ur"ʕ(# ゚皿゚ )/ %q" 4 | 5 | # Emacs like 6 | percol.import_keymap({ 7 | "C-a" : lambda percol: percol.command.beginning_of_line(), 8 | "C-e" : lambda percol: percol.command.end_of_line(), 9 | "C-b" : lambda percol: percol.command.backward_char(), 10 | "C-f" : lambda percol: percol.command.forward_char(), 11 | "C-d" : lambda percol: percol.command.delete_forward_char(), 12 | "C-h" : lambda percol: percol.command.delete_backward_char(), 13 | #"C-k" : lambda percol: percol.command.kill_end_of_line(), 14 | "C-y" : lambda percol: percol.command.yank(), 15 | "C-n" : lambda percol: percol.command.select_next(), 16 | "C-p" : lambda percol: percol.command.select_previous(), 17 | "C-j" : lambda percol: percol.finish(), 18 | "C-k" : lambda percol: percol.command.select_previous(), 19 | "C-v" : lambda percol: percol.command.select_next_page(), 20 | "M-v" : lambda percol: percol.command.select_previous_page(), 21 | "M-<" : lambda percol: percol.command.select_top(), 22 | "M->" : lambda percol: percol.command.select_bottom(), 23 | "C-m" : lambda percol: percol.finish(), 24 | "C-g" : lambda percol: percol.cancel(), 25 | "C-s" : lambda percol: percol.command.toggle_mark_and_next(), 26 | "C-u" : lambda percol: percol.command.unmark_all(), 27 | "M-c" : lambda percol: percol.command.toggle_case_sensitive(), 28 | "M-m" : lambda percol: percol.command.toggle_finder(FinderMultiQueryMigemo), 29 | "M-r" : lambda percol: percol.command.toggle_finder(FinderMultiQueryRegex) 30 | }) 31 | -------------------------------------------------------------------------------- /.pryrc: -------------------------------------------------------------------------------- 1 | begin 2 | require 'awesome_print' 3 | Pry.config.print = proc { |output, value| output.puts value.ai } 4 | rescue LoadError => err 5 | puts "no awesome_print :(" 6 | end 7 | 8 | begin 9 | require 'hirb' 10 | rescue LoadError 11 | # Missing goodies, bummer 12 | puts "no hirb :(" 13 | end 14 | 15 | if defined? Hirb 16 | # Slightly dirty hack to fully support in-session Hirb.disable/enable toggling 17 | Hirb::View.instance_eval do 18 | def enable_output_method 19 | @output_method = true 20 | @old_print = Pry.config.print 21 | Pry.config.print = proc do |output, value| 22 | Hirb::View.view_or_page_output(value) || @old_print.call(output, value) 23 | end 24 | end 25 | 26 | def disable_output_method 27 | Pry.config.print = @old_print 28 | @output_method = nil 29 | end 30 | end 31 | 32 | Hirb.enable 33 | end 34 | -------------------------------------------------------------------------------- /.rdebugrc: -------------------------------------------------------------------------------- 1 | set autolist 2 | set autoeval 3 | set autoreload 4 | -------------------------------------------------------------------------------- /.sbtconfig: -------------------------------------------------------------------------------- 1 | SBT_OPTS="-XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M" 2 | 3 | -------------------------------------------------------------------------------- /.screenrc: -------------------------------------------------------------------------------- 1 | autodetach on 2 | startup_message off 3 | defscrollback 50000 4 | defmonitor on 5 | caption always "%{= wk} %-w%{=bu dr}%n %t%{-}%+w %= %{=b wk}[%0`] [%l] %{=b wk}%y/%m/%d %{=b wr}%c" 6 | backtick 0 0 0 echo ${ttyname} 7 | escape ^Tt 8 | termcapinfo xterm* ti@:te@ 9 | term xterm-256color 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.tmux.conf.osx: -------------------------------------------------------------------------------- 1 | bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy" 2 | -------------------------------------------------------------------------------- /.vim/README: -------------------------------------------------------------------------------- 1 | From Stefan Matthias Aust's website (http://www.3plus4.de/scala/): 2 | 3 | * How to use it 4 | 5 | The Vim editor (http://www.vim.org/) can be customized using the 6 | following two resources located either in your home directory or 7 | in some system-specific directory: 8 | 9 | .vimrc is the main configuration file; it should at least 10 | contain the command "syn on" to enable syntax 11 | hightlighting 12 | 13 | .vim is the Vim configuration directory; it contains scripts 14 | (http://www.vim.org/scripts/) in predefined locations. 15 | The support files for Scala are contained in the three 16 | directories "indent", "syntax" and "ftdetect"; simply 17 | copy them to your Vim configuration directory. 18 | 19 | Vim searchs for user-specific resources at the following locations: 20 | 21 | - under Linux, Solaris, etc. usually /home//.vimrc 22 | - under Mac OS X: /Users//.vimrc 23 | - under Windows: %HOMEDRIVE%%HOMEPATH%\_vimrc 24 | 25 | * Thanks 26 | 27 | scala.vim was contributed by Stefan Matthias Aust (nobody@3plus4.de) 28 | 29 | * Version 30 | 31 | $Id: README 7131 2006-04-13 09:03:01Z michelou $ 32 | -------------------------------------------------------------------------------- /.vim/dict/javascript.dict: -------------------------------------------------------------------------------- 1 | 2 | Infinity 3 | NaN 4 | false 5 | null 6 | true 7 | undefined 8 | 9 | break 10 | catch 11 | continue 12 | for 13 | function 14 | if 15 | return 16 | switch 17 | try 18 | while 19 | 20 | alert 21 | arguments 22 | document 23 | item 24 | length 25 | location 26 | prototype 27 | value 28 | window 29 | 30 | appendChild 31 | attributes 32 | childNodes 33 | cloneNode 34 | createElement 35 | firstChild 36 | getAttribute 37 | getAttributeNode 38 | getElementById 39 | getElementsByName 40 | getElementsByTagName 41 | getNamedItem 42 | hasChildNodes 43 | innerHTML 44 | insertBefore 45 | isSupported 46 | lastChild 47 | nextSibling 48 | nodeName 49 | nodeType 50 | nodeValue 51 | normalize 52 | ownerDocument 53 | parentNode 54 | previousSibling 55 | removeChild 56 | removeNamedItem 57 | replaceChild 58 | setAttribute 59 | setAttributeNode 60 | setNamedItem 61 | encodeURI 62 | encodeURIComponent 63 | decodeURI 64 | decodeURIComponent 65 | 66 | background 67 | backgroundAttachment 68 | backgroundColor 69 | backgroundImage 70 | backgroundPosition 71 | backgroundPositionX 72 | backgroundPositionY 73 | backgroundRepeat 74 | border 75 | borderColor 76 | borderStyle 77 | borderWidth 78 | clear 79 | clip 80 | color 81 | cssText 82 | cursor 83 | display 84 | filter 85 | font 86 | fontFamily 87 | fontSize 88 | fontStyle 89 | fontVariant 90 | fontWeight 91 | height 92 | left 93 | letterSpacing 94 | lineHeight 95 | listStyle 96 | listStyleImage 97 | listStylePosition 98 | listStyleType 99 | margin 100 | marginBottom 101 | marginLeft 102 | marginRight 103 | marginTop 104 | overflow 105 | paddingBottom 106 | paddingLeft 107 | paddingRight 108 | paddingTop 109 | pageBreakAfter 110 | pageBreakBefore 111 | pixelHeight 112 | pixelLeft 113 | pixelTop 114 | pixelWidth 115 | posHeight 116 | posLeft 117 | posTop 118 | posWidth 119 | position 120 | styleFloat 121 | textAlign 122 | textDecoration 123 | textDecorationBlink 124 | textDecorationLineThrough 125 | textDecorationNone 126 | textDecorationOverline 127 | textDecorationUnderline 128 | textIndent 129 | textTransform 130 | top 131 | verticalAlign 132 | visibility 133 | width 134 | zIndex 135 | 136 | Object 137 | Number 138 | String 139 | Boolean 140 | Array 141 | Math 142 | Date 143 | Function 144 | RegExp 145 | Window 146 | Navigator 147 | History 148 | Location 149 | Document 150 | Elements 151 | -------------------------------------------------------------------------------- /.vim/dict/lua.dict: -------------------------------------------------------------------------------- 1 | and 2 | appendto 3 | ascii 4 | assert 5 | call 6 | date 7 | do 8 | dofile 9 | dostring 10 | else 11 | elseif 12 | end 13 | error 14 | execute 15 | exit 16 | for 17 | format 18 | function 19 | getenv 20 | gsub 21 | if 22 | local 23 | next 24 | nextvar 25 | not 26 | or 27 | print 28 | read 29 | readfrom 30 | remove 31 | rename 32 | repeat 33 | return 34 | strfind 35 | strlen 36 | strlower 37 | strrep 38 | strsub 39 | strupper 40 | then 41 | tmpname 42 | tonumber 43 | tostring 44 | type 45 | until 46 | while 47 | write 48 | writeto 49 | -------------------------------------------------------------------------------- /.vim/dict/ocaml.dict: -------------------------------------------------------------------------------- 1 | function 2 | 3 | string_of_int 4 | int_of_string 5 | string_of_float 6 | float_of_string 7 | int_of_float 8 | float_of_int 9 | 10 | print_int 11 | print_float 12 | print_string 13 | 14 | 15 | 16 | and 17 | as 18 | asr 19 | assert 20 | begin 21 | class 22 | closed 23 | constraint 24 | do 25 | done 26 | downto 27 | else 28 | end 29 | exception 30 | external 31 | false 32 | for 33 | fun 34 | function 35 | functor 36 | if 37 | in 38 | include 39 | inherit 40 | land 41 | lazy 42 | let 43 | lor 44 | lsl 45 | lsr 46 | lxor 47 | match 48 | method 49 | mod 50 | module 51 | mutable 52 | new 53 | of 54 | open 55 | or 56 | parser 57 | private 58 | rec 59 | sig 60 | struct 61 | then 62 | to 63 | true 64 | try 65 | type 66 | val 67 | virtual 68 | when 69 | while 70 | 71 | # 72 | ! 73 | != 74 | & 75 | ( 76 | ) 77 | * 78 | *. 79 | + 80 | +. 81 | , 82 | - 83 | -. 84 | -> 85 | . 86 | .( 87 | / 88 | /. 89 | : 90 | :: 91 | := 92 | ; 93 | ;; 94 | < 95 | <. 96 | <- 97 | <= 98 | <=. 99 | <> 100 | <>. 101 | = 102 | =. 103 | == 104 | > 105 | >. 106 | >= 107 | >=. 108 | @ 109 | [ 110 | [| 111 | ] 112 | ^ 113 | _ 114 | __ 115 | { 116 | | 117 | |] 118 | } 119 | ' 120 | -------------------------------------------------------------------------------- /.vim/syntax/rspec-result.vim: -------------------------------------------------------------------------------- 1 | " .vim/syntax/rspec-result.vim 2 | " quickrun.vimでRSpecの実行結果のカラー設定をする | teranishihiroki.com : 3 | " http://teranishihiroki.com/quickrun-vim%E3%81%A7rspec%E3%81%AE%E5%AE%9F%E8%A1%8C%E7%B5%90%E6%9E%9C%E3%81%AE%E3%82%AB%E3%83%A9%E3%83%BC%E8%A8%AD%E5%AE%9A%E3%82%92%E3%81%99%E3%82%8B/ 4 | " 5 | 6 | if exists("b:current_syntax") 7 | finish 8 | endif 9 | 10 | if !exists("main_syntax") 11 | let main_syntax = 'rspec-result' 12 | endif 13 | 14 | "大文字と小文字を区別する 15 | syntax case match 16 | 17 | syntax match RSpecGreen /^[\.F]*\.[\.F]*$/ 18 | syntax match RSpecGreen /^.*, 0 failures$/ 19 | syntax match RSpecRed /F/ 20 | syntax match RSpecRed /^.*, [1-9]* failures.*$/ 21 | syntax match RSpecRed /^.*, 1 failure.*$/ 22 | syntax match RSpecRed /^ *(.*$/ 23 | syntax match RSpecRed /^ *expected.*$/ 24 | syntax match RSpecRed /^ *got.*$/ 25 | syntax match RSpecRed /^ *Failure\/Error:.*$/ 26 | syntax match RSpecRed /^.*(FAILED - [0-9]*)$/ 27 | syntax match RSpecRed /^rspec .*:.*$/ 28 | syntax match RSpecComment / # .*$/ 29 | syntax match RSpecNormal /^Failures:/ 30 | syntax match RSpecNormal /^Finished/ 31 | syntax match RSpecNormal /^Failed/ 32 | 33 | " 背景色ver. 34 | " highlight RSpecGreen ctermfg=White ctermbg=Green guifg=White guibg=Green 35 | " highlight RSpecRed ctermfg=White ctermbg=Red guifg=White guibg=Red 36 | " highlight RSpecComment ctermfg=White ctermbg=Cyan guifg=White guibg=Cyan 37 | " highlight RSpecNormal ctermfg=Black ctermbg=White guifg=Black guibg=White 38 | 39 | " 文字色ver.(※ただしMacVimKaoriYaだとうまく動かなかった) 40 | " highlight RSpecGreen ctermfg=Green ctermbg=none guifg=Green guibg=none 41 | " highlight RSpecRed ctermfg=Red ctermbg=none guifg=Red guibg=none 42 | " highlight RSpecComment ctermfg=Cyan ctermbg=none guifg=Cyan guibg=none 43 | " highlight RSpecNormal ctermfg=White ctermbg=none guifg=Black guibg=White 44 | 45 | " 文字色ver.(noneのとこ消したらうまくいった) 46 | highlight RSpecGreen ctermfg=Green guifg=Green 47 | highlight RSpecRed ctermfg=Red guifg=Red 48 | highlight RSpecComment ctermfg=Cyan guifg=Cyan 49 | highlight RSpecNormal ctermfg=White guifg=Black guibg=White 50 | 51 | let b:current_syntax = 'rspec-result' 52 | 53 | if main_syntax == 'rspec-result' 54 | unlet main_syntax 55 | endif 56 | -------------------------------------------------------------------------------- /.vimrc: -------------------------------------------------------------------------------- 1 | "vunlde.vimで管理してるpluginを読み込む 2 | source ~/dotfiles/.vimrc.bundle 3 | 4 | "基本設定 5 | source ~/dotfiles/.vimrc.basic 6 | "StatusLine設定 7 | source ~/dotfiles/.vimrc.statusline 8 | "インデント設定 9 | source ~/dotfiles/.vimrc.indent 10 | "表示関連 11 | source ~/dotfiles/.vimrc.apperance 12 | "補完関連 13 | source ~/dotfiles/.vimrc.completion 14 | "Tags関連 15 | source ~/dotfiles/.vimrc.tags 16 | "検索関連 17 | source ~/dotfiles/.vimrc.search 18 | "移動関連 19 | source ~/dotfiles/.vimrc.moving 20 | "ウィンドウ関連 21 | source ~/dotfiles/.vimrc.window 22 | "Color関連 23 | source ~/dotfiles/.vimrc.colors 24 | "編集関連 25 | source ~/dotfiles/.vimrc.editing 26 | "エンコーディング関連 27 | source ~/dotfiles/.vimrc.encoding 28 | "その他 29 | source ~/dotfiles/.vimrc.misc 30 | "プラグインに依存するアレ 31 | source ~/dotfiles/.vimrc.plugins_setting 32 | 33 | "Vimでgitのログをきれいに表示する - derisの日記 34 | " http://deris.hatenablog.jp/entry/2013/05/10/003430 35 | " source ~/dotfiles/.vimrc.gitlogviewer 36 | 37 | 38 | -------------------------------------------------------------------------------- /.vimrc.apperance: -------------------------------------------------------------------------------- 1 | "------------------------------------------------------------------------------- 2 | " 表示 Apperance 3 | "------------------------------------------------------------------------------- 4 | set showmatch " 括弧の対応をハイライト 5 | set number " 行番号表示 6 | set list " 不可視文字表示 7 | set listchars=tab:>.,trail:_,extends:>,precedes:< " 不可視文字の表示形式 8 | set display=uhex " 印字不可能文字を16進数で表示 9 | 10 | " 全角スペースの表示 11 | highlight ZenkakuSpace cterm=underline ctermfg=lightblue guibg=darkgray 12 | match ZenkakuSpace / / 13 | 14 | " カーソル行をハイライト 15 | set cursorline 16 | " カレントウィンドウにのみ罫線を引く 17 | augroup cch 18 | autocmd! cch 19 | autocmd WinLeave * set nocursorline 20 | autocmd WinEnter,BufRead * set cursorline 21 | augroup END 22 | 23 | hi clear CursorLine 24 | hi CursorLine gui=underline 25 | highlight CursorLine ctermbg=black guibg=black 26 | 27 | 28 | 29 | " インサートモードに入った時にカーソル行(列)の色を変更する 30 | augroup vimrc_change_cursorline_color 31 | autocmd! 32 | autocmd InsertEnter * highlight CursorLine term=underline cterm=underline ctermbg=240 gui=underline guibg=#666666 | highlight CursorColumn ctermfg=231 ctermbg=31 gui=bold guifg=#ffffff guibg=#0087af 33 | autocmd InsertLeave * highlight CursorLine term=underline cterm=underline ctermbg=235 gui=underline guibg=#333333 | highlight CursorColumn term=reverse ctermbg=235 guibg=#333333 34 | augroup END 35 | 36 | " コマンド実行中は再描画しない 37 | set lazyredraw 38 | " 高速ターミナル接続を行う 39 | set ttyfast 40 | -------------------------------------------------------------------------------- /.vimrc.basic: -------------------------------------------------------------------------------- 1 | "------------------------------------------------------------------------------- 2 | " 基本設定 Basics 3 | "------------------------------------------------------------------------------- 4 | let mapleader = "," " キーマップリーダー 5 | set scrolloff=5 " スクロール時の余白確保 6 | set textwidth=0 " 一行に長い文章を書いていても自動折り返しをしない 7 | set nobackup " バックアップ取らない 8 | set autoread " 他で書き換えられたら自動で読み直す 9 | " set noswapfile " スワップファイル作らない 10 | set hidden " 編集中でも他のファイルを開けるようにする 11 | set backspace=indent,eol,start " バックスペースでなんでも消せるように 12 | set formatoptions=lmoq " テキスト整形オプション,マルチバイト系を追加 13 | set vb t_vb= " ビープをならさない 14 | set browsedir=buffer " Exploreの初期ディレクトリ 15 | set whichwrap=b,s,h,l,<,>,[,] " カーソルを行頭、行末で止まらないようにする 16 | set showcmd " コマンドをステータス行に表示 17 | set showmode " 現在のモードを表示 18 | set viminfo='50,<1000,s100,\"50 " viminfoファイルの設定 19 | set modelines=0 " モードラインは無効 20 | set notitle " vimを使ってくれてありがとう 21 | set noundofile " undo file (*.un~)を作らない 22 | 23 | " OSのクリップボードを使用する 24 | set clipboard+=unnamed 25 | " ターミナルでマウスを使用できるようにする 26 | set mouse=a 27 | set guioptions+=a 28 | set ttymouse=xterm2 29 | 30 | "ヤンクした文字は、システムのクリップボードに入れる" 31 | set clipboard=unnamed 32 | " 挿入モードでCtrl+kを押すとクリップボードの内容を貼り付けられるようにする " 33 | imap "*pa 34 | 35 | " Ev/Rvでvimrcの編集と反映 36 | command! Ev edit $MYVIMRC 37 | command! Rv source $MYVIMRC 38 | 39 | set helpfile=$VIMRUNTIME/doc/help.txt 40 | 41 | " ensure cache dir 42 | let $VIMTMP = expand('~/.cache/vim') 43 | 44 | if !isdirectory(expand($VIMTMP)) 45 | call mkdir(expand($VIMTMP), 'p') 46 | endif 47 | 48 | set directory=$VIMTMP 49 | set backupdir=$VIMTMP 50 | 51 | 52 | " Some Linux distributions set filetype in /etc/vimrc. 53 | " " Clear filetype flags before changing runtimepath to force Vim to 54 | " reload them. 55 | if exists("g:did_load_filetypes") 56 | filetype off 57 | filetype plugin indent off 58 | endif 59 | 60 | " GoLangのpluginをruntime pathへ 61 | let goroot = substitute(system("go env GOROOT"), '\n$', '', '') 62 | 63 | " ファイルタイプ判定をon 64 | filetype plugin on 65 | -------------------------------------------------------------------------------- /.vimrc.colors: -------------------------------------------------------------------------------- 1 | "------------------------------------------------------------------------------- 2 | " カラー関連 Colors 3 | "------------------------------------------------------------------------------- 4 | 5 | " colorscheme mrkn256 6 | colorscheme yuroyoro256 7 | 8 | " ターミナルタイプによるカラー設定 9 | if &term =~ "xterm-256color" || "screen-256color" 10 | " 256色 11 | set t_Co=256 12 | set t_Sf=[3%dm 13 | set t_Sb=[4%dm 14 | elseif &term =~ "xterm-debian" || &term =~ "xterm-xfree86" 15 | set t_Co=16 16 | set t_Sf=[3%dm 17 | set t_Sb=[4%dm 18 | elseif &term =~ "xterm-color" 19 | set t_Co=8 20 | set t_Sf=[3%dm 21 | set t_Sb=[4%dm 22 | endif 23 | 24 | "ポップアップメニューのカラーを設定 25 | "hi Pmenu guibg=#666666 26 | "hi PmenuSel guibg=#8cd0d3 guifg=#666666 27 | "hi PmenuSbar guibg=#333333 28 | 29 | " ハイライト on 30 | syntax enable 31 | " 補完候補の色づけ for vim7 32 | " hi Pmenu ctermbg=255 ctermfg=0 guifg=#000000 guibg=#999999 33 | " hi PmenuSel ctermbg=blue ctermfg=black 34 | hi PmenuSel cterm=reverse ctermfg=33 ctermbg=222 gui=reverse guifg=#3399ff guibg=#f0e68c 35 | " hi PmenuSbar ctermbg=0 ctermfg=9 36 | " hi PmenuSbar ctermbg=255 ctermfg=0 guifg=#000000 guibg=#FFFFFF 37 | 38 | " Highlight the go 'error' 39 | autocmd FileType go :highlight goErr cterm=bold ctermfg=214 40 | autocmd FileType go :match goErr /\/ 41 | 42 | autocmd FileType javascript :highlight jsColonAtTail cterm=underline ctermfg=lightblue guibg=darkgray 43 | autocmd FileType javascript :match jsColonAtTail /:$/ 44 | 45 | 46 | " vimdiffの色設定 47 | highlight DiffAdd cterm=bold ctermfg=10 ctermbg=22 48 | highlight DiffDelete cterm=bold ctermfg=10 ctermbg=52 49 | highlight DiffChange cterm=bold ctermfg=10 ctermbg=17 50 | highlight DiffText cterm=bold ctermfg=10 ctermbg=21 51 | 52 | -------------------------------------------------------------------------------- /.vimrc.completion: -------------------------------------------------------------------------------- 1 | "------------------------------------------------------------------------------- 2 | " 補完・履歴 Complete 3 | "------------------------------------------------------------------------------- 4 | set wildmenu " コマンド補完を強化 5 | set wildchar= " コマンド補完を開始するキー 6 | set wildmode=list:full " リスト表示,最長マッチ 7 | set history=1000 " コマンド・検索パターンの履歴数 8 | set complete+=k " 補完に辞書ファイル追加 9 | 10 | " Ex-modeでのをzshのヒストリ補完っぽくする 11 | cnoremap 12 | cnoremap 13 | cnoremap 14 | cnoremap 15 | 16 | " 補完にneocomplcacheを使う 17 | source ~/dotfiles/.vimrc.completion.neocomplcache 18 | 19 | " 補完にAutoComplPopを使う 20 | " source ~/dotfiles/.vimrc.completion.autocomplpop 21 | 22 | 23 | -------------------------------------------------------------------------------- /.vimrc.completion.autocomplpop: -------------------------------------------------------------------------------- 1 | 2 | " 真なら vim 開始時から自動ポップアップが有効になります。 3 | let g:acp_enableAtStartup = 1 4 | 5 | " キーワード補完の自動ポップアップを行うのに必要なカーソルの直前のキーワ 6 | " ード文字数。負数ならこの補完は行われません。 7 | let g:acp_behaviorKeywordLength = 2 8 | 9 | " キーワード補完のコマンド。このオプションには普通 "\" か "\" 10 | " を設定します。 11 | let g:acp_behaviorKeywordCommand = "\" 12 | 13 | " ファイル名補完の自動ポップアップを行うのに必要なカーソルの直前のキーワ 14 | " ード文字数。負数ならこの補完は行われません。 15 | let g:acp_behaviorFileLength = 3 16 | 17 | " メソッド補完のための、Ruby オムニ補完の自動ポップアップを行うのに必要 18 | " なカーソルの直前のキーワード文字数。負数ならこの補完は行われません。 19 | let g:acp_behaviorRubyOmniMethodLength = 2 20 | 21 | " シンボル補完のための、Ruby オムニ補完の自動ポップアップを行うのに必要 22 | " なカーソルの直前のキーワード文字数。負数ならこの補完は行われません。 23 | let g:acp_behaviorRubyOmniSymbolLength = 2 24 | 25 | " Python オムニ補完の自動ポップアップを行うのに必要なカーソルの直前のキ 26 | " ーワード文字数。負数ならこの補完は行われません。 27 | let g:acp_behaviorPythonOmniLength = 2 28 | 29 | " Perl オムニ補完の自動ポップアップを行うのに必要なカーソルの直前のキー 30 | " ワード文字数。負数ならこの補完は行われません。 31 | let g:acp_behaviorPerlOmniLength = 2 32 | 33 | " HTML オムニ補完の自動ポップアップを行うのに必要なカーソルの直前のキー 34 | " ワード文字数。負数ならこの補完は行われません。 35 | let g:acp_behaviorHtmlOmniLength = 3 36 | 37 | " プロパティ補完のための、CSS オムニ補完の自動ポップアップを行うのに必要 38 | " なカーソルの直前のキーワード文字数。負数ならこの補完は行われません。 39 | let g:acp_behaviorCssOmniPropertyLength = 2 40 | 41 | " 値補完のための、CSS オムニ補完の自動ポップアップを行うのに必要なカーソ 42 | " ルの直前のキーワード文字数。負数ならこの補完は行われません。 43 | let g:acp_behaviorCssOmniValueLength = 2 44 | 45 | " でomni補完 46 | imap 47 | 48 | " " -- tabでオムニ補完 49 | function! InsertTabWrapper() 50 | if pumvisible() 51 | return "\" 52 | endif 53 | let col = col('.') - 1 54 | if !col || getline('.')[col -1] !~ '\k\|<\|/' 55 | return "\" 56 | elseif exists('&omnifunc') && &omnifunc == '' 57 | return "\" 58 | else 59 | return "\\" 60 | endif 61 | endfunction 62 | inoremap =InsertTabWrapper() 63 | -------------------------------------------------------------------------------- /.vimrc.encoding: -------------------------------------------------------------------------------- 1 | "------------------------------------------------------------------------------- 2 | " エンコーディング関連 Encoding 3 | "------------------------------------------------------------------------------- 4 | set ffs=unix,dos,mac " 改行文字 5 | set encoding=utf-8 " デフォルトエンコーディング 6 | 7 | " 文字コード認識はbanyan/recognize_charcode.vimへ 8 | 9 | " cvsの時は文字コードをeuc-jpに設定 10 | autocmd FileType cvs :set fileencoding=euc-jp 11 | " 以下のファイルの時は文字コードをutf-8に設定 12 | autocmd FileType svn :set fileencoding=utf-8 13 | autocmd FileType js :set fileencoding=utf-8 14 | autocmd FileType css :set fileencoding=utf-8 15 | autocmd FileType html :set fileencoding=utf-8 16 | autocmd FileType xml :set fileencoding=utf-8 17 | autocmd FileType java :set fileencoding=utf-8 18 | autocmd FileType scala :set fileencoding=utf-8 19 | 20 | " ワイルドカードで表示するときに優先度を低くする拡張子 21 | set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc 22 | 23 | " 指定文字コードで強制的にファイルを開く 24 | command! Cp932 edit ++enc=cp932 25 | command! Eucjp edit ++enc=euc-jp 26 | command! Iso2022jp edit ++enc=iso-2022-jp 27 | command! Utf8 edit ++enc=utf-8 28 | command! Jis Iso2022jp 29 | command! Sjis Cp932 30 | -------------------------------------------------------------------------------- /.vimrc.gitlogviewer: -------------------------------------------------------------------------------- 1 | " https://gist.github.com/deris/5548058/raw/7e753c7eda604c86e2a9ae19aa7530046ab2dd11/gitlogviewer.vim 2 | " 3 | " Inspired by ujihisa's vimrc 4 | function! s:GitLogViewer() 5 | " vnewだとコミットメッセージが切れてしまうのでnew 6 | new 7 | VimProcRead git log -u 'HEAD~30..HEAD' 8 | set filetype=git-log.git-diff 9 | setlocal foldmethod=expr 10 | setlocal foldexpr=getline(v:lnum)=~'^commit'?'>1':getline(v:lnum+1)=~'^commit'?'<1':'=' 11 | setlocal foldtext=FoldTextOfGitLog() 12 | endfunction 13 | command! GitLogViewer call s:GitLogViewer() 14 | 15 | " git log表示時の折りたたみ用 16 | function! FoldTextOfGitLog() 17 | let month_map = { 18 | \ 'Jan' : '01', 19 | \ 'Feb' : '02', 20 | \ 'Mar' : '03', 21 | \ 'Apr' : '04', 22 | \ 'May' : '05', 23 | \ 'Jun' : '06', 24 | \ 'Jul' : '07', 25 | \ 'Aug' : '08', 26 | \ 'Sep' : '09', 27 | \ 'Oct' : '10', 28 | \ 'Nov' : '11', 29 | \ 'Dec' : '12', 30 | \ } 31 | 32 | if getline(v:foldstart) !~ '^commit' 33 | return getline(v:foldstart) 34 | endif 35 | 36 | if getline(v:foldstart + 1) =~ '^Author:' 37 | let author_lnum = v:foldstart + 1 38 | elseif getline(v:foldstart + 2) =~ '^Author:' 39 | " commitの次の行がMerge:の場合があるので 40 | let author_lnum = v:foldstart + 2 41 | else 42 | " commitの下2行がどちらもAuthor:で始まらなければ諦めて終了 43 | return getline(v:foldstart) 44 | endif 45 | 46 | let date_lnum = author_lnum + 1 47 | let message_lnum = date_lnum + 2 48 | 49 | let author = matchstr(getline(author_lnum), '^Author: \zs.*\ze <.\{-}>') 50 | let date = matchlist(getline(date_lnum), ' \(\a\{3}\) \(\d\{1,2}\) \(\d\{2}:\d\{2}:\d\{2}\) \(\d\{4}\)') 51 | let message = getline(message_lnum) 52 | 53 | let month = date[1] 54 | let day = printf('%02s', date[2]) 55 | let time = date[3] 56 | let year = date[4] 57 | 58 | let datestr = join([year, month_map[month], day], '-') 59 | 60 | return join([datestr, time, author, message], ' ') 61 | endfunction 62 | -------------------------------------------------------------------------------- /.vimrc.indent: -------------------------------------------------------------------------------- 1 | "------------------------------------------------------------------------------- 2 | " インデント Indent 3 | "------------------------------------------------------------------------------- 4 | set autoindent " 自動でインデント 5 | "set paste " ペースト時にautoindentを無効に(onにするとautocomplpop.vimが動かない) 6 | set smartindent " 新しい行を開始したときに、新しい行のインデントを現在行と同じ量にする。 7 | set cindent " Cプログラムファイルの自動インデントを始める 8 | 9 | " softtabstopはTabキー押し下げ時の挿入される空白の量,0の場合はtabstopと同じ,BSにも影響する 10 | set tabstop=2 shiftwidth=2 softtabstop=0 11 | 12 | if has("autocmd") 13 | "ファイルタイプの検索を有効にする 14 | filetype plugin on 15 | "そのファイルタイプにあわせたインデントを利用する 16 | filetype indent on 17 | " これらのftではインデントを無効に 18 | "autocmd FileType php filetype indent off 19 | 20 | autocmd FileType apache setlocal sw=4 sts=4 ts=4 et 21 | autocmd FileType aspvbs setlocal sw=4 sts=4 ts=4 et 22 | autocmd FileType c setlocal sw=4 sts=4 ts=4 et 23 | autocmd FileType cpp setlocal sw=4 sts=4 ts=4 et 24 | autocmd FileType cs setlocal sw=4 sts=4 ts=4 et 25 | autocmd FileType css setlocal sw=2 sts=2 ts=2 et 26 | autocmd FileType diff setlocal sw=4 sts=4 ts=4 et 27 | autocmd FileType eruby setlocal sw=4 sts=4 ts=4 et 28 | autocmd FileType html setlocal sw=2 sts=2 ts=2 et 29 | autocmd FileType java setlocal sw=4 sts=4 ts=4 et 30 | autocmd FileType javascript setlocal sw=2 sts=2 ts=2 et 31 | autocmd FileType jsx setlocal sw=2 sts=2 ts=2 et 32 | autocmd FileType perl setlocal sw=4 sts=4 ts=4 et 33 | autocmd FileType php setlocal sw=4 sts=4 ts=4 et 34 | autocmd FileType python setlocal sw=4 sts=4 ts=4 et 35 | autocmd FileType ruby setlocal sw=2 sts=2 ts=2 et 36 | autocmd FileType haml setlocal sw=2 sts=2 ts=2 et 37 | autocmd FileType sh setlocal sw=4 sts=4 ts=4 et 38 | autocmd FileType sql setlocal sw=4 sts=4 ts=4 et 39 | autocmd FileType vb setlocal sw=4 sts=4 ts=4 et 40 | autocmd FileType vim setlocal sw=2 sts=2 ts=2 et 41 | autocmd FileType wsh setlocal sw=4 sts=4 ts=4 et 42 | autocmd FileType xhtml setlocal sw=4 sts=4 ts=4 et 43 | autocmd FileType xml setlocal sw=4 sts=4 ts=4 et 44 | autocmd FileType yaml setlocal sw=2 sts=2 ts=2 et 45 | autocmd FileType zsh setlocal sw=4 sts=4 ts=4 et 46 | autocmd FileType scala setlocal sw=2 sts=2 ts=2 et 47 | autocmd FileType go setlocal noexpandtab list tabstop=2 shiftwidth=2 48 | endif 49 | 50 | -------------------------------------------------------------------------------- /.vimrc.misc: -------------------------------------------------------------------------------- 1 | "------------------------------------------------------------------------------- 2 | " その他 Misc 3 | "------------------------------------------------------------------------------- 4 | 5 | " ;でコマンド入力( ;と:を入れ替) 6 | noremap ; : 7 | " pluginとかでnmap :call hoge..とかやってるやつがあるので、 8 | " :でもexコマンドに入れるようにしておく 9 | " noremap : ; 10 | 11 | -------------------------------------------------------------------------------- /.vimrc.search: -------------------------------------------------------------------------------- 1 | "------------------------------------------------------------------------------- 2 | " 検索設定 Search 3 | "------------------------------------------------------------------------------- 4 | set wrapscan " 最後まで検索したら先頭へ戻る 5 | set ignorecase " 大文字小文字無視 6 | set smartcase " 検索文字列に大文字が含まれている場合は区別して検索する 7 | set incsearch " インクリメンタルサーチ 8 | set hlsearch " 検索文字をハイライト 9 | "Escの2回押しでハイライト消去 10 | nmap ;nohlsearch 11 | 12 | "選択した文字列を検索 13 | vnoremap // y/=escape(@", '\\/.*$^~[]') 14 | "選択した文字列を置換 15 | vnoremap /r "xy;%s/=escape(@x, '\\/.*$^~[]')//gc 16 | 17 | "s*置換後文字列/gでカーソル下のキーワードを置換 18 | nnoremap s* ':%substitute/\<' . expand('') . '\>/' 19 | 20 | " Ctrl-iでヘルプ 21 | nnoremap :help 22 | " カーソル下のキーワードをヘルプでひく 23 | nnoremap :help 24 | 25 | " :Gb でGrepBufferする 26 | command! -nargs=1 Gb :GrepBuffer 27 | " カーソル下の単語をGrepBufferする 28 | nnoremap :GrepBuffer 29 | 30 | " :Gr でカレントディレクトリ以下を再帰的にgrepする 31 | command! -nargs=1 Gr :Rgrep * 32 | " カーソル下の単語をgrepする 33 | nnoremap :Rgrep * 34 | 35 | let Grep_Skip_Dirs = '.svn .git' 36 | let Grep_Default_Options = '-I' "バイナルファイルがgrepしない; 37 | let Grep_Skip_Files = '*.bak *~' 38 | 39 | " A wrapper function of :keeppatterns for Vim 7.4 compativility 40 | " 41 | " Thanks to @osyo_mem http://ideone.com/rgVoyf 42 | " 43 | function! s:keeppatterns(cmd) 44 | let old = @/ 45 | try 46 | execute a:cmd 47 | call histdel("/", -1) 48 | catch 49 | echohl ErrorMsg 50 | echo v:exception 51 | echohl NONE 52 | finally 53 | let @/ = old 54 | endtry 55 | endfunction 56 | 57 | command! -complete=command -nargs=* 58 | \ Keeppatterns 59 | \ call s:keeppatterns() 60 | -------------------------------------------------------------------------------- /.vimrc.statusline: -------------------------------------------------------------------------------- 1 | "------------------------------------------------------------------------------- 2 | " ステータスライン StatusLine 3 | "------------------------------------------------------------------------------- 4 | set laststatus=2 " 常にステータスラインを表示 5 | 6 | "カーソルが何行目の何列目に置かれているかを表示する 7 | set ruler 8 | 9 | " vim-powerlineでフォントにパッチを当てないなら以下をコメントアウト 10 | let g:Powerline_symbols = 'fancy' 11 | 12 | "ステータスラインに文字コードと改行文字を表示する 13 | " if winwidth(0) >= 120 14 | " set statusline=%<[%n]%m%r%h%w%{'['.(&fenc!=''?&fenc:&enc).':'.&ff.']'}%y\ %{g:HahHah()}\ %F%=[%{GetB()}]\ %{fugitive#statusline()}\ %l,%c%V%8P 15 | " else 16 | " set statusline=%<[%n]%m%r%h%w%{'['.(&fenc!=''?&fenc:&enc).':'.&ff.']'}%y\ %{g:HahHah()}\ %f%=[%{GetB()}]\ %{fugitive#statusline()}\ %l,%c%V%8P 17 | " endif 18 | 19 | "入力モード時、ステータスラインのカラーを変更 20 | " augroup InsertHook 21 | " autocmd! 22 | " autocmd InsertEnter * highlight StatusLine guifg=#ccdc90 guibg=#2E4340 ctermfg=cyan 23 | " autocmd InsertLeave * highlight StatusLine guifg=#2E4340 guibg=#ccdc90 ctermfg=white 24 | " augroup END 25 | 26 | "自動的に QuickFix リストを表示する 27 | autocmd QuickfixCmdPost make,grep,grepadd,vimgrep,vimgrepadd cwin 28 | autocmd QuickfixCmdPost lmake,lgrep,lgrepadd,lvimgrep,lvimgrepadd lwin 29 | 30 | function! GetB() 31 | let c = matchstr(getline('.'), '.', col('.') - 1) 32 | let c = iconv(c, &enc, &fenc) 33 | return String2Hex(c) 34 | endfunction 35 | " help eval-examples 36 | " The function Nr2Hex() returns the Hex string of a number. 37 | func! Nr2Hex(nr) 38 | let n = a:nr 39 | let r = "" 40 | while n 41 | let r = '0123456789ABCDEF'[n % 16] . r 42 | let n = n / 16 43 | endwhile 44 | return r 45 | endfunc 46 | " The function String2Hex() converts each character in a string to a two 47 | " character Hex string. 48 | func! String2Hex(str) 49 | let out = '' 50 | let ix = 0 51 | while ix < strlen(a:str) 52 | let out = out . Nr2Hex(char2nr(a:str[ix])) 53 | let ix = ix + 1 54 | endwhile 55 | return out 56 | endfunc 57 | -------------------------------------------------------------------------------- /.vimrc.tags: -------------------------------------------------------------------------------- 1 | "------------------------------------------------------------------------------- 2 | " タグ関連 Tags 3 | "------------------------------------------------------------------------------- 4 | " set tags 5 | if has("autochdir") 6 | " 編集しているファイルのディレクトリに自動で移動 7 | set autochdir 8 | set tags=tags; 9 | else 10 | set tags=./tags,./../tags,./*/tags,./../../tags,./../../../tags,./../../../../tags,./../../../../../tags 11 | endif 12 | 13 | set notagbsearch 14 | 15 | "はscreentとかぶるので削除 16 | "tab pagesを使い易くする 17 | " nnoremap 18 | " nnoremap n ;tabnew 19 | " nnoremap c ;tabclose 20 | " nnoremap o ;tabonly 21 | " nnoremap j ;execute 'tabnext' 1 + (tabpagenr() + v:count1 - 1) % tabpagenr('$') 22 | " nnoremap k gT 23 | 24 | "tags-and-searchesを使い易くする 25 | nnoremap t 26 | "「飛ぶ」 27 | nnoremap tt 28 | "「進む」 29 | nnoremap tj ;tag 30 | "「戻る」 31 | nnoremap tk ;pop 32 | "履歴一覧 33 | nnoremap tl ;tags 34 | 35 | -------------------------------------------------------------------------------- /.vimrc.window: -------------------------------------------------------------------------------- 1 | " Vimの便利な画面分割&タブページと、それを更に便利にする方法 - Qiita 2 | " http://qiita.com/tekkoc/items/98adcadfa4bdc8b5a6ca 3 | 4 | 5 | " CTRL-hjklでウィンドウ移動 6 | nnoremap j 7 | nnoremap k 8 | nnoremap l 9 | nnoremap h 10 | 11 | " sを潰す 12 | nnoremap s 13 | 14 | " ウィンドウ間の移動 15 | nnoremap sj j 16 | nnoremap sk k 17 | nnoremap sl l 18 | nnoremap sh h 19 | nnoremap sw w 20 | 21 | " ウィンドウ自体の移動 22 | nnoremap sJ J 23 | nnoremap sK K 24 | nnoremap sL L 25 | nnoremap sH H 26 | nnoremap sr r 27 | 28 | " タブ切り替え 29 | nnoremap sn gt 30 | nnoremap sp gT 31 | 32 | " ウィンドウサイズ関連 33 | nnoremap s= = 34 | nnoremap so _| 35 | nnoremap sO = 36 | call submode#enter_with('bufmove', 'n', '', 's>', '>') 37 | call submode#enter_with('bufmove', 'n', '', 's<', '<') 38 | call submode#enter_with('bufmove', 'n', '', 's+', '+') 39 | call submode#enter_with('bufmove', 'n', '', 's-', '-') 40 | call submode#map('bufmove', 'n', '', '>', '>') 41 | call submode#map('bufmove', 'n', '', '<', '<') 42 | call submode#map('bufmove', 'n', '', '+', '+') 43 | call submode#map('bufmove', 'n', '', '-', '-') 44 | 45 | " バッファ移動 46 | nnoremap sN :bn 47 | nnoremap sP :bp 48 | 49 | " ウィンドウ分割 50 | nnoremap ss :sp 51 | nnoremap sv :vs 52 | 53 | " ウィンドウ/バッファクローズ 54 | nnoremap sq :q 55 | nnoremap sQ :bd 56 | 57 | -------------------------------------------------------------------------------- /.vrapperrc: -------------------------------------------------------------------------------- 1 | 2 | :set ignorecase 3 | :set smartcase 4 | 5 | "スクロール 6 | noremap j 7 | noremap k 8 | 9 | "カーソル位置の単語をyankする 10 | nnoremap vv vawy 11 | 12 | "最後に変更されたテキストを選択する 13 | nnoremap gc `[v`] 14 | vnoremap gc ;normal gc 15 | onoremap gc ;normal gc 16 | 17 | " Insert mode中で単語単位/行単位の削除をアンドゥ可能にする 18 | inoremap u 19 | inoremap u 20 | 21 | " ;でExコマンド入力( ;と:を入れ替) 22 | noremap ; : 23 | noremap : ; 24 | 25 | "srで参照をプロジェクトから検索 26 | eclipseaction SearchRef org.eclipse.jdt.ui.edit.text.java.search.references.in.project 27 | noremap sr :SearchRef 28 | 29 | "j, kで画面送り 30 | noremap j 31 | noremap k 32 | 33 | "最後に編集された位置に移動 34 | eclipseaction GoLastEditPosition org.eclipse.ui.edit.text.gotoLastEditPosition 35 | nnoremap gb :GoLastEditPosition 36 | 37 | "対応する括弧に移動 38 | nnoremap [ % 39 | nnoremap ] % 40 | 41 | 42 | "次のメンバ(フィールド,メソッド) 43 | eclipseaction GoNextMember org.eclipse.jdt.ui.edit.text.java.goto.next.member 44 | nnoremap mm :GoNextMember 45 | eclipseaction GoPrevMember org.eclipse.jdt.ui.edit.text.java.goto.previous.member 46 | nnoremap mp :GoPrevMember 47 | -------------------------------------------------------------------------------- /.zsh/cheat-sheet: -------------------------------------------------------------------------------- 1 | PROCESS SUBSTITUTION 2 | =( list ) # list の出力を一時ファイルにし、ファイル名に置換 3 | <( list ) # list の出力とのパイプを作り、fd 名に置換 4 | >( list ) # list の入力とのパイプを作り、fd 名に置換 5 | 6 | LOOP 7 | for i in *; do; echo $i; done; 8 | 9 | PARAMETER EXPANSION 10 | ${i//.old/.new} # 拡張子置換 11 | 12 | GLOB (man zshexpn) 13 | *~hoge # hoge 以外の * 14 | *(/) # dir 15 | *(^/) # not dir 16 | *(.) # plain file 17 | 18 | -------------------------------------------------------------------------------- /.zsh/percol-sources/select-history.zsh: -------------------------------------------------------------------------------- 1 | function percol-select-history() { 2 | local tac_cmd 3 | which gtac &> /dev/null && tac_cmd=gtac || tac_cmd=tac 4 | BUFFER=$($tac_cmd ~/.zsh_history | sed 's/^: [0-9]*:[0-9]*;//' \ 5 | | percol --match-method regex --query "$LBUFFER") 6 | CURSOR=$#BUFFER # move cursor 7 | zle -R -c # refresh 8 | } 9 | zle -N percol-select-history 10 | 11 | bindkey '^r' percol-select-history 12 | -------------------------------------------------------------------------------- /.zsh/percol.zsh: -------------------------------------------------------------------------------- 1 | # ~/.zsh/percol.zsh 2 | # load percol sources 3 | for f (~/.zsh/percol-sources/*) source "${f}" 4 | -------------------------------------------------------------------------------- /.zshrc: -------------------------------------------------------------------------------- 1 | source $HOME/.zshrc.custom 2 | 3 | ### Added by the Heroku Toolbelt 4 | export PATH="/usr/local/heroku/bin:$PATH" 5 | -------------------------------------------------------------------------------- /.zshrc.linux: -------------------------------------------------------------------------------- 1 | 2 | # Terminal Colorの設定 3 | export CLICOLOR=1 4 | export LSCOLORS=ExFxCxDxBxegedabagacad 5 | 6 | alias ls='ls -alh --color' 7 | if [ -f "/usr/bin/vim" ] ; then 8 | alias vi='/usr/bin/vim' 9 | alias vim='/usr/bin/vim' 10 | fi 11 | 12 | export PATH 13 | 14 | # man path 15 | MANPATH=/usr/local/man:$MANPATH 16 | export MANPATH 17 | INFOPATH=/usr/local/info:$INFOPATH 18 | export INFOPATH 19 | 20 | # Java 21 | export JAVA_HOME=/usr/java/default 22 | export PATH=$JAVA_HOME/bin:$PATH 23 | 24 | # Maven2 25 | export MAVEN_HOME=/usr/local/apache-maven-2.2.1 26 | export PATH=$MAVEN_HOME/bin:$PATH 27 | export MAVEN_OPTS=-Xmx1024M 28 | 29 | # rbenv 30 | export PATH="$HOME/.rbenv/bin:$PATH" 31 | if which rbenv > /dev/null 2>&1 ; then eval "$(rbenv init -)"; fi 32 | 33 | export PATH=$PATH:$HOME/.gem/ruby/1.8/bin 34 | export PATH=/opt/firefox:$PATH 35 | 36 | export PATH=$PATH:$HOME/.cabal/bin 37 | # export RUBYGEMS_GEMDEPS=- 38 | 39 | # node 40 | if which npm > /dev/null 2>&1 ; then 41 | export NODE_PATH=$NODE_PATH:$(npm prefix -g 2>/dev/null)/lib/node_modules 42 | export PATH=$PATH:$(npm bin -g 2>/dev/null) 43 | fi 44 | 45 | 46 | # Go Lang 47 | if which go > /dev/null 2>&1 ; then 48 | export CGO_ENABLED=1 49 | export GOPATH=$HOME/dev/go 50 | export PATH=$PATH:$(go env GOROOT)/bin:$GOPATH/bin 51 | fi 52 | -------------------------------------------------------------------------------- /.zshrc.osx: -------------------------------------------------------------------------------- 1 | export PATH=/usr/local/bin:/usr/local/sbin:$PATH 2 | export PATH=/opt/local/bin:/opt/local/sbin/:~/bin:$PATH 3 | 4 | # osx alias 5 | alias pbc='pbcopy' 6 | 7 | # Terminal Colorの設定 8 | export CLICOLOR=1 9 | export LSCOLORS=ExFxCxDxBxegedabagacad 10 | 11 | # vim 12 | # export EDITOR=/usr/local/Cellar/macvim-kaoriya/HEAD/MacVim.app/Contents/MacOS/Vim 13 | export EDITOR=/usr/local/bin/nvim 14 | 15 | alias vi8='env LANG=ja_JP.UTF-8 /usr/local/Cellar/macvim-kaoriya/HEAD/MacVim.app/Contents/MacOS/Vim "$@"' 16 | alias vim8='env LANG=ja_JP.UTF-8 /usr/local/Cellar/macvim-kaoriya/HEAD/MacVim.app/Contents/MacOS/Vim "$@"' 17 | 18 | # man path 19 | MANPATH=/usr/local/man:$MANPATH 20 | export MANPATH 21 | INFOPATH=/usr/local/info:$INFOPATH 22 | export INFOPATH 23 | 24 | # Ruby 25 | # if [[ -s /Users/ozaki/.rvm/scripts/rvm ]] ; then source $HOME/.rvm/scripts/rvm ; fi 26 | export RBENV_ROOT=/usr/local/var/rbenv 27 | if which rbenv > /dev/null 2>&1 ; then eval "$(rbenv init -)"; fi 28 | 29 | # Go Lang 30 | # export GOROOT=/usr/local/go 31 | # export GOOS=darwin 32 | # export GOARCH=amd64 33 | export CGO_ENABLED=1 34 | export GOPATH=$HOME 35 | export PATH=$PATH:$(go env GOROOT)/bin:$GOPATH/bin 36 | 37 | # node.js 38 | # export NODE_PATH=$PATH:/usr/local/lib/node_modules 39 | export PATH=$HOME/.nodebrew/current/bin:$PATH 40 | 41 | # tmux 42 | alias tma='tmux attach' 43 | alias tml='tmux list-window' 44 | 45 | # avr-gcc for qmk firmware build 46 | export PATH="/usr/local/opt/avr-gcc@7/bin:$PATH" 47 | 48 | -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | Clone from github 2 | git clone git@github.com:yuroyoro/dotfiles.git 3 | 4 | ln -s dotfiles/.zshrc ~/.zshrc 5 | 6 | .dotfileの種類 7 | .vimrc 8 | .vim/ 9 | .screenrc 10 | .zshrc 11 | 12 | -------------------------------------------------------------------------------- /bin/epylint.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # http://www.emacswiki.org/cgi-bin/wiki/PythonMode 3 | # Before you install this script, you need to install pylint command 4 | # pylint http://www.logilab.org/857 5 | 6 | import re 7 | import sys 8 | 9 | from subprocess import Popen, PIPE 10 | 11 | p = Popen("pylint -f parseable -r n --disable-msg-cat=C,R --indent-string=' ' %s" % 12 | sys.argv[1], shell = True, stdout = PIPE).stdout 13 | 14 | for line in p.readlines(): 15 | match = re.search("\\[([WE])(, (.+?))?\\]", line) 16 | if match: 17 | kind = match.group(1) 18 | func = match.group(3) 19 | 20 | if kind == "W": 21 | msg = "Warning" 22 | else: 23 | msg = "Error" 24 | 25 | if func: 26 | line = re.sub("\\[([WE])(, (.+?))?\\]", 27 | "%s (%s):" % (msg, func), line) 28 | else: 29 | line = re.sub("\\[([WE])?\\]", "%s:" % msg, line) 30 | print line, 31 | 32 | p.close() 33 | -------------------------------------------------------------------------------- /bin/git-back: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # usage: 4 | # git back でひとつ前に居たbranchに戻る 5 | # git back N でN個前に戻る 6 | # git back --listで履歴だす 7 | 8 | CNT=1 9 | 10 | if [ $# -ne 0 ]; then 11 | if [ $1 = "--list" ]; then 12 | git reflog | grep checkout | head -10 | cut -d' ' -f6 | awk '{print FNR, $0}' 13 | exit 14 | else 15 | CNT=$1 16 | fi 17 | fi 18 | 19 | 20 | PREVIOUS_BRANCH=`git reflog | grep checkout | head -${CNT} | tail -1 | cut -d' ' -f6` 21 | git checkout ${PREVIOUS_BRANCH} 22 | -------------------------------------------------------------------------------- /bin/git-follow: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # this command exec git pull --rebase from othre branch. 4 | # usage) git follow branch1 branch2 ... 5 | # ex) git follow develop test 6 | 7 | if [ $# -eq 0 ]; then 8 | git pull --rebase 9 | exit 10 | fi 11 | 12 | CURRENT=`git symbolic-ref --short HEAD` 13 | 14 | git fetch --prune 15 | 16 | for branch in $* ; do 17 | REMOTE=`git config branch.${branch}.remote` 18 | MERGE=`git config branch.${branch}.merge | sed -e "s/^refs\/heads\///g"` 19 | 20 | if [ -z "$REMOTE" -o -z "$MERGE" ]; then 21 | echo "${branch} is not remote-tracking branch." 22 | exit 23 | fi 24 | 25 | git rebase --onto ${REMOTE}/${branch} ${branch} ${branch} 26 | done 27 | 28 | git co ${CURRENT} 29 | -------------------------------------------------------------------------------- /bin/git-switch: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # -*- coding: utf-8 -*- 3 | 4 | require 'optparse' 5 | 6 | @hard = false 7 | opt_parser = OptionParser.new{|opts| 8 | opts.banner = 'git switch [--hard] [--repository=] [--new-workdir=] ' 9 | opts.on("--hard", 'execute `git reset --hard` before switch to branch'){ @hard == true} 10 | opts.on("--repository=V", "target repository.(default is current repository)"){|v| @repository = v} 11 | opts.on("--new-workdir=V", "path to the new working directory.(default /tmp/)"){|v| @new_work_dir = v} 12 | } 13 | 14 | args = ARGV.dup 15 | opt_parser.order!(args) 16 | @branch = args.shift 17 | @command = args 18 | 19 | unless @branch && @command && @command.length > 0 20 | puts opt_parser.banner 21 | exit 128 22 | end 23 | 24 | unless @repository 25 | @repository = `git rev-parse -q --show-toplevel`.chomp 26 | end 27 | 28 | unless File.exists?(@repository) 29 | puts "No such repository: #{@repository}" 30 | exit 128 31 | end 32 | 33 | unless @new_work_dir 34 | @new_work_dir = "/tmp/#{File.basename(@repository)}" 35 | end 36 | 37 | unless File.exists?(@new_work_dir) 38 | res = system("git-new-workdir #{@repository} #{@new_work_dir} ") 39 | exit 128 unless res 40 | puts "git-new-workdir #{@repository} #{@new_work_dir} " 41 | end 42 | 43 | if @hard 44 | res = system("git reset --hard HEAD") 45 | exit 128 unless res 46 | end 47 | 48 | Dir.chdir(@new_work_dir){ 49 | res = system("git checkout #{@branch}") 50 | exit 128 unless res 51 | 52 | pid = fork do 53 | exec(*@command) 54 | end 55 | 56 | if pid 57 | # TODO signal handling 58 | # force terminate child process 59 | [:INT, :TERM, :KILL, :CHLD, :QUIT].each do |sig| 60 | Signal.trap(sig){ 61 | catch(:done) { 62 | [:INT, :CHLD, :KILL, :QUIT].each do |s| 63 | begin 64 | Process.kill(s, pid) 65 | rescue Errno::ECHILD 66 | throw :done 67 | rescue Errno::ESRCH 68 | throw :done 69 | end 70 | end 71 | } 72 | } 73 | end 74 | end 75 | 76 | Process.wait 77 | } 78 | 79 | -------------------------------------------------------------------------------- /bin/git-風呂: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | git flow $* 4 | -------------------------------------------------------------------------------- /bin/gsta: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ $# -eq 1 ]; then 4 | git add `git status -s -b | grep -v "^#" | awk '{print$1="";print}' | grep -v "^$" | awk "NR==$1"` 5 | else 6 | exit 1 7 | fi 8 | -------------------------------------------------------------------------------- /bin/gstd: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ $# -eq 1 ]; then 4 | git diff -- `git status -s -b | grep -v "^#" | awk '{print$1="";print}' | grep -v "^$" | awk "NR==$1"` 5 | else 6 | exit 1 7 | fi 8 | -------------------------------------------------------------------------------- /bin/gstv: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ $# -eq 1 ]; then 4 | vim `git status -s -b | grep -v "^#" | awk '{print$1="";print}' | grep -v "^$" | awk "NR==$1"` 5 | else 6 | exit 1 7 | fi 8 | -------------------------------------------------------------------------------- /bin/loadaverage: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | uptime | awk -F\ '{print $(NF - 2),$(NF - 1),$NF}' 3 | -------------------------------------------------------------------------------- /bin/platex2pdf: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | platex $1 3 | dvipdfmx ${1%tex}dvi 4 | open -a Skim.app ${1%tex}pdf 5 | -------------------------------------------------------------------------------- /bin/pre-commit.keyword-check.sample: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # An example hook script to verify what is about to be committed. 4 | # Called by "git commit" with no arguments. The hook should 5 | # exit with non-zero status after issuing an appropriate message if 6 | # it wants to stop the commit. 7 | # 8 | # To enable this hook, rename this file to "pre-commit". 9 | 10 | if git rev-parse --verify HEAD >/dev/null 2>&1 11 | then 12 | against=HEAD 13 | else 14 | # Initial commit: diff against an empty tree object 15 | against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 16 | fi 17 | 18 | # If you want to allow non-ascii filenames set this variable to true. 19 | allownonascii=$(git config hooks.allownonascii) 20 | 21 | # Cross platform projects tend to avoid non-ascii filenames; prevent 22 | # them from being added to the repository. We exploit the fact that the 23 | # printable range starts at the space character and ends with tilde. 24 | if [ "$allownonascii" != "true" ] && 25 | # Note that the use of brackets around a tr range is ok here, (it's 26 | # even required, for portability to Solaris 10's /usr/bin/tr), since 27 | # the square bracket bytes happen to fall in the designated range. 28 | test "$(git diff --cached --name-only --diff-filter=A -z $against | 29 | LC_ALL=C tr -d '[ -~]\0')" 30 | then 31 | echo "Error: Attempt to add a non-ascii file name." 32 | echo 33 | echo "This can cause problems if you want to work" 34 | echo "with people on other platforms." 35 | echo 36 | echo "To be portable it is advisable to rename the file ..." 37 | echo 38 | echo "If you know what you are doing you can disable this" 39 | echo "check using:" 40 | echo 41 | echo " git config hooks.allownonascii true" 42 | echo 43 | exit 1 44 | fi 45 | 46 | for FILE in `git diff-index --name-status $against -- | grep -E '\.js(\.coffee)?$'| cut -c3-` ; do 47 | # Check if the file contains 'console.log' 48 | grep_result=`grep 'console.log' $FILE | grep -v -E '\s*(\#+|\/\/).*console.log' | grep -v '^$' ` 49 | if [ -n "${grep_result}" ] 50 | then 51 | echo $FILE ' contains console.log!' 52 | echo $grep_result 53 | exit 1 54 | fi 55 | done 56 | 57 | for FILE in `git diff-index --name-status $against -- | grep '\.rb$'| cut -c3-` ; do 58 | # Check if the file contains 'debugger' 59 | grep_result=`grep 'debugger' $FILE | grep -v -E '\s*\#+.*debugger' | grep -v '^$'` 60 | if [ -n "${grep_result}" ] 61 | then 62 | echo $FILE ' contains debugger!' 63 | echo $grep_result 64 | exit 1 65 | fi 66 | done 67 | 68 | exec git diff-index --check --cached $against -- 69 | -------------------------------------------------------------------------------- /bin/socks-proxy: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # usage : 4 | # socks-proxy [NETWORK] [on|off] [PROXY] [PORT] 5 | # socks-proxy Wi-Fi on localhost 1080 6 | # 7 | # SOCKSプロキシを使った接続とその設定 - 帽子の中 http://d.hatena.ne.jp/seaborgium/20111227/1324993156 8 | 9 | NETWORK=$1 10 | SWITCH=$2 11 | PROXY=$3 12 | PORT=$4 13 | 14 | if [ -z "${NETWORK}" ]; then 15 | NETWORK="Ethernet" 16 | fi 17 | if [ -z "${SWITCH}" ]; then 18 | SEITCH="on" 19 | fi 20 | 21 | if [ -n "${PROXY}" -a -n "${PORT}" ]; then 22 | networksetup -setsocksfirewallproxy "${NETWORK}" ${PROXY} ${PORT} 23 | echo "Network [${NETWORK}] : set socks proxy to '${PROXY}:${PORT}'" 24 | fi 25 | 26 | networksetup -setsocksfirewallproxystate "${NETWORK}" ${SWITCH} 27 | if [ ${SWITCH} = "on" ]; then 28 | echo "Network [${NETWORK}] : socks proxy is enabled" 29 | else 30 | echo "Network [${NETWORK}] : socks proxy is disabled" 31 | fi 32 | -------------------------------------------------------------------------------- /bin/track_all_branches: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master | sed -e "s/^ remotes\/origin\///g" ` ; do 3 | git branch --track ${branch} remotes/origin/${branch} 4 | done 5 | -------------------------------------------------------------------------------- /bin/up_all_branches: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ssh-agent /home/ozaki/.ssh/ozaki_id_rsa 3 | git fetch 4 | for branch in `git branch -r | cut -d " " -f3 | grep -v HEAD | sed -e "s/^origin\///g" | sort | uniq` ; do 5 | echo ${branch} 6 | git checkout ${branch} && git pull --rebase 7 | done 8 | -------------------------------------------------------------------------------- /import.scala: -------------------------------------------------------------------------------- 1 | import com.yuroyoro.util._ 2 | import com.yuroyoro.util.io._ 3 | import com.yuroyoro.util.net._ 4 | 5 | import scala.io.Source 6 | import scala.collection.JavaConversions._ 7 | import scala.xml._ 8 | import scala.xml.parsing.XhtmlParser 9 | 10 | // import scala.util.matching.Regex 11 | // import scala.collection.jcl.Conversions._ 12 | // import java.util.{List => JList, Map => JMap } 13 | // import java.util.{Calendar,Date } 14 | 15 | // // import _root_.com.yuroyoro.interactivehelp.Help._ 16 | // // 17 | // type -->[A, B] = PartialFunction[A, B] 18 | 19 | // object FileOut{ 20 | // import java.io.{Writer, OutputStreamWriter, FileOutputStream } 21 | 22 | // def os(fileName:String):Writer = 23 | // new OutputStreamWriter( new FileOutputStream( fileName ), "UTF-8") 24 | 25 | // def apply( fileName:String, content:String ) = { 26 | // val o = os( fileName ) 27 | // o.write( content ) 28 | // o.flush 29 | // o.close 30 | // } 31 | // def apply( fileName:String, content:Seq[String] ) = { 32 | // val o = os( fileName ) 33 | // content.foreach { c => o.write( c + "\n" ) } 34 | // o.flush 35 | // o.close 36 | // } 37 | // } 38 | 39 | // class MapOrElseOption[A]( o:Option[A] ){ 40 | 41 | // def mapOrElse[B]( default : => B)( f:(A) => B ) = o match { 42 | // case None => default 43 | // case Some(x) => f(x) 44 | // } 45 | // } 46 | 47 | // implicit def option2MapOrElseOption[A]( o:Option[A] ) = new MapOrElseOption( o ) 48 | 49 | // class HtmlNodeSeq( xml:NodeSeq ) { 50 | // def class_?(className:String ) = xml filter{ e => 51 | // styleClass(e).split("\\s").contains(className) 52 | // } 53 | 54 | // def id_?( id:String ) = xml filter{ e => 55 | // (e \ "@id" text) == id 56 | // } 57 | // def styleClass( xml:NodeSeq ) = xml \ "@class" text 58 | // def link( xml:NodeSeq ) = xml \ "@href" text 59 | // } 60 | // implicit def nodeSeq2HtmlNodeSeq( xml:NodeSeq ) = new HtmlNodeSeq( xml ) 61 | 62 | -------------------------------------------------------------------------------- /nvim/dein.rc.vim: -------------------------------------------------------------------------------- 1 | 2 | if &compatible 3 | set nocompatible 4 | endif 5 | 6 | filetype plugin indent on 7 | 8 | " ensure cache dir 9 | let $CACHE = expand('~/.cache') 10 | 11 | if !isdirectory(expand($CACHE)) 12 | call mkdir(expand($CACHE), 'p') 13 | endif 14 | 15 | let s:dein_dir = expand('$CACHE/dein') 16 | let s:dein_repo_dir = s:dein_dir . '/repos/github.com/Shougo/dein.vim' 17 | 18 | " git clone dein if not installed 19 | if !isdirectory(s:dein_repo_dir) 20 | execute '!git clone https://github.com/Shougo/dein.vim' s:dein_repo_dir 21 | endif 22 | execute 'set runtimepath^=' . s:dein_repo_dir 23 | 24 | if dein#load_state(s:dein_dir) 25 | call dein#begin(s:dein_dir) 26 | 27 | " load pluginsettings from toml file 28 | call dein#load_toml('~/.config/nvim/dein.toml', {'lazy' : 0}) 29 | call dein#load_toml('~/.config/nvim/deinlazy.toml', {'lazy' : 1}) 30 | 31 | call dein#end() 32 | call dein#save_state() 33 | endif 34 | 35 | autocmd VimEnter * call dein#call_hook('post_source') 36 | -------------------------------------------------------------------------------- /nvim/deinlazy.toml: -------------------------------------------------------------------------------- 1 | # ========================================================== 2 | # programming 3 | # ========================================================== 4 | 5 | # golang 6 | [[plugins]] 7 | repo = 'zchee/deoplete-go' 8 | depends = ['deoplete.nvim'] 9 | build = 'make' 10 | hook_post_source = 'source ~/.config/nvim/plugins/deoplete-go.rc.vim' 11 | on_ft = 'go' 12 | 13 | [[plugins]] 14 | repo = 'fatih/vim-go' 15 | on_ft = 'go' 16 | hook_source = 'source ~/.config/nvim/plugins/vim-go.rc.vim' 17 | hook_post_source = 'source ~/.config/nvim/plugins/vim-go.post.rc.vim' 18 | 19 | # ruby 20 | [[plugins]] 21 | repo = 'tpope/vim-rails' 22 | on_ft = 'ruby' 23 | 24 | [[plugins]] 25 | repo = '5t111111/denite-rails' 26 | # repo = 'yuroyoro/denite-rails' 27 | # rev = 'patch-1' 28 | hook_post_source = 'source ~/.config/nvim/plugins/denite-rails.rc.vim' 29 | on_ft = 'ruby' 30 | 31 | # crystal 32 | [[plugins]] 33 | repo = 'rhysd/vim-crystal' 34 | on_ft = 'crystal' 35 | 36 | # TypeScript 37 | [[plugins]] 38 | repo = 'leafgarland/typescript-vim' 39 | on_ft = 'typescript' 40 | 41 | 42 | [[plugins]] 43 | repo = 'Quramy/tsuquyomi' 44 | on_ft = 'typescript' 45 | -------------------------------------------------------------------------------- /nvim/init.vim: -------------------------------------------------------------------------------- 1 | " load dein.vim and plugins 2 | source ~/dotfiles/nvim/dein.rc.vim 3 | 4 | " load option settings 5 | source ~/dotfiles/nvim/options.rc.vim 6 | 7 | " load key mapings 8 | source ~/dotfiles/nvim/keymap.rc.vim 9 | -------------------------------------------------------------------------------- /nvim/plugins/CamelCaseMotion.rc.vim: -------------------------------------------------------------------------------- 1 | "------------------------------------ 2 | " camelcasemotion.vim 3 | "------------------------------------ 4 | 5 | " move cursor by camel case 6 | map w CamelCaseMotion_w 7 | map b CamelCaseMotion_b 8 | map e CamelCaseMotion_e 9 | 10 | " in text-object 11 | omap iw CamelCaseMotion_iw 12 | xmap iw CamelCaseMotion_iw 13 | omap ib CamelCaseMotion_ib 14 | xmap ib CamelCaseMotion_ib 15 | omap ie CamelCaseMotion_ie 16 | xmap ie CamelCaseMotion_ie 17 | -------------------------------------------------------------------------------- /nvim/plugins/airline.rc.vim: -------------------------------------------------------------------------------- 1 | "------------------------------------ 2 | " vim-ariline 3 | "------------------------------------ 4 | 5 | set laststatus=2 6 | let g:airline_powerline_fonts = 1 7 | 8 | 9 | 10 | " powerline symbols 11 | let g:airline_left_sep = '⮀' 12 | let g:airline_left_alt_sep = '⮁' 13 | let g:airline_right_sep = '⮂' 14 | let g:airline_right_alt_sep = '⮃' 15 | 16 | let g:airline_symbols = {} 17 | let g:airline_symbols.linenr = '⭡' 18 | let g:airline_symbols.crypt = '🔒' 19 | let g:airline_symbols.maxlinenr = '␤' 20 | let g:airline_symbols.branch = '⎇' 21 | let g:airline_symbols.paste = 'ρ' 22 | let g:airline_symbols.paste = 'p' 23 | let g:airline_symbols.paste = '∥' 24 | let g:airline_symbols.spell = 'Ꞩ' 25 | let g:airline_symbols.notexists = 'n' 26 | let g:airline_symbols.whitespace = 'Ξ' 27 | -------------------------------------------------------------------------------- /nvim/plugins/ale.rc.vim: -------------------------------------------------------------------------------- 1 | "------------------------------------ 2 | " ALE(Asynchronous Lint Engine) 3 | "------------------------------------ 4 | 5 | let g:airline#extensions#ale#enabled = 1 6 | 7 | " always show error sign colum left with line number col 8 | let g:ale_sign_column_always = 1 9 | 10 | " don't fire linting on each text chnage evnet 11 | let g:ale_lint_on_text_changed = 'never' 12 | 13 | " add errors to quickfix, not to location list 14 | let g:ale_set_loclist = 0 15 | let g:ale_set_quickfix = 1 16 | 17 | " open quickfix window on save 18 | let g:ale_open_list = 'on_save' 19 | 20 | let g:ale_sign_error = '⨉' 21 | let g:ale_sign_warning = '⚠' 22 | let g:ale_statusline_format = ['⨉ %d', '⚠ %d', '⬥ ok'] 23 | 24 | let g:ale_echo_msg_error_str = 'E' 25 | let g:ale_echo_msg_warning_str = 'W' 26 | let g:ale_echo_msg_format = '[%linter%] %s [%severity%]' 27 | let g:ale_loclist_msg_format = '[%linter%] %s [%severity%]' 28 | 29 | let g:ale_fix_on_save = 1 30 | let g:ale_linters.go = ['go build', 'gofmt', 'golint', 'golangci-lint'] 31 | let g:ale_fixers.go = ['gofmt', 'goimports'] 32 | 33 | let g:ale_go_golangci_lint_package = 1 34 | let g:ale_go_golangci_lint_options = "--enable-all --disable gochecknoglobals" 35 | let g:ale_go_gofmt_options = "-s" 36 | 37 | -------------------------------------------------------------------------------- /nvim/plugins/denite-gtags.rc.vim: -------------------------------------------------------------------------------- 1 | "------------------------------------ 2 | " denite-gtags 3 | "------------------------------------ 4 | 5 | " Keymap 6 | nmap [denite]tr :DeniteCursorWord -buffer-name=gtags_ref gtags_ref 7 | nmap [denite]td :DeniteCursorWord -buffer-name=gtags_def gtags_def 8 | -------------------------------------------------------------------------------- /nvim/plugins/denite-rails.rc.vim: -------------------------------------------------------------------------------- 1 | "------------------------------------ 2 | " denite-rails 3 | "------------------------------------ 4 | 5 | " Keymap 6 | nmap [denite]rm :Denite rails:model 7 | nmap [denite]rc :Denite rails:controller 8 | nmap [denite]rv :Denite rails:view 9 | nmap [denite]rs :Denite rails:spec 10 | -------------------------------------------------------------------------------- /nvim/plugins/denite.rc.vim: -------------------------------------------------------------------------------- 1 | "------------------------------------ 2 | " denite.nvim 3 | "------------------------------------ 4 | 5 | " Change default prompt 6 | call denite#custom#option('default', { 7 | \ 'prompt': '>', 8 | \ 'cursor_wrap': 'short', 9 | \ }) 10 | 11 | call denite#custom#source('_', 'matchers', ['matcher_cpsm']) 12 | call denite#custom#source('_', 'sorters', ['sorter_word', 'sorter_rank']) 13 | 14 | " Change mapping in denite buffer 15 | call denite#custom#map( 16 | \ 'insert', 17 | \ '', 18 | \ '', 19 | \ 'noremap' 20 | \) 21 | call denite#custom#map( 22 | \ 'insert', 23 | \ '', 24 | \ '', 25 | \ 'noremap' 26 | \) 27 | call denite#custom#map( 28 | \ 'insert', 29 | \ 'jj', 30 | \ '', 31 | \ 'noremap' 32 | \) 33 | call denite#custom#map( 34 | \ 'insert', 35 | \ 'kk', 36 | \ '', 37 | \ 'noremap' 38 | \) 39 | 40 | 41 | " key mappings 42 | nnoremap [denite] 43 | nmap f [denite] 44 | 45 | " source file 46 | nnoremap [denite]f :Denite file 47 | 48 | " source file with buffer dir 49 | nnoremap [denite]d :DeniteBufferDir file 50 | 51 | " source file with project dir 52 | nnoremap [denite]p :DeniteProjectDir file 53 | 54 | " source file_mru 55 | nnoremap [denite]u :Denite file_mru 56 | 57 | " source file_rec 58 | nnoremap [denite]t :Denite file_rec 59 | 60 | " source buffer 61 | nnoremap [denite]b :Denite buffer 62 | 63 | " source help 64 | nnoremap [denite]h :DeniteCursorWord help 65 | 66 | " grep 67 | nnoremap [denite]w :DeniteCursorWord grep 68 | nnoremap [denite]g :DeniteProjectDir grep 69 | 70 | 71 | " Ripgrep command on grep source 72 | call denite#custom#var('grep', 'command', ['rg']) 73 | call denite#custom#var('grep', 'default_opts', 74 | \ ['--vimgrep', '--no-heading','-S']) 75 | call denite#custom#var('grep', 'recursive_opts', ['']) 76 | call denite#custom#var('grep', 'final_opts', []) 77 | -------------------------------------------------------------------------------- /nvim/plugins/deoplete-go.rc.vim: -------------------------------------------------------------------------------- 1 | "------------------------------------ 2 | " deoplete-go.nvim 3 | "------------------------------------ 4 | 5 | let g:deoplete#sources#go#gocode_binary = $GOPATH.'/bin/gocode-gomod' 6 | let g:deoplete#sources#go#sort_class = ['package', 'func', 'type', 'var', 'const'] 7 | -------------------------------------------------------------------------------- /nvim/plugins/deoplete.rc.vim: -------------------------------------------------------------------------------- 1 | "------------------------------------ 2 | " deoplete.nvim 3 | "------------------------------------ 4 | 5 | let g:deoplete#enable_at_startup = 1 6 | 7 | inoremap 8 | \ pumvisible() ? "\" : 9 | \ check_back_space() ? "\" : 10 | \ deoplete#mappings#manual_complete() 11 | 12 | function! s:check_back_space() abort "{{{ 13 | let col = col('.') - 1 14 | return !col || getline('.')[col - 1] =~ '\s' 15 | endfunction"}}} 16 | 17 | -------------------------------------------------------------------------------- /nvim/plugins/gen_tags.rc.vim: -------------------------------------------------------------------------------- 1 | "------------------------------------ 2 | " gen_tags.vim 3 | "------------------------------------ 4 | 5 | " Auto generate gtags 6 | let g:gen_tags#gtags_auto_gen = 1 7 | " Store GTAGS file to .git dire 8 | let g:gen_tags#use_cache_dir = 0 9 | -------------------------------------------------------------------------------- /nvim/plugins/gitgutter.rc.vim: -------------------------------------------------------------------------------- 1 | "------------------------------------ 2 | " gitgutter 3 | "------------------------------------ 4 | 5 | " revert the hunk 6 | nnoremap grh :GitGutterUndoHunk 7 | -------------------------------------------------------------------------------- /nvim/plugins/iceberg.rc.vim: -------------------------------------------------------------------------------- 1 | "------------------------------------ 2 | " iceberg 3 | "------------------------------------ 4 | 5 | colorscheme iceberg 6 | 7 | " change visual mode highlighting 8 | highlight Visual ctermfg=234 ctermbg=150 guifg=#161821 guibg=#b4be82 9 | AirlineTheme iceberg 10 | AirlineRefresh 11 | 12 | -------------------------------------------------------------------------------- /nvim/plugins/indent-guides.rc.vim: -------------------------------------------------------------------------------- 1 | "------------------------------------ 2 | " vim-indent-guides 3 | "------------------------------------ 4 | 5 | let g:indent_guides_enable_on_vim_startup = 1 6 | 7 | -------------------------------------------------------------------------------- /nvim/plugins/jellybeans.rc.vim: -------------------------------------------------------------------------------- 1 | "------------------------------------ 2 | " jellybeans 3 | "------------------------------------ 4 | 5 | colorscheme jellybeans 6 | 7 | AirlineTheme jellybeans 8 | AirlineRefresh 9 | 10 | -------------------------------------------------------------------------------- /nvim/plugins/lucius.rc.vim: -------------------------------------------------------------------------------- 1 | "------------------------------------ 2 | " vim-lucius 3 | "------------------------------------ 4 | 5 | 6 | colorscheme lucius 7 | " LuciusBlackLowContrast 8 | LuciusBlack 9 | 10 | AirlineTheme lucius 11 | AirlineRefresh 12 | 13 | highlight LineNr guifg=#999999 guibg=#444444 14 | highlight Search ctermfg=233 ctermbg=172 guifg=bg guibg=#F3C759 15 | highlight MatchParen ctermfg=188 ctermbg=106 guifg=bg guibg=#3DB680 16 | highlight Identifier ctermfg=81 guifg=#AEC1E3 17 | highlight rubyInstanceVariable guifg=#95DFD6 18 | highlight String guifg=#F9E3AA 19 | 20 | -------------------------------------------------------------------------------- /nvim/plugins/minibufexpl.rc.vim: -------------------------------------------------------------------------------- 1 | "------------------------------------ 2 | " MiniBufExplorer 3 | "------------------------------------ 4 | 5 | "set minibfexp 6 | let g:miniBufExplMapWindowNavVim=1 " move hjkl 7 | let g:miniBufExplSplitBelow=0 " Put new window above 8 | let g:miniBufExplMapWindowNavArrows=1 9 | let g:miniBufExplMapCTabSwitchBufs=1 10 | let g:miniBufExplModSelTarget=1 11 | let g:miniBufExplSplitToEdge=1 12 | let g:miniBufExplMaxSize = 10 13 | let g:miniBufExplCycleArround = 1 14 | 15 | ":Toggle MiniBufExplorer 16 | command! Mt :MBEToggle 17 | -------------------------------------------------------------------------------- /nvim/plugins/nerdcommenter.rc.vim: -------------------------------------------------------------------------------- 1 | "------------------------------------ 2 | " NERD_commenter.vim 3 | "------------------------------------ 4 | 5 | " insert space into comment 6 | let NERDSpaceDelims=1 7 | 8 | " align comment charactor 9 | let g:NERDDefaultAlign='left' 10 | 11 | " toggle comment 12 | map x c 13 | 14 | " don't show undfined filetype error 15 | let NERDShutUp=1 16 | -------------------------------------------------------------------------------- /nvim/plugins/vim-easy-align.rc.vim: -------------------------------------------------------------------------------- 1 | "------------------------------------ 2 | " vim-easy-align.vim 3 | "------------------------------------ 4 | 5 | " Start interactive EasyAlign in visual mode (e.g. vipga) 6 | xmap ga (EasyAlign) 7 | 8 | " Start interactive EasyAlign for a motion/text object (e.g. gaip) 9 | nmap ga (EasyAlign) 10 | -------------------------------------------------------------------------------- /nvim/plugins/vim-go.post.rc.vim: -------------------------------------------------------------------------------- 1 | "------------------------------------ 2 | " vim-go (post source) 3 | "------------------------------------ 4 | 5 | highlight goErr cterm=bold ctermfg=214 guifg=#F3C759 6 | match goErr /\/ 7 | -------------------------------------------------------------------------------- /nvim/plugins/vim-go.rc.vim: -------------------------------------------------------------------------------- 1 | "------------------------------------ 2 | " vim-go 3 | "------------------------------------ 4 | 5 | set completeopt-=preview 6 | 7 | " syntax highlighting setteings 8 | let g:go_highlight_extra_types = 1 9 | let g:go_highlight_operators = 1 10 | let g:go_highlight_functions = 1 11 | let g:go_highlight_function_arguments = 1 12 | let g:go_highlight_function_calls = 1 13 | let g:go_highlight_fields = 1 14 | let g:go_highlight_types = 1 15 | let g:go_highlight_build_constraints = 1 16 | let g:go_highlight_generate_tags = 1 17 | let g:go_highlight_variable_assignments = 1 18 | let g:go_highlight_variable_declarations = 1 19 | -------------------------------------------------------------------------------- /nvim/plugins/vim-surround.rc.vim: -------------------------------------------------------------------------------- 1 | "------------------------------------ 2 | " surround.vim 3 | "------------------------------------ 4 | 5 | " s, ss 6 | nmap s Ysurround 7 | nmap ss Yssurround 8 | let g:surround_{char2nr('e')} = "begin \r end" 9 | let g:surround_{char2nr('d')} = "do \r end" 10 | let g:surround_{char2nr("-")} = ":\r" 11 | -------------------------------------------------------------------------------- /nvim/plugins/yuroyoro256.rc.vim: -------------------------------------------------------------------------------- 1 | "------------------------------------ 2 | " yuroyoro256 3 | "------------------------------------ 4 | 5 | colorscheme yuroyoro256 6 | -------------------------------------------------------------------------------- /oneliners.txt: -------------------------------------------------------------------------------- 1 | 2 | #MysqlでFKの一覧を調べるワンライナー 3 | mysql -u resolver --password=resolver resolver < TableList.sql |sed 's/\\n/&\ 4 | /g'| grep 'CONSTRAINT .* FOREIGN KEY'|cut -d ' ' -f4 > FKList 5 | 6 | # ファイル名を置換するワンライナー 7 | ls *.png | cut -d ' ' -f14,15,16,17 |perl -nle '$o=$_;$_=~s/\s/_/i;$_=lc($_);$_=~s/^/icon_/i;rename($o, $_);' 8 | 9 | ls *.png | cut -d ' ' -f14,15,16,17 |perl -nle '$o=$_;$_=~s/\s/_/i;$_=lc($_);$_=~s/^/button_/i;rename($o, $_);' 10 | 11 | ls *.png |perl -nle '$o=$_;split($_);print $_' 12 | 13 | # .svnを消す 14 | rm -rf `find ./ -type d -name .svn ! -regex \.svn/. -print` 15 | 16 | rm -rf `find ./ -type d -name __MACOSX ! -regex __MACOSX/. -print` 17 | 18 | rm -rf `find ./ -type f -name vssver2.scc ! -regex vssver2\.scc -print` 19 | 20 | rm -rf `find ./ -type f -name .DS_Store ! -regex \.DS_Store -print` 21 | 22 | hogehoge.txtより最終更新日が新しい/path/to/dir以下のファイル名を表示 23 | 1. find /path/to/dir -type f -newer hogehoge.txt 24 | hogehoge.txtより最終更新日が古い/path/to/dir以下のファイル名を表示 25 | 1. find /path/to/dir -type f ! -newer hogehoge.txt 26 | 最終更新日が2008年3月1日0時より新しい、/path/to/dir以下のファイル名を表示 ※3/21 「-d」が抜けていたのを修正しました。 27 | 1. touch -m -d '2008/03/01 00:00:00' hogehoge 28 | 2. find /path/to/dir -type f -newer hogehoge 29 | 最終更新日が2008年3月1日0時より古い、/path/to/dir以下のファイルを削除 30 | 1. touch -m -d '2008/03/01 00:00:00' hogehoge 31 | 2. find /path/to/dir -type f ! -newer hogehoge -exec rm {} \; 32 | -execの{}には、findでマッチした各ファイル名が入って、指定したコマンドが実行されます。最後の\;を忘れずに。 33 | findの結果を受けてコマンドを実行するのは、xargsでもできます。 34 | /path/to/dir以下の.svnディレクトリを一括削除 35 | 1. find /path/to/dir -type d -name '.svn' | xargs rm -rvf 36 | subversionを使っていると、使う機会があるかもしれません。 37 | diffも便利です。 38 | 指定した二つのディレクトリ内で、異なっているファイルがないか調べる。 39 | 1. diff -brtBEq /path/to/dir1 /path/to/dir2 40 | 41 | 42 | findとsedでディレクトリ内のファイルからある文字列を一括置換する 43 | 44 | find . -name "*.hbm.xml" -exec sed -i 's/hibernate-mapping-2.0/hibernate-mapping-3.0/g' {} \; 45 | b、t、B、Eで、タブ、スペース、空行の違いが無視されます。 46 | rは再帰的に、qはファイル名だけ表示するオプションです。 47 | 48 | 文字コード・改行変換 49 | find . -name '*.sql' | xargs nkf --overwrite -w -Lu 50 |  iconv -s -f SHIFT_JIS -t UTF-8 51 | 52 | find . -name '*.java' | xargs nkf --overwrite -w -Lu --ic=EUC-JP --oc=UTF-8 53 | 54 | killする方法 55 | pgrep screen | sudo xargs kill 56 | 57 | Findで見つかった全ファイルをディレクトリ構造ごとコピーする 58 | find ./ -type f -mtime -1 | cpio -pd ../banner 59 | find ./ -type f -mtime -2 -name "*.scala" | cpio -pd 60 | find ./ -type f -mtime -2 -name "*.pdf" | cpio -pd ../pdf 61 | ../work Subversion の .svn や Mac 固有の .DS_Store, ._* を含めず zip アーカイブを作成する 62 | 63 | zip -r [アーカイブ名] [アーカイブ対象ディレクトリ] -x *.svn* *.DS_Store* *._* 64 | svnでディレクトリ全体をignoreをかけるコマンド 65 | svn propset svn:ignore ‘*’ [ディレクトリ名]/ 66 | svn statusで変更があったファイルのみディレクトリ構造毎別なディレクトリにコピーする湾来名 > svn status | cut -d ' ' -f8 | cpio -pd ../work 67 | 68 | -------------------------------------------------------------------------------- /setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DOT_FILES=( .zsh .zshrc .zshrc.custom .zshrc.alias .zshrc.linux .zshrc.osx .ctags .emacs.el .gdbinit .gemrc .gitconfig .gitignore .inputrc .irbrc .sbtconfig .screenrc .vimrc .vim .vrapperrc import.scala .tmux.conf .dir_colors .rdebugrc .pryrc .percol.d) 4 | 5 | for file in ${DOT_FILES[@]} 6 | do 7 | ln -s $HOME/dotfiles/$file $HOME/$file 8 | done 9 | 10 | --------------------------------------------------------------------------------