Skip to content

Instantly share code, notes, and snippets.

@osyo-manga
osyo-manga / quickrun.vim
Created March 11, 2013 13:36
quickrun.vim の設定
function! s:quickrun_config()
return unite#sources#quickrun_config#quickrun_config_all()
endfunction
" quickrun-runner {{{
" vimscript_all {{{
let s:runner = {}
$ vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jan 22 2018 13:38:04)
適用済パッチ: 1-1428
Compiled by worker@worker-desktop
Huge 版 with GTK2 GUI. 機能の一覧 有効(+)/無効(-)
+acl +farsi +mouse_sgr -tag_any_white
+arabic +file_in_path -mouse_sysmouse -tcl
+autocmd +find_in_path +mouse_urxvt +termguicolors
-autoservername +float +mouse_xterm +terminal
+balloon_eval +folding +multi_byte +terminfo
" vim 8.0 1295
" $ vim -u .test_vimrc
" .test_vimrc
filetype plugin indent on
set filetype=tex
startinsert
call feedkeys("\\begin{itemize}\<CR>")
" vital-palette-keymapping
function! s:escape_special_key(key)
" Workaround : <C-?> https://github.com/osyo-manga/vital-palette/issues/5
if a:key ==# "<^?>"
return "\<C-?>"
endif
execute 'let result = "' . substitute(escape(a:key, '\"'), '\(<.\{-}>\)', '\\\1', 'g') . '"'
return result
endfunction
call lexima#clear_rules()
function! s:as_list(a)
return type(a:a) == type([]) ? a:a : [a:a]
endfunction
function! s:add_ignore_rule(rule)
let rule = copy(a:rule)
let rule.input = rule.char
let rule.input_after = ""
nnoremap <C-Space> i <Esc><Right>
nnoremap <Esc><Esc> :nohlsearch<CR>
nnoremap <silent> <C-j> :call append(line(".")-1, "")<CR>
nnoremap <silent> <C-k> <Up>dd
nnoremap <silent> j gj
nnoremap <silent> k gk
nnoremap <Down> gj
nnoremap <Up> gk
nnoremap h <Left>
nnoremap l <Right>
#define CATCH_CONFIG_MAIN
#include "./catch.hpp"
#include <vector>
#include <list>
template<typename List>
void func(){
List v;
v.push_back(1);
let s:V = vital#of("vital")
let s:S = s:V.import("Palette.Scriptnames")
function! s:call_stack()
try
throw 'abc'
catch /^abc$/
return split(matchstr(v:throwpoint, 'function \zs.*\ze,.*'), '\.\.')[ : -2]
endtry
function! s:init(value)
let value = a:value
" 初期値に基づいて関数を定義する
function! s:hoge() closure
return value + value
endfunction
function! s:bar(value) closure
return value + a:value
function! Foo()
let x = 0
function! Bar() closure
let x += 1
return x
endfunction
return function('Bar')
endfunction
let Count = Foo()