To set the default preview of browser shortcuts in sublime TEXT2/3

Source: Internet
Author: User
Tags blank page

Ladies and gentlemen, what do you like to use when using the IDE editor? Is Dreamweaver, Zend Studio, EditPlus, or sublime text? Today Ma Haozhou to everyone to talk about setting sublime TEXT2/3 in the default preview browser shortcuts, you may have set up early, (set the automatic ignore). This article speaks to the Novice sublime text.

Why should we set the default preview browser? Because of the front-end know, you can not preview a browser, you may need more than one, of course, today we will say in the example of Google browser Chrome,ie browser Internet Explorer, Firefox Firefox, why choose these three? Because they are our most used browser. Don't say you didn't use it!

First (an) (LI) Sublime text: (taken from the encyclopedia)

Sublime text is a code editor (Sublime text 2 is a paid software, but can be tried indefinitely) and is also an advanced text editor for HTML and prose. Sublime text was developed by the programmer Jon Skinner in January 2008 and was originally designed as a vim with extensive functionality.
Sublime text has a beautiful user interface and powerful features such as code thumbnails, Python plugins, code snippets, and more. You can also customize key bindings, menus, and toolbars. The main features of Sublime Text include: Spell checker, bookmarks, full Python API, Goto feature, instant item switching, multiple selection, multiple windows, and more. Sublime Text is a cross-platform editor that supports operating systems such as Windows, Linux, Mac os X.

1: Open sublime text;

2: Click on "Preferences"--"key bindings-users" like, you see a blank page:(Chinese version)

(click "Preferences"--"Key bindings-user" appears a blank page: English version)

3: Copy the following code, paste it in;

  1. [
  2. Ie
  3. {
  4. "Keys": ["F12"],
  5. "Command": "Side_bar_files_open_with",
  6. "Args": {
  7. "Paths": [],
  8. "Application": "C:/Program files/internet explorer/iexplore.exe",
  9. "Extensions": ". *"
  10. }
  11. },
  12. Chorme
  13. {
  14. "Keys": ["Alt+f12"],
  15. "Command": "Side_bar_files_open_with",
  16. "Args": {
  17. "Paths": [],
  18. "Application": "C:\\Program Files\\google\\chrome\\application\\chrome.exe",
  19. "Extensions": ". *"
  20. }
  21. }
  22. ]

4: Click on the File menu and click Save.

But don't think it's going to be so simple, do you know what the code above says? Why did you set it up? did someone follow through and found out that they have set or did not play a role? haha, that's right, let Ma Haozhou to you to explain this code you have to pay attention to and understand what it!

"Keys": ["F12"],

keys: indicates that the shortcut key, that is, F12 can start IE browser for preview. Of course you can set your favorite keys, you can give a few commonly used keys: ALT+F12, CTRL+F12;

"Application": "C:/Program files/internet Explorer/iexplore.exe",

Application: indicates the installation path where the browser is located and only if the path is properly configured to invoke the browser normally. And the above path is the browser path on my computer. What's that? What is your browser path? How do I know? I do not see the browser on their own computer path AH? find the correct path to overwrite my path on it.

Can be careful of the program apes have found that I set two browsers when the path to write a different way, one is to use a slash "/" The other is a double backslash "\ \", in fact, both of these are correct, but if you write a backslash "\" That is the wrong drop! Because in Windows systems: backslashes \, used in Windows systems to represent directories. Forward slash/representative URL, url address. In sublime text, the slash "/" and the double backslash "\ \" are used for a purpose. (It's a little far away.)

There is another problem, if you want to add more than one browser to do, in fact, the same way, the code is the same, just set the button and path problem, here take Firefox for example:

  1. Firefox
  2. { "keys": ["F3"], "command": "Side_bar_files_open_with",
  3. "Args": {
  4. "Paths": [],
  5. "Application": "D:/program files/mozilla firefox/firefox.exe",
  6. "Extensions":". *"
  7. }
  8. }

