This file contains 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
function! s:hoge(xs) | |
let top = get(a:xs,0,[]) | |
let rest = a:xs[1:] | |
let i = 0 | |
while i < len(rest) | |
for e in top | |
if -1 < index(get(rest,i,[]), e) | |
let top = uniq(sort(top + rest[i])) | |
call remove(rest,i) |
This file contains 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
scriptencoding utf-8 | |
let s:suite = themis#suite('Test for string.vim') | |
let s:assert = themis#helper('assert') | |
function! s:suite.string_split_0() | |
let float = -1 | |
let width = 0 | |
call s:assert.equals(string#split('あaいbうcえdおe', width, float, 1), ['']) | |
call s:assert.equals(string#split('あaいbうcえdおe', width, float, 0), ['']) |
This file contains 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
function! s:echo_line_with_hl(lnum, sep) | |
let line = getline(a:lnum) | |
let cs = split(line, '\zs') | |
let xs = [] | |
for c in range(1, len(line)) | |
if diff_hlID(a:lnum, c) isnot 0 | |
let name = synIDattr(synIDtrans(diff_hlID(a:lnum, c)), 'name') | |
else | |
let name = synIDattr(synIDtrans(synID(a:lnum, c, 1)), 'name') | |
endif |
This file contains 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
function! s:CloseCLW() | |
if bufname('%') is '[Command Line]' | |
quit | |
endif | |
enew | |
endfunction | |
command! CloseCLW :call <sid>CloseCLW() |
This file contains 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
using System; | |
using System.Threading.Tasks; | |
namespace test01 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
This file contains 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
\%(0*\%(\|1\%(00\|11\)*01\%(00\|11\)*01\|1\%(00\|11\)*01\%(00\|11\)*10\%(00\|11\)*10\|1\%(00\|11\)*01\%(00\|11\)*10\%(00\|11\)*01\%(00\|11\)*01\|1\%(00\|11\)*10\|01\%(00\|11\)*01\%(00\|11\)*01\|01\%(00\|11\)*01\%(00\|11\)*10\%(00\|11\)*10\|01\%(00\|11\)*01\%(00\|11\)*10\%(00\|11\)*01\%(00\|11\)*01\|01\%(00\|11\)*10\|10\%(00\|11\)*01\|10\%(00\|11\)*10\%(00\|11\)*01\%(00\|11\)*01\|10\%(00\|11\)*10\%(00\|11\)*10\|11\)\)\+$ |
This file contains 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
function! s:get_archive() " {{{ | |
let archive = [] | |
let format = { | |
\ 'layout' : '^layout: \(.*\)$', | |
\ 'id' : '^title: 第\(\d\+\)回 vimrc読書会$', | |
\ 'category' : '^category: \(.*\)$', | |
\ 'date' : '^\(\d\{4,4}/\d\{2,2}/\d\{2,2}\)\%(.*\)\( \d\{2,2}:\d\{2,2}\)-$', | |
\ 'author/name' : '^\(.*\) さんの vimrc を読みました。$', | |
\ 'vimrcs/name' : '^- \[\(.*\)](.*) (\[ダウンロード](\%(.*\)))$', |
This file contains 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
augroup auto_comment_off | |
autocmd! | |
autocmd BufEnter * setlocal formatoptions-=ro | |
augroup END |
This file contains 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
let s:save_cpo = &cpo | |
set cpo&vim | |
function! s:_vital_loaded(V) | |
let s:assert_config = { | |
\ 'equal_separator' : ['<=>','<=>'], | |
\ 'not_equal_separator' : ['<!>','<!>'], | |
\ 'enable' : 1, | |
\ } |
This file contains 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
let s:V = vital#of('vital') | |
let s:S = s:V.import('Assertion') | |
call s:S.define('Assert',1) | |
function! s:hoge(x) | |
return a:x * 3 | |
endfunction | |
Assert 3 <!> s:hoge(4) |