Skip to content

Instantly share code, notes, and snippets.

@rbtnn
rbtnn / MyLogged.vim
Created June 23, 2013 09:58
let g:vimconsole#hooks.on_logged = function('MyLogged')
function! MyLogged(context)
call vimconsole#winopen()
endfunction
let g:vimconsole#hooks.on_logged = function('MyLogged')
autocmd FileType vimshell call vimshell#hook#add('emptycmd', 'my_emptycmd', 'g:my_emptycmd')
function! g:my_emptycmd(args,context)
if empty(a:args)
call vimshell#execute('ls')
return 'git status'
else
return a:args
endif
endfunction
@rbtnn
rbtnn / Nancy.md
Created July 10, 2013 08:38
https://github.com/NancyFx/Nancy/wiki ここの重要そうな部分を適当に翻訳したやつ。

Nancy

最初のNancyアプリケーション

ここではあなたはNugetをインストールしており、Visual Studio 2010を使って いることを前提として話を進めています。 しかしこれと同等なことをMono(Version 2.10.2以降)とMonoDevelopを使っても できます。 NancyとNancyのASP.NET Hostingを使った"hello world"アプリケーション作成に

マルチバイトなMarkdownを考える
==============================
日本の社会人たちが好んで使うマルチバイトの記号
----------------------------------------------
括弧内はVimのdigraphです。(`:set digraph`)
@rbtnn
rbtnn / gist:6575954
Created September 16, 2013 02:01
vimrc読書会 No.1~No.63のプラグイン統計
18: Shougo/unite.vim
15: mattn/webapi-vim
15: Shougo/vimproc
14: Shougo/neocomplcache
14: Shougo/neobundle.vim
13: tpope/vim-surround
13: thinca/vim-ref
13: Shougo/vimfiler
12: tyru/open-browser.vim
12: tpope/vim-fugitive
function! s:vim_version() " {{{
redir => lines
silent! version
redir END
let m1 = []
let m2 = []
let regex1 = '^VIM - Vi IMproved \(\d\+.\i\+\) '
let regex2 = '^Included patches: \(\d\+\)-\(\d\+\)'
for line in split(lines,"\n")
if line =~# regex1
@rbtnn
rbtnn / gist:7281389
Last active May 31, 2017 05:55
簡易Filer
function! s:explorer(path)
if a:path ==# '.'
new
elseif isdirectory(a:path)
execute 'cd ' . a:path
else
execute 'tabedit ' . a:path
return
endif
let list = filter(glob('*', 1, 1) + glob('.*', 1, 1), 'v:val !~ "^\\.$"')
@rbtnn
rbtnn / vimtips.vim
Created December 7, 2013 07:40
逆引きVim scriptなど
let g:vimtips#tips_dir = get(g:,'vimtips#tips_dir',expand('~/.tips'))
let g:vimtips#tipsfile_default_encoding = get(g:,'vimtips#tipsfile_default_encoding','utf-8')
function! s:contents_list() " {{{
let list = []
for x in split(globpath(g:vimtips#tips_dir,'*.*'),"\n")
let list += [{
\ 'path' : x,
@rbtnn
rbtnn / Assertion
Last active January 2, 2016 00:28
Vital.Assertion
let s:V = vital#of('vital')
let s:S = s:V.import('Assertion')
call s:S.define('Assert',1)
function! s:hoge(x)
return a:x * 3
endfunction
Assert 3 <!> s:hoge(4)