jinzihao.info Religion SUBLIME PRODUCTIVITY PDF

Sublime productivity pdf

Monday, April 15, 2019 admin Comments(0)

Sublime Text is a versatile text editor and a gold standard for many programmers. Our tips focus on efficient coding, but general users will. A collection of some of the best Sublime Text packages, themes, and goodies. $36 e-book (EPUB and PDF) by Wes Bos; Sublime Productivity - $22 e-book by. Code Like a Pro with Today's Premier Text Editor You fell in love with Sublime, and it changed the way you code.

Language: English, Spanish, Arabic
Country: Indonesia
Genre: Religion
Pages: 232
Published (Last): 11.12.2015
ISBN: 677-7-71900-656-3
ePub File Size: 21.45 MB
PDF File Size: 12.45 MB
Distribution: Free* [*Regsitration Required]
Downloads: 48616
Uploaded by: NISHA

You fell in love with Sublime, and it changed the way you code. But the newness is wearing off, and you're wondering: "What else am I missing. Sublime Productivity. Code Like a Pro with Today's Premier Text Editor. Josh Earl . This book is for sale at jinzihao.info Download as PDF, TXT or read online from Scribd. Flag for inappropriate . This book is for sale at jinzihao.info This version was.

Very useful to use in conjunction with the multi-text selection feature mentioned above, especially when making a bunch of hyperlinks in HTML, for example. This short little block illustrates most of what you need to know to write your own snippets. Scoped Selection. To publish our plugin, we'll need to have git installed on our system and a GitHub account. An input overlay appears.

It's a useful tool to inspect the editor's settings, quickly test API calls while developing plugins, or just do simple math. The following screenshot shows a Python console: Modifying your system's version of python, such as replacing it with the MacPorts version, can cause problems with Sublime Text.

But how can we find the packages that suit our needs? And how do we install different packages? That's why we have Package Control https: Let's start by installing the Package Control plugin into Sublime. ProxyHandler ; open os. This code will download the Package Control package and place it inside the Installed Packages directory. After it has finished installing, open the command palette and navigate to Package Control Install Package.

What we see in this screenshot is the package title, description, version, and the repository link.

Pdf sublime productivity

To install, simply press Enter and the new installed features will appear in the command palette. Summary By the end of this chapter we should have Sublime Text with Package Control installed on our system, and all the necessary shortcuts for Sublime commands in the CLI.

We have also learned how to navigate the user interface and had a sneak peak of some of the cool features of Sublime.

Popular Topics

In the next chapter, we are going to touch some code and learn more advanced techniques for navigating and code editing in Sublime. We will also install two important plugins for most languages and master Sublime's Shortcuts Map. In this chapter we will cover the following topics: Sublime Text has two main search features: To take full advantage of the Search and Replace features of Sublime, you should at least know the basics of Regular Expressions, also known as regex or regexp.

Regular Expressions can be really annoying, painful, and joyful at the same time! We won't cover Regular Expressions in this book because it's an endless topic. The search panel options can be controlled using keyboard shortcuts: We can see that lines 2 and 8 still say messages and not message; that's exactly what we expected! The incremental search Incremental search is another cool feature that is here to save us keyboard clicks.

The only difference between the incremental search and a regular search is the behavior of the Enter key; in incremental searches, the Enter key will select the next match and dismiss the search panel. This saves us from pressing Esc to dismiss the regular search panel. The same shortcuts from the single file search also apply here; the difference is that we have the Where field and a … button near it.

The Where field determines where the files can be searched for; we can define the scope of the search in several ways: Results will be opened in a new tab called Find Results, containing all found results separated by file paths.

Double clicking on a result will take you to the exact location of the result in the original file. So how can we select multiple lines? We select one line like we usually do and select the second line while holding Ctrl or command on OS X.

This feature is really useful and it is recommended that you play with it. The following are some shortcuts that can help us feel more comfortable with multiple selections: We can select multiple lines by pressing Shift and dragging the right mouse button on Windows and Linux, or Linux and pressing Option and dragging the left mouse button on OS X.

12 Most-Wanted Sublime Text Tips and Tricks

Here we want to remove the letter s from messages, as shown in the following screenshot: We have selected all s using Column selection; now we just need to hit backspace to delete them.

Navigating through everything Sublime is known for its ability to quickly move between and around files and lines. In this section, we are going to master how to navigate our code quickly and easily.

Go To Anything We already learned how to use the Go To Anything feature, but it can do more than just searching for filenames. We can conduct a fuzzy search inside a "fuzzily found" file. Yeah, we can. For example, we can type the following inside the Go To Anything window: It is very common to use fuzzy search inside HTML files because it immediately shows all the elements and classes that match, accelerating navigation.

Projects A project is a group of files and folders. To save a project we just need to add folders and files to the sidebar, and then from the menu, we navigate to Project Save Project As… The saved file is our projects data, and it is stored in a JSON formatted file with a. The following is a sample project file: Folders Each folder must have a valid folder path that can be absolute or relative to the project directory, which is where the project file is. A folder can also include the following keys: This will include symlinks if set to true Settings The project-specific settings array will contain all the settings that we want to apply only to this project.

These settings will override our global user settings. For more information about build systems, please visit http: Its main features are: We will then need to restart Sublime. When it first starts, SublimeCodeIntel needs to build an index of the languages you're using.

Be patient though, it will be well worth it when it's ready. SublimeCodeIntel shortcuts map: By default, this file will be an empty JSON-formatted file.

Here is an example for optional configuration: SublimeLinter is a plugin that supports linting and has the following linters built in: This lints via Perl:: This lints via xmllint Installing SublimeLinter We can install this plugin by using the Package Control that we installed earlier.

Using SublimeLinter SublimeLinter can run in four different modes; the current mode is set by the sublimelinter key in the user settings: When the sublimelinter key is set to true, linting is performed constantly in the background while we modify the file. When the sublimelinter key is set to load-save, linting will be performed when a file is loaded and after the file is saved.

When the sublimelinter key is set to save-only, linting is performed only after a file is saved. When the sublimelinter key is set to false, linting will only be initiated by us.

We can also control all SublimeLinter settings and initiate an instant lint from the command palette. The must-know shortcuts map The following is a must-know shortcuts map for Sublime Text: General General shortcuts for Sublime's basic features are as follows: Here are the shortcuts for using Bookmarks: It is important to know that SublimeLinter and SublimeCodeIntel do not support all kinds of projects and languages. They are also not the right choice for you if you are developing in a specific language; there may be a plugin that fits your requirement better.

In the next chapter we are going to learn what Snippets, Macros, and Key Bindings are, and even make our own snippet! The best example of this is the following code: That's why Sublime has the snippets feature.

11 Sublime Text Tips for Productivity and a Faster Workflow

Snippets are smart templates that insert the right text when we need it, where we need it. Let's see this example live by using Lorem ipsum.

We have this empty HTML page that we wrote using our awesome, fast fingers. We just type the trigger letter for our snippet, in this case l, and we get all the options. Pressing Tab will insert the snippet as shown in the following screenshot: We now have a Lorem ipsum. Because we do not have other snippets starting with lore, Sublime will know exactly what we meant. We'll make an awesome HTML snippet, better than the one in the preceding example. First, let's have a look at how snippets work in more detail.

How do snippets work? Snippets must live in a Sublime package. File format and syntax Snippets are simple XML-formatted files with the extension sublime-snippet.

This tag represents the actual snippet. Snippets won't work if we won't do it. The XML parser will replace any undefined variables with empty strings. This tag contains a sequence of characters that will trigger the snippet when written. After writing these characters, pressing Tab will insert the snippet immediately. This is the scope in which the snippet will be active.

A short and intuitive description for the snippet, which will be shown when the snippet's menu is open. Knowing about snippets' features Snippets have some extra features that can be really helpful such as inserting copyrights on code, inserting default file structures, or just helping us type functions faster. We will cover all that you need to know about snippets so that you can take full advantage of them. Environment variables We learned about Sublime's environment variables in a previous chapter.

