Skip to content

Instantly share code, notes, and snippets.

View notfornothing's full-sized avatar
✈️

Sparrow notfornothing

✈️
View GitHub Profile
# winget parameter completion
Register-ArgumentCompleter -Native -CommandName winget -ScriptBlock {
param($wordToComplete, $commandAst, $cursorPosition)
[Console]::InputEncoding = [Console]::OutputEncoding = $OutputEncoding = [System.Text.Utf8Encoding]::new()
$Local:word = $wordToComplete.Replace('"', '""')
$Local:ast = $commandAst.ToString().Replace('"', '""')
winget complete --word="$Local:word" --commandline "$Local:ast" --position $cursorPosition | ForEach-Object {
[System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
}
}
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
Set-PSReadLineOption -PredictionSource History
Set-PSReadLineOption -PredictionViewStyle ListView
" :actionlist可以查询所有命令
" 基本思路
" w 比如全屏、分屏
" g 跳转
" z 比如打开最近修改的文件那种了
" q 关闭标签
" e 运行/调试
" t 任务
set showmode
@AlexPl292
AlexPl292 / .ideavimrc
Last active May 22, 2025 06:35
My `~/.ideavimrc` file
let mapleader=" "
""" Plugins --------------------------------
set surround
set multiple-cursors
set commentary
set argtextobj
set easymotion
set textobj-entire
set ReplaceWithRegister
@dasautoooo
dasautoooo / vi-cheatsheet.md
Last active April 10, 2024 10:05
Vi Editor Cheat Sheet

Vi Editor Cheat Sheet

光标移动命令

字符

按键 解释
h,j,k,l 左,右,上,下

文本

按键 解释
@pokev25
pokev25 / install-tmux.sh
Last active May 8, 2025 08:54 — forked from rothgar/install-tmux
Install tmux 2.8 on centos 7
# Install tmux 2.8 on Centos
# install deps
yum install gcc kernel-devel make ncurses-devel
# cd src
cd /usr/local/src
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -LO https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 3, 2025 16:10
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname