Skip to content

Instantly share code, notes, and snippets.

View sigwyg's full-sized avatar
:octocat:

Yasuo Fukuda sigwyg

:octocat:
View GitHub Profile
filetype off
filetype plugin indent off
if has('vim_starting')
set nocompatible
set runtimepath+=~/.vim/bundle/neobundle.vim
endif
call neobundle#begin(expand('~/.vim/bundle/'))
NeoBundleFetch 'Shougo/neobundle.vim'
NeoBundle 'Shougo/vimproc.vim', { 'build' : {
\ 'windows' : 'mingw32-make -f make_mingw32.mak',
@sigwyg
sigwyg / gist:2818495
Created May 28, 2012 10:55
Vimの$PATHに追加する
" Add $PATH
if has('vim_starting')
if isdirectory(expand('~/.nvm/v0.6.18/bin/'))
execute 'let $PATH="' . $PATH . ':' . $HOME .'/.nvm/v0.6.18/bin/"'
endif
endif
" autocmd Ver.
autocmd VimEnter * execute 'let $PATH="' . $PATH . ':' . $HOME .'/.nvm/v0.6.18/bin/"'
@sigwyg
sigwyg / gist:2773991
Created May 23, 2012 08:52
行中2度目の「<input」にマッチ(Vim: 肯定後読み)
:'<,'>s/\(.\{-}\zs<input\)\{2}/ <input/
@sigwyg
sigwyg / gist:2156796
Created March 22, 2012 07:13
vimprocが無い場合のエラー出力
vimprocが無い場合のエラー出力
=================================================
## Unite sshの場合(vimprocが無い場合)
Sources: ssh
!!!function <SNR>30_call_unite_empty..unite#start..<SNR>33_recache_candidates..<SNR>33_recache_candidates_loop..<SNR>33_get_source_candidates..72..<SNR>112_get_filenames..<SNR>112_ssh_command..unite#sources#ssh#system_passwd, 行 1!!!
!!!Vim(return):E117: 未知の関数です: sytem!!!
!!!Error occured in change_candidates!!!!
!!!Source name is ssh!!!
@sigwyg
sigwyg / gist:2146045
Created March 21, 2012 10:29
:VimFiler ssh にて特定のファイルを上書きしようとするとエラーになる問題
:VimFiler ssh にて特定のファイルを上書きしようとするとエラーになる問題
===================================================================
* VimShell-sshでは上書きできる
* chmod/chownともに上書き可能なファイルと同じ
* ファイル名に*が付いている
* ファイル名に*が付いていても上書きできるファイルもある
* VimFilerの一覧表示時では、ファイル名に*は付いていない(03/19時点。03/16時点では付いていた)
* エラー文中のuser, host, path, filenameは諸般の事情につき置換しています
@sigwyg
sigwyg / css3-property-duplicate
Created February 24, 2012 14:13 — forked from edom18/css3-property-duplicate
CSSのプロパティを、ベンダープレフィクス付きで複製するスクリプト。(インデントも引き継ぐよう修正+直前のレジスタを保持)
" -----------------------------------------------------------------------
" CSS3PropertyDuplicate(): {{{
" - Origin: https://gist.github.com/972806
" - Forked: https://gist.github.com/1901182
"
" "" -> 無名レジスタ(YなどでYankしたテキストが入る)
" @" -> 無名レジスタの内容を実行する
" @@ -> 直前に実行したレジスタを再実行する
" ""P -> 無名レジスタの内容をペースト
"
@sigwyg
sigwyg / gist:1660919
Created January 23, 2012 05:39
VimFiler ssh://... でファイル保存時、ファイル内容が消える。
VimFiler ssh://... 接続
-> 任意の階層に移動。E/eでファイルを開く。
-> カレントバッファが編集用バッファに移る(正常)
-> :w で保存
-> カレントバッファの内容が消滅。空行でリモート保存されている。:undolistも消滅
VimFiler ssh://... 接続
-> 任意の階層に移動。E/eでファイルを開く。
-> カレントバッファが編集用バッファに移る(正常)
-> ファイルを編集する
@sigwyg
sigwyg / gist:1619272
Created January 16, 2012 05:53
Unite-ssh テスト 2012-01-16 17:00 ver.
1.「:VimFiler ssh://[email protected]:port/home/www/archiva/」だと開けない。
---
[in]: ssh://[email protected]:port/home/www/archiva/
..
- ls: cannot access home/www/archiva/: No such file or directory
---
※「:VimFiler ssh://[email protected]:22//home/www/archiva/」だと開ける
2.初回アクセス時の階層では「../」が表示されない。
@sigwyg
sigwyg / gist:1569714
Created January 6, 2012 08:33
Unite-ssh テスト 2012-01-06 17:00 ver.
:VimFiler ssh://[email protected]/
:VimFiler ssh://[email protected]:port/
-> 問題なし
---
:VimFiler ssh://[email protected]/home/
-> Failed file "[email protected]/home:" copy : cp: [email protected]/home:: No such file or directory^@
---
@sigwyg
sigwyg / gist:1501444
Created December 20, 2011 12:41
VimShell-ssh 利用中、iexe ssh を別タブでBufferから呼び出したときに稀に起こるエラー。netrwが読込専用となる。テンパって<C-c>押すとiexe sshが*Killed*となる。落ち着いて:qすれば問題なかったかもしれない?
function vimshell#execute_current_line..vimshell#int_mappings#execute_line..<SNR>241_execute_histo..optimized_print..<SNR>237_print_simple の処<e7><90>
行 22:
W10: 警告: 読込専用ファイルを変更します