Snippets can also access these variables, which can be very convenient as shown in the following example: Field markers Field Markers will let us cycle between our snippet's field markers by pressing Tab.

We'll use fields for customizing a snippet after it's been inserted. Mirrored field markers Identical field markers mirror what we write on one of them. When we edit the first mirrored field marker, the rest will change in real time to the same values. Placeholders We can even put some default values, which are called placeholders. Let's see a full example of field markers' usage: We can put any value though.

Let's go to Tools New Snippet… and Sublime will open a new snippet template for us, as shown in the following screenshot: Let's have a look at the following code: Writing doctype in a. Pressing Tab again will make the cursor jump to fill in the title, which is filled with a default value of Untitled. We can now open any. Just like installing any other plugin, we can go to Install Package and look for snippets' packages.

Here are some packages I recommend you use for web development: Recording, editing, and using macros Macros can be very helpful; they are saved with the. Before creating a new macro, we should understand what the use case is. If we find ourselves doing the same actions over and over again, we should use a macro for it. For example, when writing C code, we always go to the end of the line to insert a semicolon and press Enter.

How can we do this faster? We will notice that the status bar says Starting to record macro…, as shown in the following screenshot: Sublime will always play the last recorded macro. Saving and editing We can also save the recorded macro and edit it manually. When opened open it for editing, we should see the following: For the full list of commands, visit http: Binding a saved macro We recorded, saved, and edited our macro.

Now, we want to make it accessible for later use, and one way of doing this is by binding the macro to a shortcut key. We will do this by defining a new key binding to our macro. Our file should look like the following screenshot: Once you save this file, you can run the macro using the specified shortcut.

All commands used by shortcuts are the same commands that are used by the macros. Summary We are stocked with snippets, both our own and from the community. We have recorded a macro, saved it, and bound it to a shortcut key.

In the next chapter we are going to learn about overriding existing key bindings and how to avoid collisions. We will also learn how to customize Sublime's base settings, Colors, and Themes. We'll even create our own theme. And for dessert, we will play with Splitting Windows in Sublime. We will also customize our own color theme. And as a bonus, we will check out the Split Windows feature. Sublime also gives us the option to bind keys to any command by adding custom key bindings; but what are key bindings exactly?

In one sentence: Customization and Theme Development Platform-specific key bindings Key bindings can be different per platform; their filename has to be one of the following: Key map file structure A key map is an array of key bindings.

Each key binding contains the following elements: This contains an array of case-sensitive keys that needs to be pressed to trigger the key binding.

This contains the command to be executed. This contains a dictionary of parameters to be passed to the command element. This contains an array of contexts that will enable the key binding. All contexts must be true for the key binding to be enabled. Here's an example from the Windows default key map: For a list of all available commands, visit either http: Here is the full list of all the keyboard keys that can be used with key bindings: Advanced key bindings Simple key bindings include only BoundKeys and a command.

However, we can also make more advanced key bindings by passing arguments to the command using the args key; for example: More advanced key bindings can be achieved using contexts. A context determines if the command will be executed based on the caret's position or some other state.

For example: For a list of all available contexts, visit either http: Keeping our key bindings organized A big problem is that Sublime keeps track of all the key bindings we have.

So first, let's understand how Sublime knows when a key binding needs to override another key binding. Each keymap file that is being loaded will override any other key bindings that have been loaded before it in case of a key conflict.

Don't be afraid to read the preceding information twice. It's important to know how Sublime handles key bindings. Lucky for us, we have an awesome plugin that can help us manage our key bindings and detect collisions and conflict.

It is called BoundKey, and can be installed using our favorite Package Control! Then, we'll choose Install Package and install the BoundKeys plugin.

