Skip to content

Instantly share code, notes, and snippets.

@deton
deton / gist:5138905
Last active April 5, 2024 11:11
Vimでの日本語のカーソル移動の改善: 文節単位のWORD移動(W,E,B)プラグインと、句読点に移動するmap
@deton
deton / gist:5191896
Last active September 5, 2018 08:40
eblook.vimを使って様々な辞典を検索する

eblook.vimを使って様々な辞典を検索する

Vim Advent Calendar 2012 の109日目(2013-03-19)の記事です。

Vimで文章を書いている際に、国語辞典や和英辞典などを引きたくなることがあります。

eblook.vimプラグインを使うと、購入してローカルにインストールしてある 広辞苑やジーニアス英和・和英などの様々な辞典を、

@deton
deton / tsf-vim-vac2012.markdown
Last active April 20, 2024 03:40
Vi風操作をWindows用IMEとして実装
uname -a
Linux colinux 2.6.33.7-co-0.7.9 #1 PREEMPT Sat Apr 9 20:30:51 UTC 2011 i686 GNU/Linux
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Mar 8 2014 09:55:01)
Included patches: 1-192
Compiled by deton@colinux
Huge version without GUI. Features included (+) or not (-):
+acl +farsi +mouse_netterm +syntax
+arabic +file_in_path +mouse_sgr +tag_binary
@deton
deton / dot.screenrc
Last active July 17, 2017 00:56
GNU screenで継続行をコピーする際に、`\`等を除く方法
bind g command -c buffilt
bind -c buffilt \\ eval writebuf screen 'stuff "scrbuf.sh rmwrap-emacs&&exit^M"'
bind -c buffilt > eval writebuf screen 'stuff "scrbuf.sh rmwrap-vim&&exit^M"'
bind -c buffilt + eval writebuf screen 'stuff "scrbuf.sh rmwrap-mutt&&exit^M"'
bind -c buffilt ^E eval writebuf screen 'stuff "scrbuf.sh rmwrap-width&&exit^M"'
bind -c buffilt $ eval writebuf screen 'stuff "scrbuf.sh picklastarg&&exit^M"'
bind -c buffilt ' ' eval writebuf screen 'stuff "scrbuf.sh join-with-blank&&exit^M"'
bind -c buffilt e eval writebuf screen 'stuff "scrbuf.sh edit&&exit^M"'
bind -c buffilt g eval writebuf screen 'stuff "scrbuf.sh grep2l&&exit^M"'
bind -c buffilt h eval writebuf screen 'stuff "scrbuf.sh rmhtmltag&&exit^M"'
@deton
deton / LDOCE5.map
Last active August 29, 2015 14:10
EBWin用外字定義ファイル。ロングマン現代英英辞典5訂版
ha121 u014b
ha122 u00ca
ha123 u2033
ha124 u00ec
ha125 u2212
ha126 u02cc
ha127 u00fa
ha128 u00fc
ha129 u01c1
ha12a - # ue003 not a valid unicode character
@deton
deton / bdf2fontx.c.support-ankfont.patch
Last active August 29, 2015 14:25
bdf2fontx.cをANKフォント対応するパッチ
--- bdf2fontx.c.orig 2001-12-07 01:51:03.000000000 +0900
+++ bdf2fontx.c 2015-07-20 14:52:11.000000000 +0900
@@ -106,6 +106,9 @@ void bdfheader(char *name, int *width, i
else if (match(coding, "jisx0208") == 0) {
*type = 1;
}
+ else {
+ *type = 0;
+ }
break;
@deton
deton / bdfunicode2jis.pl
Created July 26, 2015 05:13
iso10646(unicode)のBDFフォントから、jisx0208またはjisx0201のBDFフォントを生成するスクリプト
#!/usr/bin/perl
# make jisx0208 or jisx0201 BDF font file from iso10646(unicode) BDF font file.
use strict;
use warnings;
use Encode;
# from cp932_roundtrip
sub encode_ {
my $unicode = $_[0];
if (#(0xe000 <= $unicode && $unicode <= 0xf8ff) || # private use area
@deton
deton / bdf2fontx.c.fix-noendchar.patch
Last active August 29, 2015 14:25
bdf2fontx.cでno ENDCHARになる問題の修正パッチ。BITMAP内の行数はBBX行のheightを使用
diff --git a/bdf2fontx.c b/bdf2fontx.c
index 816cfa6..b40a9a4 100644
--- a/bdf2fontx.c
+++ b/bdf2fontx.c
@@ -85,19 +85,20 @@ int match(char *s, char *t)
"FONT -%[^-]-%*[^-]-%*[^-]-%*[^-]-%*[^-]--%d-%*d-%*d-%*d-%*[^-]-%d-%[^-]-%*s"
/* jis fixed medium r normal 14 130 75 75 C 70 jisx0201 */
-void bdfheader(char *name, int *width, int *height, int *type)
+void bdfheader(char *name, int *width, int *height, int *type, int *xoffset, int *yoffset)
@deton
deton / lyncringnotify-eac2015.md
Created December 13, 2015 02:02
Lyncで電話がかかってきた時にDVDトレイを開いて通知する

Lyncで電話がかかってきた時にDVDトレイを開いて通知する

Eject Advent Calendar 2015の記事です。

会社の内線電話がMicrosoft Lync(Skype for Business)になったのですが、 スピーカからの着信音に気付かないことがあったので、 気付きやすくするために、着信時にDVDトレイを開くようにしてみました。

LyncRingNotify