This file contains hidden or 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
| perl -e 'print q/hello gist/;' |
This file contains hidden or 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
| post by gist-vim (test) |
This file contains hidden or 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
| " neobundle {{{ | |
| if has('vim_starting') | |
| set runtimepath+=~/.bundle/neobundle.vim/ | |
| endif | |
| call neobundle#rc(expand('~/.bundle/')) | |
| " let NeoBundle manage NeoBundle | |
| " required! | |
| filetype off | |
| filetype plugin indent off |
This file contains hidden or 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
| let g:P= vital#of('vital').import('ProcessManager') | |
| if !g:P.is_available() | |
| throw 'omg' | |
| endif | |
| " ProcessManager intented to manage interactive processes, | |
| " thus sort prg isn't good example. | |
| let g:p= g:P.new('erl') |
This file contains hidden or 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
| function! s:collect_imports() | |
| return filter(getbufline('%', 1, '$'), 'v:val =~# "^\\s*import"') | |
| endfunction | |
| echo s:collect_imports() |
This file contains hidden or 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
| let g:proc= vimproc#popen3('irb --simple-prompt') | |
| sleep | |
| echo 'kill()' | |
| echo g:proc.kill(0) | |
| call g:proc.stdin.write("warn 2;\n") | |
| let g:stdout= '' |
This file contains hidden or 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
| let g:proc= vimproc#popen3('irb --simple-prompt') | |
| sleep | |
| call g:proc.stdin.write("warn 2;\n") | |
| let g:stdout= '' | |
| let g:stderr= '' | |
| while 1 | |
| let g:stdout.= g:proc.stdout.read() |
This file contains hidden or 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
| " vim:foldmethod=marker:fen: | |
| scriptencoding utf-8 | |
| set nocompatible | |
| set runtimepath=~/.bundle/vimproc/ |
This file contains hidden or 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
| use 5.010; | |
| use utf8; | |
| use strict; | |
| use warnings; | |
| use Carp qw/croak cluck/; | |
| use IPC::Open2; | |
| use Time::HiRes qw/gettimeofday tv_interval/; | |
| use Data::Dumper; | |
| use Devel::Peek; | |
| use Encode qw/decode/; |
This file contains hidden or 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
| let s:save_cpo= &cpo | |
| set cpo&vim | |
| function! Sprintf(expr, args) | |
| let l:result= a:expr | |
| while match(l:result, '\${\w\+}') != -1 | |
| let l:keyword= matchstr(l:result, '\${\zs\w\+\ze}') | |
| let l:replacement= has_key(a:args, l:keyword) ? a:args[l:keyword] : '' |
OlderNewer