Skip to content

Instantly share code, notes, and snippets.

@msmhrt
msmhrt / py30.diff
Created December 28, 2013 13:07
patch to support Python 3.0 on Vim 7.4.131
diff -r 2f856c7c1d43 src/if_python3.c
--- a/src/if_python3.c Sun Dec 15 10:02:33 2013 +0100
+++ b/src/if_python3.c Sat Dec 28 14:57:26 2013 +0900
@@ -79,8 +79,9 @@
# define CODEC_ERROR_HANDLER NULL
#endif
-/* Python 3 does not support CObjects, always use Capsules */
-#define PY_USE_CAPSULE
+#if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x030100b1
@msmhrt
msmhrt / gist:7888026
Created December 10, 2013 09:33
Syntax higilight of indent (ts=8,sw=4)
syntax match MyIndentStart "^" nextgroup=MySoftIndent1,MyMixedIndent1,MyHardIndentOdd
syntax match MySoftIndent1 "____"he=s+1 contained nextgroup=MySoftIndent2,MyMixedIndent2,MyHardIndentOdd
syntax match MySoftIndent2 "____"he=s+1 contained nextgroup=MySoftIndent3,MyMixedIndent3,MyHardIndentEven
syntax match MySoftIndent3 "____"he=s+1 contained nextgroup=MySoftIndent4,MyMixedIndent4,MyHardIndentEven
syntax match MySoftIndent4 "____"he=s+1 contained nextgroup=MySoftIndent1,MyMixedIndent1,MyHardIndentOdd
syntax match MyHardIndentOdd "\t" contained nextgroup=MySoftIndent3,MyMixedIndent3,MyHardIndentEven
syntax match MyHardIndentEven "\t" contained nextgroup=MySoftIndent1,MyMixedIndent1,MyHardIndentOdd
syntax match MyMixedIndent1 "_\{1,3}\t" contained nextgroup=MySoftIndent3,MyMixedIndent3,MyHardIndentEven
syntax match MyMixedIndent2 "_\{1,3}\t" contained nextgroup=MySoftIndent3,MyMixedIndent3,MyHardIndentEven
syntax match MyMixedIndent3 "_\{1,3}\t" contained nextgroup=MySoftIndent1,MyMixedInd
@msmhrt
msmhrt / katakana_variants.txt
Created November 17, 2013 12:12
Katakana word list for GNOME 3.12 (development) (2013/11/17)
アイコンファイル(4)、アイコン・ファイル(2)
アクションキー(3)、アクション・キー(2)
アクセラレータ(49)、アクセラレーター(1)
アクセラレータキー(8)、アクセラレーターキー(1)
アセンブラー(1)、アセンブラ(1)
アゾーレス(1)、アゾレス(1)
アナーバー(1)、アナバ(1)
アピーア(1)、アピア(1)
アラーム(12)、アラム(1)
アルーバ(1)、アルヴァ(1)、アルバ(1)
@msmhrt
msmhrt / katakana_variants.txt
Created November 16, 2013 22:53
Katakana word list for EPUB 3.0.1Draft (2013/11/17)
オペレーティング・システム(2)、オペレーティングシステム(2)
コンテクスト(25)、コンテキスト(12)
パッケージメタデータ(6)、パッケージ・メタデータ(4)
フローコンテンツ(2)、フロー・コンテンツ(1)
ヘッダー(4)、ヘッダ(1)
マルチ・パス(1)、マルチパス(1)
ユーザーインターフェース(3)、ユーザインタフェース(1)
ルートディレクトリ(11)、ルート・ディレクトリ(1)
ルートファイル(2)、ルート・ファイル(1)
レ(1)、リ(1)
@msmhrt
msmhrt / less-458.utf-8.patch
Created September 5, 2013 12:34
カラー表示でも画面が崩れないUTF-8対応のless.exe ref: http://qiita.com/msmhrt/items/77be4bf01154478abdb8
diff -Naur less-458.orig/Makefile.wnm less-458/Makefile.wnm
--- less-458.orig/Makefile.wnm Fri Apr 5 01:55:07 2013
+++ less-458/Makefile.wnm Thu Sep 5 21:27:07 2013
@@ -6,7 +6,7 @@
CC = cl
# Normal flags
-CFLAGS = /nologo /ML /W3 /GX /O2 /I "." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /c
+CFLAGS = /nologo /W3 /EHsc /O2 /I "." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D"_CRT_SECURE_NO_WARNINGS" /c
LDFLAGS = /nologo /subsystem:console /incremental:no /machine:I386
@msmhrt
msmhrt / vim-7.3.1109.patch
Created June 3, 2013 21:16
a patch for 'DEBUG' build of Vim 7.3.1109
diff -r b58729d9fc5f src/regexp_nfa.c
--- a/src/regexp_nfa.c Mon Jun 03 20:12:51 2013 +0200
+++ b/src/regexp_nfa.c Tue Jun 04 06:08:17 2013 +0900
@@ -3032,7 +3032,7 @@
#ifdef ENABLE_LOG
static void
-report_state(char *action, regsub_T *sub, nfa_state_T *state, int lid);
+report_state(char *action, regsub_T *sub, nfa_state_T *state, int lid)
{
@msmhrt
msmhrt / fixprint.py
Created April 6, 2013 11:21
Python 3の print() で UnicodeEncodeError を回避するデコレータ ref: http://qiita.com/items/61d6a38b43f839a77e48
#!/usr/bin/env python3
# vim:fileencoding=utf-8
# Copyright (c) 2013 Masami HIRATA <msmhrt@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
@msmhrt
msmhrt / katakana_variants.txt
Last active December 9, 2015 17:08
Katakana word list for enja-oss/Backbone (2013/01/03)
サーバー(48)、サーバ(25)
データ(27)、データー(2)
トリガー(18)、トリガ(5)
パラメータ(15)、パラメーター(2)
フィルター(1)、フィルタ(1)
プロキシ(8)、プロキシー(2)、プロクシ(1)
ヘッダー(2)、ヘッダ(2)
ヘルパー(2)、ヘルパ(2)
ユーザー(8)、ユーザ(1)
レポジトリ(2)、リポジトリ(1)
@msmhrt
msmhrt / katakana_variants.txt
Last active December 13, 2015 02:17
Katakana word list for pydocja/py33 (2013/01/03)
アイデア(19)、アイディア(1)
アクセサ(8)、アクセッサ(1)
アドレスファミリ(16)、アドレスファミリー(3)
アプリケーションコード(5)、アプリケーション・コード(1)
アポストロフィ(2)、アポストロフィー(1)
アンインストーラー(2)、アンインストーラ(1)
アンダフロー(2)、アンダーフロー(1)
アーカイバ(4)、アーカイバー(2)
アーカイブメンバ(6)、アーカイブメンバー(3)
イベントハンドラ(4)、イベント・ハンドラ(1)
@msmhrt
msmhrt / katakana_variants.txt
Last active July 25, 2017 00:13
Katakana word list for the master branch of vim-jp/vimdoc-ja-working (2017/07/25)
キャラクタ(21)、キャラクター(1)
コンピュータ(19)、コンピューター(1)
サーバー(163)、サーバ(1)
ハンドラ(13)、ハンドラー(9)
バー(11)、バッ(1)
パス(208)、パース(32)
パラメーター(19)、パラーメーター(1)
ファイル・ウィンドウ(1)、ファイルウィンドウ(1)
ファイル・バッファ(2)、ファイルバッファ(1)
フィルタ(69)、フィルター(8)