sublimetext3

How to refresh Sublime Text 3 workspace color schemes?

孤街浪徒 提交于 2019-12-03 13:08:31
When you save a project, Sublime Text will create a .sublime-workspace file. In this file, there is an array of buffers, and for each buffer there is a color_scheme property. This is set to whatever color scheme was chosen when the buffers and workspace were created. I recently changed my theme and color scheme in my user settings file. How can I refresh all of my project's workspaces so that way it uses my new color_scheme provided in my user preference file without needed to edit each project's workspace file one-by-one? Expanding on the answer given by Tot you can do this for all views in

sublimerepl getenv failing

*爱你&永不变心* 提交于 2019-12-03 13:08:29
问题 I'd like to use the SiblimeREPL package with Sublime Text. When I try to start a REPL, I get SublimeREPL: obtaining sane environment failed in getenv() Check console and 'getenv_command' setting WARN: Falling back to SublimeText environment This happens regardless of which REPL I try to start. (I tried Ruby, Python, and Clojure.) I tried Sublime Text 2 and Sublime Text 3 with the same results. This is on Mac OS X, if that matters. I looked in the package settings, where I see "getenv_command"

Sublime Text: text list of open files

拜拜、爱过 提交于 2019-12-03 12:33:34
I have some files opened in sublime text. I can see that list on the side panel. I want to know if there is a plugin that can give me this list as text. i.e., I hit a button and new file pops up that has lists all the open file names. 4 open files: open_file_1.cc open_file_1.h open_file_2.cc open_file_2.h I wrote a small plugin for this as I could not find anything. Pasting it here so that someone can use it if needed in future. https://github.com/rrg/ListOpenFiles Press: Ctrl ` (Control-backtick) To open up Sublime's internal Python console. Then run the following command: print("\n".join(

Save the edit when running a Sublime Text 3 plugin

▼魔方 西西 提交于 2019-12-03 12:29:30
For understanding what I'm trying to achieve : printing delayed text in another view... I'm trying to make this sublime text 3 plugin run properly I want to call multiple method of my class using the edit passed in parameter of my run method as so : # sample code, nothing real class MyCommandClass(sublime_plugin.TextCommand): myEdit = None def run(self, edit): self.myEdit = edit # stuff self.myMethod() def myMethod(self): # use self.myEdit ... And I try to use it later on another method, but when I execute the plugin I get this error : ValueError: Edit objects may not be used after the

How do I set sublime text to auto detect a file type after setting it once?

吃可爱长大的小学妹 提交于 2019-12-03 12:00:05
for instance I have a .zsh file that I would like to always open in sublime as a "Shell Script (bash)" file type. Currently it defaults back to a text file format even when I change and reopen it. Look in the bottom right of the window. Click the file type name. Let's assume it is 'Shell Script (Bash)'. Notice that the first option is 'Open all with current extension as...' Follow the obvious steps from there and you should be all set. 来源: https://stackoverflow.com/questions/27454555/how-do-i-set-sublime-text-to-auto-detect-a-file-type-after-setting-it-once

Sublime Text: disable all packages

こ雲淡風輕ζ 提交于 2019-12-03 11:35:29
问题 I'm using Sublime Text 3083. When I load a file with several thousand lines and try to edit it, it gets amazingly un-responsive to the point that adding/removing even one character takes it seconds. I have > 20 packages installed and I need a way to disable all of them at once, to check if this issue is package related or o not. I've searched around and I know that you can disable packages one by one but that's not good when lots of packages are installed. According to this post in the

Sublime Text 2: How to Page Up/Down without moving the cursor

别来无恙 提交于 2019-12-03 11:24:40
I'm on OS X 10.8.4 using ST2. When I use the Home and End keys, the viewport moves and the cursor is left alone. This is standard Mac behavior, and what I'd expect. However, when I use Page Up (pageup/pgup) and Page Down (pagedown/pgdn), the cursor moves along with the viewport. This is not how other Mac apps behave, and I'd like the cursor to be left alone for these keys too. I've been able to get this half-working by adding this to my key bindings: [ { "keys": ["pageup"], "command": "scroll_lines", "args" : {"amount": 30.0} }, { "keys": ["pagedown"], "command": "scroll_lines", "args" : {

Autoindent on Sublime Text

主宰稳场 提交于 2019-12-03 11:14:39
问题 Are there any command/shortcut to auto-indent all my code on the page at once on Sublime Text 3? e.g: On NetBeans I can do this with Alt + Shift + F . 回答1: That's quite simple in Sublime. Just Ctrl+Shift+P (to open tools pallet), type reindent , and pick Indentation: Reindent Lines . It should reindent all the file you are in, just remember to save before running the command, or it may not appear. 回答2: Auto-indenting on Sublime Text 3 - "Key Bindings" Just add this binding to your "Key

How to change the color of right sidebar (miniMap) in sublime?

…衆ロ難τιáo~ 提交于 2019-12-03 11:00:24
There is a rectangle area in the right sidebar, showing the current code block you are in in the context of the whole file, however it is kind of difficult to see, anyone know how to make the color more obvious? sergioFC Yes, it is possible to change the color of the minimap. In addition there are also a couple of settings that you can enable to make the minimap easier to see : draw_minimap_border : enable it to see the minimap border. always_show_minimap_viewport : makes the minimap always visible (even if the mouse is not near the minimap). Example user settings (use menu Preferences

sublime text find, copy, change and paste in new line

对着背影说爱祢 提交于 2019-12-03 10:15:46
I need a Regex to find the certain text in document and change and paste in new line. logging.info("hello i am here") need to find all occurrence of logging.info and change to print("hello i am here") Final looks like this logging.info("hello i am here") print("hello i am here") Is their any regex that i can do or i need to do manually. I believe a regex like this should work: ^(\h*)logging\.info\(([^)]*)\) Replace with: $0\n$1print($2) regex101 demo Description: ^ # Beginning of line (\h*) # Get any spaces/tabs before the line and store in $1 logging\.info\( # Match 'logging.info(' ([^)]*) #