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
" find_rust_std.vim | |
scriptencoding utf-8 | |
function! FindRustStd(fname) | |
let fname = '*' . substitute(tolower(a:fname), '::', '/', 'g') . '.rs' | |
" echo fname | |
let found = globpath(s:path, fname) | |
if found != '' | |
return found | |
endif |
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
#!/bin/sh | |
# ~/.ctags.d/drivers | |
() { | |
COMMAND_NOT_FOUND=127 | |
if ! type dscanner; then | |
exit ${COMMAND_NOT_FOUND} | |
fi | |
} > /dev/null 2>&1 |
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
" :compiler dscanner | |
" License: Public Domain | |
scriptencoding utf-8 | |
if exists('current_compiler') | |
finish | |
endif | |
let current_compiler = 'dscanner' | |
if exists(':CompilerSet') != 2 |
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
augroup typescript-tscpath | |
autocmd! | |
autocmd BufNewFile,BufRead *.ts call TSCPath() | |
augroup END | |
function! TSCPath() "{{{ | |
if !exists('g:typescript_compiler_binary') | |
" try get local tsc path | |
let tsc_path = split(system('npm ls -s --parseable typescript'), '\n')[-1] | |
if !executable(tsc_path . '/bin/tsc') |
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
# wrapper for ref.vim | |
# license: Public Domain | |
function vimref { | |
if [[ $# < 2 ]] then | |
print "$0 - ref.vim wrapper | |
usage: | |
$0 SOURCE KEYWORDS | |
example: | |
$0 man 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
" ref-codic.vim - A ref source for codic. | |
" ref-codic.vim is inspired by unite-codic.vim <https://github.com/rhysd/unite-codic.vim> | |
" Version: 0.0.1 | |
" Author : h14i <[email protected]> | |
" License: Public domain | |
" | |
" Requirements: | |
" ref.vim <https://github.com/thinca/vim-ref/> | |
" codic.vim <https://github.com/koron/codic-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
#!/usr/bin/zsh | |
plenv local system | |
pyenv local 2.7.6 | |
rbenv local 2.1.2 | |
plenv rehash | |
pyenv rehash | |
rbenv rehash |
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
-- 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
" 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/... |
NewerOlder