Sublime Text 3和ConvertCase包初学者安装问题


0

我刚刚安装了Sublime Text build 3114并开始探索它的功能。 这里 我发现可以安装 案例转换插件 。提到的页面显示了两种安装方式:

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

第一种方法对我没用(参见下面的日志),所以我使用了第二种方法。我的崇高文本位于 C:\Users\wakatana\Downloads\Sublime Text 3 目录。 案例转换插件 网站声称这个插件应该安装在哪里 Preferences -> Browse Packages Sublime中的选项带你。我指向 C:\Users\wakatana\Downloads\Sublime Text 3\Data\Packages 所以我克隆了回购 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 但是你可以在下面的图片中看到有非活跃的情况:

this picture

这是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 ConversionPackage 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\Packages 对面 C:\Users\wakatana\Downloads\Sublime Text 3\Data\Packages 对于 案例转换插件

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

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

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

为什么我无法安装 案例转换插件 运用 包控制插件

为什么 案例转换插件 不工作?

为什么我在控制台中出错?

PS:我已经把这个发布到了 官方ST论坛

Answers:


1

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

错误消息听起来像我没有正确安装Package Control。如果要手动安装,请从“程序包控制”中执行以下步骤 安装指南

  1. 点击 Preferences > Browse Packages… 菜单
  2. 浏览一个文件夹,然后进入 Installed Packages/
  3. 下载 Package Control.sublime-package 并将其复制到 Installed Packages/ 目录
  4. 重新启动Sublime文本

谢谢。好像我搞砸了安装 PackageControl 插入。以前我已经把 Package Control.sublime-package.\Packages 目录但正确的位置是在 .\Data\Installed Packages 目录。
Wakan Tanka
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.