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
call extend(s:, vimlparser#import()) | |
let s:PythonCompiler = {} | |
function s:PythonCompiler.new(...) | |
let obj = copy(self) | |
call call(obj.__init__, a:000, obj) | |
return obj |
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
/* compile: cl /MD /LD drawcusotm.c user32.lib gdi32.lib | |
* usage: :echo libcall('C:\fullpath\to\drawcustom.dll', 'init', '/path/to/background-image.bmp') | |
* bmp is loaded with LoadImage() API. And it doesn't support BITMAPV4HEADER and above. | |
*/ | |
#include <windows.h> | |
#include <string.h> | |
typedef int (WINAPI *fFillRect)(HDC hDC, CONST RECT *lprc, HBRUSH hbr); | |
typedef BOOL (WINAPI *fExtTextOutA)(HDC, int, int, UINT, CONST RECT *, LPCSTR, UINT, CONST INT *); |
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
from subprocess import Popen, PIPE, STDOUT | |
import shlex | |
import json | |
class Pipeline: | |
def __init__(self, stdin=None): | |
self.returncode = None | |
self.stdout = stdin | |
self.stderr = None |
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
// http://www.tatapa.org/~takuo/input_subsystem/input_subsystem.html | |
// virtual key event | |
// sudo sh -c "./a.out keycode > /dev/input/eventX" | |
// 30 == KEY_A | |
// 41 == KEY_GRAVE (zenkaku hankaku) | |
#include <linux/input.h> // see for keycode constant KEY_XXX | |
#include <sys/time.h> | |
#include <unistd.h> | |
#include <stdio.h> |
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
// BUILD: | |
// cc `python-config --cflags` -o a.out test.c `python-config --ldflags` | |
// cc `python-config --cflags` -fPIE -o a-pie.out test.c `python-config --ldflags` | |
// | |
// PyIter_Check() does not work when -Bsymbolic-functions is used. | |
// On Ubuntu, -Bsymbolic-functions is included in compile flag. | |
// Workaround is -fPIE. | |
// | |
// https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/1196047 | |
// https://groups.google.com/forum/?fromgroups=#!searchin/vim_dev/tests/vim_dev/CEaL812aLNI/aSuZ0Jin8BQJ |
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 dd44a527c2bd src/edit.c | |
--- a/src/edit.c Sun Apr 06 21:34:04 2014 +0200 | |
+++ b/src/edit.c Wed Apr 09 20:24:53 2014 +0900 | |
@@ -9330,12 +9330,7 @@ | |
tpos = curwin->w_cursor; | |
if (oneleft() == OK) | |
{ | |
-#if defined(FEAT_XIM) && defined(FEAT_GUI_GTK) | |
- /* Only call start_arrow() when not busy with preediting, it will | |
- * break undo. K_LEFT is inserted in im_correct_cursor(). */ |
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
// > cl /LD set_icon.c user32.lib | |
// :call libcallnr('path/to/set_icon.dll', 'set_icon', v:windowid . ',' . 'path/to/myvim.ico') | |
#include <windows.h> | |
#include <stdio.h> | |
__declspec(dllexport) int set_icon(char **args) | |
{ | |
HWND hWnd; | |
char iconpath[1024]; | |
HICON hIcon; |
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
[2014年09月16日 20時20分34秒] | |
...ro/.vim/package/rogue.vim/autoload/rogue/monster.lua:203: attempt to index field '?' (a nil value) | |
stack traceback: | |
...hiro/.vim/package/rogue.vim/autoload/rogue/debug.lua:241: in function <...hiro/.vim/package/rogue.vim/autoload/rogue/debug.lua:235> | |
...ro/.vim/package/rogue.vim/autoload/rogue/monster.lua:203: in function 'aim_monster' | |
...ro/.vim/package/rogue.vim/autoload/rogue/monster.lua:217: in function 'put_m_at' | |
...ro/.vim/package/rogue.vim/autoload/rogue/monster.lua:751: in function 'create_monster' | |
...kihiro/.vim/package/rogue.vim/autoload/rogue/use.lua:463: in function 'read_scroll' | |
...ihiro/.vim/package/rogue.vim/autoload/rogue/play.lua:145: in function 'play_level' |
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 y = substitute('aaa', '\ze', 'x', 'g') | $put =y " => xaxaxax | |
$put ='aaa' | s/\ze/x/g " => xaxaxa | |
let y = substitute('abc', 'a\|\ze', 'x', 'g') | $put =y " => xxbxcx | |
$put ='abc' | s/a\|\ze/x/g " => xbxc |
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
" This is a port of CC500 | |
" http://homepage.ntlworld.com/edmund.grimley-evans/cc500/ | |
" | |
"------------------------------------------------------------------------------- | |
" ORIGINAL HEADER | |
"------------------------------------------------------------------------------- | |
" Copyright (C) 2006 Edmund GRIMLEY EVANS <[email protected]> | |
" | |
" This program is free software; you can redistribute it and/or modify | |
" it under the terms of the GNU General Public License as published by |