Skip to content

Instantly share code, notes, and snippets.

View eagletmt's full-sized avatar

Kohei Suzuki eagletmt

View GitHub Profile
{-# LANGUAGE ExistentialQuantification #-}
import System
class Hi_ a where
hi :: a -> String
data Hi = forall a. Hi_ a => Hi a
instance Hi_ Hi where
hi (Hi x) = hi x
data Ujihisa = Ujihisa
" For test (Do quickrun on the target character!):
" aiu
" あいう
function! s:get_current_character()
if mode() ==# 'c'
let str = getcmdline()
let cur_idx = getcmdpos() - 1
return matchstr(str, '.', cur_idx)
@eagletmt
eagletmt / .vimrc
Created May 16, 2010 17:58 — forked from thinca/.vimrc
" Move window position {{{
nnoremap <silent> <Plug>swap_window_next :<C-u>call <SID>swap_window(v:count1)<CR>
nnoremap <silent> <Plug>swap_window_prev :<C-u>call <SID>swap_window(-v:count1)<CR>
nnoremap <silent> <Plug>swap_window_j :<C-u>call <SID>swap_window_dir(v:count1, 'j')<CR>
nnoremap <silent> <Plug>swap_window_k :<C-u>call <SID>swap_window_dir(v:count1, 'k')<CR>
nnoremap <silent> <Plug>swap_window_h :<C-u>call <SID>swap_window_dir(v:count1, 'h')<CR>
nnoremap <silent> <Plug>swap_window_l :<C-u>call <SID>swap_window_dir(v:count1, 'l')<CR>
nnoremap <silent> <Plug>swap_window_t :<C-u>call <SID>swap_window_dir(v:count1, 't')<CR>
nnoremap <silent> <Plug>swap_window_b :<C-u>call <SID>swap_window_dir(v:count1, 'b')<CR>
@eagletmt
eagletmt / .vimrc
Created April 27, 2010 10:55 — forked from Shougo/.vimrc
" Capture {{{
command!
\ -nargs=+
\ -complete=command
\ Capture
\ call s:cmd_capture([<f-args>])
function! s:capture(cmd)
redir => result
silent execute a:cmd
" A .vimrc snippet that allows you to move around windows beyond tabs
nnoremap <silent> <Tab> :<C-u>call <SID>NextWindowOrTab()<CR>
nnoremap <silent> <S-Tab> :<C-u>call <SID>PreviousWindowOrTab()<CR>
function! s:NextWindowOrTab()
if winnr() < winnr("$")
wincmd w
else
tabnext