Sublime = > a good tool for development

Time:2020-1-19

Download and install

  • Windows needless to say, just download and install exe. The installation package is small, and the installation is fast

  • Download the DEB package dpkg-i [DEB filename] for Ubuntu. I f you need to install it, you need to rely on sudo apt get install-f for a while, and then repeat dpkg-i

Install the plug-in:

Sublime has a rich plug-in ecosystem, which can meet most of your needs even if you don’t install anything.

Auto install:
From menuView – Show Consoleperhapsctrl + ~Shortcut key, call up console.
Paste the following Python code into it and execute it in the enter. The installation will be completed without exception. Installation codes for ST3 and ST2 are provided below:
Sublime Text 3:

import urllib.request,os; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); open(os.path.join(ipp, pf), 'wb').write(urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ','%20')).read())

Sublime Text 2:

import urllib2,os; pf='Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler( ))); open( os.path.join( ipp, pf), 'wb' ).write( urllib2.urlopen( 'http://sublime.wbond.net/' +pf.replace( ' ','%20' )).read()); print( 'Please restart Sublime Text to finish installation')

Manual installation:
You may not be able to install with code due to various reasons. You can install package control manually through the following steps:
1. Click Preferences > Browse packages menu
2. Enter the upper directory of the opened directory, and then enter the installed packages / directory
3. Download package control.sublime-package and copy it to the installed packages / directory
4. Restart sublime text.
 
Download address of package control main file: https://github.com/wbond/sublime’package’control
Use the shortcut Ctrl + Shift + P and type install

Uninstall plugins

ctrl+shift+pinputremove packageSelect the plug-in to be deleted
Sublime displays a list of which plug-ins are installed

Attach a screenshot of my sublime

Plugin recommendation

  • jsformant
    JS developers will like it

Also use package control to install the jsformat plug-in
You can format JS in JS file by right clicking – > jsformat or keyboard shortcut Ctrl + Alt + F

  • emmet
    Nice to write HTML structure

It’s very handsome if you use it skillfully
How to use Emmet
How to use Emmet

#page>div.logo+ul#navigation>li*5>a{Item $}
  • markdown preview
    For those who often see the readme.md file

To view the markdown file, click Ctrl + Shift + P, enter markdown, and you will be prompted to show in browser, and then select markdown to display the MD file in the browser

Plug ins are recommended, but I think it’s still the demand that determines what you need. Search and experience the fun of finding plug-ins. Don’t install them all at once, they won’t work

Theme installation

I choose SETI as the theme. I like the color. When the sidebar displays the file list, it will display small icons according to the file type.

Screenshot of my configuration (modified in performance > settings)

Shortcut key (sublime text 3) (a little more, just notes, check as you use)

CTRL + Shift + P: Open Command Panel
CTRL + D: select a word, repeat to add the next same word
CTRL + P: search for files in a project
CTRL + G: jump to line
CTRL + W: close the currently open file
CTRL + Shift + W: close all open files
CTRL + Shift + V: paste and format
CTRL + L: select row, repeat to add and select next row in turn
CTRL + Shift + L: select multiple lines
CTRL + Shift + Enter: insert a new row before the current row
CTRL + X: delete current row
CTRL + M: jump to the corresponding bracket
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 sidebar
CTRL + Shift + M: select the content of the current bracket, and repeat to select the bracket itself
CTRL + F2: set / remove tag
CTRL + /: comment current line
CTRL + Shift + /: insert comment at current position
CTRL + Alt + /: block comment, focus to the first line, write the comment description
CTRL + Shift + A: before and after selecting the current label, modify F11 used for the label: full screen shift + F11: full screen undisturbed mode, only edit the current file Alt + F3: select all the same words Alt +.: close label Alt + Shift + number: split screen display Alt + number: switch to open the nth file Shift + right drag: there are many cursors, used to change or insert column contents the forward and backward keys of the mouse can be cut Change tab file press
CTRL, click or select one by one, and press
CTRL + Shift + up and down to replace line break
Selection class
Ctrl+DSelect the text occupied by the cursor, and continue to select the next same text.
Alt+F3Select the text and press the shortcut key to select all the same text at one time for editing at the same time. For example, chestnut: quickly select and change all the same variable names, function names, etc.
Ctrl+LSelect the whole row, continue to select the next row, effect andShift+↓The effect is the same.
Ctrl+Shift+LSelect multiple lines first, and then press the shortcut key. The cursor will be inserted at the end of each line to edit these lines at the same time.
Ctrl+Shift+MSelect the content in parentheses (continue to select parent parentheses). For example, chestnut: quickly select and delete the code in the function, rewrite the function body code or rewrite the content in brackets.
Ctrl+MMove the cursor to the end or start position within the brackets.
Ctrl+EnterInsert a new row on the next row. Take a chestnut: you can quickly insert a line down even if the cursor is not at the end of the line.
Ctrl+Shift+EnterInsert a new row on the previous row. Take a chestnut: you can insert a line up quickly even if the cursor is not at the beginning of the line.
Ctrl+Shift+[Select the code and press the shortcut key to collapse the code.
Ctrl+Shift+]Select the code and press the shortcut key to expand the code.
Ctrl+K+0Expand all collapse codes.
Ctrl+←Move the cursor unit to the left, and move the cursor quickly.
Ctrl+→Move the cursor unit to the right and quickly.
shift+↑Select multiple lines up.
shift+↓Select multiple rows down.
Shift+←Select the text to the left.
Shift+→Select the text to the right.
Ctrl+Shift+←Select the text unit to the left.
Ctrl+Shift+→Select the text unit to the right.
Ctrl+Shift+↑Swap the cursor line with the previous line of code (insert the cursor line before the previous line).
Ctrl+Shift+↓Swap the cursor line with the next line of code (insert the cursor line after the next line).
Ctrl+Alt+↑Add a multiline cursor up to edit multiple rows at the same time.
Ctrl+Alt+↓Add a multiline cursor down to edit multiple rows at the same time.
Editing class
Ctrl+JMerge the selected multiple lines of code into one line. Take Chestnut: combine the CSS properties of multi line format into one line.
Ctrl+Shift+DCopy the whole line of the cursor and insert it into the next line.
TabIndent right.
Shift+TabIndent left.
Ctrl+K+KDelete the code from the cursor to the end of the line.
Ctrl+Shift+KDelete the entire row.
Ctrl+/Comment line.
Ctrl+Shift+/Comment multiline.
Ctrl+K+UConvert to uppercase.
Ctrl+K+LConvert lowercase.
Ctrl+ZRevoke.
Ctrl+YResume undo.
Ctrl+USoft undo, feel andGtrl+ZSame.
Ctrl+F2Set bookmarks
Ctrl+TLeft and right letters are interchanged.
F6Word check spelling
Search class
Ctrl+FOpen the bottom search box to find keywords.
Ctrl+shift+FThe difference between searching in folders and ordinary editors is that sublime allows multiple folders to be added for searching, which is slightly high-end and not studied.
Ctrl+POpen the search box. For example, chestnuts: 1. Input the file name in the current project and search for the file quickly; 2. Input @ and keywords to find the function name in the file; 3. Input: and numbers to jump to the line of code in the file; 4. Input ා, keywords to find the variable name.
Ctrl+GOpen the search box, automatically with:, enter the number to jump to this line of code. For example, chestnut: in the page code of a long file to quickly locate.
Ctrl+ROpen the search box, automatically bring @, enter keywords, and find the function name in the file. Take Chestnut: find a function quickly on the page with more functions.
Ctrl+:Open the search box, automatically bring the keyword, enter the keyword, and find the variable name and attribute name in the file.
Ctrl+Shift+POpen the command box. Scenario Chestnut: open the naming box, enter keywords, and call sublime text or plug-in functions, such as using package to install plug-ins.
EscExit cursor multi line selection, exit search box, command box, etc.
Display class
Ctrl+TabToggles the tabs of the current window in the order in which the files were browsed.
Ctrl+PageDownToggles the tabs of the current window to the left.
Ctrl+PageUpToggles the tab of the current window to the right.
Alt+Shift+1Window split screen, restore the default 1 screen (not the number of keypad)
Alt+Shift+2Left and right split screen – 2 columns
Alt+Shift+3Left and right split screen – 3 columns
Alt+Shift+8Vertical split screen – 2 screens
Alt+Shift+9Vertical split screen – 3 screens
Ctrl+K+BTurn sidebar on / off.
F11Full screen mode
Shift+F11Undisturbed mode

Recommended Today

Notes on tensorflow 2 deep learning (I) tensorflow Foundation

This series of notes records the process of learning tensorflow2, mainly based on https://github.com/dragen1860/Deep-Learning-with-TensorFlow-book Learning First of all, it needs to be clear that tensorflow is a scientific computing library for deep learning algorithm, and the internal data is stored in theTensor objectAll operations (OPS) are also based on tensor objects. data type Fundamentals in […]