This file contains 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
rem システムの環境変数を変更するため管理者として実行する必要がある | |
rem gistにcp932に投稿すると文字化けするのでこのファイルのエンコードはUTF-8 | |
rem cmdでchcp 65001と打つとUTF-8を使用するように変更できる | |
chcp 65001 | |
setx HOME "C:\Users\%USERNAME%" | |
rem cygwin以外からも、cygwinに入れたコマンド使えるようにする | |
setx /M PATH "C:\cygwin\bin;%PATH%" |
This file contains 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:Paste64Copy() range | |
let l:tmp = @" | |
silent normal gvy | |
let l:selected = @" | |
let @" = l:tmp | |
let l:i = 0 | |
let l:len = strlen(l:selected) | |
let l:escaped = '' | |
while l:i < l:len | |
let l:c = strpart(l:selected, l:i, 1) |
This file contains 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
if &term =~ "xterm" && v:version > 603 | |
if $TMUX != '' | |
let &t_SI = "\ePtmux;\e\e[?2004h\e\\" | |
let &t_EI = "\ePtmux;\e\e[?2004l\e\\" | |
elseif $TERM == 'screen' | |
let &t_SI = "\eP\e[?2004h\e\\" | |
let &t_EI = "\eP\e[?2004l\e\\" | |
else | |
let &t_SI = "\e[?2004h" | |
let &t_EI = "\e[?2004l" |
This file contains 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
set backup | |
set backupdir=~/.vim.d/.bak | |
augroup backup | |
autocmd! | |
autocmd BufWritePre,FileWritePre,FileAppendPre * call UpdateBackupFile() | |
function! UpdateBackupFile() | |
let basedir = expand("~/.vim.d/.bak") | |
let dir = strftime(basedir."/%Y%m/%d", localtime()).substitute(expand("%:p:h"), '^C:', '' , '') | |
if !isdirectory(dir) |
This file contains 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
.gist { color: #000 } | |
.gist .gist-file { | |
border: 1px solid #dedede; | |
font-family: Consolas, "Liberation Mono", Courier, monospace; | |
margin-bottom: 1em; | |
} | |
.gist .gist-file .gist-meta { | |
font-family: Helvetica, arial, freesans, clean, sans-serif; | |
overflow: hidden; | |
font-size: 85%; |
This file contains 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
#!/usr/bin/env bash | |
# An example hook script to verify what is about to be pushed. Called by "git | |
# push" after it has checked the remote status, but before anything has been | |
# pushed. If this script exits with a non-zero status nothing will be pushed. | |
# | |
# This hook is called with the following parameters: | |
# | |
# $1 -- Name of the remote to which the push is being done | |
# $2 -- URL to which the push is being done | |
# |
This file contains 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 utf8mac2utf8(str) { | |
var utf8marArr = ["が","ぎ","ぐ","げ","ご","ざ","じ","ず","ぜ","ぞ","だ","ぢ","づ","で","ど","ば","ぱ","び","ぴ","ぶ","ぷ","べ","ぺ","ぼ","ぽ","ゔ","ガ","ギ","グ","ゲ","ゴ","ザ","ジ","ズ","ゼ","ゾ","ダ","ヂ","ヅ","デ","ド","バ","パ","ビ","ピ","ブ","プ","ベ","ペ","ボ","ポ","ヴ","ヷ","ヸ","ヹ","ヺ"]; | |
var utf8Arr = ["が","ぎ","ぐ","げ","ご","ざ","じ","ず","ぜ","ぞ","だ","ぢ","づ","で","ど","ば","ぱ","び","ぴ","ぶ","ぷ","べ","ぺ","ぼ","ぽ","ゔ","ガ","ギ","グ","ゲ","ゴ","ザ","ジ","ズ","ゼ","ゾ","ダ","ヂ","ヅ","デ","ド","バ","パ","ビ","ピ","ブ","プ","ベ","ペ","ボ","ポ","ヴ","ヷ","ヸ","ヹ","ヺ"]; | |
for (var i = 0, len = utf8marArr.length; i < len; i++) { | |
str = str.replace(utf8marArr[i], utf8Arr[i], "g"); | |
} | |
return str; | |
} |