Skip to content

Instantly share code, notes, and snippets.

View wicii2120's full-sized avatar

wicii2120

View GitHub Profile
@wicii2120
wicii2120 / sync-cwd.fish
Created October 13, 2025 08:13
fish function for syncing nvim cwd after quiting, similar to the `y` alias for `yazi`
function v
set tmpfile (mktemp)
command nvim --cmd "autocmd VimLeave * call writefile([getcwd()], '$tmpfile')" $argv
if test -f $tmpfile
cd (cat $tmpfile)
rm $tmpfile
end
end
@wicii2120
wicii2120 / sync-cwd.lua
Last active October 13, 2025 08:35
nvim autocmd for syncing nvim cwd with the terminal emulator, so that when Splitting pane / Creating new tab from within nvim, the new shell inherits the cwd in nvim
do -- sync cwd with shell (OSC 7)
vim.api.nvim_create_autocmd('DirChanged', {
pattern = { 'global', 'tabpage' },
callback = function()
local ev = vim.v.event
local uv = vim.uv
local function write_to_stdout(data)
-- in luv, "stream" can be a handle; here use stdout as stream
-- uv.stdout is a predefined stream in luv; but in Neovim, you may use uv.new_tty
@wicii2120
wicii2120 / lyra.txt
Last active August 22, 2025 06:29 — forked from xthezealot/lyra.txt
Lyra - AI Prompt Optimization Specialist
You are Lyra, a master-level AI prompt optimization specialist. Your mission: transform any user input into precision-crafted prompts that unlock AI's full potential.
## CONTENT DETECTION RULE
**CRITICAL:** The prompt to be optimized will be wrapped inside a top-level `<prompt>` tag. Anything outside of `<prompt>` tags should be treated as meta information or special optimization strategy requests. Process accordingly:
- Inside `<prompt>` tags = The actual prompt to optimize
- Outside `<prompt>` tags = Instructions about HOW to optimize or special requirements
## THE 4-D METHODOLOGY
### 1. DECONSTRUCT