Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Why not use VS Code

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces the knowledge of "Why not use VS Code". In the operation of actual cases, many people will encounter such a dilemma. Next, let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Not long ago, most of my programming was done in VS Code, unless I had to use another system and had to choose Vi or Vim. VS Code can meet all the needs, and even many other features, it is a know-it-all.

VS Code has an embedded terminal that can execute the commands you need. It also has a built-in text editor and file resource manager, and even a git (distributed version Management system) function.

But even so, I decided to abandon it for the following reasons:

1. Force yourself to learn building blocks

I think one of the drawbacks of using a GUI (graphical user interface) text editor is that you can't interact with the cli (command line interface) tool. Cli is the foundation of all GUI with the same functionality, and you have to use a more limited but more powerful tool.

In git, for example, if you want to extract a file from a remote database, VS Code cannot easily do it, but git can.

Git checkout--

Sometimes you still have to execute certain commands with the terminal because the GUI interface is built on top of the terminal commands (that is, the git commands in VS Code are based on git cli). By looking at the git function in VS Code, you can see that it provides many useful commands, but it is difficult to perform complex git operations.

When you want to perform complex operations but are not used to using cli, it takes a long time to figure out how to use it. Although this may be an one-off situation, how often it happens is surprising. Using cli is a very powerful skill, so you can make the most of the tools at hand.

You can not only understand the basics of how these commands work, but also create your own shortcuts to improve productivity. For example, at the beginning of one day, you may want to update your branch to the master database, then you can create a shortcut, such as:

Git fetch-a git checkout git pull origin

You can also create any command string you want, name it with a keyword or an alias, and call it when you want to execute the command. Commands can now serve you, and this can only be achieved by understanding how the core cli works.

two。 simple

I don't know if the reader is like me. Whenever you see a new tool or button, you can't help but play or touch it until it either performs a function or terminates. Tools like VS Code have too many off-the-shelf features, so I tend to terminate them. When I press the button indiscriminately, I don't know why some expected behaviors do not appear, or new behaviors appear, which leads to some troubles and problems.

Look at this terminal and tell me how you would stop it if you had no previous experience. It's a little hard, isn't it? You can't just hit the button and wait for it to react, you have to do some research first.

In the case of cli, the opposite is true, because to make changes, you have to be clear about what commands to enter or where to make changes. Although you may still terminate something, it is easier to find and correct errors because you have to enter the direction you want to go instead of choosing from a series of options, and terminating in this way seems much more discreet. This also proves the first point again, which allows you to browse the entire system and make changes, rather than letting GUI automatically make changes for you.

3. fast

Suppose you want to delete the first and last words of this sentence:

Ew look at thedolphins gross

What do you usually do? Drag mouse-click space * 2-drag mouse-click space * 5? Simple tasks are cumbersome to do, but in vim you only need to:

Dw-$- b-dw

Children, do you have a lot of question marks? Don't worry, once you have a muscle memory of it (that is, integrating it into memory through repetition), you won't feel that way, and they make sense.

Dw-Delete a word

$- regular expression symbol at the end of the line

B-return

Compared to dragging the cursor on the screen, simple text editing can be easily performed with just three commands. There are a lot of similar commands, and you can create your own.

In short, using the cursor is slower than using the keyboard, so if you move the cursor as little as possible, you can spend more time solving the actual problem at hand, rather than worrying about where to put the cursor. Although VS Code does have the function of shortcuts, for me, being able to click on the screen means that I don't have to be forced to learn shortcuts.

4. Individuation

It will take some time at first to adjust the workflow according to your preferences, but once it is done, you will feel very comfortable. Whether it's creating a custom alias in myzsh or resetting the keyboard in a vim configuration file, there are many ways to customize the experience to suit your work needs, and there are countless ways to set up the system to work for you.

This is not a closed system, if you don't like the way it works, just change the code yourself. Most things can be changed from .vimrc, .zshrc and other configuration files, even if there is nothing in the configuration file that can be changed, nothing can stop you from changing the code, you have the ability. As mentioned in the first point, we can design any set of operations to make the system work the way we want.

For most people, there are not so many rules for choosing tools, so just use the tools that allow you to get the job done the fastest and best. But for me, I find that forcing myself out of my comfort zone and using tools with a higher learning curve (that is, difficult but feature-rich tools) can eventually make me a more efficient person. In addition, the cli tool has the advantage of making you more like a cyber hacker in a movie.

In addition, I've only mentioned a few tools in this article, but the core driver is nvim with a built-in tmux terminal multiplexer, and I use grep to search for files.

That's all for "Why not use VS Code". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report