Skip to content

Instantly share code, notes, and snippets.

View thinca's full-sized avatar
⌨️
Happy Vimming!

thinca thinca

⌨️
Happy Vimming!
View GitHub Profile
[] [2014年03月05日 23時55分15秒] [DEBUG] ----- eskk.vim was started. -----
[] [2014年03月05日 23時55分16秒] [DEBUG] eskk#filter(): char = ';'
[] [2014年03月05日 23時55分17秒] [DEBUG] eskk#filter(): char = 'h'
[] [2014年03月05日 23時55分17秒] [DEBUG] eskk#filter(): char = 'e'
[] [2014年03月05日 23時55分17秒] [DEBUG] eskk#complete#eskkcomplete(): a:findstart = 1, a:base = ''
[] [2014年03月05日 23時55分18秒] [DEBUG] eskk#filter(): char = 'n'
[] [2014年03月05日 23時55分18秒] [DEBUG] eskk#filter(): char = 'n'
[] [2014年03月05日 23時55分18秒] [DEBUG] eskk#complete#eskkcomplete(): a:findstart = 1, a:base = ''
[] [2014年03月05日 23時55分18秒] [DEBUG] eskk#filter(): char = 'k'
[] [2014年03月05日 23時55分19秒] [DEBUG] eskk#filter(): char = 'a'
function! GenerateCanonical()
let b = 32
let r = (0x7fffffff + 0.0) - (0x80000000 + 0.0) + 1.0
let log2r = float2nr(log(r) / log(2.0))
let k = max([1, (b + log2r - 1) / log2r])
let sum = 0.0
let tmp = 1.0
while k != 0
let sum += (g:V.Random.rand() - (0x80000000 + 0.0)) * tmp
let tmp = tmp * r
function! s:scan(str, pattern)
let pos = 0
let results = []
while 1
let start = match(a:str, a:pattern, pos)
if start < 0
break
endif
let end = matchend(a:str, a:pattern, pos)
if start != end
let s:suite = themis#suite('Threes object')
let s:assert = themis#helper('assert')
function! s:suite.tiles()
let t = threes#new()
call t.new_game()
call s:assert.equals(t.width(), 4)
call s:assert.equals(t.height(), 4)
call s:assert.not_same(t._state.tiles[0], t._state.tiles[1])
endfunction
function! s:set_window_name(name)
let esc = "\<ESC>"
silent! execute '!echo -n "' . esc . 'k' . escape(a:name, '%#!')
\ . esc . '\\"'
redraw!
endfunction
call unite#custom#substitute('file', '\$\w\+', '\=eval(submatch(0))', 200)
call unite#custom#substitute('file', '[^~.:]\zs/', '*/*', 20)
call unite#custom#substitute('file', '^@@', '\=getcwd()."/*"', 2)
call unite#custom#substitute('file', '^@', '\=expand("#:p:h")."/*"', 1)
call unite#custom#substitute('file', '^\\', '~/*')
call unite#custom#substitute('file', '^;v', '~/.vim/*')
call unite#custom#substitute('file', '^;a', '~/.vim/autoload/*')
call unite#custom#substitute('file', '^;b', '~/.vim/bundle/*')
let s:assert = themis#helper('assert')
let s:from_format = themis#suite('DateTime.from_format')
function! s:from_format.before()
let self.DT = vital#of('vital').import('DateTime')
endfunction
let s:from_format.title._01 = 'makes a DateTime object from formatted string'
function! s:from_format._01()
set runtimepath^=~/.vim/bundle/neobundle
" これは普段私がこの設定で使っているため(変えるとディレクトリ名が変わってロードできない)
let g:neobundle#enable_name_conversion = 1
call neobundle#rc(expand('~/.vim/bundle'))
NeoBundle 'Shougo/unite.vim'
nnoremap <silent> <Leader>af :<C-u>Unite -profile-name=files file/new<CR>
diff -r 79c59b4c9d20 runtime/doc/quickfix.txt
--- a/runtime/doc/quickfix.txt Sat Oct 11 14:47:26 2014 +0200
+++ b/runtime/doc/quickfix.txt Sun Oct 12 14:07:01 2014 +0900
@@ -141,8 +141,9 @@
current window is used instead of the quickfix list.
*:cq* *:cquit*
-:cq[uit][!] Quit Vim with an error code, so that the compiler
+:cq[uit][!] [code] Quit Vim with an error code, so that the compiler
will not compile the same file again.
let g:called = 0
nmap \\x <Plug>(test)
nnoremap <silent> <Plug>(test) :set operatorfunc=Test<CR>g@
function! Test(type)
let g:called += 1
normal! x
endfunction