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 / test_dict.vim
Created March 19, 2016 16:27
test funcref in dict
let dict = {}
function! dict.func1() abort
endfunction
let dict.func2 = dict.func1
echo assert_true(dict.func1 == dict.func2)
@thinca
thinca / type.diff
Last active March 18, 2016 00:17
fix type() for partial
diff --git a/src/eval.c b/src/eval.c
index 6280323..5fce7d7 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -20385,6 +20385,7 @@ f_type(typval_T *argvars, typval_T *rettv)
{
case VAR_NUMBER: n = 0; break;
case VAR_STRING: n = 1; break;
+ case VAR_PARTIAL:
case VAR_FUNC: n = 2; break;
let s:Object = {}
function! s:Object.x() abort
let dt = filter(self, '1')
endfunction
let s:Object['+'] = s:Object.x
function! s:new() abort
return copy(s:Object)
endfunction
@thinca
thinca / kikori.kt
Created March 13, 2016 23:23
kikori mod for Spigot by Kotlin
package com.github.gist.thinca.spigot.plugin.kikori
import org.bukkit.Material
import org.bukkit.block.Block
import org.bukkit.entity.Player
import org.bukkit.event.EventHandler
import org.bukkit.event.Listener
import org.bukkit.event.block.BlockBreakEvent
import org.bukkit.plugin.java.JavaPlugin
diff --git a/src/Makefile b/src/Makefile
index f460a61..c1b1e3f 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -2003,6 +2003,7 @@ test_arglist \
test_cursor_func \
test_delete \
test_expand \
+ test_feedkeys \
test_glob2regpat \
diff --git a/src/Makefile b/src/Makefile
index f460a61..c1b1e3f 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -2003,6 +2003,7 @@ test_arglist \
test_cursor_func \
test_delete \
test_expand \
+ test_feedkeys \
test_glob2regpat \
..F.......................F.......................F...........FF.FF...F...........................................F...................F..F.....................F...................F.FF.....F.......FFFFFF.F...FFFFFFFFFFFFFFFF......................................F.....FFFFFF..FFF...................FFFFFFF..F....F.FF...F..F.................................FF.......FF..FF.......F.F.........F...F................F.F..F............FFF..F.......FFFFF.F.F.
Failures:
1) help helptags for module Assertion set_config
function 401() dict Line:1 (~/share/Dropbox/work/vim-plugins/vital/test/help.vim)
Vim(help):E149: 残念ですが Vital.Assertion.set_config() にはヘルプがありません
2) help helptags for module Data.BigNum div_mod
function 425() dict Line:1 (~/share/Dropbox/work/vim-plugins/vital/test/help.vim)
Vim(help):E149: 残念ですが Vital.Data.BigNum.div_mod() にはヘルプがありません
% utils/build-script --release
Building the standard library for: swift-stdlib-linux-x86_64
Running Swift tests for: check-swift-linux-x86_64
cmark: using standard linker
++ cmake_config_opt cmark
++ product=cmark
++ [[ Ninja == \X\c\o\d\e ]]
+ /usr/bin/cmake --build /home/thinca/work/sandbox/swift-suite/build/Ninja-ReleaseAssert/cmark-linux-x86_64 -- all
ninja: no work to do.

Introduction to OmniSharp.vim

2015/11/21 VimConf 2015

@thinca
thinca / getcwd.diff
Last active November 15, 2015 13:17
Improve getcwd() and haslocaldir()
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 6e7039c..e36b6b6 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1828,7 +1828,7 @@ getcmdpos() Number return cursor position in command-line
getcmdtype() String return current command-line type
getcmdwintype() String return current command-line window type
getcurpos() List position of the cursor
-getcwd() String the current working directory
+getcwd( [{winnr} [, {tabnr}]]) String get the working directory