This file contains hidden or 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
{-# 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 |
This file contains hidden or 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
" 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) |
This file contains hidden or 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
" 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> |
This file contains hidden or 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
" Capture {{{ | |
command! | |
\ -nargs=+ | |
\ -complete=command | |
\ Capture | |
\ call s:cmd_capture([<f-args>]) | |
function! s:capture(cmd) | |
redir => result | |
silent execute a:cmd |
This file contains hidden or 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
" 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 |