SublimeText 3 和 ConvertCase 包初学安装问题

SublimeText 3 和 ConvertCase 包初学安装问题

我刚刚安装了 Sublime Text build 3114 并开始探索它的功能。这里我发现可以安装大小写转换插件. 上述页面显示了两种安装可能性:

  1. 使用包控制插件
  2. 手动安装

第一种方法对我不起作用(见下面的日志),所以我使用了第二种方法。我的 sublime text 位于C:\Users\wakatana\Downloads\Sublime Text 3目录中。大小写转换插件网站声称,该插件应该安装Preferences -> Browse Packages在 Sublime 选项引导您安装的任何位置。我的指向,C:\Users\wakatana\Downloads\Sublime Text 3\Data\Packages所以我将 repo 克隆到了 中C:\Users\wakatana\Downloads\Sublime Text 3\Data\Packages\User\CaseConversion-master

我正在尝试更改以下文件中的大小写(示例取自这里

this_is_something
this_is_something
this_is_something

我单击了第一次出现的this_is_something并按下ctrl+d然后我导航到Edit -> Convert Case但正如您在下图中看到的,存在非活动案例:

这张照片

以下是 Sublime Text 启动后控制台立​​即显示的日志:

DPI scale: 1
startup, version: 3114 windows x32 channel: stable
executable: /C/Users/wakatana/Downloads/Sublime Text 3/sublime_text.exe
working dir: /c/Users/wakatana/Downloads/Sublime Text 3
packages path: /C/Users/wakatana/Downloads/Sublime Text 3/Data/Packages
state path: /C/Users/wakatana/Downloads/Sublime Text 3/Data/Local
zip path: /C/Users/wakatana/Downloads/Sublime Text 3/Packages
zip path: /C/Users/wakatana/Downloads/Sublime Text 3/Data/Installed Packages
ignored_packages: ["Vintage"]
pre session restore time: 1.86239
startup time: 7.79439
first paint time: 7.79439
first paint time: 7.79539
reloading plugin Default.auto_indent_tag
reloading plugin Default.block
reloading plugin Default.comment
reloading plugin Default.convert_syntax
reloading plugin Default.copy_path
reloading plugin Default.delete_word
reloading plugin Default.detect_indentation
reloading plugin Default.duplicate_line
reloading plugin Default.echo
reloading plugin Default.exec
reloading plugin Default.fold
reloading plugin Default.font
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.indentation
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading plugin Default.open_file_settings
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.profile
reloading plugin Default.quick_panel
reloading plugin Default.run_syntax_tests
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.show_scope_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading plugin Default.swap_line
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.trim_trailing_white_space
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
reloading plugin Package Control.1_reloader
reloading plugin Package Control.2_bootstrap
reloading plugin Package Control.Package Control
plugins loaded
Traceback (most recent call last):
  File "C:\Users\wakatana\Downloads\Sublime Text 3\sublime_plugin.py", line 162, in on_api_ready
    m.plugin_loaded()
  File "2_bootstrap in C:\Users\wakatana\Downloads\Sublime Text 3\Packages\Package Control.sublime-package", line 103, in plugin_loaded
  File "package_control.loader in C:\Users\wakatana\Downloads\Sublime Text 3\Packages\Package Control.sublime-package", line 193, in add
  File "./python3.3/zipfile.py", line 921, in __init__
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\wakatana\\Downloads\\Sublime Text 3\\Installed Packages\\0_package_control_loader.sublime-package'
Package Control: Not running package cleanup since bootstrapping is not yet complete

这是我输入pciPackage Control: Install Package)后的日志Command palette... (ctrl+shift+p)

Package Control: Fetching list of available packages
  Platform: windows-x32
  Sublime Text Version: 3114
  Package Control Version: 3.1.2
Package Control: Download Debug
  URL: https://packagecontrol.io/channel_v3.json
  Timeout: 120
  Resolved IP: 50.116.33.29
Package Control: WinINet Debug Proxy
  proxy: XXX:3128
  proxy bypass: XXX:3128 <local>
  proxy username: 
  proxy password: 
Package Control: WinINet HTTPS Debug General
  Server SSL Certificate:
    subject: US, Massachusetts, Private Organization, 471714639, US, Massachusetts, Newbury, Codex Non Sufficit LC, codexns.io
    issuer: US, GeoTrust Inc., GeoTrust EV SSL CA - G4
    common name: codexns.io
    issue date: Mon, 28 Mar 2016 02:00:00 GMT
    expire date: Mon, 28 Nov 2016 00:59:59 GMT
Package Control: WinINet HTTPS Debug Write
  GET /channel_v3.json HTTP/1.1
  User-Agent: Package Control v3.1.2
  Host: packagecontrol.io
  Connection: Keep-Alive
  Cache-Control: no-cache
  Accept-Encoding: bzip2,gzip,deflate
  If-None-Match: "5745ad91-3f11b"
  If-Modified-Since: Wed, 25 May 2016 13:50:09 GMT
Package Control: WinINet HTTPS Debug Read
  HTTP/1.1 200 OK
  Server: nginx
  Date: Wed, 25 May 2016 14:55:26 GMT
  Content-Type: application/json
  Content-Length: 259521
  Last-Modified: Wed, 25 May 2016 14:50:09 GMT
  Connection: keep-alive
  ETag: "5745bba1-3f5c1"
  Content-Encoding: bzip2
  Vary: Accept-Encoding
  Strict-Transport-Security: max-age=15552000
  Accept-Ranges: bytes
Package Control: Caching https://packagecontrol.io/channel_v3.json in C:\Users\wakatana\Downloads\Sublime Text 3\Data\Packages\User\Package Control.cache\01524fae79697630d0454ba3fabd9414
Package Control: WinINet HTTPS Debug General
  Closing connection to packagecontrol.io on port 443 after 1 request

这是我选择后的Case Conversion日志Package Control: Install Package

Traceback (most recent call last):
  File "package_control.package_installer in C:\Users\wakatana\Downloads\Sublime Text 3\Packages\Package Control.sublime-package", line 159, in on_done
  File "package_control.package_disabler in C:\Users\wakatana\Downloads\Sublime Text 3\Packages\Package Control.sublime-package", line 74, in disable_packages
ImportError: No module named 'package_control'

之前我安装Package Control.sublime-packageC:\Users\wakatana\Downloads\Sublime Text 3\PackagesC:\Users\wakatana\Downloads\Sublime Text 3\Data\Packages大小写转换插件

我还将代理更改为以下(使用教程):

{
    "debug" : true,
    "timeout" : 120,
    "http_proxy": "http://XXX:8080/",
    "https_proxy": "http://XXX:8080/",
}

Sublime Text 下的Data\Packages和目录有什么区别?Packages

为什么我无法安装大小写转换插件使用包控制插件

为什么大小写转换插件不起作用?

为什么我在控制台中收到错误?

PS:我已将这篇文章转发至官方 ST 论坛

答案1

文件.sublime-package是压缩包,应安装在 中Sublime Text 3\Installed Packages。只有提取的包才能进入Sublime Text 3\Packages\(或其User子文件夹)。

错误消息听起来像是 Package Control 未正确安装。如果您想手动安装,请按照 Package Control 中的以下步骤操作安装指南

  1. 点击Preferences > Browse Packages…菜单
  2. 浏览文件夹然后进入该Installed Packages/文件夹
  3. 下载Package Control.sublime-package并复制到Installed Packages/目录中
  4. 重启 Sublime Text

相关内容