Skip to content

Instantly share code, notes, and snippets.

@k-takata
k-takata / fix-comments.diff
Last active December 16, 2015 21:48
fix Ruby's comments and documents
README.EXT | 10 ++++----
README.EXT.ja | 2 +-
bignum.c | 2 +-
compar.c | 2 +-
compile.c | 4 +-
doc/ChangeLog-1.8.0 | 2 +-
doc/ChangeLog-1.9.3 | 4 +-
eval.c | 10 ++++----
ext/bigdecimal/bigdecimal.c | 24 ++++++++++----------
ext/bigdecimal/bigdecimal.h | 2 +-
@k-takata
k-takata / gist:5958877
Last active September 14, 2016 19:15
Vim 7.3.xxx patch author ranking
119 (Christian Brabandt)
109 (ZyX)
56 (Yasuhiro Matsumoto)
52 (Dominique Pelle)
47 (Ken Takata)
31 (Mike Williams)
30 (Lech Lorens)
27 (Yukihiro Nakadaira)
23 (Taro Muraoka)
12 (James Vega)
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -4883,7 +4883,7 @@
*rmdir()*
rmdir({dname} [, {flags}])
Remove a directory {dname}. Return 0 for success, otherwise
- return non-zero value. If the direcotry contains any files or
+ return non-zero value. If the directory contains any files or
sub-directories, this function will fail, when no {flags}
@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