sublimetext3

Where does sublime store the last cursor position of a previosuly opened file?

。_饼干妹妹 提交于 2019-12-24 21:28:49
问题 I would like to export a list of last opened files (tabs) and the last cursor position for each file, in Sublime editor. I can easily parse the session file called Session.sublime_session located in the installation sub-path: <install path>/Data/Local/ (in Windows), to get the file names. But looking in that file, there are no obvious line numbers to be found. Or did I miss something? Where is the last cursor position stored? UPDATE I now see that it is stored in the JSON field called

How to fix inconsistent indentation of a project in Sublime Text 3?

家住魔仙堡 提交于 2019-12-24 20:15:42
问题 I notice one of the file in my PHP Laravel project kept showing weird lines indetation in my Sublime Text 3. Both file in the same project, but I am not sure one show a lot more line than other. Is there a way to fix this in Sublime? Is there a way to fix the file indentation? 回答1: In situations where files don't seem to have the indentation that you would expect them to have based on your settings, the culprit is generally this setting: // Set to false to disable detection of tabs vs. spaces

Where do some sublime packages and default settings go?

好久不见. 提交于 2019-12-24 16:33:44
问题 Sometimes I install a new sublime package and a new directory gets added to the /Users/max/Library/Application Support/Sublime Text 3/Packages directory, which I like because I can use a bookmark with FuzzyFileNav and quickly browse the default .sublime-settings and .sublime-key files to get my bearings about what is going on with this package. However sometimes there is no entry added, as shown below (ironically with FuzzyFileNav) So then the way I would find the .sublime-settings and

Prevent Sublime Text from overwriting .sublime-project

隐身守侯 提交于 2019-12-24 16:14:24
问题 Running Sublime Text 3 with the Anaconda IDE package on Mac OS X, it appears that when I edit the .sublime-project file, for some reason some of the changes will be removed after some time. Any ideas how to prevent this? Before { "build_systems": [ { "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)", "name": "Anaconda Python Builder", "selector": "source.python", "shell_cmd": "~/anaconda/envs/test/bin/python -u \"$file\"", "env": { "PYTHONPATH": "/Users/nyx/test" } } ], After env setting

How do I remove specific whitespace inside xml tag in Sublime Text?

谁说我不能喝 提交于 2019-12-24 16:10:57
问题 I have a file with some xml tags that follow specific patterns (Name and Props are placeholders) <Name id="mod:Name"/> <Prop1 Name id="mod:object.Prop1 Name"/> <Prop1 Prop2 Name id="mod:object.Prop1 Prop2 Name"/> <Prop1 Prop2 Prop3 Name id="mod:object.Prop1 Prop2 Prop3 Name"/> I am looking for regex to remove whitespace from portion before the "id=..." How this should look <Name id="mod:Name"/> <Prop1Name id="mod:object.Prop1 Name"/> <Prop1Prop2Name id="mod:object.Prop1 Prop2 Name"/>

Can Sublime text 2 Follow path in a file?

六眼飞鱼酱① 提交于 2019-12-24 15:32:13
问题 Is it possible to open a linked file in sublime text 2 ? What I mean is, imagine I have the following code : <?php require_once( 'include/const-inc.php' ); require_once( 'include/db-inc.php' ); require_once( 'classes/dummy-class.php' ); ?> I would love to be able to click on the files to open the corresponding file. Sublime text knows the local file path so should be able to resolve the corresponding files paths no? 回答1: Check out the Open-Include plugin, available via Package Control. It

Sublime Text 2 + SublimeREPL allowing user input

时光怂恿深爱的人放手 提交于 2019-12-24 13:19:12
问题 I'd like to set up Sublime Text 2 (or 3 if recommended) to allow user input (raw_input() or input() within the files.). To clarify, I've had this work before! I want to be able to write and execute all code within one window/tab. I have installed sublimeREPL correctly but yet whenever I use either raw_input() or input() I receive the following error: EOFERROR: EOF when reading a line I've had it setup correctly and it worked perfectly before, but it's been a long time and I cannot reproduce

Manage python packages in Sublime text 3

安稳与你 提交于 2019-12-24 13:11:42
问题 Working with Ubuntu 14.04 How to tell Sublime text 3 and SublimeREPL where to look for the python packages? From my terminal, pip list returns a list with many python packages like that: numexpr (2.2.2) numpy (1.8.2) oauthlib (0.6.1) oneconf (0.3.7) openpyxl (2.2.5) PAM (0.4.2) pandas (0.16.2) However, inside Sublime text 3, on the console: >>> import openpyxl Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: No module named 'openpyxl' >>> import pandas

GREP: Find lines more than 12 characters excluding spaces

瘦欲@ 提交于 2019-12-24 07:38:24
问题 I am using a GREP search in Sublime Text 3. I want to find all lines that are more than 12 characters, excluding spaces. Example Mac and Cheese Peanut Butter and Jelly Sandwich In the above example, Mac and Cheese would not be found, because it's exactly 12 characters excluding spaces. How would I do this? I can use the following to find all lines that are more than 12 characters. But I am not sure how to exclude spaces: (?<=.{13}).+ 回答1: The pattern (?<=.{13}).+ will assert what is on the

Anaconda ignoring “extra_paths” in Sublime Text settings

岁酱吖の 提交于 2019-12-24 07:25:31
问题 I'm trying to configure Sublime Text 3 to act as my IDE for Python development, and while I've read the documentation, I'm still having problems importing extra libraries using the Anaconda.sublime-settings file. From what I've read, it should be as simple as having this text in the Anaconda.sublime-settings file: { "python_interpreter": "/Users/mc/anaconda/bin/python", "extra_paths": [ "/Users/mc/workspaces/brg/brg_framework/libs/python", "/Users/mc/workspaces/brg/brg_packages/brg_fea" ] }