A brief guide for beginners to work in the sublime and in the field of layout. Here collected all the most necessary and important. (You will find more from the links if necessary)
We will consider it for Layout on Pug / Less, where we do not need a huge debugging functionality.Therefore, it is this editor (in my opinion) that wins his competitors both in speed and in functionality. ')
1. Installation of the program and control of add-ons (Package Control)
Install Sublime Text 3. Everything is simple - download and run.
Now press ctrl / ⌘ + shift + p or in the menu (Tool> Command Palette).
Here we can Download, install, delete, view add-ons, etc.
2. Program settings:
We use spaces, instead of tabs . "Translate_tabs_to_spaces": true
Tab size is 4 spaces. "Tab_size": 4
You ask why? In order not to accidentally press the space and tab together, and not to break the pug assembly. And also for the uniformity of teamwork.
- Perhaps on this mandatory MustHave settings end. We turn to the individual:
Fullscreen mode F11 + hiding the menu (alt) panel. Allows you to maximize the use of the monitor for work and not be distracted by the status of the OS panel.
The prohibition of line breaks. Probably the best property of the above. Does not confuse pug syntax. Shows always the expected code and nesting regardless of screen size. Horizontal scrolling is done by a shift + wheel, (or touchPanel) "Word_wrap": "false"
Themes. I can not say anything about this. Just find what you like (preferably using a dark scheme). I use „theme“: „Material-Theme-Darker.sublime-theme“.
Syntax highlighting. Well, I think there should be no problems here. If you make sure that the expansion and highlighting match (Pug for Pug, not Jade for Pug)
View → Side Bar → Hide Open Files - frees up space for the project tree. Since this field is duplicated by tabs and three dots on top
In the first paragraph, we say that we skip all the standard combinations, such as ctrl () + Z (⌘ - then just ctrl). Cancel, save, repeat, close tab, restore tab, and so on ...
Perhaps the next most popular combination is: crtl + P - Allows you to search for files in a project you have opened. Lets get rid of a huge tree of open styles.
Next in importance: ctrl + D - Search for copies of selected text. Ideal for multi-editing. And to search for duplicates. Especially in larger files and large fragments. For multi-cursor hold ctrl and use mouse.
ctrl + L - Selects the entire line and allows you to delete it completely. Works well with ctrl + D.
Search ... Well, probably the first is ctrl + F - file search. The second and more important is to search the folder for multiple files ctrl + shift + F (You can call right-click on the folder and select 'Find in folder ...') I advise you not to include the Known Fat Girl folder
ctrl + shift + up / down - Moves the line up / down (swaps them). Convenient to work with styles and variables.
Now a small tutorial on key combinations . You probably saw these combinations separated by commas. So I saw ... and now I know how to use them. To do this, in turn, press these combinations (you can not release the common mode key) Here are the helpful ones:
ctrl + K, ctrl + 4 - Hides all branches with more than 4 nesting. Collapse the analogue of the arrow. ( ctrl + K, ctrl + J - expands everything that is)
ctrl + K, ctrl + B - Hides / shows SideBar. (works well with F12)