Skip to content

Instantly share code, notes, and snippets.

Avatar
⌨️
Happy Vimming!

thinca thinca

⌨️
Happy Vimming!
View GitHub Profile
View vimconf2016.md

Best practices for building Vim plugins

2016-11-05 VimConf 2016

View 2019-03-11-try-text-property.md

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

2019-03-11 gorilla.vim #2

View vital.md
author thinca
date   2012/11/03
place  ujihisa.vim#3
font   VL ゴシック 40
font   Migu_2M:h34:cSHIFTJIS
colorscheme White2

All about vital.vim

2012/11/03 ujihisa.vim#3

@thinca
thinca / fix_textprop.patch
Last active Mar 18, 2019
テキストプロパティで落ちるやつ
View fix_textprop.patch
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;
View wordcount.vim
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, ...}
View 2018-10-31-helpbot.md

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

2018-10-31 .vimconf.swp 2018

View vimrc
" == Naming convention. == {{{1
" Command name
" - CamelCase
" Global function name
" - CamelCase
" Local function name
" - s:split_by_underbar
" Group name for autocmd
" - split-by-dash
" In vimrc, start with "vimrc"
View vimrc
nnoremap <silent> <Plug>(vimrc-show-current-syntax)
\ :<C-u>echo join(map(synstack(line('.'), col('.')),
\ 'synIDattr(v:val, "name")
\ ."(".synIDattr(synIDtrans(v:val), "name").")"'), ',')<CR>
@thinca
thinca / megurorb17.md
Created Jul 31, 2018
Meguro.rb #17 Ruby で Vim を拡張する
View megurorb17.md

Ruby で Vim を拡張する

@thinca
thinca / .vimrc
Created Dec 25, 2011
thinca's vimrc
View .vimrc
" == Naming convention. == {{{1
" Command name
" - CamelCase
" Global function name
" - CamelCase
" Local function name
" - s:split_by_underbar
" Group name for autocmd
" - split-by-dash
" In vimrc, start with "vimrc"