Skip to content

Instantly share code, notes, and snippets.

@h14i
h14i / ref-codic.vim
Created October 2, 2014 11:17
A ref source for codic
" 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/>
@h14i
h14i / vimref.zsh
Last active August 29, 2015 14:07
シェルから ref.vim を呼び出すためのラッパー関数
# 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
@h14i
h14i / typescript_tscpath.vim
Last active August 29, 2015 14:15
Setup project-local tsc path
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')
@h14i
h14i / dscanner.vim
Last active August 29, 2015 14:25
vim compiler plugin for dscanner
" :compiler dscanner
" License: Public Domain
scriptencoding utf-8
if exists('current_compiler')
finish
endif
let current_compiler = 'dscanner'
if exists(':CompilerSet') != 2
@h14i
h14i / dscanner
Last active December 16, 2015 01:45
Dscanner driver for universal-ctags
#!/bin/sh
# ~/.ctags.d/drivers
() {
COMMAND_NOT_FOUND=127
if ! type dscanner; then
exit ${COMMAND_NOT_FOUND}
fi
} > /dev/null 2>&1
" 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