This adds success. It's so simple. Still the same, modify your keys and modify your correct browser address. Here, the way to set the default preview browser shortcut in Sublime Text2/3 Ma Haozhou has been taught to you! Here are the two (I have organized some sublime text shortcut keys and common plug-ins), take it, no, please call me red scarf!

Sublime Text shortcut key:
  • ctrl+shift+p: Open Command Panel
  • ctrl+p: Searching for files in a project
  • ctrl+g: Jump to the first few lines
  • ctrl+w: Close the currently open file
  • ctrl+shift+w: Close all open files
  • ctrl+shift+v: pasting and formatting
  • ctrl+d: Select words, repeat to add the next same word
  • ctrl+l: Select rows, repeat to select the next row in turn
  • ctrl+shift+l: Select multiple lines
  • ctrl+shift+enter: Inserting a new row before the current line
  • ctrl+x: delete When moving forward
  • ctrl+m: jump to corresponding parentheses
  • Ctrl+u: Soft undo, undo cursor Position
  • ctrl+j: Select label content
  • ctrl+f: Find content
  • ctrl+shift+f: Find and replace
  • ctrl+h: Replace
  • ctrl+r: Go to Method
  • CTRL + N: New Window
  • ctrl+k+b: Switch side bar
  • ctrl+shift+m: Check the contents of the current parenthesis, repeating the parentheses themselves
  • ctrl+f2: Set/Remove Tags
  • ctrl+/: Comment When moving forward
  • ctrl+shift+/: Insert comment at current position
  • ctrl+alt+/: Block comment, and focus to the first line, write the comment description with the
  • Ctrl+shift+a: Before and after selecting the current label, modify the label with
  • F11: fullscreen
  • shift+f11: fullscreen-free mode, editing only the current file
  • alt+f3: Select all the same words
  • ALT +. : Closed label
  • alt+shift+ number : Split screen display
  • ALT + number : Toggle to open nth file
  • shift+ Right-drag : Many cursors are not used to change or insert column contents
  • Mouse forward and backward key to toggle tab file
  • Press CTRL, tap or select , to edit multiple locations
  • Press ctrl+shift+ up/down key to replace row

Install common plugins: ctrl+shift+p(menu –tools–command paletter), enter install to select the install package and enter Enter or select the plug-in you need to install (note the small text changes in the lower left corner, will prompt installation success), install other plug-ins is also this method, very fast.

    • zencoding
      A plugin for front-end development, Write less, show more. Can be used directly after installation, tab trigger, ALT+SHIFT+W is a code machine.
    • Alignment
      Code alignment, such as writing a few variables, check these lines, Ctrl+alt+a, wow, qi.
    • prefixr
      Write CSS can automatically add-webkit such as private affixes, ctrl+alt+x trigger.
    • Tag
      HTML format, right-Auto-format Tags on ducument.
    • Clipboard historical
      Clipboard history, showing more historical copies, Ctrl+shift+v triggering.
    • sidebarenhancements
      Sidebar Right-click enhancements, very useful
    • Theme–soda
      Perfect Coding theme, Used all good, Setting user inside Add "theme": "Soda dark.sublime-theme"
    • GBK to UTF8
      file encoding from GBK to Huang UTF8, Menu –file inside Find
    • SFTP
      directly edit files on FTP or SFTP server, absolute FTP cloud
    • WordPress
      Integrate some WordPress functions, for people like me who often write WP templates and plug-ins are particularly useful
    • phptidy
      Organizing and publishing PHP code
    • YUI Compressor
      compressing js and css files

OK, the way to set the default preview browser shortcut in Sublime Text2/3 is really over here. If you also need this method, you can try Oh, if there is a problem with the settings, you can contact me the first time, I will do my best to help you complete the sublime text settings. If you encounter an unresolved problem, Ma Haozhou think as a program ape/front-end engineer, you have to have this spirit ————

To set the default preview of browser shortcuts in sublime TEXT2/3

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.