【问题标题】:Subl command in windows 10 is recognized but does not open sublime text 3Windows 10中的Subl命令被识别但不打开崇高文本3
【发布时间】:2021-05-26 17:43:55
【问题描述】:

我在 Windows 10 上安装了 sublime3 时遇到问题。文件夹已添加到环境路径 C:\Program Files\Sublime Text 3;。仍然当在 cmd 中输入subl 时,会发生命令被接受但没有任何反应...... 当我输入 cmd 时:subl -help 我出去了:

Sublime Text build 3211

Usage: subl [arguments] [files]         Edit the given files
   or: subl [arguments] [directories]   Open the given directories

Arguments:
  --project <project>: Load the given project
  --command <command>: Run the given command
  -n or --new-window:  Open a new window
  -a or --add:         Add folders to the current window
  -w or --wait:        Wait for the files to be closed before returning
  -b or --background:  Don't activate the application
  -s or --stay:        Keep the application activated after closing the file
  -h or --help:        Show help (this message) and exit
  -v or --version:     Show version and exit

Filenames may be given a :line or :line:column suffix to open at a specific
location.

所以它就像它确实工作但它没有打开。我也试过subl -n,结果相同,用subl file.py打开一个文件

我确实重新启动了计算机。 问题与此类似:Sublime Text 3 subl command not working in Windows 10 但提供的灵魂不起作用。虽然我没有将 subl.exe 复制到 system32 目录,因为我已经将带有 sublime 的文件夹添加到了 env 用户路径。

【问题讨论】:

    标签: powershell cmd windows-10 sublimetext3


    【解决方案1】:

    好的,我发现了错误。我一定是很久以前将 subl.exe 粘贴到了我的 sys32 文件夹中。发生了什么,我认为来自 sys32 的文件将打开,而不是程序文件中的文件。仍然不明白为什么它不起作用...

    【讨论】:

    • 您的sys32 目录是否在Program Files 目录之前的PATH 变量中?
    • 作为一般规则:您应该永远anything 放入 System32 或任何其他系统目录,只是为了将其添加到您的 PATH 中。打开控制面板应用程序并搜索“路径”,将有一个选项来编辑您的环境变量,这就是您想要的。确保在重新加载更改后重新启动 CMD 或 Powershell。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-02-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-11-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多