2025/03/24 23:42:43
composer配置文件
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
位置:C:\Users\Administrator\AppData\Roaming\Composer\config.json
{
"config": {},
"repositories": {
"packagist": {
"type": "composer",
"url": "https://mirrors.aliyun.com/composer/"
}
}
}
2025/03/22 16:47:12
sublime text 快捷键
位置:D:\Program Files\Sublime Text 4173 x64\Data\Packages\User\Default (Windows).sublime-keymap
[
//取消编译
{
"keys": ["ctrl+shift+b"],
"command": "cancel_build"
},
// 转为本地语言
{
"keys": ["alt+shift+z"],
"command": "ya_translate"
},
// 转为其他语言
{
"keys": ["alt+shift+x"],
"command": "ya_translate_to"
},
// 粘贴剪切板中的内容
{
"keys": ["alt+shift+v"],
"command": "paste_from_history"
},
// 撤销选择
{
"keys": ["alt+shift+o"],
"command": "soft_undo"
},
// 重新选择
{
"keys": ["alt+shift+y"],
"command": "soft_redo"
},
// 选择到段落
{
"keys": ["ctrl+shift+l"],
"command": "expand_selection_to_paragraph"
},
// 向外扩展
{
"keys": ["ctrl+shift+space"],
"command": "expand_selection",
"args":
{
"to": "scope"
}
},
// 选择到缩进
{
"keys": ["ctrl+shift+j"],
"command": "expand_selection",
"args":
{
"to": "indentation"
}
},
// 对齐
{
"keys": ["ctrl+alt+a"],
"command": "alignment"
},
// 切换字体截断
{
"keys": ["ctrl+shift+m"],
"command": "toggle_setting",
"args":
{
"setting": "word_wrap"
}
},
// 快速切换项目
{
"keys": ["ctrl+0"],
"command": "prompt_select_workspace"
},
// 函数跳转
{
"keys": ["alt+space"],
"command": "goto_definition"
},
// 获取文件路径位置,自动完成提示
{
"keys": ["alt+enter"],
"command": "afn_show_filenames",
"context": [
{
"key": "afn_use_keybinding",
"operator": "equal",
"operand": true
}]
},
// 格式化
{
"keys": ["alt+y"],
"command": "htmlprettify"
},
// 向左选中
{
"keys": ["alt+shift+f"],
"command": "move",
"args":
{
"by": "characters",
"forward": false,
"extend": true
}
},
// 向右选中
{
"keys": ["alt+shift+j"],
"command": "move",
"args":
{
"by": "characters",
"forward": true,
"extend": true
}
},
// 向上选中
{
"keys": ["alt+shift+r"],
"command": "move",
"args":
{
"by": "lines",
"forward": false,
"extend": true
}
},
// 向下选中
{
"keys": ["alt+shift+m"],
"command": "move",
"args":
{
"by": "lines",
"forward": true,
"extend": true
}
},
// 选中并移动到可视区头
{
"keys": ["alt+shift+;"],
"command": "move",
"args":
{
"by": "pages",
"forward": false,
"extend": true
}
},
// 选中并移动可视区尾
{
"keys": ["alt+shift+'"],
"command": "move",
"args":
{
"by": "pages",
"forward": true,
"extend": true
}
},
// 选中并移动光标位置到头部
{
"keys": ["alt+shift+g"],
"command": "move_to",
"args":
{
"to": "bol",
"extend": true
}
},
// 选中并移动光标位置到尾部
{
"keys": ["alt+shift+h"],
"command": "move_to",
"args":
{
"to": "eol",
"extend": true
}
},
// SublimeREPL: Python
{
"keys": ["alt+shift+w"],
"caption": "SublimeREPL: Python",
"command": "run_existing_window_command",
"args":
{
"id": "repl_python",
"file": "config/Python/Main.sublime-menu"
}
},
// SublimeRPL:Python-运行当前文件
{
"keys": ["alt+shift+e"],
"caption": "SublimeREPL: Python - RUN current file",
"command": "run_existing_window_command",
"args":
{
"id": "repl_python_run",
"file": "config/Python/Main.sublime-menu"
}
},
// 重新激活DocBlock字段
{
"keys": ["alt+shift+q"],
"command": "jsdocs_reparse",
"context": [
{
"key": "selector",
"operator": "equal",
"operand": "comment.block"
}]
},
// 检测兼容性
{
"keys": ["alt+shift+a"],
"command": "caniuse"
},
// 有道字典翻译
{
"keys": ["alt+shift+s"],
"command": "auto_translate"
},
// 打开gulp插件列表
{
"keys": ["ctrl+alt+p"],
"command": "gulp_plugins"
},
// gulp打开任务列表
{
"keys": ["ctrl+alt+o"],
"command": "gulp",
"args":
{
"paths": []
}
},
// gulp运行最后一次运行的任务
{
"keys": ["ctrl+alt+;"],
"command": "gulp_last",
"args":
{
"paths": []
}
},
// gulp缓存清理
{
"keys": ["ctrl+alt+h"],
"command": "gulp_delete_cache",
"args":
{
"paths": []
}
},
// gulp任意任务启动
{
"keys": ["ctrl+alt+l"],
"command": "gulp_arbitrary",
"args":
{
"paths": []
}
},
// gulp结束所有任务
{
"keys": ["ctrl+alt+i"],
"command": "gulp_kill"
},
// gulp结束特定任务
{
"keys": ["ctrl+alt+k"],
"command": "gulp_kill_task"
},
// 默认启动default任务
{
"keys": ["ctrl+alt+j"],
"command": "gulp",
"args":
{
"task_name": "default",
"paths": []
}
},
// 打开控制台
{
"keys": ["ctrl+shift+`"],
"command": "show_panel",
"args":
{
"panel": "console",
"toggle": true
}
},
// 另存为
{
"keys": ["ctrl+alt+s"],
"command": "auto_save"
},
// 剪贴板
{
"keys": ["ctrl+shift+alt+s"],
"command": "sublime_highlight",
"args":
{
"target": "clipboard",
"output_type": "html"
}
},
// 大写
{
"keys": ["ctrl+8"],
"command": "upper_case"
},
// 小写
{
"keys": ["ctrl+7"],
"command": "lower_case"
},
// 首字母大写
{
"keys": ["ctrl+9"],
"command": "title_case"
},
// 放大
{
"keys": ["alt+="],
"command": "close_tag"
},
// 跳转上一个编辑点
{
"keys": ["alt+,"],
"command": "jump_back"
},
// 跳转到下一个编辑点
{
"keys": ["alt+."],
"command": "jump_forward"
},
// 切换窗口1(分屏的情况下)
{
"keys": ["ctrl+1"],
"command": "focus_group",
"args":
{
"group": 0
}
},
// 切换窗口2(分屏的情况下)
{
"keys": ["ctrl+2"],
"command": "focus_group",
"args":
{
"group": 1
}
},
// 切换窗口3(分屏的情况下)
{
"keys": ["ctrl+3"],
"command": "focus_group",
"args":
{
"group": 2
}
},
// 双引号或单引号选中
{
"keys": ["alt+i"],
"command": "expand_selection_to_quotes"
},
// 复制整行插入下一行,选中词添加在其后
{
"keys": ["alt+p"],
"command": "duplicate_line"
},
// css补全前缀;
{
"keys": ["alt+8"],
"command": "autoprefixer"
},
// 选中单词
{
"keys": ["alt+o"],
"command": "find_under_expand"
},
// 复制文件路径
{
"keys": ["ctrl+shift+c"],
"command": "copy_path"
},
// 显隐侧边栏
{
"keys": ["f5"],
"command": "toggle_side_bar"
},
// 打开ie11
{
"keys": ["f11"],
"command": "side_bar_files_open_with",
"args":
{
"paths": [],
"application": "C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe",
"extensions": ".*"
}
},
// 打开(系统默认浏览器)
{
"keys": ["f12"],
"command": "open_in_browser"
},
// css 按顺序排序
{
"keys": ["alt+7"],
"command": "css_comb"
},
// 切换是否换行显示
{
"keys": ["ctrl+shift+w"],
"command": "toggle_setting",
"args":
{
"setting": "word_wrap"
}
},
// 光标左右字母互换
{
"keys": ["ctrl+t"],
"command": "transpose"
},
// 函数名
{
"keys": ["ctrl+r"],
"command": "show_overlay",
"args":
{
"overlay": "goto",
"text": "@"
}
},
// 跳转到指定行
{
"keys": ["ctrl+g"],
"command": "show_overlay",
"args":
{
"overlay": "goto",
"text": ":"
}
},
// 搜索变量名属性名
{
"keys": ["ctrl+;"],
"command": "show_overlay",
"args":
{
"overlay": "goto",
"text": "#"
}
},
// 搜索文件
{
"keys": ["ctrl+p"],
"command": "show_overlay",
"args":
{
"overlay": "goto",
"show_files": true
}
},
// 光标在括号内跳转内容首尾
{
"keys": ["ctrl+m"],
"command": "move_to",
"args":
{
"to": "brackets"
}
},
// 向下合并
{
"keys": ["ctrl+j"],
"command": "join_lines"
},
// 向下插入一行
{
"keys": ["alt+e"],
"command": "run_macro_file",
"args":
{
"file": "res://Packages/Default/Add Line.sublime-macro"
}
},
// 向上插入一行
{
"keys": ["alt+q"],
"command": "run_macro_file",
"args":
{
"file": "res://Packages/Default/Add Line Before.sublime-macro"
}
},
// 删除本行,剪切
{
"keys": ["alt+w"],
"command": "cut"
},
// 光标在括号内跳转内容首尾
{
"keys": ["alt+/"],
"command": "move_to",
"args":
{
"to": "brackets"
}
},
// 截断换行
{
"keys": ["enter"],
"command": "move",
"args":
{
"by": "characters",
"forward": true
},
"context": [
{
"key": "following_text",
"operator": "regex_contains",
"operand": "^[)\\]\\>\\'\\\"\\ %>\\}\\;\\,]",
"match_all": true
},
{
"key": "preceding_text",
"operator": "not_regex_match",
"operand": "^.*\\{$",
"match_all": true
},
{
"key": "auto_complete_visible",
"operator": "equal",
"operand": false
}]
},
// 跳转到行首
{
"keys": ["alt+g"],
"command": "move_to",
"args":
{
"to": "bol",
"extend": false
}
},
// 跳转到行尾
{
"keys": ["alt+h"],
"command": "move_to",
"args":
{
"to": "eol",
"extend": false
}
},
// 选择到开头
{
"keys": ["shift+home"],
"command": "move_to",
"args":
{
"to": "bol",
"extend": true
}
},
// 选择到结尾
{
"keys": ["shift+end"],
"command": "move_to",
"args":
{
"to": "eol",
"extend": true
}
},
// 返回顶部
{
"keys": ["ctrl+home"],
"command": "move_to",
"args":
{
"to": "bof",
"extend": false
}
},
// 返回底部
{
"keys": ["ctrl+end"],
"command": "move_to",
"args":
{
"to": "eof",
"extend": false
}
},
// 选择到顶部
{
"keys": ["ctrl+shift+home"],
"command": "move_to",
"args":
{
"to": "bof",
"extend": true
}
},
// 选择到底部
{
"keys": ["ctrl+shift+end"],
"command": "move_to",
"args":
{
"to": "eof",
"extend": true
}
},
// 左移动
{
"keys": ["alt+f"],
"command": "move",
"args":
{
"by": "characters",
"forward": false
}
},
// 右移动
{
"keys": ["alt+j"],
"command": "move",
"args":
{
"by": "characters",
"forward": true
}
},
// 上移动
{
"keys": ["alt+r"],
"command": "move",
"args":
{
"by": "lines",
"forward": false
}
},
// 下移动
{
"keys": ["alt+m"],
"command": "move",
"args":
{
"by": "lines",
"forward": true
}
},
// 折叠
{
"keys": ["alt+["],
"command": "fold"
},
// 展开
{
"keys": ["alt+]"],
"command": "unfold"
},
// 折叠一层
{
"keys": ["alt+1"],
"command": "fold_by_level",
"args":
{
"level": 1
}
},
// 折叠二层
{
"keys": ["alt+2"],
"command": "fold_by_level",
"args":
{
"level": 2
}
},
// 折叠三层
{
"keys": ["alt+3"],
"command": "fold_by_level",
"args":
{
"level": 3
}
},
// 折叠四层
{
"keys": ["alt+4"],
"command": "fold_by_level",
"args":
{
"level": 4
}
},
// 展开全部
{
"keys": ["alt+`"],
"command": "unfold_all"
},
// 上一个文件
{
"keys": ["ctrl+up"],
"command": "scroll_lines",
"args":
{
"amount": 20.0
}
},
// 下一个文件
{
"keys": ["ctrl+down"],
"command": "scroll_lines",
"args":
{
"amount": -20.0
}
},
// 打开调色板
{
"keys": ["ctrl+shift+o"],
"command": "color_picker",
"context": [
{
"key": "color_highlighter.color_picker"
}]
},
// 快速定位标签头尾
{
"keys": ["alt+a"],
"command": "emmet_go_to_tag_pair"
},
// 在该标签外添加标签
{
"keys": ["alt+v"],
"command": "emmet_wrap_with_abbreviation"
},
// 删除所在位置标签
{
"keys": ["alt+b"],
"command": "emmet_remove_tag"
},
// 修改标签
{
"keys": ["alt+t"],
"command": "emmet_rename_tag"
},
// 标签半闭合
{
"keys": ["alt+6"],
"command": "emmet_split_join_tag"
},
// 数学表达式求值
{
"keys": ["alt+z"],
"command": "emmet_evaluate_math"
},
// 向内选择内容(要选择内容就在标签内alt+;两次就可以快速选择了,在内容出就alt+;一次)
{
"keys": ["alt+;"],
"command": "emmet_balance",
"args":
{
"direction": "inward"
}
},
// 向外选择内容
{
"keys": ["alt+'"],
"command": "emmet_balance",
"args":
{
"direction": "outward"
}
},
// 标签中填入图片大小
{
"keys": ["ctrl+u"],
"command": "emmet_update_image_size"
},
// 全选中相同内容
{
"keys": ["alt+x"],
"command": "find_all_under"
},
// 跳过当前选中内容
{
"keys": ["alt+c"],
"command": "find_under_expand_skip"
},
// 去除重复行
{
"keys": ["ctrl+4"],
"command": "permute_lines",
"args":
{
"operation": "unique"
}
},
// 标签补全
{
"keys": ["ctrl+e"],
"command": "emmet_expand_abbreviation"
},
// html字符串拼接单引号
{
"keys": ["ctrl+5"],
"command": "quote_html",
"args":
{
"action": "single"
}
},
// html字符串拼接双引号
{
"keys": ["ctrl+6"],
"command": "quote_html",
"args":
{
"action": "double"
}
},
// git下一次
{
"keys": ["ctrl+shift+alt+j"],
"command": "git_gutter_next_change"
},
// git上一次
{
"keys": ["ctrl+shift+alt+p"],
"command": "git_gutter_prev_change"
},
// git不同
{
"keys": ["ctrl+shift+alt+d"],
"command": "git_gutter_diff_popup"
},
// git比较
{
"keys": ["ctrl+shift+alt+v"],
"command": "git_gutter_show_compare"
},
// git比较头部
{
"keys": ["ctrl+shift+alt+h"],
"command": "git_gutter_compare_head"
},
// git比较组织
{
"keys": ["ctrl+shift+alt+o"],
"command": "git_gutter_compare_origin"
},
// git分支
{
"keys": ["ctrl+shift+alt+c"],
"command": "git_gutter_compare_commit"
},
// git文件合并
{
"keys": ["ctrl+shift+alt+f"],
"command": "git_gutter_compare_file_commit"
},
// git分支
{
"keys": ["ctrl+shift+alt+b"],
"command": "git_gutter_compare_branch"
},
// git 标签
{
"keys": ["ctrl+shift+alt+t"],
"command": "git_gutter_compare_tag"
},
// 清除标记
{
"keys": ["shift+f4"],
"command": "clear_bookmarks",
"args":
{
"name": "mark"
}
},
// 标记,交换标记
{
"keys": ["f4"],
"command": "swap_with_mark"
},
// 反向选中
{
"keys": ["f10"],
"command": "invert_selection"
},
// 显隐打开的标签侧边列表
{
"keys": ["f6"],
"command": "toggle_show_open_files"
},
// 切换全屏显示
{
"keys": ["f7"],
"command": "toggle_full_screen"
},
// 打开当前页面需要的程序
{
"keys": ["f8"],
"command": "side_bar_open"
},
// 显示输出窗口
{
"keys": ["ctrl+alt+u"],
"command": "gulp_show_panel"
},
// 同步滚动
{
"keys": ["ctrl+shift+right"],
"command": "toggle_sync_scroll"
},
// 清理对比结果
{
"keys": ["alt+shift+c"],
"command": "diffy",
"args":
{
"action": "clear"
}
},
// postcss按顺序排序
{
"keys": ["alt+0"],
"command": "postcsssorting"
},
// 解码url
{
"keys": ["alt+5"],
"command": "emmet_convert_data_url"
},
// 向下合并下一行
{
"keys": ["alt+-"],
"command": "join_lines"
},
// 恢复缩进
{
"keys": ["ctrl+\\"],
"command": "reindent",
"args":
{
"single_line": true
},
},
// 大小写互换
{
"keys": ["ctrl+shift+9"],
"command": "swap_case"
},
// 选中内容拆分行添加光标
{
"keys": ["alt+shift+i"],
"command": "split_selection_into_lines"
},
// 向上增加光标
{
"keys": ["ctrl+alt+r"],
"command": "select_lines",
"args":
{
"forward": false
}
},
// 向下增加光标
{
"keys": ["ctrl+alt+m"],
"command": "select_lines",
"args":
{
"forward": true
}
},
// 开启或关闭拼写检测
{
"keys": ["alt+shift+t"],
"command": "toggle_setting",
"args":
{
"setting": "spell_check"
}
},
// 开启或关闭某些语法设置
{
"keys": ["ctrl+shift+u"],
"args":
{
"file": "${packages}/Better Completion/sbc-setting.sublime-settings"
},
"command": "open_file"
},
// 启动Sublime服务器
{
"keys": ["alt+shift+p"],
"command": "sublimeserver_start",
"caption": "Start SublimeServer"
},
// 停止Sublime服务器
{
"keys": ["alt+shift+]"],
"command": "sublimeserver_stop",
"caption": "Stop SublimeServer"
},
// 重置Sublime 服务器
{
"keys": ["alt+shift+["],
"command": "sublimeserver_restart",
"caption": "Restart SublimeServer"
},
// 打开服务器浏览器
{
"keys": ["alt+shift+\\"],
"command": "sublimeserver_browser",
"caption": "View in SublimeServer"
},
// 根据配置的路径默认打开
{
"keys": ["ctrl+shift+d"],
"command": "cmd_caller_default"
},
// 展示未保存的变化
{
"keys": ["alt+shift+b"],
"command": "diff_changes"
},
// swi调试
{
"keys": ["ctrl+alt+q"],
"command": "swi_debug"
},
// 切换断点
{
"keys": ["ctrl+alt+w"],
"command": "swi_debug_toggle_breakpoint"
},
// 清除所有断点
{
"keys": ["ctrl+alt+e"],
"command": "swi_debug_clear_breakpoints"
},
// 选择调试
{
"keys": ["ctrl+alt+d"],
"command": "swi_debug_start"
},
// 结束调试
{
"keys": ["ctrl+alt+f"],
"command": "swi_debug_stop"
},
// 重新载入页面
{
"keys": ["ctrl+alt+g"],
"command": "swi_debug_reload"
},
// 清空控制台
{
"keys": ["ctrl+alt+h"],
"command": "swi_debug_clear_console"
},
// 切换编写代码
{
"keys": ["ctrl+alt+z"],
"command": "swi_toggle_authored_code"
},
// 选中调试
{
"keys": ["ctrl+alt+x"],
"command": "swi_debug_evaluate"
},
// 转储文件映射
{
"keys": ["ctrl+alt+c"],
"command": "swi_dump_file_mappings"
},
// 切换编写代码
{
"keys": ["ctrl+alt+z"],
"command": "swi_toggle_authored_code"
},
// 逐过程:和逐语句类似,但是点击逐过程会在函数调用时,令调试器将执行转到所调用的函数声明中去
{
"keys": ["ctrl+alt+8"],
"command": "swi_debug_step_into"
},
// 当使用逐过程进入某个函数内部后,点击该按钮会跳过该函数声明的剩余部分,调试器会将执行过程移动到其父函数中。
{
"keys": ["ctrl+alt+9"],
"command": "swi_debug_step_out"
},
// 逐语句:逐行执行,以了解每一行如何操作当前的变量。当你的代码调用另一个函数的时候,调试器不会跳到那个函数的代码中去,其焦点还是当前的函数,而 Step into 则相反。
{
"keys": ["ctrl+alt+0"],
"command": "swi_debug_step_over"
},
// 暂停或恢复
{
"keys": ["ctrl+alt+y"],
"command": "swi_debug_pause_resume"
},
// 记录上一次日志
{
"keys": ["ctrl+shift+k"],
"command": "log_magic_down",
"context": [
{
"operand": "source.js",
"operator": "equal",
"match_all": true,
"key": "selector"
}]
},
// 记录上一次日志
{
"keys": ["ctrl+shift+k"],
"command": "log_magic_down",
"context": [
{
"operand": "source.coffee",
"operator": "equal",
"match_all": true,
"key": "selector"
}]
},
// 记录下一次日志
{
"keys": ["ctrl+shift+h"],
"command": "log_magic_up",
"context": [
{
"operand": "source.coffee",
"operator": "equal",
"match_all": true,
"key": "selector"
}]
},
// 拆分选择
{
"keys": ["ctrl+alt+,"],
"command": "split_selection"
},
// 添加选择
{
"keys": ["alt+shift+,"],
"command": "selection_fields",
"args":
{
"mode": "add"
}
},
// 激活选择,多次点击循环
{
"keys": ["alt+shift+."],
"command": "selection_fields"
},
// 逐个取消并选择下一个
{
"keys": ["alt+shift+/"],
"command": "selection_fields",
"args":
{
"mode": "smart",
"only_other": true
}
},
// 选择第一个第二次反选后面几个
{
"keys": ["ctrl+shift+alt+/"],
"command": "selection_fields",
"args":
{
"mode": "toggle",
"only_other": true
}
},
// 选中单词
{
"keys": ["ctrl+d"],
"command": "plain_tasks_complete",
"context": [
{
"key": "selector",
"operator": "equal",
"operand": "text.todo"
}]
},
// 复制,复制本行,复制到剪切板
{
"keys": ["alt+c"],
"command": "plain_tasks_cancel",
"context": [
{
"key": "selector",
"operator": "equal",
"operand": "text.todo"
}]
},
// 直接换行
{
"keys": ["ctrl+enter"],
"command": "plain_tasks_new",
"context": [
{
"key": "selector",
"operator": "equal",
"operand": "text.todo"
}]
},
// 显示面板搜索关键词
{
"keys": ["ctrl+i"],
"command": "plain_tasks_new",
"context": [
{
"key": "selector",
"operator": "equal",
"operand": "text.todo"
}]
},
// 带日期的普通任务
{
"keys": ["ctrl+shift+enter"],
"command": "plain_tasks_new_with_date",
"context": [
{
"key": "selector",
"operator": "equal",
"operand": "text.todo"
}]
},
// 普通任务存档
{
"keys": ["ctrl+shift+a"],
"command": "plain_tasks_archive",
"context": [
{
"key": "selector",
"operator": "equal",
"operand": "text.todo"
}]
},
// 普通任务存档组织
{
"keys": ["ctrl+shift+o"],
"command": "plain_tasks_archive_org",
"context": [
{
"key": "selector",
"operator": "equal",
"operand": "text.todo"
}]
},
// 普通任务打开url
{
"keys": ["ctrl+shift+u"],
"command": "plain_tasks_open_url",
"context": [
{
"key": "selector",
"operator": "equal",
"operand": "text.todo"
}]
},
// 选中单词
{
"keys": ["alt+o"],
"command": "plain_tasks_open_link",
"context": [
{
"key": "selector",
"operator": "equal",
"operand": "text.todo"
}]
},
// 制表符
{
"keys": ["tab"],
"command": "plain_task_insert_date",
"context": [
{
"key": "selection_empty",
"operator": "equal",
"operand": true,
"match_all": true
},
{
"key": "selector",
"operator": "equal",
"operand": "text.todo"
},
{
"key": "preceding_text",
"operator": "regex_contains",
"operand": "(@started|@toggle|@created)(?!\\([\\d\\w,\\.:\\-\/ @]*\\))",
"match_all": true
}]
},
// 制表符
{
"keys": ["tab"],
"command": "plain_tasks_replace_short_date",
"context": [
{
"key": "selection_empty",
"operator": "equal",
"operand": true,
"match_all": true
},
{
"key": "selector",
"operator": "equal",
"operand": "text.todo"
},
{
"key": "preceding_text",
"operator": "regex_contains",
"operand": "@due\\([^\\)]+(?!.*?\\))",
"match_all": true
},
{
"key": "following_text",
"operator": "regex_contains",
"operand": "[ \t]*\\)",
"match_all": true
}]
},
// 制表符
{
"keys": ["tab"],
"command": "plain_tasks_re_calculate_time_for_tasks",
"context": [
{
"key": "selector",
"operator": "equal",
"operand": "text.todo meta.tag.todo.completed, text.todo meta.tag.todo.cancelled"
}]
},
// 加1
{
"keys": ["alt+up"],
"command": "emmet_increment_number",
"args":
{
"delta": 1
}
},
// 减1
{
"keys": ["alt+down"],
"command": "emmet_increment_number",
"args":
{
"delta": -1
}
},
// 加0.1
{
"keys": ["alt+right"],
"command": "emmet_increment_number",
"args":
{
"delta": 0.1
}
},
// 减0.1
{
"keys": ["alt+left"],
"command": "emmet_increment_number",
"args":
{
"delta": -0.1
}
},
// 加10
{
"keys": ["alt+shift+up"],
"command": "emmet_increment_number",
"args":
{
"delta": 10
}
},
// 减10
{
"keys": ["alt+shift+down"],
"command": "emmet_increment_number",
"args":
{
"delta": -10
}
},
// 打开ie11
{
"keys": ["f11"],
"context": [
{
"key": "selector",
"operator": "equal",
"operand": "text.tex.latex"
}],
"command": "jump_to_pdf",
"args":
{
"from_keybinding": true
}
},
// 打开(系统默认浏览器)
{
"keys": ["f12"],
"args":
{
"only_current_file": true
},
"context": [
{
"key": "selector",
"operator": "equal",
"operand": "text.tex"
}],
"command": "latex_toc_quickpanel"
},
// 括号内选中
{
"keys": ["alt+u"],
"command": "bh_key",
"args":
{
"no_outside_adj": null,
"lines": true,
"plugin":
{
"type": ["__all__"],
"command": "bh_modules.bracketselect"
}
}
},
// {
// "keys": ["alt+shift+u"],
// "command": "expand_selection",
// "args":
// {
// "to": "brackets"
// }
// },
// 选中包含括号内的内容
{
"keys": ["alt+shift+u"],
"command": "bh_async_key",
"args":
{
"no_outside_adj": null,
"lines": true,
"plugin":
{
"type": ["__all__"],
"command": "bh_modules.bracketselect",
"args":
{
"always_include_brackets": true
}
}
}
},
// 交换单双引号
{
"keys": ["alt+'"],
"command": "bh_async_key",
"args":
{
"lines": true,
"plugin":
{
"type": ["single_quote", "double_quote", "py_single_quote", "py_double_quote"],
"command": "bh_modules.swapquotes"
}
}
},
// 交换括号
{
"keys": ["alt+;"],
"command": "swap_brackets",
"args":
{
"async": true
}
},
// 拆下括号或者内容
{
"keys": ["alt+n"],
"caption": "BracketHighlighter: Remove Brackets",
"command": "bh_remove_brackets"
},
//跳转到单词开头
{
"keys": ["alt+d"],
"command": "move",
"args":
{
"by": "words",
"forward": false
}
},
// 跳转到单词结尾
{
"keys": ["alt+k"],
"command": "move",
"args":
{
"by": "word_ends",
"forward": true
}
},
// 选择至单词开头
{
"keys": ["alt+shift+d"],
"command": "move",
"args":
{
"by": "words",
"forward": false,
"extend": true
}
},
// 选择至单词结尾
{
"keys": ["alt+shift+k"],
"command": "move",
"args":
{
"by": "word_ends",
"forward": true,
"extend": true
}
},
// 对比文件
{
"keys": ["ctrl+shift+left"],
"command": "diffy"
},
// 滚屏光标处内容到屏中间
{
"keys": ["alt+shift+l"],
"command": "show_at_center"
},
// 分屏1列
{
"keys": ["alt+shift+1"],
"command": "set_layout",
"args":
{
"cols": [0.0, 1.0],
"rows": [0.0, 1.0],
"cells": [
[0, 0, 1, 1]
]
}
},
// 分屏2列
{
"keys": ["alt+shift+2"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.5, 1.0],
"rows": [0.0, 1.0],
"cells": [
[0, 0, 1, 1],
[1, 0, 2, 1]
]
}
},
// 分屏3列
{
"keys": ["alt+shift+3"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.33, 0.66, 1.0],
"rows": [0.0, 1.0],
"cells": [
[0, 0, 1, 1],
[1, 0, 2, 1],
[2, 0, 3, 1]
]
}
},
// 分屏4列
{
"keys": ["alt+shift+4"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.25, 0.5, 0.75, 1.0],
"rows": [0.0, 1.0],
"cells": [
[0, 0, 1, 1],
[1, 0, 2, 1],
[2, 0, 3, 1],
[3, 0, 4, 1]
]
}
},
// 网格4个
{
"keys": ["alt+shift+5"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.5, 1.0],
"rows": [0.0, 0.5, 1.0],
"cells": [
[0, 0, 1, 1],
[1, 0, 2, 1],
[0, 1, 1, 2],
[1, 1, 2, 2]
]
}
},
// 分屏2行
{
"keys": ["alt+shift+8"],
"command": "set_layout",
"args":
{
"cols": [0.0, 1.0],
"rows": [0.0, 0.5, 1.0],
"cells": [
[0, 0, 1, 1],
[0, 1, 1, 2]
]
}
},
// 分屏3行
{
"keys": ["alt+shift+9"],
"command": "set_layout",
"args":
{
"cols": [0.0, 1.0],
"rows": [0.0, 0.33, 0.66, 1.0],
"cells": [
[0, 0, 1, 1],
[0, 1, 1, 2],
[0, 2, 1, 3]
]
}
},
// 变量翻译
{
"keys": ["alt+enter"],
"command": "translate"
}, // 跳转到上一个空内容或空属性值上,或空行
{
"keys": ["alt+s"],
"command": "emmet_go_to_edit_point",
"args":
{
"previous": true
}
},
// 跳转到下一个空内容或空属性值上,或空行
{
"keys": ["alt+l"],
"command": "emmet_go_to_edit_point"
}, // 选择上一个标签、属性、值
{
"keys": ["ctrl+left"],
"command": "emmet_select_item",
"args":
{
"previous": true
}
},
// 选择下一个标签、属性、值
{
"keys": ["ctrl+right"],
"command": "emmet_select_item"
},
// 打开程序列表
{
"keys": ["ctrl+shift+f"],
"command": "cmd_caller_list"
},
// 格式化python
{
"keys": ["alt+\\"],
"command": "black"
},
// 编译
{
"keys": ["ctrl+alt+b"],
"command": "terminus_open",
"args":
{
"cmd": ["cmd", "/k", "call conda activate automa && python automa.py"],
"cwd": "${file_path:${folder}}",
"show_in_panel": false
}
}
]
2025/03/22 16:43:58
typora快捷键设置
位置:C:\Users\Administrator\AppData\Roaming\Typora\conf\conf.user.json
/** For advanced users. */
{
"defaultFontFamily": {
"standard": null, //String - Defaults to "Times New Roman".
"serif": null, // String - Defaults to "Times New Roman".
"sansSerif": null, // String - Defaults to "Arial".
"monospace": null // String - Defaults to "Courier New".
},
"autoHideMenuBar": false, //Boolean - Auto hide the menu bar unless the Alt
key is pressed. Default is false.
// Array - Search Service user can access from context menu after a range of text is selected. Each item is formatted as [caption, url]
"searchService": [
["Search with Google", "https://google.com/search?q=%s"]
],
// https://support.typoraio.cn/Shortcut-Keys/#change-shortcut-keys
// Custom key binding, which will override the default ones.
// see https://support.typora.io/Shortcut-Keys/#windows--linux for detail
"keyBinding": {
/*==============================
文件
==============================*/
"New": "Ctrl+N", // 新建
"New Window": "Ctrl+Shift+N", // 新建窗口
"Open": "Ctrl+O", // 打开
// "Open Folder": "Ctrl+Shift+H", // 打开文件夹
"Open Quickly": "Ctrl+P", // 快速打开
// "Auto": "Ctrl+Shift+H", // 自动
"Reopen Closed File": "Ctrl+Shift+T", // 重新打开已关闭的文件
// "Clear Items": "Ctrl+Shift+H", // 清除项目
"Save": "Ctrl+S", // 保存
"Save As": "Ctrl+Shift+S", // 另存为
// "Move To": "Ctrl+Shift+H", // 移动到
// "Save All": "Ctrl+Shift+H", // 保存全部
// "Properties": "Ctrl+Shift+H", // 属性
// "Open File Location": "Ctrl+Shift+H", // 打开文件位置
// "Reveal in Sidebar": "Ctrl+Shift+H", // 在侧边栏显示
// "Delete": "Ctrl+Shift+H", // 删除
// "Import": "Ctrl+Shift+H", // 导入
// "Export with Previous": "Ctrl+Shift+H", // 使用之前的设置导出
// "Export and Overwrite with Previous": "Ctrl+Shift+H", // 使用之前的设置导出并覆盖
// "Export Setting": "Ctrl+Shift+H", // 导出设置
"Print": "Alt+Shift+P", // 打印
"Preference": "Ctr+,", // 偏好设置
"Close": "Ctrl+W", // 关闭
/*==============================
编辑
==============================*/
"Undo": "Ctrl+Z", // 撤销
"Redo": "Ctrl+Y", // 重做
"Cut": "Ctrl+X", // 剪切
"Copy": "Ctrl+C", // 复制
// "Copy Image Content": "Ctrl+Shift+H", // 复制图像内容
// "Paste": "Ctrl+V", // 粘贴
// "Copy as Plain Text": "Ctrl+Shift+H", // 复制为纯文本
"Copy as Markdown": "Ctrl+Shift+C", // 复制为 Markdown
// "Copy as HTML Code": "Ctrl+Shift+H", // 复制为 HTML 代码
// "Copy without Theme Styling": "Ctrl+Shift+H", // 复制不带主题样式
"Paste as Plain Text": "Ctrl+Shift+V", // 粘贴为纯文本
// "Select All": "Ctrl+Shift+H", // 全选
// "Select Paragraph / Block": "Ctrl+Shift+H", // 选择段落/块
// "Select Line / Sentence": "Ctrl+Shift+H", // 选择行/句子
// "Select Styled Scope": "Ctrl+Shift+H", // 选择样式范围
// "Select Word": "Ctrl+Shift+H", // 选择单词
// "Jump to Top": "Ctrl+Shift+H", // 跳转到顶部
// "Jump to Selection": "Ctrl+Shift+H", // 跳转到选择
// "Jump to Bottom": "Ctrl+Shift+H", // 跳转到底部
// "Jump to Line Start": "Ctrl+Shift+H", // 跳转到行首
// "Jump to Line End": "Ctrl+Shift+H", // 跳转到行尾
// "Delete": "Ctrl+Shift+H", // 删除
// "Delete Range": "Ctrl+Shift+H", // 删除范围
// "Math Tools": "Ctrl+Shift+H", // 数学工具
// "Smart Punctuation": "Ctrl+Shift+H", // 智能标点
// "Line Endings": "Ctrl+Shift+H", // 行尾
// "Whitespace and Line Breaks": "Ctrl+Shift+H", // 空格和换行
// "Spell Check...": "Ctrl+Shift+H", // 拼写检查
// "Find and Replace": "Ctrl+Shift+H", // 查找和替换
// "Emoji and Symbols": "Ctrl+Shift+H", // 表情和符号
/*==============================
表格处理
==============================*/
"Add Row Above": "Ctrl+Shift+|", // 在当前行上方添加一行
"Add Row Below": "Ctrl+Enter", // 在当前行下方添加一行
// "Add Column Before": "Ctrl+Shift+;", // 在当前列左侧添加一列(无法生效不知道原因)
"Add Column After": "Ctrl+Shift+\"", // 在当前列右侧添加一列
"Move Row Up": "Alt+Up", // 将当前行上移
"Move Row Down": "Alt+Down", // 将当前行下移
"Move Column Left": "Alt+Left", // 将当前列左移
"Move Column Right": "Alt+Right", // 将当前列右移
"Delete Row": "Ctrl+Shift+Backspace", // 删除当前行
"Delete Column": "Ctrl+Shift+H", // 删除当前列
// "Copy Table": "Ctrl+Shift+H", // 复制当前表格
// "Prettify Source Code": "Ctrl+Shift+H", // 格式化当前表格源码
// "Delete Table": "Ctrl+Shift+H", // 删除当前表格
},
"monocolorEmoji": false, //default false. Only work for Windows
"maxFetchCountOnFileList": 500,
"flags": [] // default [], append Chrome launch flags, e.g: [["disable-gpu"], ["host-rules", "MAP * 127.0.0.1"]]
}
2025/03/19 19:48:41
自定义mykeymap函数
位置:D:\Program Files\MyKeymap-2.0-beta33\data\custom_functions.ahk
; 自定义的函数写在这个文件里, 然后能在 MyKeymap 中调用
; 使用如下写法,来加载当前目录下的其他 AutoHotKey v2 脚本
; Include../data/test.ahk
RequiresAutoHotkey v2.0
DetectHiddenWindows True
; 定义全局变量用于控制提示窗口
global isShowing := false
global MyGui
global currentHandlerIndex := 1 ; 新增全局变量用于记录当前模式
; 显示提示信息并在1秒后消失的函数
ShowToolTip(message, x := unset, y := unset) { ; 添加可选参数
if !IsSet(x) || !IsSet(y) { ; 当参数未传入时执行原逻辑
try {
; 获取光标位置
caretPos := CaretGetPos()
x := caretPos.X + 20
y := caretPos.Y + 20
} catch {
; 获取失败时使用屏幕中心坐标
x := A_ScreenWidth // 2
y := A_ScreenHeight // 2
}
}
; 创建GUI代替ToolTip
myGui := Gui("+AlwaysOnTop -Caption +ToolWindow +E0x20") ; 添加透明度样式
myGui.BackColor := "FFFF00" ; 黄色背景
WinSetTransparent(255, myGui.Hwnd) ; 设置透明度
myGui.SetFont("s12", "微软雅黑") ; 字体大小12,字体类型
myGui.Add("Text",, message)
myGui.Show("x" x " y" y " NoActivate") ; 显示在指定位置
; 定时销毁GUI
SetTimer(() => myGui.Destroy(), 1000)
}
; 循环切换函数小英,中文,大写
CycleHandlers() {
global currentHandlerIndex
Switch currentHandlerIndex {
Case 1:
RShiftHandler()
Case 2:
LShiftHandler()
Case 3:
CapsLockHandler()
}
currentHandlerIndex := Mod(currentHandlerIndex, 3) + 1 ; 在1-3之间循环
}
; 左Shift键处理函数
RShiftHandler() {
if GetKeyState("CapsLock", "T") {
SetCapsLockState 0
}
if isEnglishMode() { ; 当前为英文时切换
Send "^{Space}"
}
ShowToolTip("中")
}
; 右Shift键处理函数
LShiftHandler() {
if GetKeyState("CapsLock", "T") {
SetCapsLockState 0
if !isEnglishMode() {
Send "^{Space}"
}
ShowToolTip("en")
} else {
if !isEnglishMode() {
Send "^{Space}"
ShowToolTip("en")
}
}
}
; CapsLock键处理函数
CapsLockHandler() {
if GetKeyState("CapsLock", "T") {
SetCapsLockState 0
if !isEnglishMode() { ; 关闭CapsLock时强制切英文
Send "^{Space}"
ShowToolTip("en")
}
} else {
SetCapsLockState 1
ShowToolTip("EN")
}
}
; 判断当前输入法是否为英文模式
isEnglishMode() {
hWnd := WinGetID("A")
result := SendMessage(
0x283, ; WM_IME_CONTROL
0x001, ; IMC_GETCONVERSIONMODE
0,
,
"ahk_id " DllCall("imm32\ImmGetDefaultIMEWnd", "Uint", hWnd, "Uint")
)
return result == 0 ; 0=英文模式,1=中文模式
}
;--------------------------------------------------------------------------------------------
; 切换虚拟桌面的独立函数
SwitchVirtualDesktop() {
static pressed := false ; 静态变量保存切换状态
pressed := !pressed ; 每次调用翻转状态
; 根据状态发送不同的组合键
if pressed {
Send("^#{Right}") ; 切换到右侧虚拟桌面
} else {
Send("^#{Left}") ; 切换到左侧虚拟桌面
}
}
; #Tab:: { ; Win+Tab 热键切换两个窗口
; static pressed := false ; 静态变量保存状态
; pressed := !pressed ; 切换状态
; if (pressed) {
; Send("^#{Right}") ; 切换到右侧虚拟桌面
; } else {
; Send("^#{Left}") ; 切换到左侧虚拟桌面
; }
; }
; 切换最小化和还原所有窗口(排除 Rainmeter)
ToggleMinimizeAll() {
static isMinimized := false
if (isMinimized) {
RestoreAllWindows()
isMinimized := false
} else {
MinimizeAllWindows()
isMinimized := true
}
}
; 最小化所有窗口(排除 Rainmeter)
MinimizeAllWindows() {
windows := WinGetList()
for id in windows {
try { ; 防止无效窗口导致崩溃
processName := WinGetProcessName(id)
if (processName != "Rainmeter.exe") {
WinMinimize(id)
}
}
}
}
; 还原所有最小化窗口(排除 Rainmeter)
RestoreAllWindows() {
windows := WinGetList()
for id in windows {
try {
; 先检查窗口是否存在,避免无效句柄
if !WinExist("ahk_id " id)
continue
; 排除 Rainmeter 进程
processName := WinGetProcessName(id)
if (processName == "Rainmeter.exe")
continue
; 获取窗口状态(关键修正点)
minMaxState := WinGetMinMax(id)
; AHK 中最小化状态值为 -1,最大化是 1,正常是 0
if (minMaxState == -1) {
WinRestore(id)
; 可选:激活窗口确保还原(部分系统需要)
; WinActivate(id)
}
} catch Error {
; 捕获异常(例如权限问题)
continue
}
}
}
; ; 写一个函数切换windowtop,windowbottom,windowleft,windowright
; ; 窗口位置配置中心(默认参数)
global WindowPositions := {
top: { width: 2560, height: 460 },
bottom: { width: 2560, height: 460 },
left: { width: 870, height: 1440 },
right: { width: 870, height: 1440 }
}
ToggleWindowPosition(params := "") {
static state := 0
state := Mod(state, 5) + 1
; 合并全局配置与自定义参数
config := MergeConfig(WindowPositions.Clone(), params)
switch state {
case 1:
windowtop(config.top.width, config.top.height)
case 2:
windowbottom(config.bottom.width, config.bottom.height)
case 3:
windowleft(config.left.width, config.left.height)
case 4:
windowright(config.right.width, config.right.height)
case 5:
MaximizeWindows()
}
}
; 配置合并函数
MergeConfig(base, extend) {
if !IsObject(extend)
return base
for k, v in extend {
if IsObject(v) && base.HasKey(k)
base[k] := MergeConfig(base[k], v)
else
base[k] := v
}
return base
}
; 调整窗口大小并定位到屏幕顶部(任务栏下方)且水平居中
windowtop(width, height) {
if NotActiveWin() {
return
}
DllCall("SetThreadDpiAwarenessContext", "ptr", -1, "ptr")
WinExist("A")
if (WindowMaxOrMin())
WinRestore
WinGetPos(&x, &y, &w, &h)
ms := GetMonitorAt(x + w / 2, y + h / 2)
MonitorGetWorkArea(ms, &l, &t, &r, &b)
w := r - l ; 工作区宽度
h := b - t ; 工作区高度
; 计算窗口尺寸(不超过工作区)
winW := Min(width, w+20)
winH := Min(height, h)
; 水平居中,顶部对齐
winX := l + (w - winW) / 2
winY := t ; 关键修改:从工作区顶部开始定位
WinMove(winX, winY, winW, winH)
DllCall("SetThreadDpiAwarenessContext", "ptr", -3, "ptr")
; SetWindowTopMost()
}
; 将当前窗口调整至显示器底部并水平居中显示
windowbottom(width, height) {
; 检查当前是否有活动窗口,没有则直接返回
if NotActiveWin() {
return
}
; 设置DPI感知模式为UNAWARE(-1),让系统自动处理缩放
; 当执行窗口移动操作时,即使指定固定像素尺寸,系统会自动适配显示器缩放比例
DllCall("SetThreadDpiAwarenessContext", "ptr", -1, "ptr")
; 确保操作对象是当前活动窗口
WinExist("A")
; 如果窗口处于最大化/最小化状态,先恢复窗口
if (WindowMaxOrMin())
WinRestore
; 获取窗口当前位置和尺寸(&表示输出变量)
WinGetPos(&x, &y, &w, &h)
; 根据窗口中心点坐标获取所在显示器序号
ms := GetMonitorAt(x + w / 2, y + h / 2)
; 获取该显示器的工作区域坐标(排除任务栏等区域)
MonitorGetWorkArea(ms, &l, &t, &r, &b)
w := r - l ; 计算工作区实际可用宽度
h := b - t ; 计算工作区实际可用高度
; 计算最终窗口尺寸(不超过显示器工作区大小)
winW := Min(width, w+20) ; 取期望宽度与最大可用宽度的较小值
winH := Min(height, h) ; 取期望高度与最大可用高度的较小值
; 计算窗口位置(水平居中 + 底部对齐)
winX := l + (w - winW) / 2 ; 水平居中:左边界 + (可用宽度-窗口宽度)/2
winY := b - winH ; 垂直底部:工作区下边界 - 窗口高度
; 移动窗口到计算位置(使用新的尺寸)
WinMove(winX, winY, winW, winH)
; 还原DPI感知模式为PER_MONITOR_AWARE(-3),确保鼠标移动等操作精准
DllCall("SetThreadDpiAwarenessContext", "ptr", -3, "ptr")
; 设置窗口置顶状态(根据之前的配置)
; SetWindowTopMost()
}
; 调整窗口大小并定位到屏幕左侧(垂直居中)
windowleft(width, height) {
if NotActiveWin() {
return
}
DllCall("SetThreadDpiAwarenessContext", "ptr", -1, "ptr")
WinExist("A")
if (WindowMaxOrMin())
WinRestore
WinGetPos(&x, &y, &w, &h)
ms := GetMonitorAt(x + w / 2, y + h / 2)
MonitorGetWorkArea(ms, &l, &t, &r, &b)
w := r - l ; 工作区宽度
h := b - t ; 工作区高度
; 计算窗口尺寸(不超过工作区)
winW := Min(width, w)
winH := Min(height, h)
; 左侧对齐,垂直居中
winX := l-10 ; 关键修改:从工作区左侧开始
winY := t + (h - winH) / 2 ; 垂直居中计算
WinMove(winX, winY, winW, winH)
DllCall("SetThreadDpiAwarenessContext", "ptr", -3, "ptr")
; SetWindowTopMost()
}
; 调整窗口大小并定位到屏幕右侧(垂直居中)
windowright(width, height) {
if NotActiveWin() {
return
}
DllCall("SetThreadDpiAwarenessContext", "ptr", -1, "ptr")
WinExist("A")
if (WindowMaxOrMin())
WinRestore
WinGetPos(&x, &y, &w, &h)
ms := GetMonitorAt(x + w / 2, y + h / 2)
MonitorGetWorkArea(ms, &l, &t, &r, &b)
w := r - l ; 工作区宽度
h := b - t ; 工作区高度
; 计算窗口尺寸(不超过工作区)
winW := Min(width, w)
winH := Min(height, h)
; 右侧对齐,垂直居中
winX := r - winW +10 ; 关键修改:从工作区右侧向左计算
winY := t + (h - winH) / 2 ; 垂直居中计算
WinMove(winX, winY, winW, winH)
DllCall("SetThreadDpiAwarenessContext", "ptr", -3, "ptr")
; SetWindowTopMost()
}
; 窗口最大化
MaximizeWindows() {
if NotActiveWin() {
return
}
if WindowMaxOrMin() {
WinRestore("A")
; SetWindowTopMost()
} else {
WinMaximize("A")
; UnsetWindowTopMost()
}
}
; 置顶窗口函数
SetWindowTopMost() {
WinSetAlwaysOnTop(true, "A")
if (WinGetExStyle("A") & 0x8) { ; 状态校验
Tip(Translation().always_on_top_on)
; 可扩展功能点:记录置顶日志/触发声音反馈
}
}
; 取消置顶函数
UnsetWindowTopMost() {
WinSetAlwaysOnTop(false, "A")
if !(WinGetExStyle("A") & 0x8) { ; 状态校验
Tip(Translation().always_on_top_off)
; 可扩展功能点:窗口位置复位/透明度重置
}
}
;RequiresAutoHotkey v2.0
; 设置图像文件的路径(确保使用相对路径或绝对路径)
imagePath := "D:\Program Files\MyKeymap-2.0-beta33\data\ee.bmp" ; 替换为你的图像文件路径
; 设置图像搜索的模式
CoordMode("Mouse", "Screen")
CoordMode("Pixel", "Screen")
; 定义检查间隔时间(毫秒)
checkInterval := 1000 ; 每1秒检查一次
; 定义全局变量用于保存图像位置
global Fx := 0
global Fy := 0
global imageFound := false ; 用于标记是否已经找到图像
global timerRunning := false ; 用于标记定时器是否在运行
CheckImage() {
global Fx, Fy, imagePath, imageFound
; 查找目标窗口
if WinExist("ahk_exe chrome.exe") {
; 在整个屏幕范围内搜索图像
found := ImageSearch(&Fx, &Fy, 0, 0, A_ScreenWidth, A_ScreenHeight, imagePath)
; 检查图像是否找到
if found {
; 如果图像之前没有被找到,则执行操作
if !imageFound {
; 点击图像左上角位置向上偏移28像素
Sleep 500
Click Fx, Fy-28
Send("^v")
Sleep 500 ; 等待0.5秒,以确保粘贴完成
; 移动鼠标到屏幕中间
MouseMove A_ScreenWidth // 2, A_ScreenHeight // 2
imageFound := true ; 更新标志,表示图像已找到并处理
ShowToolTip("图像已找到并处理")
}
} else {
imageFound := false ; 如果没有找到图像,重置标志
ShowToolTip("未找到图像")
}
} else {
ShowToolTip("Chrome未运行")
}
}
; 定义热键以手动控制定时器
;`::ToggleTimer() ; 切换定时器状态
;+`::StopTimer()
; 切换定时器状态函数
ToggleTimer() {
global timerRunning
if (timerRunning) {
SetTimer(CheckImage, -1) ; 暂停检测
timerRunning := false
ShowToolTip("定时器已暂停")
} else {
if WinExist("ahk_exe chrome.exe") {
SetTimer(CheckImage, checkInterval) ; 启动检测
timerRunning := true
ShowToolTip("定时器已启动,每 " checkInterval " 毫秒检查一次图像")
} else {
ShowToolTip("Chrome未运行,无法启动定时器")
}
}
}
; 停止定时器函数
StopTimer() {
SetTimer(CheckImage, 0) ; 停止检测
timerRunning := false
ShowToolTip("定时器已停止")
}
2025/03/15 12:11:24
sublime-terminus配置
位置:D:\Program Files\Sublime Text 4173 x64\Data\Packages\User\Default (Windows).sublime-keymap
// 编译
{
"keys": ["ctrl+b"],
"command": "terminus_open",
"args":
{
"cmd": ["cmd", "/k", "call conda activate automa && python automa.py"],
"cwd": "${file_path:${folder}}",
"show_in_panel": true
}
}
配置文件D:\Program Files\Sublime Text 4173 x64\Data\Packages\User\conda.sublime-build
{
"shell": true,
"cmd": "chcp 65001 > nul && E:\\.conda\\envs\\automa\\python.exe \"$file\"",
"selector": "source.python",
"file_regex": "^\\s*File \"(...*?)\", line ([0-9]*)",
"working_dir": "$file_dir",
"encoding": "utf-8",
"env": {"PYTHONIOENCODING": "utf8"}
}
配置文件:D:\Program Files\Sublime Text 4173 x64\Data\Packages\Python\Python.sublime-build
{
"shell_cmd": "\"D:/Program Files/python/python312/python.exe\" -OO -u \"$file\"",
"selector": "source.python",
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"env": {"PYTHONIOENCODING": "utf-8"}
}
配置文件:D:\Program Files\Sublime Text 4173 x64\Data\Packages\Python 3\Python3.sublime-build
{
"env": {"PYTHONIOENCODING": "utf8"},
"shell_cmd": "python3 -OO -u \"$file\"",
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python.3",
"windows":
{
"shell_cmd": "\"D:/Program Files/python/python312/python.exe\" -OO -u \"$file\"",
},
"syntax": "Packages/Python 3/Python3.tmLanguage"
}
2025/03/05 11:26:04
位置:C:\Users\Administrator\pip\pip.ini
[global]
;index-url = https://pypi.org/simple
;index-url = https://mirrors.cloud.tencent.com/pypi/simple
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
;extra-index-url = https://pypi.org/simple
;extra-index-url = https://mirrors.cloud.tencent.com/pypi/simple
extra-index-url = https://pypi.tuna.tsinghua.edu.cn/simple
https://mirrors.cloud.tencent.com/pypi/simple
https://pypi.org/simple
;proxy = http://127.0.0.1:10809
[install]
trusted-host = pypi.org
files.pythonhosted.org
mirrors.cloud.tencent.com
pypi.tuna.tsinghua.edu.cn
mirrors.aliyun.com
[search]
index = https://pypi.org/simple
2025/03/05 11:22:04
git界面;位置:C:\Users\Administrator\.minttyrc
Locale=zh_CN
Charset=UTF-8
Language=zh_CN
Font=等距更纱黑体 SC SemiBold
FontWeight=600
2025/03/05 11:19:19
#conda配置:C:\Users\Administrator\.condarc
channels:
- defaults
show_channel_urls: true
default_channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
pytorch-lts: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
deepmodeling: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/
pkgs_dirs:
- E:\.conda\pkgs
envs_dirs:
- E:\.conda\envs
2025/03/05 11:15:33
# Git 基本操作别名-配置位置:C:\Users\Administrator\.bashrc
# (添)添加文件
alias a="git add"
# (查)查看本地分支
alias b="git branch"
# (查)查看所有分支(包括远程分支)
alias ba="git branch -a"
# (创)创建一个名为 c 的新分支
alias bdc="git branch c"
# (删)删除本地分支(安全删除)
alias bd="git branch -d"
# (删)强制删除本地分支
alias bdd="git branch -D"
# (改)重命名当前分支
alias bdd="git branch -m"
# (改)强制重命名当前分支
alias bdd="git branch -M"
# (查)查看分支的详细信息(包括跟踪的远程分支)
alias bv="git branch -vv"
# (设)设置当前分支跟踪的远程分支
alias bs="git branch --set-upstream"
# 检出与克隆
# (切)切换分支或恢复文件
alias c="git checkout"
# (创)创建并切换到新分支
alias cb="git checkout -b"
# (切)切换到 master 分支
alias cm="git checkout master"
# (克)克隆远程仓库
alias cl="git clone"
# 暂存与状态
# (暂)暂存当前工作目录的修改
alias st="git stash"
# (查)查看当前工作目录的状态
alias s="git status"
# (恢)恢复最近暂存的修改
alias sa="git stash apply"
# (查)查看提交日志的摘要
alias sl="git shortlog"
# (查)查看所有暂存的修改
alias stl="git stash list"
# (清)清除所有暂存的修改
alias stc="git stash clear"
# 提交与差异
# (提)提交暂存区的修改并添加提交信息
alias co="git commit -m"
# (查)查看工作目录与暂存区的差异
alias d="git diff"
# (查)查看暂存区与最新提交的差异
alias dc="git diff --cached"
# 拉取与推送
# (拉)从远程仓库获取最新数据
alias f="git fetch"
# (检)检查仓库的完整性并恢复丢失的对象
alias fs="git fsck --lost-found"
# (查)查看全局配置
alias ggl="cg --list"
# (初)初始化一个新的 Git 仓库
alias in="git init"
# 日志与合并
# (查)查看简洁的提交日志
alias l="git log --oneline --decorate --graph"
# (查)查看指定作者的提交日志
alias la="git log --author"
# (查)查看指定日期之后的提交日志
alias laf="git log --after"
# (查)查看指定日期之前的提交日志
alias lbe="git log --before"
# (查)自定义格式查看提交日志
alias lf="git log --pretty=format:'%cn--%h--%cd'"
# (跟)跟踪大文件
alias lft="git lfs track"
# (取)取消跟踪大文件
alias lfu="git lfs untrack"
# (合)合并分支
alias m="git merge"
# 远程与重置
# (拉)从远程仓库拉取并合并代码
alias pl="git pull"
# (推)将本地提交推送到远程仓库
alias ps="git push"
# (查)查看引用日志
alias r="git reflog"
# (重)重置当前分支的 HEAD
alias re="git reset"
# (重)强制重置工作目录和暂存区,
alias reh="re --hard"
# (重)将本地分支强制重置为远程分支的状态。
alias reho="re --hard origin/main"
# (管)管理远程仓库
alias rem="git remote"
# (添)添加远程仓库
alias rema="git remote add"
# (删)删除文件
alias rm="git rm"
# (删)从暂存区删除文件
alias rmc="git rm --cached"
# (删)强制删除文件
alias rmf="git rm -f"
# 其他操作
# (创)创建空文件或更新文件时间戳
alias t="touch"
# (管)管理标签
alias tg="git tag"
# Git 配置
# (管)管理 Git 配置
alias g="git config"
# (存)存储 Git 凭据
alias g1.0="g credential.helper store"
# (禁)禁用自动换行符转换
alias g1.1="g core.autocrlf false"
# (禁)禁用路径引号
alias g1.2="g core.quotepath false"
# (设)设置 Sublime Text 为默认编辑器
alias g1.3="g core.editor \"'D:\\Program Files\\Sublime Text 4173 x64\\sublime_text.exe' -w\""
# (禁)禁用换行符安全检查
alias g1.4="g core.safecrlf false"
# (设)设置默认推送行为
alias g1.5="g push.default simple"
# (设)设置用户邮箱
alias g1.6="g user.email w3c0929@163.com"
# (设)设置用户名
alias g1.7="g user.name w3c0929"
# (配)快速配置 Git
alias gg="g1.0 && g1.1 && g1.2 && g1.3 && g1.4 && g1.5 && g1.6 &&g1.7"
# (查)查看或设置用户邮箱
alias gue="g user.email"
# (查)查看或设置用户名
alias gun="g user.name"
# (设)设置 VS Code 为默认编辑器
alias ge="g core.editor \"'e:\\Users\\Administrator\\AppData\\Local\\Programs\\Microsoft VS Code\\bin\\code\' --wait\""
# 全局配置
# (管)管理全局配置
alias cg="git config --global"
# (存)全局存储 Git 凭据
alias g2.0="cg credential.helper store"
# (禁)全局禁用自动换行符转换
alias g2.1="cg core.autocrlf false"
# (禁)全局禁用路径引号
alias g2.2="cg core.quotepath false"
# (设)全局设置 Sublime Text 为默认编辑器
alias g2.3="cg core.editor \"'D:\\Program Files\\Sublime Text 4173 x64\\sublime_text.exe' -w\""
# (禁)全局禁用换行符安全检查
alias g2.4="cg core.safecrlf false"
# (设)全局设置默认推送行为
alias g2.5="cg push.default simple"
# (设)全局设置用户邮箱
alias g2.6="cg user.email w3c0929@163.com"
# (设)全局设置用户名
alias g2.7="cg user.name w3c0929"
# (设)全局设置 GUI 编码为 UTF-8
alias g2.8="cg gui.encoding utf-8"
# (设)全局设置提交编码为 UTF-8
alias g2.9="cg i18n.commitencoding utf-8"
# (设)全局设置 SVN 路径编码为 UTF-8
alias g3.0="cg svn.pathnameencoding utf-8"
# (配)快速配置全局 Git
alias ggg="g2.0 && g2.1 && g2.2 && g2.3 && g2.4 && g2.5 && g2.6 && g2.7 && g2.8 && g2.9 && g3.0"
# (查)查看或设置全局用户邮箱
alias ggue="cg user.email"
# (查)查看或设置全局用户名
alias ggun="cg user.name"
# (设)设置全局代理
alias ggp="cg http.https://github.com.proxy socks5://127.0.0.1:10808"
# (设)全局设置 VS Code 为默认编辑器
alias gge="cg core.editor \"'e:\\Users\\Administrator\\AppData\\Local\\Programs\\Microsoft VS Code\\bin\\code\' --wait\""
# 一键开启 Git 全局代理(替换端口和协议)
git_proxy_on() {
git config --global http.proxy http://127.0.0.1:10809
git config --global https.proxy http://127.0.0.1:10809
echo "Git 全局代理已开启"
}
# 一键关闭 Git 全局代理
git_proxy_off() {
git config --global --unset http.proxy
git config --global --unset https.proxy
echo "Git 全局代理已关闭"
}
# 创建简化别名(可选)
alias ggn="git_proxy_on"
alias ggf="git_proxy_off"
2025/03/04 15:36:04
落雪音源地址:
https://fastly.jsdelivr.net/gh/Huibq/keep-alive/render_api.js