Skip to content

Instantly share code, notes, and snippets.

View kana's full-sized avatar

Kana Natsuno kana

View GitHub Profile
" perl: add 'use' statement for package name under the cursor
function! AddUse()
let line = line('.')
let col = col('.')
normal! yiw
let default = @0
let package = input('Package? ', default)
if (search('^use\s\+'.package, 'bnw') == 0)
call search('^use\s\+', 'b')
put ='use ' . package . ';'
#include <stdio.h>
typedef struct Greeter
{
struct Greeter (*hello)(const char*);
} Greeter;
Greeter hello(const char *name);
@kana
kana / c.vim
Created May 2, 2009 09:03 — forked from mootoh/c.vim
" c.vim
" Syntax Highlight Rule for 'KRDS': stands for KoRe ha DaSai, similar to FIXME
" install this by putting it as ~/.vim/after/syntax/c.vim
syn keyword cTodo contained TODO FIXME XXX KRDS
@kana
kana / gist:14316
Created October 2, 2008 08:49 — forked from yoppi/gist:14313
yoppiblog's problem
" quickrun - run a command and show its result quickly
" Author: ujihisa <http://ujihisa.nowa.jp/>
" ModifiedBy: kana <http://whileimautomaton.net/>
if exists('g:loaded_quickrun')
finish
endif