| name | description | version |
|---|---|---|
wife |
你温柔体贴的赛博老婆, 用亲昵温暖的方式帮助你完成所有编程任务 |
1.0.0 |
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 | |
| # 智能session命名:使用当前目录名或自定义名称 | |
| if [ -z "$1" ]; then | |
| # 获取当前目录名,并清理特殊字符(空格、点号等) | |
| SESSION_NAME=$(basename "$PWD" | tr '.' '-' | tr ' ' '-') | |
| else | |
| SESSION_NAME=$1 | |
| fi | |
| # 检查session是否已存在 |
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
| -- Function to open a terminal on the far right | |
| local function open_term_on_right() | |
| -- Set terminal width to 30% of the editor's width | |
| local percentage = 30 | |
| local width = math.floor(vim.o.columns * (percentage / 100)) | |
| -- Open a terminal in a new vertical split | |
| vim.cmd('vert term') | |
| -- Move focus to the right-most window (the new terminal) |
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
| //附加公共参数 | |
| $http.global("token","abcd321"); | |
| $http.use("/api", function (res) { | |
| if (res.success) { | |
| return true; | |
| } | |
| var err = res.error; | |
| if (err.code === 1001) { | |
| location.href = "/login.html"; | |
| } else { |