w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Start Sublime 3 from terminal, when default is Sublime Text 2
When you run sublime, your computer should run a bash file at /usr/bin/sublime (running which sublime as Mike Li suggested will confirm the location. Open that up and edit it for Sublime Text 3. The contents of that file should be: #!/bin/bash /usr/lib/sublime-text-2/sublime_text --class=sublime-text-2 "$@" Edit it as so: (On my computer the executable is called subime_text_3 instead of subime_text. Verifiy by opening /usr/lib/sublime-text-3.) #!/bin/bash /usr/lib/sublime-text-3/sublime_text_3 --class=sublime-text-3 "$@" Point it to the location of Sublime Text 3 on your system. Edit Build 2221 (using the ppa) changed the installation directory from /usr/lib/sublime-text-2 to /opt/sublime_text_2

Categories : Linux

Sublime Text 2 Python.sublime-package
Remove existing /User/Python.sublime-package and try manually unzip Python.sublime-package (change it's extension to .zip) to Package folder /Packages/Python. Package folder can be revealed via Preferences->Browse Packages... command.

Categories : Python

how to install sublime text indent xml in sublime 3
The location is system dependent, but are located at: OS X: ~/Library/Application Support/Sublime Text 3/Packages/ Windows: %APPDATA%/Sublime Text 3/Packages/ Linux: ~/.config/sublime-text-3/Packages/

Categories : Xml

Jslint and sublime text
I found solution in this link: http://nicksantan.com/blog/2012/12/adding-auto-format-code-indenting-to-sublime-text-2/ Hopt it work.

Categories : Javascript

Using Sublime Text 3 as a Python IDE with 3.3.2?
Set your "cmd" to the following: "cmd": ["/Library/Framework/Python.framework/Versions/3.3/bin/python3", "-u", "$file"], and it should work. Probably the reason your path addition didn't work was because it was missing the beginning /.

Categories : Python

Sublime Text 2 C Compiling
What Operating System do you use? Linux? Using Linux is more practical, because you compile in the terminal. Installing the Compiler 1 - Make sure that you have the compiler installed. If you dont have, open the terminal (Ctrl + Alt + t) and type this and press Enter: sudo apt-get install g++ gcc build-essential Compiling a file Open the terminal and go to the local that you had saved the files. Type in the terminal: gcc filename.c -o filename Then, type: ./filename The program you run in the terminal normally. PS: gcc is for programs in .c g++ for programs in .cpp -o = to create an "executable" file ./ = to run the program

Categories : C

Vintage Sublime Text go to tab N
Not that it matters, but those are ST1 docs. The command is probably focus_view (though I haven't checked it). If you are using ST3, I'd recommend trying Vintageous. It appears to be much more complete than the built in vintage mode. For example, 3gt does move you to the third tab with this plugin.

Categories : Vim

Sublime text 2 snippets
Sorry snippets are primarily meant for reusability; you can do precisely as you say above but cannot insert specific things - you would have to write your own plugin in order to add this functionality as it would require things like a specific way of selecting things to modify and replace which would be specific to it.

Categories : Python

Using Sublime Text 2 for C++ and OpenGL
I c++, if you want to use a (static in this example) library, you have to link against it. In normal english, you have to tell your compiler where it can find the implementations of the library's functions. I don't know how to do that in your editor, but usually there is something called linker settings, where you can link all the libraries you need for your project. For more info see this wiki page

Categories : C++

How to run Ruby file on Sublime Text
It is possible to run your programs when you need to have user input from the keyboard, but it isn't very nice. When I do so, I need to input from a terminal that opens when I run Sublime, while also reading the response from the program at the bottom of the editor. It is simply easier to run the program from the console/terminal. So, the answer is, while it is possible to do so, there are concerns. You may need to use STDOUT.sync = true or STDOUT.flush to help manage the buffer with the OS, you have two thing to look at, while doing so... yuck. It may not be the answer you are looking for, but as a developer, you should be comfortable running things from the console/terminal.

Categories : Ruby

sublime text remove repository
Click on Sublime Text 2 on the menu bar, then Preferences -> Browse Packages to open up a Finder window pointing to ~/Library/Application Support/Sublime Text 2/Packages. Open the User folder and open Package Control.sublime-settings in Sublime Text. You should see a list of installed packages, and a key (possible down at the bottom) called "repositories". The file should look something like this: { "auto_upgrade_last_run": null, "installed_packages": [ "PackageName", "AnotherPackageName", "AwesomeSublimePlugin", "Neon Color Scheme" ], "repositories": [ "https://github.com/SoMeUsEr/BadURL" ] } and to delete the repository you should make it look like this: { "auto_upgrade_last_run": null, "installed_packages

Categories : Python

The REPL of sublime text 2 can't using the command of git?
SublimeREPL is for programming language interpreters like Clojure or Python, not shell programs like git. What you need is sublime-text-2-git, available from the Package Control menu as "Git". SideBarGit may also be useful.

Categories : GIT

How to update Sublime Text 2 on Ubuntu 12.04?
There is a PPA for Sublime Text 2: https://launchpad.net/~webupd8team/+archive/sublime-text-2 But remember, that you will be integrating a new third-party-repository into your system.

Categories : Ubuntu

RubyTest has no output in Sublime Text 2
Personally, I'd recommend installing ZenTest and using its autotest functionality to continually run your tests in a terminal window. It watches for changes in the tests and reruns them automatically. It's very handy as you write your code and tests.

Categories : Ruby On Rails

Sublime Text 3 C++ Build System for OS X
According to this thread, ST simply doesn't allow for interactive builds. Edit: Check out this thread here for a workaround.

Categories : C++

Sublime Text 3 Java autocomplete
Sublime 3 does have basic autocompletion for Java baked-in - if you start typing "pub", for example, it'll suggest "public". I'd also suggest looking at the Javatar plugin, which adds things like automatic creation of classes, packages, and interfaces. The QuickJava plugin might also be worth a look - it adds automatic creation commands for setters, getters, and constructors.

Categories : Java

uninstall sublime text 3 on ubuntu 12.04
Option 1 If you installed sublime-text-3 with apt-get, based on this article: http://www.webupd8.org/2013/07/sublime-text-3-ubuntu-ppa-now-available.html With these lines: sudo add-apt-repository ppa:webupd8team/sublime-text-3 sudo apt-get update sudo apt-get install sublime-text-installer You could remove your installation: sudo apt-get remove sublime-text-installer Option 2 If you installed Sublime Text 3 from a .deb package which was downloaded directly from Sublime Text page: http://www.sublimetext.com/3 And you have used this command for installation sudo dpkg -i sublime-text_build-3047_amd64.deb Or you just double clicked on it and Ubuntu Software Center installed it... So, in this case: sudo dpkg -r sublime-text But you have to reinstall Sublime Text 2 in each case

Categories : Ubuntu

sublime text 2 portable update not sure how?
Assume that your old version is installed in Sublime.old, and the new version in Sublime.new. Make sure Sublime Text 2 is closed, then move the Sublime.newData folder to someplace else (like your Desktop, for now), just in case anything breaks. Then, copy (don't move) the Sublime.oldData folder to Sublime.new. Fire up the program and check to see that everything is there, and works properly. Please note that this method will not work when upgrading from ST2 to ST3, as there are major differences in the way plugins are run.

Categories : Windows

Sublime Text 2 python SublimeREPL
CtrlShiftP is the keyboard shortcut for the Command Palette, which is what you want. You can also open it via Tools -> Command Palette.... CtrlP is Goto Anything, and has nothing to do with Package Control or installing things. Don't use it. Open the Command Palette by whichever way suits you best, menu or keyboard shortcut. Once there, type PCI and Package Control: Install will be highlighted. Hit Enter, and a dropdown of the full list of available packages should appear. Now, type "sublimerepl" and it should show up. Click on it or hit Enter and you should see a message at the bottom of the window that SublimeREPL is installing. Once it's done, restart ST2 (for good luck) and it should be available in the Tools menu down at the bottom. Please read the full documentation to familiari

Categories : Python

Sublime Text 2. Autocomplete python `from`
Have you checked out SublimeCodeIntel? It's available through Package Control, and has this functionality. The initial indexing of your packages may take some time, but once it's all set (you may need to restart Sublime once or twice to get everything loaded) it works like a charm.

Categories : Python

Make Envs Available To Sublime Text
Just a guess, but if you are using the build system, perhaps adding the "shell": true option? If it's a plugin you are working through, perhaps create an issue for the plugin (I'm guessing it's on github)

Categories : Ruby On Rails

Change behavior of Alt key in Sublime Text 2
There is a Sublime Text 2 plugin called Sublemacs Pro that provides emacs-like keybindings and operations, including those that you mentioned pining for. You can find installation instructions and the complete keybinding reference on the Github page.

Categories : Osx

Sublime Text 3 - Clean Paste
Not too much work to make this python 3 compatible: # coding=utf8 import sublime_plugin, sublime, re, html def clipboard(): return sublime.get_clipboard() def copy(data): sublime.set_clipboard(data) # to transfer data to sublime text def clean_paste(data): # clean word data = str(data) data = data.replace(u'”', '"').replace(u'“', '"').replace(u'’', "'") data = data.replace('________________________________________', ' ') # clean htmlentities data = re.sub('&([^;]+);', lambda m: unichr(html.entities.name2codepoint[m.group(1)]), data) return data; # to transfer data from sublime text def clean_copy(data): # clean html data = str(data) data = re.sub(r'<br ?/?>', ' ', data, re.I); data = re.sub(r'<[^>]*>', '', da

Categories : Python

Can i add css property shortcuts to sublime text?
These are called snippets. For this particular example, Open the Tools menu and select New Snippet..., then paste in the following: <snippet> <content><![CDATA[margin: 0 auto;]]></content> <tabTrigger>m-a</tabTrigger> <scope>source.css</scope> </snippet> Save this file as Packages/User/CSS/margin auto.sublime-snippet and you should be good to go. Open a CSS file, type m-a, hit Tab, and you're all set. Snippets are pretty powerful, and also allow for tab stops to enter customized data. For example, you could set up some boilerplate code that only requires that the colors be customized like so: <snippet> <content><![CDATA[body { max-width: 500px; _width: 500px; padding: 30px 20px 50px; bo

Categories : HTML

Python settings in Sublime Text 2
First make sure that you saved the file with .py extension and then try to run again. You also need to check that the Python in your .sublime-build is correct. For this look at %APPDATA%Sublime Text 2PythonPython.sublime-build file. This file should have something like this: { "cmd": ["C:\python27\python.exe", "-u", "$file"], "file_regex": "^[ ]*File "(...*?)", line ([0-9]*)", "selector": "source.python" } This is equivalent to doing the following on the command line, check that you can do: python -u C:your_pathyour_script.py If this doesn't work from the command line it also wont from sublime.

Categories : Python

Sublime Text indentation issue
For ST2 : Open the html package and edit the Packages/HTML/Miscellaneous.tmPreferences file. Replace the text with the one below. The below regex accepts basic jsp tags in <c:if> format & JSP comments. This will not format scriplets. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>name</key> <string>Miscellaneous</string> <key>scope</key> <string>text.html</string> <key>settings</key> <dict> <key>decreaseIndentPattern</key> <string>(?x) ^s* (&lt;/(?!html) ([A-Za-z0-9]

Categories : Jsp

Why is it not OK to call Matplotlib from Sublime Text 2?
You need to install matplotlib before you can import anything from pylab. Try installing the package from the downloads page. (exactly as @nordev says)

Categories : Python

In Sublime text 2 php autocomplete is not working
In your sublime User/Preferences.sublime-settings file add: { "auto_complete_selector": "source, text", } This will enable auto-complete even when there is no closing PHP tag.

Categories : PHP

Unable to run tests from sublime text 3
From looking at this issue, it's probably related to your bundler generated binstubs. Looking at the RVM docs, you might want to try running: gem regenerate_binstubs or: bundle install --binstubs If you still have issues after that, I'd try totally removing the binstubs. Instructions for doing that can be found here.

Categories : Ruby

Attempting to Center Text Under Button - Android
just changed your code a bit, hope it works for you <TextView android:id="@+id/text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/go_button" android:layout_alignRight="@+id/go_button" android:layout_below="@+id/go_button" android:textColor="#000000" android:gravity="center" android:textSize="14sp" />

Categories : Android

Make Sublime Text treat