Skip to content

Instantly share code, notes, and snippets.

View phakeandy's full-sized avatar
🏠
Working from home

Andy Phake phakeandy

🏠
Working from home
View GitHub Profile
@phakeandy
phakeandy / alacritty.ahk
Created April 20, 2025 05:43
alacritty 在 windows 下粘贴会出现换行 bug,维护者不打算修复
; https://github.com/alacritty/alacritty/issues/2324
#Requires AutoHotkey v2
#HotIf WinActive("ahk_exe alacritty.exe")
; Ctrl+Shift+V -- change line endings
^+v::
{
A_Clipboard := StrReplace(A_Clipboard, "`r`n", "`n")
Send("^+v")
@phakeandy
phakeandy / prompt_fish.sh
Created April 17, 2025 15:57
fish-like prompt path zsh script, 兼容 zsh 和 bash
function _fish_collapsed_pwd() {
local pwd="$1"
local home="$HOME"
local size=${#home}
[[ $# == 0 ]] && pwd="$PWD"
[[ -z "$pwd" ]] && return
if [[ "$pwd" == "/" ]]; then
echo "/"
return
elif [[ "$pwd" == "$home" ]]; then
@phakeandy
phakeandy / 小鹤.reg
Created April 6, 2025 14:23
windows 添加小鹤双拼输入法
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\InputMethod\Settings\CHS]
"EnableExtraDomainType"=dword:00000001
"Enable Double Pinyin"=dword:00000001
"DoublePinyinScheme"=dword:0000000a
"UserDefinedDoublePinyinScheme0"="小鹤双拼*2*^*iuvdjhcwfg^xmlnpbksqszxkrltvyovt"
@phakeandy
phakeandy / .vimrc
Last active April 19, 2025 04:28
Simple vimrc without any plugins
syntax on " 打开语法高亮
set showmode " 在底部显示,当前处于命令模式还是插入模式
set showcmd " 命令模式下,在底部显示,当前键入的指令
set mouse=a " 支持使用鼠标
set cursorline " 光标所在的当前行高亮
set number " Show current line number
set relativenumber " Show relative line numbers
set list listchars=tab\ ,trail:·,precedes:<,extends:> " set list 可以显示 listchars (see :help listchars)
@phakeandy
phakeandy / keymapping.ahk
Last active April 6, 2025 03:17
ahk v1 脚本, 处理键盘映射
; 需要安装 AutoHotKey v1 `scoop install extras/autohotkey`
; ================
; vim-like 按键映射
; ================
!h::Send, {Left} ; Alt+H -> 左箭头
!j::Send, {Down} ; Alt+J -> 下箭头
!k::Send, {Up} ; Alt+K -> 上箭头
!l::Send, {Right} ; Alt+L -> 右箭头
@phakeandy
phakeandy / .ideavimrc
Created February 8, 2025 13:27
ideavim configuration file
" .ideavimrc is a configuration file for IdeaVim plugin. It uses
" the same commands as the original .vimrc configuration.
" You can find a list of commands here: https://jb.gg/h38q75
" Find more examples here: https://jb.gg/share-ideavimrc
"" -- Suggested options --
" Show a few lines of context around the cursor. Note that this makes the
" text scroll if you mouse-click near the start or end of the window.
set scrolloff=5
@phakeandy
phakeandy / tmux.conf
Last active April 18, 2025 17:55
tmux configuration file
#############################################################
### 基础配置 (Basic Settings) ###
#############################################################
# 取消默认前缀键绑定
unbind C-b
unbind C-s
# 设置新前缀键为 Ctrl+s (保留 Ctrl+b 作为备用前缀)
set -g prefix C-s
@phakeandy
phakeandy / surfing-key.js
Created February 4, 2025 07:10
the simple config of SurfingKeys
const {
Clipboard,
Front,
Hints,
Normal,
RUNTIME,
Visual,
aceVimMap,
addSearchAlias,
cmap,