zoukankan      html  css  js  c++  java
  • sublime添加右键菜单

    
    参考:https://www.zhihu.com/question/29662273/answer/45277925
    
    @echo Off
    :START
    CLS
    echo *=========================================================================*
    echo *                        注意: 该bat文件必须和sublime_text.exe在同级目录  *
    echo *                            [A]添加右键菜单                              *
    echo *                            [D]删除右键菜单                              *
    echo *                            [Q]退出                                      *
    echo *                                                                         *
    echo *=========================================================================*
    Set /P Choice=       请选择要进行的操作 (A/D/Q) ,然后按回车:
    If /I "%Choice%"=="A" Goto :ADD
    If /I "%Choice%"=="D" Goto :DEL
    If /I "%Choice%"=="Q" Exit
     
    START
     
    :ADD
    CLS
    set str=%cd%
    echo Windows Registry Editor Version 5.00> tmp.reg 
    echo [HKEY_CLASSES_ROOT*shell]>> tmp.reg 
    echo [HKEY_CLASSES_ROOT*shellSublimeText]>> tmp.reg 
    echo @="用Sublime Text打开">> tmp.reg 
    echo "Icon"=""%str:=\%\sublime_text.exe",0">> tmp.reg
    echo [HKEY_CLASSES_ROOT*shellSublimeTextCommand]>> tmp.reg 
    echo @=""%str:=\%\sublime_text.exe" "%%1^"">> tmp.reg 
    
    echo [HKEY_CLASSES_ROOTDirectoryshellsublime]>> tmp.reg 
    echo @="添加到Sublime Text工程项目">> tmp.reg 
    echo "Icon"=""%str:=\%\sublime_text.exe",0">> tmp.reg
    echo [HKEY_CLASSES_ROOTDirectoryshellsublimeCommand]>> tmp.reg 
    echo @=""%str:=\%\sublime_text.exe" "%%1^"">> tmp.reg 
    
    echo [HKEY_CLASSES_ROOTDirectoryBackgroundshellsublime]>> tmp.reg 
    echo @="添加到Sublime Text工程项目">> tmp.reg 
    echo "Icon"=""%str:=\%\sublime_text.exe",0">> tmp.reg
    echo [HKEY_CLASSES_ROOTDirectoryBackgroundshellsublimeCommand]>> tmp.reg 
    echo @=""%str:=\%\sublime_text.exe" "%%V^"">> tmp.reg 
    echo *=========================================================================*
    echo *                                                                         *
    echo *   正在将生成的注册信息写入注册表,请点击“是”键钮!                      *
    echo *                                                                         *
    echo *=========================================================================*
    tmp.reg
    del tmp.reg
    GOTO :START
     
    :DEL
    echo Windows Registry Editor Version 5.00> tmp.reg 
    echo [-HKEY_CLASSES_ROOT*shellSublimeText]>> tmp.reg 
    echo [-HKEY_CLASSES_ROOTDirectoryshellsublime]>> tmp.reg 
    echo [-HKEY_CLASSES_ROOTDirectoryBackgroundshellsublime]>> tmp.reg 
    tmp.reg
    del tmp.reg
    GOTO :START
  • 相关阅读:
    函数组件在react懒加载的方式
    axios 封装
    react高阶组件+ref转发的组合使用
    Iterator & Iterable 和 Comparable&Comparator
    java.lang.Collections
    虚拟机类加载学习和思考
    垃圾收集器与内存分配策略
    jvm内存区域与内存溢出
    spring装配Bean过程
    索引知识点补充
  • 原文地址:https://www.cnblogs.com/startnow/p/7753005.html
Copyright © 2011-2022 走看看