关于编辑器:工具集

2次阅读

共计 5184 个字符,预计需要花费 13 分钟才能阅读完成。

  • 截屏:Snipaste
  • 取色:ScreenToolKit
  • win 桌面:Dynamic theme
  • 数据库:Navicat
  • 鼠标连点器:鼠大侠
  • md 文档:typora 0.9.96
  • git 工具:TortoiseGit
  • PDF: 极速 PDF 阅读器
  • vscode:1.50 版本
  • Beyond Compare: 文本比对工具
  • 向日葵:近程工具
  • 抓包:Fiddler (http://www.pc6.com/softview/SoftView_51888.html)
  • SVG: 预览 SVG_Explorer_Extension
  • 近程工具:rustdesk https://rustdesk.com/zh/
  • 设计稿转标注图:pxcook
  • github 减速:利用商店 watt toolkit,fastgithub
  • 鼠标手势:Strokesplus

vscode 插件:

  • favorites
  • Auto Rename Tag
  • Beautify
  • Bracket Pair Colorizer
  • Code Runner
  • Code Spell Checker
  • ESLint
  • Path Intellisense
  • Prettier – Code formatter
  • Tabnine
  • live server
  • GitLens
  • CSScomb 
  • Turbo Console Log

vscode 配置

// 配置
{
  "editor.tabSize": 2,
  "explorer.confirmDelete": false,
  "files.autoSave": "onWindowChange",
  "update.mode": "manual",
  // "terminal.integrated.tabs.enabled": false,
  "editor.guides.bracketPairs": "active",
  "editor.bracketPairColorization.enabled": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.fontSize": 16,
  "settingsSync.ignoredSettings": ["editor.fontSize"],
  "security.workspace.trust.untrustedFiles": "open",
  // "editor.snippetSuggestions": "top", // 智能排序
  "workbench.layoutControl.enabled": false, // 暗藏布局栏
  "code-runner.clearPreviousOutput": true,
  "cSpell.showCommandsInEditorContextMenu": false,
  "turboConsoleLog.includeFileNameAndLineNum": false,
  "turboConsoleLog.insertEnclosingClass": false,
  "turboConsoleLog.insertEnclosingFunction": false,
  "remote.SSH.remotePlatform": {"root": "linux"}
}

autohotkey 配置

// 将键绑定放在此文件中以笼罩默认值 auto[]
[
  {
    "key": "ctrl+k ctrl+k",
    "command": "workbench.action.closeOtherEditors"
  },
  {
    "key": "ctrl+shift+c",
    "command": "-workbench.action.terminal.openNativeConsole",
    "when": "!terminalFocus"
  },
  {
    "key": "ctrl+f",
    "command": "list.find",
    "when": "listFocus && listSupportsFind && explorerResourceIsRoot"
  },
  {
    "key": "ctrl+f",
    "command": "-list.find",
    "when": "listFocus && listSupportsFind"
  }
]

vs 快捷键

ctrl + K ctrl + Q       上一次编辑
ctrl + shift + E        管理器中显示文件
alt + left/right        上一个地位
Ctrl+Shift+\            代码块头 / 尾光标跳转
Shift+Alt+I             选中代码块后插入光标
Ctrl+Alt+left/right 
shift+alt+ 右            区块抉择
ctrl+shift+t            从新关上敞开的文件
alt + enter             选中匹配项
合并行(命令行)

谷歌浏览器插件:

  • FeHelper(前端助手)
  • iGG 谷歌拜访助手
  • Dark Reader
  • http://new.91jingtanhao.cyou/
  • https://xn--4gq62f52gdss.com/#/knowledge
  • https://www.mojie.pw/#/plan
  • https://www.v2ny.top/#/login

autohotkey 相干性能:short.ahk 文件

#MenuMaskKey vkE8 ; 将掩码键改成未调配的按键, 如 vkE8 等.
#IfWinNotActive, ahk_exe Code.exe
  $!WheelUp:: 
    Send {WheelUp 10} 
  return
  $!WheelDown:: 
    Send {WheelDown 10} 
  return
#IfWinNotActive
; 将以后窗口置顶 shift+ 空格。第二次按会勾销置顶。+Space:: Winset, Topmost, , A
Return
; chrome 快捷翻译
#IfWinActive ahk_exe chrome.exe
  F4:: 
    Send {AppsKey}
    sleep, 20
    Send {T}
  return
  ; F2::send, ^{PGUP}
  ; F3::send, ^{PGDN}
#IfWinActive
; 有道词典中将驼峰转成带空格
#IfWinActive ahk_exe YoudaoDict.exe
  F4::
    ClipSaved := ClipboardAll
    Clipboard := ""
    send ^c
    ClipWait
    Select_Text := Clipboard
    Clipboard := ClipSaved
    ClipSaved := ""
    ; MsgBox , %Select Text%
    Select_Text := RegExReplace(Select_Text, "[_-]", " ")
    Select_Text := RegExReplace(Select_Text, "([a-z])([A-Z])", "$1 $2")
    Send , %Select_Text%
    Send , {Enter}
  return
#IfWinActive
; edge 快捷翻译
#IfWinActive ahk_exe msedge.exe
  global isTrans
  isTrans = 0
  F4::
    if(isTrans < 1){Send {AppsKey}
      sleep, 20
      Send {T}
      isTrans = 2
      return
    }
    if(isTrans > 1){
      CoordMode, Mouse, Screen
      MouseGetPos, xpos, ypos
      WinGetPos,x,y,w,h
      MouseClick, Left, x + w - 200, y + 60
      MouseClick, Left, x + w - 230, y + 250
      MouseMove, xpos, ypos
      isTrans = 0
      return
    }
#IfWinActive
; 应用 Snipaste 和 node 及百度 ocr 辨认图片上的文字
RemoveToolTip:
  ToolTip
return
^F4::
  ; PROGRA~1 是 Program Files 简写,可在 cmd 中通过 dir / x 命令获取
  C_basexeTmp:= "node C:/PROGRA~1/img2text/index.js"
  RunWait, %C_basexeTmp%, ,Hide
  ToolTip, success
  SetTimer, RemoveToolTip, -1000
return

CapsLock::Delete
#IfWinActive ahk_exe Code.exe
;CapsLock::^+k
;CapsLock::Delete
;LWin::^Enter
#IfWinActive
return

#IfWinActive ahk_exe Xshell.exe
F1::^Ins
F4::+Ins
#IfWinActive
// autoHotKeyl 加载的 js 脚本
const fs = require("fs");
const path = require("path");
const clipboard = require("clipboardy");
const AipOcrClient = require("baidu-aip-sdk").ocr;
// Snipaste 所有目录
const dir = "D:/Users/80320952/Desktop";
const files = fs.readdirSync(dir);
let file = files.find((item) => /^Snipaste.+png$/.test(item));
if (!file) return;
file = path.join(dir, file);
const bitmap = fs.readFileSync(file);
const base64 = Buffer.from(bitmap, "binary").toString("base64"); // base64 编码
if (!base64) return;

const APP_ID = "25399111";
const API_KEY = "OYuCOAuBML4y5gGkrndVIQfw";
const SECRET_KEY = "MTmr7D0hHWGKPGXK3jQfsz9rWvB8T46Y";
// 新建一个对象,倡议只保留一个对象调用服务接口
const client = new AipOcrClient(APP_ID, API_KEY, SECRET_KEY);
client
  .generalBasic(base64)
  .then((res) => {
    let str = "";
    const {words_result} = res;
    words_result.forEach((item) => {str += item.words + "\n";});
    clipboard.writeSync(str);
    fs.unlinkSync(file);
  })
  .catch(function (err) {clipboard.writeSync(err);
  });
  
  // 对应的 package.json
{
  "name": "img2text",
  "version": "1.0.0",
  "description": "","main":"index.js","scripts": {"test":"echo \"Error: no test specified\" && exit 1"},"keywords": [],"author":"",
  "license": "ISC",
  "dependencies": {
    "baidu-aip-sdk": "^4.16.8",
    "clipboardy": "^2.3.0"
  }
}

Whistle.bat
将 <-loopback> 增加到非代理列表中

@echo off
cmd /c "w2 start" & cmd /c "w2 proxy" & start http://127.0.0.1:8899
pause
w2 stop & w2 proxy off

主动切换 node 版本
echo $profile 获取 powserShell 配置地址,新增 Microsoft.PowerShell_profile.ps1 文件,内容:

$nodePath = (Get-Command node).Source
$nodeVersion = & $nodePath -v
if ((Get-Location).Path -like "D:\001-project*") {if($nodeVersion -ne "v14.5.0"){nvm use 14.5.0}
} else {if($nodeVersion -ne "v18.16.0"){nvm use 18.16.0}
}

# http-server 命令简写成 hs
function hs() { http-server $args --cors}
正文完
 0