Sublime Text 3 Topics

Source: Internet
Author: User
Tags nginx server



markdowm Grammar Notes


1. Download && Install
  • Download
  • Common plug-in installation
  • Submlit Using Tutorials
  • "How to use sublime Text3 gracefully"
2.Sublime Text Handy Tips [php for example]1). Shortcut key Type the current time:
  • Shortcut key bindings [Preferences-->key Binding--user]:{"keys":["ctrl+t"], "command":"add_current_time"}
  • Code: Save As \packages\user\addcurrenttime.py
import datetime
import sublime_plugin
class AddCurrentTimeCommand(sublime_plugin.TextCommand):
def run(self, edit):
    self.view.run_command("insert_snippet", 
    { 
        "contents": "%s" % datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
    }
2). Install PHP Syntax tips:
  • Toolbar: Preferences->package Settings->sublimelinter->settings-user
{"sublimelinter": true,
"sublimelinter_executable_map":
{
"PHP": "D: \ \ amp \ \ PHP \ \ PHP. Exe" ා replace the address on the left with your actual php.exe address
}
}
3). Ctrl+b Open the file in the browser "assuming you have installed Apache or Nginx server, and your www directory is C:\www\"
  • Shortcut key bindings:{ "keys": ["ctrl+b"], "command": "open_browser" }[www is your true point of localhost ]
  • Edit Sublime text/data/packages/user/open_broswer.py
url_map = {   ‘D:\\www\\‘ : ‘http://localhost/‘,}
4). Shortcut key generation code template [ Data\packages\sublimetmpl\templates\php.tmpl]

"${1:}--when the file is created quickly, the mouse will be positioned first here; press the TAB key to jump to ${2:} ... Last position ${0} "

  • Ctrl+alt+h==>html
  • Ctrl+alt+j==>javascript
  • Ctrl+alt+c==>css
  • ctrl+alt+p==>php
  • Ctrl+alt+r==>ruby
  • Ctrl+alt++shift+p==>python
<?php
/**
* @authors    : MinsonLee ([email protected])
* @blog       : http://www.cnblogs.com/lms520/
* @date       : ${date}
* @description: ${1:}
* @source     : 
* @version    : \$Id\$
*/
class ${2:ClassName} ${3:extends ${4:AnotherClass}} {
   $5
    function __construct(){
        $0
    }
}
5). Custom code Template Method 2

" Edit: \data\packages\php\php.sublime-snippet file (XML mode)"

<snippet>
    <content><![CDATA[<?${TM_PHP_OPEN_TAG:php} 
/**
 * @authors    : MinsonLee [email:[email protected]]
 * @blog       : http://www.cnblogs.com/lms520/
 * @date       : $1
 * @description: $2
 * @source     : $3
 * @version    : Version-$4
 */
$0
]]></content>
    <tabTrigger>php</tabTrigger>
    <scope>text.html - source.php</scope>
    <description>&lt;?php … ?&gt;</description>
</snippet>
3.Sublime Text Common Shortcut "update ..." write only common but relatively rare, commonly used can Baidu ~

Code

  • Ctrl+shift+[Folding Code
  • Ctrl+shift+] Unwind code
  • Ctrl+shift+up and Upstream Interchange
  • Ctrl+shift+down and Downlink Interchange
  • Ctrl+j Merge Line "The array used to write JavaScript, or the array inside PHP, is the inverse of heaven."
  • Ctrl+d Select the same word
  • ctrl+/Comment Entire line (if selected, same as "ctrl+shift+/" effect)
  • ctrl+shift+/Comment Selected content
  • Ctrl+ku Change to uppercase
  • CTRL+KL Change to lowercase

Property:

  • Ctrl+kt Collapsing properties
  • Ctrl+k0 Expand All
  • Ctrl+enter after inserting rows
  • Ctrl+shift+enter before inserting rows
  • Ctrl+shift+a Select the cursor position parent tag pair child

Yes:

  • Ctrl+l Select Entire row (press and hold-continue to select the downstream)
  • CTRL+KK Delete from cursor to end of line
  • Ctrl+shift+k Delete an entire row
  • Ctrl+shift+d the entire line where the cursor is copied, before inserting the line
  • Shift+tab removing indents
  • tab indent
4.Sublime Text Loading God skills

1). Font settings

  • The most handsome programming fonts: Click Yahei consolas Hybrid Download, double-click Install
  • Set font: Preferences->settings-user
{
"font_options":
[
"No bold", / * not bold*/
"No", / * is not italicized*/
"No antialias", / * no inverse image gray value distortion display*/
"Gray antialias", / * anti image gray value distortion display*/
]
"font_face": "YaHei Consolas Hybrid",
"font_size": 15
} 

2). Open the sidebar to display the directory tree:
View-->side bar-->show Side Bar "Simply drag and drop in the directory you want to see your catalogue."

3). F9 row sort (by A-Z)





* * To be updated, you are also welcome to add .... *



* * Reprint please keep Bo Master connection * *



Sublime Text 3 topic


Related Article

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.