Sublime Text 2 is a cross-platform GUI text editor for Windows, OS X and Linux.
Download sublime text 2 mac, sublime text 2 mac, sublime text 2 mac download free.
se-uql#toggleEditor'>
3
1answer
Brackets Text Editor - “Go to anything” feature like Sublime Text
I love Sublime Text and I'm playing with Brackets editor for a change. One of the features I like most in ST is the 'Go to anything' (CTRL+P). Is there something like that in Brackets?
1
1answer
error: XDG_RUNTIME_DIR not set in the environment. Gtk-WARNING **: cannot open display:
I used to open text files with sublime, and for Read-only files, I used to do :sudo sublime. But now just suddenly the sudo sublime command gives the following error :(sublime:3931): Gtk-WARNING **:...
1
2answers
Sublime Text 2/3 change snippets folder
Is there a way to change the folder of user snippets? By default it's something like: C:UsersAwesomeUserAppDataRoamingSublime Text 3PackagesUserAnd I would like to have my snippets in, for ...
4
1answer
Make the Sublime SFTP Package quick panel display for longer
I have configured sublime text 3 with SFTP package for my website (which works great). There is a small annoying issue though: I select an operation like Sync Remote -> LocalOnce the sync has ...
benscabbia30511 gold badge44 silver badges1616 bronze badges
7
1answer
How to set symlink short cut to Sublime Text 3 in terminal? [duplicate]
I'm using the ZSH bash https://github.com/robbyrussell/oh-my-zshI found and followed the directions here to symlink Sublime Text 3 to sublhttps://www.sublimetext.com/docs/3/osx_command_line.html ...
Leon GabanSublime Text 2 Build System Chrome For Mac
58066 gold badges1515 silver badges2929 bronze badges
0
1answer
How to install a Sublime Text 3 theme?
I don't understand why I'm getting all these errors:Error loading colour scheme Packages/Material Theme/schemes/Material-Theme.tmTheme:Unable to open Packages/Material Theme/schemes/Material-Theme....
Leon Gaban58066 gold badges1515 silver badges2929 bronze badges
0
1answer
Setting up a sublime symlink in Mac OS X while running pyenv
There are a lot of SO and links on how to setup a symlink so you can run sublime from the command line. But I'm running pyenv and it seems to have its own ~/.bash_profile as the real one doesn't have ...
1
0answers
![Sublime Sublime](/uploads/1/2/6/0/126019639/876673211.jpg)
Sublime Text: “for loop” text insert?
Let's say I'm writing a JSON object with a lot of properties following this naming convention:ObjectName[x] So it looks like this:ObjectName_A: ...ObjectName_B: ...ObjectName_C: .........
4
1answer
Is it possibile to attach snippet only to specific project in Sublime?
I tried to save the snippet files in the project folder but it is doesn't work.Do you have any other idea?
Aminadav Glickshtein27611 gold badge44 silver badges1919 bronze badges
1
1answer
View file tree in Sublime when using Cyberduck
I use Cyberduck to open remote files and edit them via Sublime on my local machine.I want to be able to see the file tree of the remote system in the Sublime Text side bar. I've tried a few things ...
0
2answers
Having trouble creating symlink between the terminal in Mac OS X and Sublime Text 2 so it can be launched from the command line
I’m using Mac OS X Yosemite and I want to be able to open Sublime Text 2 from the terminal with a command like this:sublime . I’ve typed this into terminal as shown on the Sublime Text 2 website:...
1
0answers
How to preserve the Extended File Attributes in linux?
I'm working on a project where i rely mostly on the file's extended attribute that i set when i create the file. But i'm facing problem while modifying the file.Solid Example:When i edit the file ...
1
1answer
in sublime how to abort previous build automatically when building again
I know that there is key mapping to cancel build.But I want automatically when I press Ctrl+B, that it will abort the previous built. Is it possible?Is it possible, that the 'cancel' build will do ...
Aminadav Glickshtein27611 gold badge44 silver badges1919 bronze badges
0
1answer
How to make Sublime JSON syntax warn on extra comma
This is for how my sublime text look like when I edit a JSON file: I want that sublime will alert me when there are too many commas (like nodejs json.parse) I need it because some JSON parser thinks ...
Aminadav Glickshtein27611 gold badge44 silver badges1919 bronze badges
2
3answers
Autocompletion for custom PHP classes in Sublime Text 2/3
How can I get autocomplete in Sublime Text 2 (or 3) to work with built-in and custom PHP functions, methods and classes?In Atom I've got it working with built-in functions, like this: In Sublime it ...
Oskar Persson72833 gold badges1212 silver badges2727 bronze badges
prev 1…34567…30 next
Active5 months ago
I do web development and am trying out Sublime Text 2. Is there a keyboard shortcut to open the current file in specified browser (e.g. Chrome)?
Any help to get setup in Sublime Text for web development is appreciated!
Timofey Gorshkov2,91344 gold badges3030 silver badges5757 bronze badges
wwwuserwwwuser1,21866 gold badges3636 silver badges5656 bronze badges
14 Answers
I'm not really sure this question is approprate here, but you can add a new 'Build System' under
Tools -> Build System -> New Build System...
As with all configuration in Sublime Text its just JSON, so it should be pretty straight forward. The main thing you are going to want to configure is the
'cmd'
key/val. Here is the build config for launching chrome on my mac.Save that as
Chrome.sublime-build
, relaunch Sublime Text and you should see a new Chrome
option in the build list. Select it, and then you should be able to launch Chrome with Cmd+B on a Mac (or whatever hotkey you have configured for build, maybe its F7 or Ctrl+B on a Windows machine)At least this should give you a push in the right direction.
Edit:
Another thing I end up doing a lot in Sublime Text 2 is if you right click inside a document, one of the items in the context menu is
Copy File Path
, which puts the current file's full path into the clipboard for easy pasting into whatever browser you want. Sublime Text 3 (linux example)'shell_cmd': 'google-chrome '$file'
J. HolmesJ. Holmes17.3k55 gold badges4040 silver badges5050 bronze badges
'Open in Browser context menu for HTML files' has been added in the latest build (2207). Its release date was 25 June 2012.
aantonaanton5,46211 gold badge1919 silver badges1515 bronze badges
Windows7 FireFox/Chrome:
just use your own path of firefox.exe or chrome.exe to replace mine.
Replace firefox.exe or chrome.exe with your own path.
Umur Kontacı33.5k55 gold badges6565 silver badges9292 bronze badges
boyaboya
Install the View In Browser plugin using Package Control or download package from github and unzip this package in your packages folder(that from browse packages)
after this, go to Preferences, Key Bindings - User, paste this
[{ 'keys': [ 'f12' ], 'command': 'view_in_browser' }]
now F12 will be your shortcut key.
dicentiudicentiu
To browse html files with default app by Alt+L hotkey:
Add this line to
Preferences -> Key Bindings - User
opening file:To browse or open with external app like chrome:
Add this line to
Tools -> Build System -> New Build System...
opening file, and save with name 'OpenWithChrome.sublime-build'
Then you can browse/open the file by selecting
Tools -> Build System -> OpenWithChrome
and pressing F7
or Ctrl+B
key.MamadexMamadex
You can install SideBarEnhancements plugin, which among other things will give you ability to open file in browser just by clicking F12.
To open exactly in Chrome, you will need to fix up “Side Bar.sublime-settings” file and set
'default_browser'
to be 'chrome'
.I also recommend to learn this video tutorial on Sublime Text 2.
Timofey GorshkovTimofey Gorshkov2,91344 gold badges3030 silver badges5757 bronze badges
On windows launching default browser with a predefined url:
Tools > Build System > New Build System:
ctrl + B and voila!
Kjuly28.8k2222 gold badges9292 silver badges108108 bronze badges
bluehipybluehipy
There seem to be a lot of solutions for Windows here but this is the simplest:
Tools -> Build System -> New Build System, type in the above, save as
Browser.sublime-build
:Then go back to your HTML file. Tools -> Build System -> Browser. Then press
Simon SarrisCTRL-B
and the file will be opened in whatever browser is your system default browser.![Sublime Text 2 Build System Chrome For Mac Sublime Text 2 Build System Chrome For Mac](https://i0.wp.com/softwarespatch.com/wp-content/uploads/2017/04/Sublime-Text-3-Build-3126-Patch-Serial-Number-Download.png?resize=500%2C414)
52.9k1111 gold badges115115 silver badges150150 bronze badges
Here is another solution if you want to include different browsers in on file.If you and Mac user, from sublime menu go to, Tools > New Plugin. Delete the generated code and past the following:
Save.Then open up User Keybindings. (Tools > Command Palette > 'User Key bindings'), and add this somewhere to the list:
Now open any html file in Sublime and use one of the keybindings, which it would open that file in your favourite browser.
egyamadoegyamado61933 gold badges1717 silver badges4040 bronze badges
On mac and sublime text 3 , which version is 3103, the content should be
clinyongclinyong
Tools -> Build System -> New Build System. The type following as your OS, save as Chrome.sublime-build
Windows OS
MAC Os
Save the file - Chrome.sublime-build in location
Sublime View in Browswer - https://github.com/adampresley/sublime-view-in-browser (Tried with Linux and it works)
J4cKJ4cK23k66 gold badges3434 silver badges4949 bronze badges
egyamado's answer was really helpful! You can enhance it for your particular setup with something like this:
And then in your keybindings:
We store sample urls at the top of all our templates, so the first part allows you to highlight that sample URL and launch it in a browser. If no text is highlighted, it will simply use the file name. You can adjust the command calls in the keybindings to your localhost url and the system path to the documents you're working on.
nabrownnabrown
I have similar situation like you. I dont wannt sublime open editor for binary like jpg png files. Instead open system default application is more reasonable.
- create one Build. Just like the accepted answer. But it will both open default application and hex editor.
- Pulgin OpenDefaultApplicationhttps://github.com/SublimeText/OpenDefaultApplicationIt will have context right click menu OpenInDefaultApplication. But It will both open default application and hex editor as well
- Pulgin: Non Text Fileshttps://packagecontrol.io/packages/Non%20Text%20Files Add config in the user settting
I choose the third way, it's quite sutiable for me. It will open jpg file in system default application and quickly close the edit mode automaically at the same time. As to the first two ways, you can set 'preview_on_click': false, to stop openning automaticlly the hex editor compromisely.
Victor ChoyVictor Choy
or try this
'cmd': ['cmd','/K','start http://localhost/Angularjs/$file_name']
VinayVinay
protected by Community♦Oct 10 '12 at 14:23
Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
Would you like to answer one of these unanswered questions instead?