sublimetext3

Sublime text: how to add a key binding to hex_viewer package command

百般思念 提交于 2021-02-18 17:25:08
问题 I've installed the Hex Viewer package on sublime text 3, to toggle it i use ctrl+shift+p to open the command palette, then i search for "hex" and select the command of the package to toggle the hex view. I was wondering how to bind a key to the specific package command, I'm aware of the key bindings configuration file but I don't know what JSON line should I add to call the package command. This is my first question on stackoverflow, sorry if I did something wrong, have a nice day! EDIT: This

syntax highlighting error of jsx in sublime text

眉间皱痕 提交于 2021-02-17 05:19:04
问题 I am trying to construct react components in sublime text, but the syntax highlighting is suggesting that I didn't do everything properly. Where is wrong? 回答1: You are most likely using the Javascript syntax definition, which does not recognize inline HTML like this. To fix this, try the JSX.sublime-syntax definition from Sublime Text 4, which is in development now. To install it, copy the .sublime-syntax file from the above link to your Packages/User directory, where Packages is the one

Add shortcut key for multiple plugins in Sublime Text 3

…衆ロ難τιáo~ 提交于 2021-02-11 15:37:02
问题 I'm using CodeFormatter and SassBeautify plugins in Sublime Text 3 in order to provide syntax highlighting and formatting for .scss files as well as .js/.html files. I've been able to set up shortcut keys for either plugin, but not to work for both, depending on the type of file I'm in. [{ "keys": ["ctrl+alt+f"], "command": "sass_beautify" }, { "keys": ["ctrl+alt+f"], "command": "code_formatter" }] Can someone suggest how do to it? I've tried to understand "contexts" but not well enough to do

Add shortcut key for multiple plugins in Sublime Text 3

我的梦境 提交于 2021-02-11 15:36:09
问题 I'm using CodeFormatter and SassBeautify plugins in Sublime Text 3 in order to provide syntax highlighting and formatting for .scss files as well as .js/.html files. I've been able to set up shortcut keys for either plugin, but not to work for both, depending on the type of file I'm in. [{ "keys": ["ctrl+alt+f"], "command": "sass_beautify" }, { "keys": ["ctrl+alt+f"], "command": "code_formatter" }] Can someone suggest how do to it? I've tried to understand "contexts" but not well enough to do

Add shortcut key for multiple plugins in Sublime Text 3

末鹿安然 提交于 2021-02-11 15:34:22
问题 I'm using CodeFormatter and SassBeautify plugins in Sublime Text 3 in order to provide syntax highlighting and formatting for .scss files as well as .js/.html files. I've been able to set up shortcut keys for either plugin, but not to work for both, depending on the type of file I'm in. [{ "keys": ["ctrl+alt+f"], "command": "sass_beautify" }, { "keys": ["ctrl+alt+f"], "command": "code_formatter" }] Can someone suggest how do to it? I've tried to understand "contexts" but not well enough to do

Open up URL on local machine sublime

末鹿安然 提交于 2021-02-11 13:41:53
问题 When opening a URL via view_in_browser command it opens file:///Applications/MAMP/htdocs/file.php instead I want it to open http://localhost:8888/file.php I was able to do it before, but it was set up 5 years ago and the computer is dead. I don't want to do anything with project URLs or setup sidebar enhancement packages, I also tried creating a custom plugin as in https://forum.sublimetext.com/t/how-to-view-in-browser/3225/7 Which overrides the open_browser command, but it doesn't work. Is

I can't make SublimeREPL run Python 3, instead it's running Python 2

我只是一个虾纸丫 提交于 2021-02-10 20:44:39
问题 As you can see from the following code: I am trying to run a simple code that checks the python version and takes the user's input: import platform print(platform.python_version()) msg = input("Hello, how are you? ") print(msg) We know that Sublime doesn't take any user input in a default fashion, so that's why I installed SublimeREPL, the inconvenience that I'm having is that an error arrises when I run the code above in SublimeREPL:( The code runs fine (apart the fact that it can't take

I can't make SublimeREPL run Python 3, instead it's running Python 2

有些话、适合烂在心里 提交于 2021-02-10 20:38:32
问题 As you can see from the following code: I am trying to run a simple code that checks the python version and takes the user's input: import platform print(platform.python_version()) msg = input("Hello, how are you? ") print(msg) We know that Sublime doesn't take any user input in a default fashion, so that's why I installed SublimeREPL, the inconvenience that I'm having is that an error arrises when I run the code above in SublimeREPL:( The code runs fine (apart the fact that it can't take

Automatically convert indentation from 2 to 4 spaces in Sublime Text 3

别说谁变了你拦得住时间么 提交于 2021-02-10 18:23:01
问题 There are a few topics about auto-conversion of the indentation in Sublime Text, but I didn't find the way to do it automatically. Many files I download have indentation of 2, which I hate, so I want to convert them to 4. What I do is: Select Tab size: 2 Convert indentation to Tabs Select Tab size: 4 Convert indentation to Spaces I don't think I need to mention that it's too much work for every single file. Some people suggest Reindent option, but for my experience, it almost never works

Sublime Text C++ Build System

不想你离开。 提交于 2021-02-10 14:57:37
问题 I use the following compiler settings to compile my C++ code: g++ -Wall -Wextra -O2 -fwrapv -Wfloat-equal -Wconversion -std=c++17 A.cpp But I am not sure how to setup the build system for the purpose, nor I want to try myself! I doubt that I may mess up the configuration (because I did once). So I need help to configure my build system for the above compiler settings. How can I do that? 回答1: This build system works in my machine, basically its the default C++ build system with the extra