Skip to content

Instantly share code, notes, and snippets.

@k-takata
k-takata / make_win32_testc.sh
Last active August 29, 2015 13:57
A multithread version of testc.c. (Onigmo)
#!/bin/sh
iconv -f EUC-JP -t CP932 testc.c | sed -e 's/EUC_JP/SJIS/g' | unix2dos > testc.c.win32
diff --git a/configure.ac b/configure.ac
index 4c3c813..b1e780d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,7 +59,7 @@ AH_VERBATIM([EXTERNAL_SORT], [
# undef EXTERNAL_SORT
#endif
])
-AH_TEMPLATE([ICONV],
+AH_TEMPLATE([HAVE_ICONV],
@k-takata
k-takata / fix-get_command_name.patch
Created May 23, 2014 09:48
patch for vimproc get_command_name()
diff --git a/autoload/vimproc.vim b/autoload/vimproc.vim
index 4c3b836..4fd3ca4 100644
--- a/autoload/vimproc.vim
+++ b/autoload/vimproc.vim
@@ -185,7 +185,7 @@ function! vimproc#get_command_name(command, ...) "{{{
let cnt = a:0 < 2 ? 1 : a:2
let files = split(substitute(vimproc#util#substitute_path_separator(
- \ vimproc#filepath#which(a:command, path)), '//', '/', 'g'), '\n')
+ \ vimproc#filepath#which(a:command, path, cnt)), '//', '/', 'g'), '\n')
# HG changeset patch
# Parent 7723e7290ac81885c1f59d9dfdb1538469732ba0
diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim
--- a/runtime/autoload/netrw.vim
+++ b/runtime/autoload/netrw.vim
@@ -3502,7 +3502,7 @@
setl ma noro
" call Decho("setl ma noro")
let b:netrw_curdir = dirname
- let url = s:method."://".s:user.s:machine.(s:port ? ":".s:port : "")."/".s:path
--- a/plugin/editorconfig-core-py/editorconfig/ini.py
+++ b/plugin/editorconfig-core-py/editorconfig/ini.py
@@ -17,10 +17,10 @@ import re
from codecs import open
import posixpath
from os import sep
-from os.path import normcase, dirname
+from os.path import dirname
from editorconfig.exceptions import ParsingError
--- a/autoload/vimproc.vim
+++ b/autoload/vimproc.vim
@@ -857,10 +857,10 @@ function! s:read(...) dict "{{{
let timeout = get(a:000, 1, s:read_timeout)
let max = 100
- let hd = ''
+ let hds = []
for cnt in range(1, max)
let [hd_r, eof] = self.f_read(number, timeout/max)
@k-takata
k-takata / concattime.vim
Created June 12, 2014 12:38
Performance of string concatenation (VimL)
let lines = readfile('vim/runtime/doc/eval.txt')
echo len(lines) . " lines"
" ----------------------------
" 1. Simplest string concatenation (.=)
let stime = reltime()
let line = ''
for l in lines
let line .= l
endfor
@k-takata
k-takata / hd2str_time.vim
Created June 16, 2014 12:55
Performance of map() and for loop (VimL)
let hds = []
for j in range(1, 200)
for i in range(0x20, 0x7e)
let hds += [printf("%02x", i)]
endfor
endfor
let hd = join(hds, '')
" Time of split
let stime = reltime()
diff --git a/autoload/vimproc.vim b/autoload/vimproc.vim
index bb79a8c..543af50 100644
--- a/autoload/vimproc.vim
+++ b/autoload/vimproc.vim
@@ -884,10 +884,8 @@ function! s:read(...) dict "{{{
" return s:hd2str([hd])
endfunction"}}}
function! s:read_lines(...) dict "{{{
- let res = self.buffer
-
@k-takata
k-takata / testpy_ic.py
Last active August 29, 2015 14:03
onigmo test script for cclass with ignorecase
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals
import onig
import testpy
import sys
x2 = testpy.x2
x3 = testpy.x3