This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* str_iconv() function */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <iconv.h> | |
static char * | |
str_iconv(const char *fromcode, const char *tocode, const char *str, size_t len) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# codecs backslashreplace for decode() | |
# encoding: utf-8 | |
from __future__ import unicode_literals | |
import sys | |
import codecs | |
_backslashreplace_errors = codecs.backslashreplace_errors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" 基本アイデア: 名前空間を実行時の環境に合わせることでファイルの変更なし | |
" にコピーできるようにする。 | |
let s:ns = expand('<sfile>:p:r:gs?[\\/]?#?:s?^.*#autoload#??:s?$?#?') | |
function {s:ns}func() | |
echo "func()" | |
endfunction | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ubuntu 10.10 glibc iconv | |
echo 83d9 | xxd -r -p > test.txt | |
vim -c "edit ++enc=cp932 test.txt" | |
# Vim: Caught deadly signal SEGV | |
# Vim: Finished. | |
# Segmentation fault | |
# | |
# vim/src/fileio.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>github like image diff</title> | |
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/themes/ui-lightness/jquery-ui.css" /> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.min.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Python.getopt | |
var getopt = (function() { | |
var POSIXLY_CORRECT = false; | |
function Array_indexOf(haystack, needle, start) { | |
var i; | |
if (start === undefined) { | |
start = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
等幅フォント表示 | |
単純化して説明してみます。 | |
\zs について。 | |
:syntax match Attr1 /\(http:\/\/\S\+\s\+\)\zs\(\S\+\)/ | |
\zs と \ze はパターンとしては意味を持ちません。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ファイルを開き直したときのカーソルのあやしい移動 | |
# make test file | |
$ vim -u NONE -c "call setline('.', range(1, 100))" -c "wq" foo.txt | |
$ vim -u NONE | |
:edit foo.txt " open file | |
:$ " move to last line | |
:split " split |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:help の検索でエラーがでる | |
バックスペースでエスケープすればエラーはでなくなるが… | |
:help /\%(\) | |
:help s/\1 | |
:help s/\2 | |
:help s/\3 | |
:help s/\9 | |
:help s/\~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r 15b934a16641 src/tag.c | |
--- a/src/tag.c Wed Sep 14 19:04:40 2011 +0200 | |
+++ b/src/tag.c Wed Oct 05 08:49:02 2011 +0900 | |
@@ -1360,13 +1360,9 @@ | |
char_u *saved_pat = NULL; /* copy of pat[] */ | |
#endif | |
- /* Use two sets of variables for the pattern: "orgpat" holds the values | |
- * for the original pattern and "convpat" converted from 'encoding' to | |
- * encoding of the tags file. "pats" point to either one of these. */ |