Skip to content

Instantly share code, notes, and snippets.

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

thinca thinca

⌨️
Happy Vimming!
View GitHub Profile
@thinca
thinca / hatokura.md
Created August 1, 2024 05:17
ハトクラを遊ぶために必要なアイテムまとめ

ハトクラを遊ぶために必要なアイテムまとめ

第二版に限定した情報をまとめる。

本体 (必須)

これがないと始まらない。現在第二版は基本セットと拡張が 1 つ出ている。

@thinca
thinca / Gemfile
Created May 7, 2023 10:27
GitHub から Webhooks を受け取り、MODal をデプロイする雑サーバ
source 'https://rubygems.org'
gem 'webrick'
@thinca
thinca / fix_textprop.patch
Last active March 18, 2019 08:16
テキストプロパティで落ちるやつ
diff --git a/src/textprop.c b/src/textprop.c
index 674faebe2..00436f51a 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -629,7 +629,7 @@ f_prop_remove(typval_T *argvars, typval_T *rettv)
mch_memmove(newptr, buf->b_ml.ml_line_ptr,
buf->b_ml.ml_line_len);
buf->b_ml.ml_line_ptr = newptr;
- curbuf->b_ml.ml_flags |= ML_LINE_DIRTY;
+ buf->b_ml.ml_flags |= ML_LINE_DIRTY;

テキストプロパティ触ってみた

2019-03-11 gorilla.vim #2

let s:S = vital#vital#import('Data.String')
let s:L = vital#vital#import('Data.List')
function! s:count_words(text) abort
let F = { memo, x -> extend(memo, {x: get(memo, x, 0) + 1}) }
return s:L.foldl(F, {}, s:S.scan(a:text, '\w\+'))
endfunction
echo s:count_words('this is a pen or not a pen')
" {'this': 1, 'is': 1, 'a': 2, 'pen': 2, ...}

Vim の helpbot は裏で何をしているのか

2018-10-31 .vimconf.swp 2018

@thinca
thinca / megurorb17.md
Created July 31, 2018 13:39
Meguro.rb #17 Ruby で Vim を拡張する

Ruby で Vim を拡張する

Collecting greenlet
1 location(s) to search for versions of greenlet:
* https://pypi.python.org/simple/greenlet/
Getting page https://pypi.python.org/simple/greenlet/
Starting new HTTPS connection (1): pypi.python.org
"GET /simple/greenlet/ HTTP/1.1" 200 24008
Analyzing links from page https://pypi.python.org/simple/greenlet/
Skipping link https://pypi.python.org/packages/00/6b/9d4b5faa314ac579fda43f874b69246f9d7d1635a39f02c5d5f8866f04e6/greenlet-0.4.5-cp27-none-win_amd64.whl#md5=e06ab7f742a642b7d5b490c90521d0fc (from https://pypi.python.org/simple/greenlet/); it is not compatible with this Python
Skipping link https://pypi.python.org/packages/00/73/63fa90c85f94c2deebe229d940da56148bababc8678d3109bd3ff67f1ace/greenlet-0.4.2.win-amd64-py2.7.exe#md5=ecf74a210b67842e4759a8d81ad5ca62 (from https://pypi.python.org/simple/greenlet/); unsupported archive format: .exe
Skipping link https://pypi.python.org/packages/00/8b/4ccae511e6a9d429ccbf701f1df16a3fe6afbbf75b338ab143754733d831/greenlet-0.4.
function! X() abort
let x = 10
let scope = l:
let F = { -> extend(scope, {'x': 200}) }
call F()
echo x
endfunction
call X()

なぜ Vim はいきなり文字を入力できないのか

2017-07-20 Fablic.vim #2