This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class C | |
def hello | |
puts 'Hello!' | |
end | |
end | |
C.new.hello |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Fedora 19, npm 1.3.11, tsc 0.9.1.1 | |
let g:quickrun_config['typescript/base'] = { | |
\ 'cmdopt': '', | |
\ 'exec': ['tsc %o %s --out %s:p:r.js', '%c %s:p:r.js', 'rm -f %s:p:r.js'], | |
\ 'temp': '%{tempname()}.ts', | |
\ } | |
let g:quickrun_config['typescript/nodejs'] = { | |
\ 'type': 'typescript/base', | |
\ 'command': 'node', | |
\ } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# contextual - wrapper of (spring|bundle exec) commands. | |
# usage: | |
# # in zshrc | |
# source /path/to/contextual | |
# alias rails=contextual-rails | |
# alias rake=contextual-rake | |
# alias rspec=contextual-rspec | |
# completion: | |
# # in zshrc | |
# # require https://github.com/zsh-users/zsh-completions/src/_rails |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" A ref source for godoc. | |
" Version: 0.0.1 | |
" Author : mattn <[email protected]> | |
" License: Creative Commons Attribution 2.1 Japan License | |
" <http://creativecommons.org/licenses/by/2.1/jp/deed.en> | |
let s:save_cpo = &cpo | |
set cpo&vim | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" For gf, [I, i_CTRL-X_CTRL-I | |
" There is a need to modify path because it is suit my environment. | |
setlocal suffixesadd=.d,.di | |
let &l:include = '^\s*\%(\%(public\|static\)\s\+\)\?\<import' | |
" let &l:path = '.,' . g:V.system('denv prefix')[:-2] . '/src/*,' . &l:path . ',,' | |
setlocal path=.,/path/to/dmd/src/**,, | |
let &l:includeexpr = 'substitute(substitute(v:fname, "\\.", "/", "g"), "$", ".d", "")' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#compdef direnv | |
# setopt -eu | |
function _direnv { | |
local direnv | |
local -a comp_list | |
direnv="\ | |
allow[Grants direnv to load the given .envrc] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" support rack app? | |
let &l:include = '^\s*\<\%(load\|autoload\|require_relative\|require\|include\|use\|register\)\>\s*:\=["'']\=\(\h\w*\)["'']\=,\=' | |
let &l:includeexpr = "substitute(substitute(tolower(substitute(substitute(v:fname,'\\(\\u\\+\\)\\(\\u\\l\\)','\\1_\\2','g'),'\\(\\l\\|\\d\\)\\(\\u\\)','\\1_\\2','g')),'::','/','g'),'$','.rb','')" | |
" setlocal path=/to/your/... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- ocamlspot.lua | |
--[[ | |
example: | |
parse_loc("l100c20b3") -> 100, 20 | |
parse_loc("abcdefghi") -> nil, nil | |
--]] | |
function parse_loc(str) | |
local _, _, line, col = string.find(str, "^l(%d+)c(%d+)b%d+$") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tmux-mouse-toggle | |
# via http://qiita.com/kawaz/items/7b15e18ca8e072c1dc57 | |
if [[ -n $TMUX ]]; then | |
if [[ -z "$(tmux show-options -gw mode-mouse | grep off)" ]]; then | |
tmux set-option -gq mouse-utf8 off | |
tmux set-option -gq mouse-resize-pane off | |
tmux set-option -gq mouse-select-pane off | |
tmux set-option -gq mouse-select-window off | |
tmux set-window-option -gq mode-mouse off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/zsh | |
plenv local system | |
pyenv local 2.7.6 | |
rbenv local 2.1.2 | |
plenv rehash | |
pyenv rehash | |
rbenv rehash |
OlderNewer