Skip to content

Instantly share code, notes, and snippets.

@LeafCage
LeafCage / gist:4cde80cf65dab0880e9b
Last active August 29, 2015 14:08
str2vimkeybind.vim
if exists('s:save_cpo')| finish| endif
let s:save_cpo = &cpo| set cpo&vim
scriptencoding utf-8
"=============================================================================
"Misc:
let s:prefix = {"\<C-b>": 'self._parse_prefix_Cb(a:i)', "\<C-d>": '"<C-"', "\<C-f>": 'self._parse_prefix_Cf(a:i)', "\<C-h>": '"<M-"', "\<C-l>": '"<C-M-"',}
let s:prefix_2byte = {'64514': '<S-', '64516': '<C-', '64518': '<S-C-', '64520': '<M-', '64522': '<S-M-', '64524': '<C-M-', '64526': '<S-C-M-'}
let s:solo = {"\<Esc>": '<Esc>', "\<CR>": '<CR>', ' ': '<Space>', "\<Tab>": '<Tab>', "\<C-_>": '<C-_>', "\<M-_>": '<M-_>', "\<C-^>": '<C-^>', "\<M-^>": '<M-^>', "\<C-]>": '<C-]>', "\<M-[>": '<M-[>', "\<M-]>": '<M-]>', "\<M-,>": '<M-,>', "\<M-.>": '<M-.>', "\<M-0>": '<M-0>', "\<M-1>": '<M-1>', "\<M-2>": '<M-2>', "\<M-3>": '<M-3>', "\<M-4>": '<M-4>', "\<M-5>": '<M-5>', "\<M-6>": '<M-6>', "\<M-7>": '<M-7>', "\<M-8>": '<M-8>', "\<M-9>": '<M-9>', "\<C-a>": '<C-a>', "\<C-b>": '<C-b>', "\<C-c>": '<C-c>', "\<C-d>": '<C-d>', "\<C-e>": '<C-e>', "\
let g:ezbar = {'separator_L': '', 'separator_R': ''}
let g:ezbar.active = [
\ 'winbufnum', 'dir',
\ 'filename',
\ {'chg_color': {'gui': ['SlateGray', 'white', 'bold']}},
\ 'filetype',
\ 'modified',
\ 'currentfuncrow',
\ {'__SEP__': 'StatusLine'},
\ 'cfi',
@LeafCage
LeafCage / profileautoload.vim
Last active December 21, 2015 17:09
autoload関数(オートロードスクリプト)の初回読み込みが遅い · Issue #461 · vim-jp/issues(https://github.com/vim-jp/issues/issues/461) の原因を調べるために書いたスクリプト.koronさんの発言を受けて.
let s:BASE_DIR = expand('<sfile>:p:h'). '/tmp'
let s:LAST = 1000
let s:POINTS = [1, 10, 100, 1000]
let s:RESULT_FILE = expand('<sfile>:p:h'). '/profileautoload_result.txt'
let s:result = []
command! -nargs=0 ProfileAutoload1rtp call <SID>ProfileAutoload(1)
command! -nargs=0 ProfileAutoload10rtp call <SID>ProfileAutoload(10)
command! -nargs=0 ProfileAutoload100rtp call <SID>ProfileAutoload(100)
command! -nargs=0 ProfileAutoload1000rtp call <SID>ProfileAutoload(1000)
@LeafCage
LeafCage / StudyVim11
Created November 16, 2012 08:10
StudyVim11 - altercmdについて
.pencolor red ; .pensize 8 ;
.font HGP創英角ゴシックUB ; .color ivory ; .gbgcolor #000000 #405060
.noeffect
.notexture
.textalign center
.label Lv-1 Lv-1開始
発表者\n[[green @LeafCage]]
よろしくお願いします。
.font MSゴシック
@LeafCage
LeafCage / Include_syntax()がうまく動かない
Created May 10, 2012 01:48
シンタックスハイライトをincludeする関数が意図したとおりに動かない。引数の一つ目については意図通り。2つめからがおかしい。
function! Include_syntax(...)
for pickedft in a:000
exe 'syn include @'.pickedft.' syntax/'.pickedft.'.vim'
exe 'syn region Syscommon_'.pickedft.' matchgroup=Syscommon_metamodify start=/^>|'.pickedft.'|\n/rs=e end=/^||</re=s-1 contains=@'.pickedft.' keepend'
endfor
hi Syscommon_metamodify gui=bold guifg=lightblue guibg=gray35
endfunction
"想定利用法
"例えば行頭に'>|vim|'と書くと次の行からvimのシンタックスが適用される