This file contains hidden or 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
vim.keymap.set("n", "<A-j>", "<C-w>w", { desc = "時計回りにウィンドウ間を移動する" }) | |
vim.keymap.set("n", "<A-k>", "<C-w>W", { desc = "反時計回りにウィンドウ間を移動する" }) | |
vim.keymap.set("t", "<A-j>", [[<C-\><C-n><C-w>w]], { desc = "時計回りにウィンドウ間を移動する" }) | |
vim.keymap.set("t", "<A-k>", [[<C-\><C-n><C-w>W]], { desc = "反時計回りにウィンドウ間を移動する" }) | |
vim.keymap.set("n", "<A-o>", [[<C-w>o]], { desc = "他のウィンドウを全部消す" }) | |
vim.keymap.set("t", "<A-o>", [[<C-\><C-n><C-w>oi]], { desc = "他のウィンドウを全部消す" }) | |
vim.keymap.set("n", "<A-->", [[<C-w>_]], { desc = "ウィンドウの高さを最大化する" }) | |
vim.keymap.set("t", "<A-->", [[<C-\><C-n><C-w>_i]], { desc = "ウィンドウの高さを最大化する" }) | |
vim.keymap.set("t", "<A-r>", function() | |
return [[<C-\><C-n>]] .. vim.fn.nr2char(vim.fn.getchar()) .. "pi" |
This file contains hidden or 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
set -gx NOTIFY_ON_COMMAND_DURATION 5000 | |
function fish_right_prompt | |
set -f check_neovim | |
if test -n "$CMD_DURATION"; and test $CMD_DURATION -gt $NOTIFY_ON_COMMAND_DURATION | |
if type -q wezterm; and test -n "$WEZTERM_PANE" | |
set -l active_pid (osascript -e 'tell application "System Events" to get the unix id of first process whose frontmost is true') | |
set -l active_pane (wezterm cli list-clients | perl -anle 'print $F[$#F] if $F[2] == '$active_pid) | |
if test -n "$active_pane"; and test $WEZTERM_PANE -eq $active_pane | |
set -f check_neovim 1 | |
end |
This file contains hidden or 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
#!/usr/bin/env perl | |
=head1 DESCRIPTION | |
Alternative vim-startuptime | |
=head1 SYNOPSIS | |
bench-nvim | |
# Run nvim 10 times after 1 warmup |
This file contains hidden or 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
vim.api.nvim_create_user_command("LazySemver", function(opts) | |
if #opts.fargs ~= 2 then | |
vim.notify("needs 2 args: spec and version", vim.log.levels.ERROR) | |
return | |
end | |
local sv = require("lazy.manage.semver") | |
local matched = sv.range(opts.fargs[1]):matches(opts.fargs[2]) | |
vim.notify(matched and "OK" or "NG", vim.log.levels[matched and "info" or "WARN"]) | |
end, { nargs = "*" }) |
This file contains hidden or 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
set -gx NOTIFY_ON_COMMAND_DURATION 5000 | |
function fish_right_prompt | |
if test -n "$CMD_DURATION"; and test $CMD_DURATION -gt $NOTIFY_ON_COMMAND_DURATION | |
if type -q wezterm; and test -n "$WEZTERM_PANE" | |
set -l active_pid (osascript -e 'tell application "System Events" to get the unix id of first process whose frontmost is true') | |
set -l active_pane (wezterm cli list-clients | perl -anle 'print $F[$#F] if $F[2] == '$active_pid) | |
if test -n "$active_pane"; and test $WEZTERM_PANE -eq $active_pane | |
return | |
end | |
end |
This file contains hidden or 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
require("telescope.builtin").live_grep { | |
---@param prompt string | |
---@return { prompt?: string, updated_finder?: TelescopeFinder } | |
on_input_filter_cb = function(prompt) | |
return { | |
prompt = vim.fn["kensaku#query"](prompt, { | |
rxop = vim.g["kensaku#rxop#javascript"], | |
}), | |
} | |
end, |
This file contains hidden or 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
#!/bin/bash | |
DIR=${1:-lua} | |
TMP=$(mktemp -d) | |
lua-language-server --check "$DIR" --configpath "$PWD/.luarc.json" --logpath "$TMP" | |
RESULT="$TMP/check.json" | |
if [[ -r $RESULT ]]; then | |
jq --arg pwd "$PWD" -r ' | |
to_entries[] | | |
(.key | gsub("^file://\($pwd)/"; "")) as $filename | | |
.value[] | |
This file contains hidden or 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 = docker/dockerfile:1.3-labs | |
FROM ubuntu:latest | |
RUN yes | unminimize | |
RUN apt-get update && apt-get install -y tzdata | |
# https://sleepless-se.net/2018/07/31/docker-build-tzdata-ubuntu/ | |
ENV TZ=Asia/Tokyo | |
RUN apt-get install -y ninja-build gettext libtool libtool-bin autoconf automake cmake g++ \ | |
pkg-config unzip git man-db libsqlite3-dev \ |
This file contains hidden or 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
vim.keymap.set("n", "<Esc>", function() | |
local Hydra = require "hydra" | |
local hint = [[ | |
_A_• 入力 _T_•ファイル _P_•印刷 _F_•書式 _D_•削除 _B_•消去 | |
_M_• 移動 _C_•コピ- _L_•クリップ _Y_•ペ-スト _X_•枠 _W_•画面 | |
_K_• 罫線 _E_•飾り _N_•サイズ _R_•フォント _S_•検索 _J_•ジャンプ | |
_U_• 特殊 _V_•ツ-ル _Z_•マクロ _H_•補助 _O_•オプション _Q_•終了 | |
]] | |
Hydra { |
This file contains hidden or 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 = docker/dockerfile:1.3-labs | |
FROM ubuntu:22.04 | |
RUN yes | unminimize | |
RUN apt-get update && apt-get install -y tzdata | |
# https://sleepless-se.net/2018/07/31/docker-build-tzdata-ubuntu/ | |
ENV TZ=Asia/Tokyo | |
RUN apt-get install -y ninja-build gettext libtool libtool-bin autoconf automake cmake g++ \ | |
pkg-config unzip git man-db libsqlite3-dev \ |
NewerOlder