Skip to content

Instantly share code, notes, and snippets.

@nukino
nukino / test.vim
Created January 16, 2012 20:32
[20120117-0532]test.vim/List代入チェック
func! s:test_func1()
let i = 0
while ( i < 500000 )
let dummy = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]
let i += 1
endwhile
endfunc
func! s:test_func2()
let i = 0
@nukino
nukino / _vimrc
Created January 13, 2012 15:21
[20120114-0021]_vimrc/OctopressにGist-tag貼り付け
func! s:paste_gist_tag()
let mx = 'http[s]\?://gist.github.com/\([0-9]\+\)'
" +または"レジスタの中身を検索する
let regs = [@+,@"]
for r in regs
let mlist = matchlist(r, mx)
if ( len(mlist) > 2 )
"カーソル行に挿入
exe "normal! O{% gist " . mlist[1] . " %}"
return
@nukino
nukino / gist_vim_helper.vim
Created January 13, 2012 15:03
[20120114-0003]gist_vim_helper.vim/gist.vimヘルパースクリプト
" -------------------------------------------------------
" author :nukino
" version :000
" license :BSD
" 変更履歴
" 12/01/13 新規作成
" -------------------------------------------------------
" %Y,%m,%dなどstrftime()の書式指定子を指定可能
" $f: ファイル名
" $d: ユーザー定義description
@nukino
nukino / myvimrc.vim
Created January 11, 2012 23:02
myvimrc.vim/Octopress新記事作成
"Octopress 新記事作成
"
"使用するグローバル変数
" g:octopress_rootdir octopressルートディレクトリ
" g:octopress_article_ext 記事の拡張子
" g:octopress_article_subdir 記事のサブフォルダ。strftime()のパラメータ(%Y等)
" 使用可能
"
" 2012/01/06 新規作成
" 2012/01/12 category,keywordに初期値を入れた
@nukino
nukino / _vimrc
Created January 9, 2012 15:18
helpgrep修正スクリプト
func! FuncJHelpgrep(strg, type)
if ( &enc != "utf-8" )
if ( !has('iconv') )
echohl ErrorMsg | echomsg 'Not support iconv' | echohl None
return
endif
if ( a:type == 0 )
let scmd = "helpgrep "
else
let scmd = "lhelpgrep "
@nukino
nukino / _vimrc
Created January 7, 2012 22:00
_vimrc/SSH接続サンプル
if (has('win32') || has('win64'))
"use scp
let g:netrw_scp_cmd = "E:\\PuTTY\\pscp.exe -q -batch"
let g:netrw_sftp_cmd = "E:\\PuTTY\\psftp.exe"
let g:netrw_ssh_cmd = "E:\\PuTTY\\plink.exe"
endif