Content for the network reprint
Sublime Text 3 is the code of the Farm's favorite coding editor, daily and code to deal with, its prerequisite, master the Basic Code Editor shortcut keys, can let you play code more Efficient. It may be a little rusty at first, just take a two-week stay and familiarize yourself with these frequently used shortcuts!
Sublime Text 3 is the code of the Farm's favorite coding editor, daily and code to deal with, its prerequisite, master the Basic Code Editor shortcut keys, can let you play code more Efficient. It may be a little rusty at first, just take a two-week stay and familiarize yourself with these frequently used shortcuts! In fact sulime text menu bar Each option will prompt related shortcut keys, you can see for yourself, this article is mainly to organize some hidden or not to be explored shortcut keys!
Sublime Text 3 shortcut key Essence Edition
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
Select Class
ctrl+d Selects the text that the cursor occupies, and continues, the next identical text is Selected.
alt+f3 Selected text Press the shortcut key, you can select all the same text at once to edit simultaneously. Give a chestnut: quickly select and change all the same variable names, function names, and so On.
ctrl+l Select the entire row, continue to select the next row, the effect is the same as the shift+↓ effect.
ctrl+shift+l Select multiple rows first, and then press the shortcut key to insert the cursor at the end of each line to edit the rows at the same time.
ctrl+shift+m Select the contents in parentheses (continue to select the parent bracket). Give me a chestnut: quickly select the code in the delete function, rewrite the function body code, or rewrite the contents of the parentheses Inside.
ctrl+m cursor moves to the end or start position within the Parentheses.
Ctrl+enter Inserts a new row in the next Line. For a chestnut: even if the cursor is not at the end of the line, you can quickly insert a line down.
Ctrl+shift+enter Inserts a new row in the previous Line. For a chestnut: even if the cursor is not at the beginning of the line, it can be inserted quickly.
ctrl+shift+[ Select the code, press the shortcut key, and collapse the Code.
ctrl+shift+] Select the code, press the shortcut key, and expand the Code.
ctrl+k+0 expands all collapsed Code.
ctrl+← Move the cursor to the left and move the cursor quickly.
ctrl+→ Move the cursor to the right and move the cursor quickly.
shift+↑ Select multiple rows upwards.
shift+↓ Select multiple Rows.
shift+← Select the text to the left.
shift+→ Select the text to the Right.
ctrl+shift+← Select the text to the left of the Unit.
ctrl+shift+→ Select the text to the right of the Unit.
ctrl+shift+↑ swaps the cursor line and the previous line of code (before inserting the row of the cursor into the previous row).
ctrl+shift+↓ swaps the lines of the cursor and the next line of code (inserts the row of the cursor after the next line).
ctrl+alt+↑ Add a multiline cursor up, and you can edit multiple lines at the same time.
ctrl+alt+↓ Adds a multiline cursor down to edit multiple lines at the same time.
Edit Class
ctrl+j Merge the selected lines of code to one LINE. For a chestnut: merge the CSS properties of the multiline format into one LINE.
ctrl+shift+d The entire line where the cursor is copied, and inserts it into the next row.
Tab Right Indent.
Shift+tab indents to the left.
ctrl+k+k removes code from the cursor at the end of the Line.
ctrl+shift+k Delete the entire row.
ctrl+/ Comment line.
ctrl+shift+/ Comment multiple Lines.
ctrl+k+u Convert Uppercase.
ctrl+k+l Convert Lowercase.
Ctrl + Z undo.
ctrl+y Restore undo.
ctrl+u Soft undo, feeling and gtrl+z the Same.
ctrl+f2 Setting bookmarks
ctrl+t around the letter Interchange.
F6 Word detection spelling
Search class
ctrl+f Open the bottom search box to find KEYWORDS.
ctrl+shift+f in folders, Unlike the normal editor is sublime allow to add multiple folders to find, slightly high-end, not researched.
ctrl+p Open the search box. For a chestnut: 1. Enter the file name in the current project, quickly search for files, 2, enter @ and keywords, find the function name in the file, 3, enter: and number, jump to the line code in the file, 4, enter # and keyword, find the variable Name.
ctrl+g Open the search box and automatically take:, enter a number to jump to that line of Code. For a chestnut: quickly locate a file in which the page code is relatively long.
ctrl+r Open the search box, automatically with @, enter keywords, find the function name in the File. For a chestnut: quickly find a function on a page with more Functions.
Ctrl +: Open the search box, automatically with #, enter keywords, find variable names in the file, attribute names, and so On.
ctrl+shift+p Open the command box. Scene Chestnut: Open the name box, enter the keyword, call sublime text or plug-in features, such as using the package installation Plugin.
ESC exits the cursor multi-line selection, exits the search box, command box, and so On.
Display class
ctrl+tab Toggles the tab of the current window in the order in which the files were Browsed.
ctrl+pagedown Toggles the tab of the current window to the Left.
ctrl+pageup Toggles the tab of the current window to the Right.
alt+shift+1 window split screen, Restore the default 1 screen (non-keypad Number)
alt+shift+2 left and right split screen-2 columns
alt+shift+3 left and right split screen-3 columns
alt+shift+4 left and right split screen-4 columns
alt+shift+5 4 screen
alt+shift+8 Vertical split screen-2 screen
alt+shift+9 Vertical split screen-3 screen
ctrl+k+b Toggle the sidebar on/off.
F11 Full Screen mode
shift+f11 free-to-disturb mode
Configuring the compilation Environment
Console input (for example in C + +)
The simple principle is to create a bat on the outside to execute the file, and then call it. Note that you need to use start to open a new window, but also need to pause to see the results, where the egg hurts is sublime default background execution of your start, if your pause and start placed in a file pause on the start%1 file is invalid , so you actually need to create two Files. Note Environment variables ... (about What is the environment variable, 32 sentence explanation is not clear, best oneself Baidu a bit.) )
After the personal feeling console input meaning is not very big, do the words are read from the file, do not need to read the development of BASIC. So~ you are Careful.
Mycrun.bat
@echo off
%
Echo.
echo-------------------
Pause
Exit
Mycallrun.bat
@start mycrun%1
The configuration file is in Sublime Text 3\packages\c++.sublime-package. Back up a bit first.
Modify the inside of the C++.sublime-build for
{
"shell_cmd": "g++ \" ${file}\ "-o \" ${file_path}/${file_base_name}\ "",
"file_regex": "^ (... [^:]*]:([0-9]+):? ([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"variants":
[
{
"name": "Run",
"shell_cmd": "g++ \" ${file}\ "-o \" ${file_path}/${file_base_name}\ "&& mycallrun \" ${file_path}/${file_base_ Name}.exe\ ""//actually is here add a Mycallrun
}
]
}
C + +
Sublime Text 3 is configured by default for C + +. But you need to add the GCC directory to the environment variable YOURSELF.
Java
Sublime Text 3 runs only Javac by default and requires you to add it yourself.
Bitter hard to understand Sublime command format, so the javac changed to a bat of their own. (it can also feel like a C + + with a && connection.)
Build myjrun.bat where the command line can be accessed directly (i put it directly under Jdk/bin)
@ECHO OFF
Cd%~dp1
ECHO compiling%~nx1 ...
IF EXIST%~n1.class (
DEL%~n1.class
)
Javac%~nx1
IF EXIST%~n1.class (
ECHO Running ...
ECHO----------------------OUTPUT----------------------
Java%~n1
)
Note You cannot use the Cls.
Modify the Java compilation Options (back up the original).
Catalog: Packages/java.sublime-package/javac.sublime-build
{
"shell_cmd": "myjrun.bat \" $file \ "",
"file_regex": "^ (... *):( [0-9]*):? ([0-9]*) ",
"selector": "source.java"
}
The Java code point Build will then run Automatically.
This approach can not be cross-platform, and then research and study sublime own way.
Go
Using Sublime to develop Golang environment is very simple, just need to install a gosublime is Almost.
Python first day (bottom): sublime text 3 shortcut keys Daquan and configuring the compilation environment