sublimetext

Parsing Error The Keyword import is Reserved (SublimeLinter-contrib-eslint)

江枫思渺然 提交于 2020-03-17 04:07:46
问题 I have a problem with eslint, it gives me [Parsing Error The keyword import is reserve] this is only occur in sublime, in atom editor work well. I have eslint .eslintrc.js module.exports = { "extends": "airbnb", "plugins": [ "react" ] }; package.json { "name": "paint", "version": "0.0.0", "description": "paint on the browser", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [ "paint", "javascript" ], "author": "", "license": "ISC",

Sublime Text通过快捷键在浏览器中预览文件

五迷三道 提交于 2020-02-28 11:54:08
首先说下,我的是Sublime Text 3,win10。 ST有个插件 View In Browser 可以在浏览器里打开文件,但经过试用,报Encoding错误,其Github的issues里也有人提出了此bug,但未解决。然后我就找到了 这么个办法 。 1、点击菜单Tools -> New Plugin…,在创建好的py模板文件输入下列内容: import sublime, sublime_plugin import webbrowser class OpenBrowser(sublime_plugin.TextCommand): def run(self, edit): url = self.view.file_name() webbrowser.open(url, 2) 这里讲解下 webbrowser.open(url, new=0, autoraise=True) 的用法。 第一个参数就是文件路径; 第二个参数为0表示在同一个浏览器窗口打开,为1表示在新的浏览器窗口打开,为2表示在新的标签页打开; 第三个参数为true表示会自动打开浏览器,实测True和False无差别。 浏览器是在后台打开的,不会覆盖ST。 2、接下来保存,就是默认弹出来的 Packages/User目录,文件名自定义,比如 open_browser 3、设置快捷键,点菜单Preferences -

SublimeText - Unselect last incrementally selected element?

﹥>﹥吖頭↗ 提交于 2020-02-19 07:37:08
问题 I recently discovered the insanely useful ctrl + D functionality in sublime text. With a careful eye, it's almost as functional for things like renaming as far more sophisticated refactoring tools. One thing bothers me. As I ctrl + D through my selections, sometimes I've selected 10 items and overshoot by one (eg. into another method). Is there a way to reverse direction and "deselect the last selected item"? 回答1: ctrl + u as per sublimetext.com/docs and tested by me. ctrl + k , ctrl + d will

Sublime Text 2: Error trying to parse settings

此生再无相见时 提交于 2020-01-31 03:11:07
问题 How do I fix this error? Error trying to parse settings: No data in ~/Library/Application Support/Sublime Text 2/Packages/User/JavaScript.sublime-settings:1:1 回答1: Most likely you or something has created an empty file in your User config directory. The config files must be valid JSON. The file in the question is empty and is not JSON. Try deleting the file or get a fixed version from somewhere (not sure for what the file is being used for) 回答2: Default installs c: / Program Files / Sublime

How do I add ~/bin to my path?

眉间皱痕 提交于 2020-01-28 13:25:47
问题 I've been having trouble modifying my path to add Sublime Text 2. I've added a ~/bin directory and run this command: ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/bin/subl The subl link appears in ~/bin . But I need to add the ~/bin directory to my path. I'm fairly new at this, and I don't know where my path is. I've looked around, and found that the likely files are either .profile , .bash_profile or .bashrc I don't have a .bash_profile . To .profile and .bashrc

How do I add ~/bin to my path?

半世苍凉 提交于 2020-01-28 13:22:38
问题 I've been having trouble modifying my path to add Sublime Text 2. I've added a ~/bin directory and run this command: ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/bin/subl The subl link appears in ~/bin . But I need to add the ~/bin directory to my path. I'm fairly new at this, and I don't know where my path is. I've looked around, and found that the likely files are either .profile , .bash_profile or .bashrc I don't have a .bash_profile . To .profile and .bashrc

How do I add ~/bin to my path?

别说谁变了你拦得住时间么 提交于 2020-01-28 13:22:22
问题 I've been having trouble modifying my path to add Sublime Text 2. I've added a ~/bin directory and run this command: ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/bin/subl The subl link appears in ~/bin . But I need to add the ~/bin directory to my path. I'm fairly new at this, and I don't know where my path is. I've looked around, and found that the likely files are either .profile , .bash_profile or .bashrc I don't have a .bash_profile . To .profile and .bashrc

SublimeText2: SublimeCodeIntel doesn't adds import even when it suggests

自闭症网瘾萝莉.ら 提交于 2020-01-25 11:21:12
问题 I am trying to use SQLAlchemy with SublimeText2 and I do the following sequence Then I do and then so my code is from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class Transaction(Base): __tablename__ = 'transaction' # id = Column('id', Integer, primary_key=True) id = Column('id', Integer, primary_key=True) def main(): print 'Hello World!' if __name__ == '__main__': main() When I try to build this as python build i see line 10, in Transaction id = Column('id',

SublimeLinter ESLint couldn't find the plugin

≡放荡痞女 提交于 2020-01-24 15:59:49
问题 When editing javascript files in Sublime Text Editor 3.x, I get the error: Oops! Something went wrong! :( ESLint: 6.0.1. ESLint couldn't find the plugin "eslint-plugin-chai-expect". (The package "eslint-plugin-chai-expect" was not found when loaded as a Node module from the directory "C:\workspace\flltools".) It's likely that the plugin isn't installed correctly. Try reinstalling by running the following: npm install eslint-plugin-chai-expect@latest --save-dev The plugin "eslint-plugin-chai

Emulate codePen twilight theme

倾然丶 夕夏残阳落幕 提交于 2020-01-17 02:20:29
问题 I'm trying to make sublime text to look like codepen.io twilight theme. I was able to copy it besides for some categories. I don't know what the name of the scope is. Here's an image with the different words I want to change. (The text from the image is JavaScript.) I want to change the purple underlined words to purple, and yellow to yellow. What are the keywords (scope names) for the words? 回答1: The yellow underlined items in your example are class names (a special case of variable name in