Common Hotkey Multiple text selection: Ctrl+ cmd +g multiple cursor selection: Shift+ CTRL + up/Down Select the label itself: Shift+ CTRL +a Select tag contents: Shift+ cmd +A reopen the tab you just closed: cmd+ SHIFT +move the cursor around the T bracket: Ctrl+m Insert a line before the cursor: Shift+ cmd +Enter inserts a line after the cursor: cmd+enter quickly collapse all functions within the file: cmd+ K,1(numeric representation level) collapsed property: Cmd+K, T (most useful for editing HTML templates) Many hotkeys can be combined, such as requirements: How to put a 'class="Edit"' div ' element's tag name changed to ' FieldSet '? Three steps will be possible, select all 'class="Edit"', then the label, and then the name of the good. Command panel Shift+ cmd +p Those that are not necessary with hotkeys, third-party extensions add common operations here. Like Lorem ipsum,color Picker,rot . -, HTML Entity Encode,install package, and so on project configuration prj-name.sublime-project, mostly individually set consistent indentation format and file exclusions (in Cmd +p, speed at GOTO command) option: {"Folders": [ { "Path":"Path_to_project", "Folder_exclude_patterns": ["img","x-library"] } ], "Settings": { "translate_tabs_to_spaces":true, "tab_size":4}} Configuring mobility is best defined in the ' Path_to_sublime/packages/user/' directory, then save them with a repo so that they can be synced to all of your devices at any time, and different control systems have different files to configure. Terminal invocation defines a link: ln-S"/applications/sublime Text 2.app/contents/sharedsupport/bin/subl"~/bin/Subl can then be called at any time, such as opening all files in the current directory in sublime: Subl. Snippets customizing some of the intimate code snippets is a must. This is also saved to the User directory that is better, with the extension '. Sublime-snippet '. For example, define a ' ci ' as ' console.info (args) ', saved in the User/js-snippets/console-info.sublime-Snippet:<snippet> <content><! [Cdata[console.info (${1})]]></content> <tabTrigger>ci</tabTrigger> <scope>source.js</scope> <descrip Tion>console.info</description></snippet>Buildcmd+b is compiling, for example I added a direct call to node. js, so it's most convenient to test some functions without opening the browser. File name reference, User/node.sublime-build:{"cmd": ["/usr/local/bin/node","$file"], "selector":"Source.js"the theme can be compatible with TextMate themes. Now my favorite theme is Solarized light, the font is MENLO or Monaco. Macro requires a batch hotkey operation, you can define a macro: Macros-sublime Text unofficial documentation An extension cannot be reached when an extension is required:1How to Create a Sublime Text2Plugin2Sublime Text Extension management must be Sublime package control:sublime. Control can then be queried at any time, install other extensions, some recommended: PREFIXR, Alignment, Hexviewer, Jsformat, Zen Coding (renamed, called Emmet), filediffs, Color picker----Update --Geneva- -additional configurations are recommended for three particularly useful:"default_line_ending":"Unix", "Trim_trailing_white_space_on_save":true,"Ensure_newline_at_eof_on_save":true, with the following functions: Default_line_ending is guaranteed to be a Unix-style line break (unique for cross-platform work). Trim_trailing_white_space_on_save guarantees that extra spaces at the end of each line are removed when the file is saved (unique after upgrading Jshint). Ensure_newline_at_eof_on_save guarantees that when a file is saved, a newline character is inserted at the end (no additional diff is produced when Git commits). Goto altogether has four kinds of goto:cmd+p file location cmd+; Word positioning #cmd+r function Positioning @cmd+g line number positioning: The first can be used with the remaining three combinations, such as Cmd+after P, enter [email protected] to instantly query the name of the file with Util, the function that begins with parse. Lint extension Sublimelinter has tried many of the same extensions and found it best to use, support multiple languages, and do not need hotkeys-it automatically checks when it is entered. Wildcard characters can be used in multiple files search where, such as*.js, *.less will search for all files with the suffix JS and less in the project.
Sublime Text Usage Tips