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
import { | |
BaseFilter, | |
FilterArguments, | |
} from "https://deno.land/x/ddu_vim@v3.5.0/base/filter.ts"; | |
import { Context, DduItem } from "https://deno.land/x/ddu_vim@v3.5.0/types.ts"; | |
type Never = Record<PropertyKey, never>; | |
export class Filter extends BaseFilter<Never> { | |
#cache = new WeakMap<Context, Map<string, number>>(); |
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
" ws以外の全ての関数は[result, newpos]を返す | |
function! s:object(in, pos) abort | |
let p = s:ws(a:in, a:pos + 1) | |
if a:in[p] == 125 " } | |
return [{}, p + 1] | |
endif | |
let acc = {} | |
while v:true | |
let [r, p] = s:member(a:in, p) |
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
import * as u from "https://deno.land/x/unknownutil@v3.11.0/mod.ts"; | |
import { is } from "https://deno.land/x/unknownutil@v3.11.0/mod.ts"; | |
type Point = { | |
x: number; | |
y: number; | |
}; | |
type Rect = Point & { | |
width: number; |
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
#!/bin/bash -u | |
touch /tmp/clip | |
wezterm start --class Floaterm nvim /tmp/clip || exit 1 # Vimが正しく終了しなかった時はコピーしない | |
# head -c -1は末尾の改行を削ぎ落とすやつ | |
head -c -1 /tmp/clip | xclip -selection clipboard | |
notify-send -t 1000 copied |
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
#!/bin/bash -u | |
if [[ $(id -u) != 0 ]]; then | |
exec sudo $0 $@ | |
fi | |
base=/tmp/archbase | |
root=/tmp/archroot | |
mkdir -p /tmp/gen |
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! BF(fxxk) abort | |
let mem = 0z00 | |
for i in range(15) | |
let mem = mem + mem | |
endfor | |
let ip = 0 | |
let dp = 0 | |
let out = [] | |
while ip < len(a:fxxk) | |
let c = a:fxxk[ip] |
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:collect() abort | |
let view = winsaveview() | |
let pairs = [] | |
call cursor([1, 1]) | |
if search('(\|)', 'cW') | |
call add(pairs, [getline('.')[col('.')-1], [line('.'), col('.')]]) | |
endif | |
while search('(\|)', 'W') |
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
#!/bin/bash -u | |
go mod init hoge | |
GOOS=js GOARCH=wasm go build -v -o main.wasm |
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! kana#init() abort | |
let s:state = {} | |
let s:state.preedit = "" | |
let s:state.preedit_next = "" | |
let s:state.kakutei = v:false | |
let s:state.feed = "" | |
let s:table = json_decode(join(readfile("table.json"), "")) | |
call kana#map() | |
endfunction |
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
<?xml version="1.0"?> | |
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
<fontconfig> | |
<!-- monospace --> | |
<match target="pattern"> | |
<test qual="any" name="family"><string>monospace</string></test> | |
<edit name="family" mode="prepend" binding="same"><string>Noto Sans Mono</string></edit> | |
<edit name="family" mode="append" binding="same"><string>Noto Sans Mono CJK JP</string></edit> | |
</match> | |
<!-- sans-serif --> |
NewerOlder