php文件关联sublime,Sublime Text Tools For 文件关联

[Asm] 纯文本查看 复制代码[url=home.php?mod=space&uid=266048]@echo[/url] off

title Sublime Text Tools By:Joker`ST

echo.

echo. Sublime Text Tools

echo --------------------

echo 1.Add Sublime Text to the system menu.

echo 2.Uninstall Sublime Text system menu.

echo 3.Exit

echo.

echo Sublime Text Tools Expain

echo -------------------------

echo 1.Please copy this script to the Sublime Text folder.

echo 2.Ensure that the Sublime Text executable file named sublime_text.exe.(The default installation name)

echo 3.Please extend will need to bind name saved to the SublimeText.txt file and directory.

echo 4.Please put Sublime Text in the right position, not the location of the mobile Sublime Text to run this script. (such as the emergence of the associated error, run this script can)

echo.

:first

set /p v=Input number and press enter:

if "%v%" == "" goto first

if "%v%" == "1" goto regmenu

if "%v%" == "2" goto unregmenu

if "%v%" == "3" goto exit

:regmenu

reg add "HKCR\*\shell\Sublime Text" /ve /d "Open With Sublime Text" /f

reg add "HKCR\*\shell\Sublime Text\command" /ve /d "%cd%\sublime_text.exe ""%%1"" /f

reg add "HKCR\SublimeText" /ve /d "文本文档" /f

reg add "HKCR\SublimeText\DefaultIcon" /ve /d "%cd%\sublime_text.exe" /f

reg add "HKCR\SublimeText\shell\open\command" /ve /d "%cd%\sublime_text.exe ""%%1"" /f

For /F "eol=;" %%e in (SublimeText.txt) Do (

Rem echo %%e

(for /f "skip=2 tokens=1,2,* delims= " %%a in ('reg query "HKCR\.%%e" /ve') do (

If NOT "%%c" == "SublimeText" (

reg add "HKCR\.%%e" /v "SublimeText" /d "%%c" /f

)

))

assoc .%%e=SublimeText

)

echo.

echo Registration successful,Press any key to exit.

pause>nul

exit

:unregmenu

reg delete "HKCR\*\shell\Sublime Text" /f

reg delete "HKCR\SublimeText" /f

For /F "eol=;" %%e in (SublimeText.txt) Do (

Rem echo %%e

(for /f "skip=2 tokens=1,2,* delims= " %%a in ('reg query "HKCR\.%%e" /v "SublimeText"') do (

reg add "HKCR\.%%e" /ve /d "%%c" /f

reg delete "HKCR\.%%e" /V "SublimeText" /f

))

)

echo.

echo Uninstall success,Press any key to exit.

pause>nul

exit

:exit

exit

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Sublime Text 3 是一个非常流行的文本编辑器,可以很方便地用来编写 PHP 代码。但是 Sublime Text 3 是一个纯文本编辑器,它本身并没有内置的 PHP 解释器,因此需要通过一些插件来实现 PHP 的语法高亮和调试等功能。下面是一些常用的 Sublime Text 3 插件和配置,可以帮助你更好地编写和调试 PHP 代码。 1. 安装 Package Control Package Control 是一个 Sublime Text 3 插件管理器,它可以帮助你快速安装、管理和更新 Sublime Text 3 插件。你可以通过以下命令来安装 Package Control: 打开 Sublime Text 3,按下 Ctrl + ` 或者 View -> Show Console 打开控制台,将以下代码复制粘贴到控制台并回车: ``` import urllib.request,os; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); open(os.path.join(ipp, pf), 'wb').write(urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ','%20')).read()) ``` 安装完成后,重启 Sublime Text 3。 2. 安装 PHP 插件 安装完 Package Control 后,你可以使用它来安装 PHP 插件。在 Sublime Text 3 中按下 Ctrl + Shift + P 或者通过菜单栏的 Tools -> Command Palette 打开命令面板,输入 install package 并回车,然后输入 PHP 并回车即可搜索并安装 PHP 插件。 安装完成后,你可以在 Sublime Text 3 中打开一个 PHP 文件,按下 Ctrl + Shift + P 或者通过菜单栏的 Tools -> Build System 选择 PHP,然后按下 Ctrl + B 即可运行 PHP 文件。 3. 配置 Xdebug Xdebug 是一个 PHP 调试器,它可以帮助你调试 PHP 代码。在 Sublime Text 3 中,你可以使用 Xdebug Client 插件来连接 Xdebug 调试器。 首先,你需要在 PHP 中配置 Xdebug。你可以打开 php.ini 文件,添加以下配置: ``` [xdebug] zend_extension="path/to/xdebug.so" xdebug.remote_enable=1 xdebug.remote_autostart=1 xdebug.remote_host="localhost" xdebug.remote_port=9000 ``` 其中,path/to/xdebug.so 是 Xdebug 的安装路径,xdebug.remote_host 是 Xdebug 调试器的主机名,xdebug.remote_port 是 Xdebug 调试器的端口号。 然后,你需要在 Sublime Text 3 中安装 Xdebug Client 插件。在 Sublime Text 3 中按下 Ctrl + Shift + P 或者通过菜单栏的 Tools -> Command Palette 打开命令面板,输入 install package 并回车,然后输入 Xdebug Client 并回车即可搜索并安装 Xdebug Client 插件。 安装完成后,你可以在 Sublime Text 3 中打开一个 PHP 文件,按下 Ctrl + Shift + P 或者通过菜单栏的 Tools -> Build System 选择 Xdebug,然后按下 Ctrl + B 即可连接 Xdebug 调试器。 以上是 Sublime Text 3 配置 PHP 开发环境的基本步骤,希望能对你有所帮助。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值