2016-11-05 VimConf 2016
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
syntax match csvHead /^/ nextgroup=csvOddColumn | |
syntax match csvOddColumn /[^,]*/ contained nextgroup=csvOddComma | |
syntax match csvOddComma /,/ contained nextgroup=csvEvenColumn | |
syntax match csvEvenColumn /[^,]*/ contained nextgroup=csvEvenComma | |
syntax match csvEvenComma /,/ contained nextgroup=csvOddColumn | |
highlight default link csvOddColumn Constant | |
highlight default link csvEvenColumn Statement |
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
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> |
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
package main | |
import ( | |
"fmt" | |
"net/http" | |
"os" | |
"runtime" | |
"strconv" | |
"strings" |
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
[23:12:42 WARN]: java.lang.IllegalArgumentException: Plugin cannot be null | |
[23:12:42 WARN]: at org.apache.commons.lang.Validate.notNull(Validate.java:192) | |
[23:12:42 WARN]: at org.bukkit.craftbukkit.v1_10_R1.scheduler.CraftScheduler.validate(CraftScheduler.java:397) | |
[23:12:42 WARN]: at org.bukkit.craftbukkit.v1_10_R1.scheduler.CraftScheduler.runTaskTimer(CraftScheduler.java:123) | |
[23:12:42 WARN]: at org.bukkit.craftbukkit.v1_10_R1.scheduler.CraftScheduler.runTaskLater(CraftScheduler.java:106) | |
[23:12:42 WARN]: at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source) | |
[23:12:42 WARN]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | |
[23:12:42 WARN]: at java.lang.reflect.Method.invoke(Method.java:498) | |
[23:12:42 WARN]: at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93) | |
[23:12:42 WARN]: at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28) |
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"?> | |
<!-- | |
https://pqrs.org/osx/karabiner/xml.html.ja | |
--> | |
<root> | |
<item> | |
<name>Private settings</name> | |
<item> | |
<name>tmux support in Terminal</name> | |
<identifier>private.tmux</identifier> |
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
Describe order | |
Before all | |
let list = ['A'] | |
End | |
Before each | |
let list += ['B'] | |
End | |
Context deep context | |
Before all |
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:show_stars() abort | |
for i in range(1, 10) | |
echo repeat('*', i) | |
endfor | |
endfunction | |
call s:show_stars() |
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 obj = {} | |
function! obj.func() abort | |
endfunction | |
let funcname = matchstr(string(obj.func), 'function(''\zs.\{-}\ze'')') | |
echo assert_true(exists('*{' . funcname . '}')) | |
unlet obj | |
echo assert_false(exists('*{' . funcname . '}')) | |