Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Sublime Text foreword


May 24, 2021 Sublime Text Use the manual


Table of contents


Prologue

Sublime Text is a cross-platform code editor that has evolved from the original Sublime Text 1.0 to subblime Text 3.0 to almost the GUI editor of choice for each platform. And such a good editor doesn't have a Chinese tutorial, so I'm trying to make up for that with this article.

Editor's Choices

From the beginning of programming to now, the editors I've used are EditPlus, UltraEdit, Notepad, Vim, TextMate, and Sublime Text, and I wouldn't hesitate to recommend Vim and Sublime Text for the following reasons:

  1. Cross-platform: Both Vim and Sublime Text are cross-platform editors (available under Linux, OS X, and Windows). Switching systems is a common thing as a programmer, and it is necessary to use a cross-platform editor to reduce duplicate learning.
  2. Scalable: Both Vim and Sublime Text are extensible and contain a number of useful plug-ins that we can multiply our productivity by installing plug-ins in our own area.
  3. Complementary: Vim and Sublime Text are the best choices for command-line environments (CIs) and graphical interface environments (GUI), respectively, and using both can greatly increase productivity.

Personal Background

I'm a very typical programmer: I usually work primarily with Java and Python in Linux environments, occasionally writing Web pages in HTML, CSS, JavaScript, writing some C-programs (including Console Applications and Mobile Apps) in Windows environments in my spare time, and playing non-mainstream languages such as Haskell, ML, and Ruby to broaden my reach.

So this article will be my personal work for the main use scenario (Scenario), although can not cover all the use scenarios, but I think can still cover the vast majority, if you think I missed something, please reply below the article, I will try to update.

Writing Style

Benefiting from the writing style of K and R C, I tend to use real-world examples to explain the functionality of Sublime Text, so the examples in this article are all based on the problems I encountered in actual development.

In addition, this article uses a lot of animation (GIF) to demonstrate the editing capabilities of Sublime Text, because I find it difficult to demonstrate the full editing process (Workflow) and the video is too heavy. Gif animations for this article are recorded using ScreenToGif.

Editor vs Integrated Development Environment (IDE)

I often see programmers comparing editors to IDEs, where discussions such as Vim is more powerful than Eclipse or Visual Studio is too slow to make notepad, which I personally don't think make sense because editors and IDEs are simply tools for two different use scenarios:

  • The editor is semantic-free plain text and does not involve domain logic, so it's fast and small enough to write separate profiles and dynamic language scripts (Shell, Python, Ruby, etc.).
  • The IDE is oriented toward semantic code and involves a lot of domain logic, so it's slow and bulky, making it suitable for writing static language projects (Java, C, C, C, etc.).

I thought I should use the right tools to do something valuable and maximize efficiency, so I'd write Java projects with Eclipse, Shell with Vim, JavaScript/HTML/Python with Sublime Text, and C with Visual Studio.

At the end of the foreword, let's move on to the subject.