The FindKeyConflicts plugin is also recommended, and can be found at https: Understanding Sublime's base settings As we saw, Sublime Text can be fully customized to fit our needs. It stores its settings in JSON-formatted. Sublime will load these settings files in the same order that it loads the keymap files. The types of settings' files Each settings file has a prefix that defines its purpose.


These prefixes are names that can be descriptive, such as Preferences Windows. This means that the file applies only to Windows. We can also specify the file type in the descriptive name, for example, Ruby. This means that the file applies only when editing Ruby code files. Feel free to change the settings with whatever fits your style.

Adding packages Let's start with adding some basic packages; download and install the following: This package adds useful file operations to the sidebar, such as a new file or new folder. We all hate trailing whitespaces in our code!

This package strips trailing whitespaces from our files. We can install these packages using Package Control. Tabs and spaces Now, let's open Sublime's settings. We can choose which file we want to edit. If we want to edit Sublime's global settings, we will open it by navigating to Preferences Settings Default, and if we want to edit specific user settings, we will open it by navigating to Preferences Settings-User. For a full list of the settings, visit http: We can change Sublime's visual experience by changing its base settings, color schemes, and themes.

Visual settings Let's start by tweaking Sublime's settings to change visual elements; for example, we can highlight the current line, change the caret style, show fold buttons, boldface folder names, and highlight modified tabs.

We are going to do this by opening our user preferences and adding some visual settings to it. The following numbered bullets refer to the labels on the next screenshot: This is cool but not enough for us; we want Sublime to be more awesome!

Sublime themes modify Sublime's look and feel by changing icons and IDE colors. Let's try downloading and installing the most popular theme, the soda theme, online. It's easy to install using Package Control. Choose Install Package and install the Theme - Soda package. After installing the theme, we need to activate it.

Let's open the user settings again by navigating to Preferences Settings User and add either "theme": The folder icons, tabs styles, and search icons have been changed! Everything looks sleek. But now, we wish to change the colors. Color schemes Color schemes are XML-formatted files with a. For a long time, I used to use a double keystroke combo to highlight the current line of code: But when I switched to a compact keyboard that lacked End and Home keys, I found myself at a loss.

Sublime Text also has a one-stroke method for deleting the entire current line, even if nothing is highlighted:. So why not split Sublime Text into two side-by-side panes for more productivity? Not only can Sublime Text have more than two columns, but it can also create vertical panes for those of you using a vertical monitor.

Productivity pdf sublime

By now, you might be feeling overwhelmed by all of these different keyboard shortcuts and menu options. Plus, switching to the mouse just to select menu options is a huge waste of time and a big productivity killer. So if you walk away from this article having learned only one thing, let it be this: And if you have plugins, they can install new palette commands as well.

If you're wondering what, how often, and where you should back up your files, we have straight forward answers. In short, every time you switch away from Sublime Text to another window, Sublime Text can instantly save all unsaved files.

Enable it by opening your User Preferences and adding:. Here are the best free and paid macOS text editors for plain text, coding, and everything in between. But I want to know: Know of any other cool tips or tricks?

Let us know in a comment below! Explore more about: Productivity , Programming , Text Editor. Your email address will not be published. Sublime Text provides them. So, Sublime text is! You can do many things quickly with Command Palette such as rename new file, set file syntax, and inserting snippets. Here are some examples. We may have many files opened when working on a project. In SublimeText, we can switch through these files or tabs quickly with the following shortcuts:. This feature would also be very useful when we are working with multiple files.

For example, say that we have several code blocks that are very similar and spread across different files in the project. To change these codes efficiently, you can:. Put the words, sentence, or line of codes that you want to change in the Find field. Pro Tip: Put the word or code replacement in the Replace input field, and hit the Replace button.

Pdf sublime productivity

A dialog will appear with a list of CSS selectors on the document, as you can see in the screenshot below. You can search and select the selectors that you intend to navigate to. I found this a more convenient way to search for code block than using the regular Find feature.

I frequently write in code editor, and I also frequently made some mistake in the spelling. If you are like me, you can enable the spell checker in SublimeText in this way.