今まで何でEmacs使ってたんだろう…と遠い目をしながら書いてます。
なんかEmacsを使うことって、暗黙の前提になってますよね。ぼくも一人暮らしをし始めたとき、何の逡巡もなくEmacsを購入してしまいました。確か15MBくらいする牛印のいい感じのヤツです。
でもですね、2年くらい前にEmacsをやめて、Vimにしたんですよ。妻が夜な夜なiPhoneで情報収集をしていたところ、突如Vimに惹かれたらしく、いつの間にか$EDITORにVimが鎮座していました。
@echo off | |
rem Based on Todd Larason's 256color2.pl. | |
rem Ported to Windows 10's Command Prompt. | |
setlocal EnableDelayedExpansion | |
rem display the colors | |
rem first the system ones: | |
echo System colors: |
メ __-─-,-- _ | |
,イ >:::::::::::< ヽ〟 | |
ヽ─イ /,::::,::::::::\ >─r | |
ヾ〟//:!:::ハ::::::|:!:ヽ ,丿 | |
ソ r:リヤ ハ::::::ハ:ハ::|rヘ〟 | |
Ⅲ:|:| V―ヘ::::/-ル゙|/ ハリ\ あらぶる | |
!|:ハ:|,-=〟ヽ/,-=.ソハリ H Vim の | |
!ヽriゾUソゾ "ハUソノ゙hNノソ ぽーず♡ | |
|!ハヾヾ` `´ノlリ´ | |
ノ:ノハ ハ 丶 クハ ____ |
Vim Advent Calendar 2012 の242日目の記事です。#昨日の記事はtyruさんで、明日の記事はsyuiさんの予定です。
今日は8月6日ですね。さて問題です。「2013年8月6日からVim Advent Calendar 2012とVim Advent Calendar 2013が並走開始する日まで何日か」をVim scriptで計算してください。
大前提として、Vim Advent Calendar 2013は2013年12月1日に確実に開始するものとします。また、Vim Advent Calendar 2012は、http://atnd.org/events/33746 にかかれているように
" moved to https://github.com/chikatoike/config/blob/master/.vimrc |
diff --git a/src/Makefile b/src/Makefile | |
--- a/src/Makefile | |
+++ b/src/Makefile | |
@@ -1914,6 +1914,7 @@ | |
test_erasebackword \ | |
test_eval \ | |
test_fixeol \ | |
+ test_getcwd \ | |
test_increment \ | |
test_insertcount \ |
#!/bin/sh | |
if [ -z "$1" ]; then | |
echo Usage: $0 {config-file} | |
exit | |
fi | |
vim -N -u NONE -i NONE -V1 -e -s --cmd "source $1" --cmd NeoBundleInstall! --cmd qall! |
let s:reg_path = 'HKLM\System\CurrentControlSet\Control\TimeZoneInformation' | |
function! s:GetTimeZoneName() | |
let res = system(printf("reg query %s /v StandardName | findstr REG_SZ", s:reg_path)) | |
return split(substitute(res, '\n', '', 'g'), '\s')[2] | |
endfunction | |
function! s:GetTimeZoneOffset() | |
let res = system(printf("reg query %s /v Bias | findstr REG_DWORD", s:reg_path)) | |
return -(split(res, '[ \t\n]\+')[2] / 60) |