Skip to content

Instantly share code, notes, and snippets.

View yamaya's full-sized avatar

Masayuki Yamaya yamaya

  • Sapporo, Hokkaido, Japan
View GitHub Profile
@yamaya
yamaya / kitty.conf
Last active April 5, 2024 06:26
Edit kitty's scroll buffer contents by nvim
map kitty_mod+v launch --stdin-source=@screen_scrollback --copy-colors --type=overlay-main nvim
@yamaya
yamaya / clap-mappings.vim
Last active December 9, 2020 14:17
vim-clap: I want to ignore the ".gitignore" setting, but exclude ".git/" in "files" provider
nnoremap <silent>,. :<C-u>Clap files ++finder=rg --vimgrep --files --follow --hidden --no-ignore --glob !.git<CR>
@yamaya
yamaya / gui.c.patch
Created June 4, 2020 13:23
This patch resolves an issue where some modifier keys could not be remapped on MacVim.
diff --git a/src/gui.c b/src/gui.c
index db59980a7..0d47396c8 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -812,7 +812,7 @@ gui_init(void)
gui_mch_disable_beval_area(balloonEval);
#endif
-#ifndef FEAT_GUI_MSWIN
+#if !defined(FEAT_GUI_MSWIN) && !defined(FEAT_GUI_MACVIM)
@yamaya
yamaya / change-mouse-motion-sticky.json
Created April 16, 2020 13:39
Karabiner-Elements: Mouse イベントをスクロールホイールに変換する - Button4でトグルする
{
"maintainers": [
"yamaya"
],
"rules": [
{
"available_since": "12.3.0",
"description": "Convert mouse move to scroll wheel (Toggle with button4)",
"manipulators": [
{
@yamaya
yamaya / macvim-inline-input-method-when-noimdisable.patch
Last active April 16, 2020 01:08
MacVim: imdisableを無効にした場合に日本語インライン入力がおかしい問題を修正
commit db357a103 (HEAD -> fix/my-patches, origin/fix/my-patches)
Author: Masayuki Yamaya <>
Date: Wed Apr 15 18:13:57 2020 +0900
imdisableを無効にした場合に日本語インライン入力がおかしい問題を修正
直接的に効果出てるのはメッセージ送信をやめた事だと思う。
このメッセージが巡り巡って下線付きテキスト表示モードを中止してしまう。
`-setImState:`は呼ばなくても良さげなので一緒に削除してみた。
@yamaya
yamaya / handler.go.diff
Created August 8, 2019 16:33
patch for mattn/efm-langserver: Fixed a bug when lint-stdin is false
diff --git a/langserver/handler.go b/langserver/handler.go
index 73e9be1..fbe5a8f 100644
--- a/langserver/handler.go
+++ b/langserver/handler.go
@@ -157,11 +157,17 @@ func (h *langHandler) lint(uri string) []Diagnostic {
diagnostics := []Diagnostic{}
+ cmdline := config.LintCommand
+ if !config.LintStdin {
#include <IOKit/hid/IOHIDLib.h>
#include <IOKit/hidsystem/event_status_driver.h>
static int hid_mousex, hid_mousey;
static void hidCallback(void* context, IOReturn result, void* sender, IOHIDValueRef valueRef)
{
IOHIDElementRef element = IOHIDValueGetElement(valueRef);
if (mouse_capture > 0 && IOHIDElementGetUsagePage(element) == kHIDPage_GenericDesktop) {
int value = (int)IOHIDValueGetIntegerValue(valueRef);
@yamaya
yamaya / shuttle.swift
Created April 27, 2017 13:50 — forked from jeamland/shuttle.swift
My stunning adventures in Swift
import Foundation
import IOKit
import IOKit.hid
import Quartz
let ioman = IOHIDManagerCreate(kCFAllocatorDefault,
IOOptionBits(kIOHIDOptionsTypeNone))
let runloop : CFRunLoop = CFRunLoopGetCurrent()
let devices = [
kIOHIDVendorIDKey: 0x0b33,
@yamaya
yamaya / sVimrc
Last active January 19, 2017 09:36
sVimrc
let scrollduration = 20
let blacklists = ["*://reader.livedwango.com/reader/*", "*://(mail|calendar).google.com/*", "*://www.apple.com/jp/shop/*", "*://www.jtb.co.jp/*", "*://secure.j-bus.co.jp/*", "*://twitter.com/*", "*://*.starbucks.co.jp/*", "*://www.tumblr.com/blog/*", "*://logentries.com/app/*", "*://eexpress.jp/*", "*://kcw.kddi.ne.jp/*"]
let nextmatchpattern = "((?!first)(next( page)?|older|more|>|›|»|forward|次へ| )+)"
let previousmatchpattern = "((?!last)(prev(ious)?( page)?|newer|back|«|less|<|‹|前へ| )+)"
unmapAll
map "j" scrollPageDown
map "k" scrollPageUp
map "ctrl+f" scrollFullPageDown
map "ctrl+b" scrollFullPageUp
@yamaya
yamaya / using-commoncrypot-in-swifty-framework.md
Last active January 10, 2020 01:45
Swift製のframeworkでlibcommonCrypto.dylibを使う方法