sublimetext2

Sublime text 2 how to delete comments only

泪湿孤枕 提交于 2019-12-18 10:17:48
问题 In my sass code, I have inline comments and I wish to remove these in sublime text. Is it possible to permanently delete all comment content alone? @function emCalc($values) { $emValues: ''; $max: length($values); //Get the total number of parameters passed @for $i from 1 through $max { $value: (nth($values, $i)); //Take the individual parameter $value: $value / ($value * 0 + 1); //Doing this gets you one unit (1px) $value: $value / $em-base * 1em; //Divide the px value by emBase and return

Using virtualenv with sublime text 2

≡放荡痞女 提交于 2019-12-18 10:09:28
问题 I am using sublime text 2 for python development along with virtualenv! The standard sublime text 2 build system uses the standard python install rather than my virtualenv where my packages are installed. How can I get sublime text 2 to build using my virtualenv? I currently use the terminal to activate my environment and run my scripts. UPDATE: Never got it working, but seeing as i am using flask and it builds when you make a change, it's not a big issue 回答1: Note comments about this

Sublime Text 2 move cursor out of parenthesis, quotes, or brackets

烈酒焚心 提交于 2019-12-18 09:59:45
问题 I need a fast way to make the cursor jump outside the auto wrap qoutes or other syntax elements. I don't want to have to reach down to my arrow keys each time, and definitely don't want to go to my mouse. Is there a quick and easy way to solve this for my workflow? 回答1: You can use a shortcut ( shift + space , or whatever you like) to move the cursor. In your Key Bindings - User : { "keys": ["shift+space"], "command": "move", "args": {"by": "characters", "forward": true} } 回答2: I made a few

Sublime Text 2: Trim trailing white space on demand

你离开我真会死。 提交于 2019-12-18 09:59:08
问题 I know that Sublime Text 2 can delete the trailing white space on files upon saving. When working in a team and commiting a change to a file this tends to produce huge diffs which make peer code review more cumbersome. For that reason I prefer to only do the white space cleaning when I'm commiting huge changes to a file anyway and leave whitespace as it is for the minor changes. I would like to know if there's any command for executing the trimming of the white space on demand on a file,

How to not highlight object keys such as 'do'/'package' as keywords in Sublime?

▼魔方 西西 提交于 2019-12-18 09:36:55
问题 I'm using Sublime Text 2/3 to code in Typescript and Javascript. But when the key of an object is also a valid keyword name, it gets highlighted like a keyword even though it is only a key in that case. Example: var test = { do: 'hello world' }; Is there a way to not highlight this kind of key as a keyword would? 回答1: The syntax highlighting is controlled by the tmLanguage file. In ST3 these are held in .cache files. So follow these steps. Open Tools -> Command Pallet and Using Package

Use default ruby version in Sublime Text 2

杀马特。学长 韩版系。学妹 提交于 2019-12-18 06:58:00
问题 My default and current version of ruby is 1.9.3. It's actually the only version that appears when I run rvm list so I don't see how I can be messing that part up. I did follow this tutorial that I found here, but it just seemed to break everything. I keep getting "No such file or directory" for all the variations of the fix I see, even the in the comments. I am on a Mac, please let me know what other information I need to post here to help you figure out how I'm breaking things. 回答1: You can

How to edit Sublime Text 3 Soda Theme

馋奶兔 提交于 2019-12-18 04:35:19
问题 I installed the Soda Theme on Sublime Text 3 on OSX and I was wondering where are the actual files and folder to the theme that way I could look at the theme file and make my own edits to it, along with I would like to adjust a few of the images used in the theme. On the Git documents it says if you are to manually install Soda on Sublime you place the soda folder in the package directory, although when I install Soda via Control Package I don't see the Soda theme in package directory. 回答1:

Execute Ruby code in sublime text 2

左心房为你撑大大i 提交于 2019-12-18 01:30:34
问题 How can I run a Ruby file with ST2 and see the ouput? I thought I should use the build command. But if I have this: def foobar "hello world" end puts foobar and then press cmd + shift + b. All I see is [Finished in 0.1s] In textmate I could use the cmd + r (run command) and see all the ouput from the ruby script. I'm I missing something? 回答1: I didn't save the file. That's why it didn't work. To run a file without saving it first (like TextMate) you should try to use the Anypreter plugin. 回答2

How to run PHP code in Sublime Text 2

这一生的挚爱 提交于 2019-12-17 18:44:41
问题 I am very new to Sublime text 2. I have just started using this and know nothing about it. I want to work on PHP. I have built a system 'php'. After choosing 'php' build system I am creating a new file and writing PHP code with just a single echo line and trying to run it. Everytime it is giving my this error By default Sublime Text 2 saved in C:\Program Files\Sublime Text 2 and the path where automatically files are being saved is C:\Users\SM Ahmed\AppData\Roaming\Sublime Text 2\Packages

Trouble setting Python version in Sublime Text2

随声附和 提交于 2019-12-17 15:59:23
问题 I'm having trouble setting the build environment in Sublime Text2. I'm using Macports for Python and package installation. My python.sublime-build file looks like this: { "cmd": ["python", "-u", "$file"], "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)", "selector": "source.python" } I think (from searching) that I need to modify the "cmd" line to point to the Macports version. Anyone done this successfully? From Terminal, everything builds/runs fine, it's only Sublime Text2's build that