OOZOU
ติดต่อเรา
Back to Blog

6 Tips to Improve Your Coding Speed [LAZY EDITION]

“I choose a lazy person to do a hard job. Because a lazy person will find an easy way to do it.” - Bill Gates

11 สิงหาคม 2563
6 min read
6 Tips to Improve Your Coding Speed [LAZY EDITION]

I couldn't agree more with this old quote from Bill Gates. I found that as I'm thriving as a developer, I tend to get lazier and the lazier I get, the more I acquire fast coding techniques. Let me share some of my favorite techniques with you folks.

1. Move cursor by word

Let's start with the most basic one. I believe most of us are already using this. It's simple, you can use the keyboard shortcuts Ctrl +←/→ (Windows) or Alt +←/→ (Mac) Now you can navigate the codebase faster.

If you hold the Shift button along the way then it selects the word for you. Neat!

2. Add cursors to line ends

Let's say you have to edit multiple lines of content to be the same, you can simply highlight all the lines and split the cursors to each line's end. Then you can edit those lines simultaneously. The actual command name depends on the editor you use. Mine is Visual Studio Code and the exact command for this is "Add cursors to line ends". The shortcut key is Alt + Shift + I (Windows) or Command + Shift + l (Mac).

3. Add selection to next find match

When you want to replace some "A" with "B" but the "Replace All" function just replaces every occurrence and ruins the mood, try this. For Visual Studio Code, the shortcut is Ctrl + D (Windows) or Command + D (Mac).

4. Join lines

Sometimes after refactoring, you find out that a part of your code containing multiple lines can be reduced to a single line for better readability. Select all the lines and join them. For VS Code, that's the Join Lines command Ctrl + J (Windows) or Command + J (Mac). You might also notice that I've used tip number 3 to format the space between each function chain. However, if you have some code formatting or linting tool set up with an auto-fix feature, that will solve the problem right away. Another example would be copying a multiline paragraph and storing it as a string variable.

5. Move Line(s) Up/Down

Want to rearrange function order while refactoring or want to change the order of code execution? Have you been using the Cut/Paste method? Worry not, we have an easier way to do this. Notice that the editor also takes into account the indentation style if the language syntax is recognized. For VS Code, the key command is Alt + Up/Down Arrow.

6. Duplicate selection

You can actually duplicate your current selection which is very useful for populating a list or any kind of collection depending on the context.

Extra: Use extensions

As mainstream editors are open to extension contributions, we can find many useful plugins that speed up our workflow. What extension to use depends on your use case. I can give you an example. Very often I have to create mock data with running numbers, so I ended up using Insert Numbers.

As you can see, being lazy led me to find better and faster ways of finishing redundant steps. This might not feel like it has a big impact, but when used frequently, it can be a huge time saver resulting in higher productivity.

7. Use multi-caret selection to edit multiple lines at once

Ever wished you could edit multiple lines of code at the same time? Well, you can! Multi-caret selection is a game-changer for making the same edit in multiple places at once. To use this feature, press Ctrl + Alt + mouse click (Windows) or Alt + Shift + mouse click (Mac) to create multiple carets. Then, you can use Ctrl + Shift + arrow keys to expand your selections.

For instance, if you want to add a semicolon at the end of several lines, simply create multiple carets at the end of each line and type a semicolon. Voilà! The semicolon is added to all the selected lines simultaneously. This feature is particularly handy when you want to make repetitive changes without the hassle of editing each line individually.

8. Use the “find and replace” feature to quickly update code

The “find and replace” feature is your best friend when it comes to quickly updating your code. You can use this tool to find specific words, phrases, or patterns and replace them with new ones. To access the “find and replace” feature, press Ctrl + F (Windows) or Command + F (Mac) for finding, and Ctrl + H (Windows) or Command + H (Mac) for replacing.

For example, if you want to replace all instances of a variable name with a new name, simply enter the old variable name in the “find” field and the new variable name in the “replace” field. Then, click the “replace all” button to update your code in one go. This feature saves you from the tedious task of manually searching and replacing each instance, making your coding process much more efficient.

9. Customize user and workspace settings to suit your needs

Customizing your user and workspace settings can significantly enhance your coding efficiency. You can adjust settings like font size, color scheme, and keyboard shortcuts to match your preferences. To access these settings, go to the “settings” menu in your editor and select the options you want to customize.

For example, if you want to change the font size of your code, navigate to the “settings” menu and select the “font size” option. Choose the font size that suits you best. You can also customize keyboard shortcuts for specific actions, such as adding a new line or deleting a selection. By tailoring your user and workspace settings, you create a coding environment that is perfectly suited to your needs, helping you work more efficiently and comfortably.

Which one do you use most often?

I'd like to know which of these matches your preference. Also, I'd like to learn some cool techniques from you as well. Feel free to leave comments in the comment section to share your ideas and methods. If you find this useful please make sure to leave a like and share this blog post. Thank you!

Related Articles

How Can I Design a Software: A Beginners Guide for Business Owners

How Can I Design a Software: A Beginners Guide for Business Owners

Designing software is an exciting yet complex process that involves creativity, logical thinking, and problem-solving skills.

Read More →
The Future of Edge Computing: What Businesses Need to Know

The Future of Edge Computing: What Businesses Need to Know

The digital landscape is evolving rapidly, and businesses must adapt to keep up with rising demands for speed, efficiency, and real-time processing.

Read More →
The Future of Retail: AI, AR, and Digital Transformation Trends

The Future of Retail: AI, AR, and Digital Transformation Trends

Retail is evolving at an unprecedented pace, driven by AI (Artificial Intelligence), AR (Augmented Reality), and digital transformation technologies, revolutionizing the retail industry. Traditional brick-and-mortar stores are no longer just about selling products—they are becoming smart, interactiv

Read More →

Have a Project in Mind?

Let's discuss how we can help bring your ideas to life with our expertise in web and mobile development.

เริ่มต้นสนทนาhello@oozou.com
OOZOU Logo

กรุงเทพฯ · สิงคโปร์ · ฮ่องกง

X
Facebook
Instagram
LinkedIn

บริการ

  • พัฒนาเว็บ
  • เอเจนต์ AI และ Generative AI
  • พัฒนาแอปมือถือ
  • วิศวกรรมและวิเคราะห์ข้อมูล
  • UI/UX และการออกแบบผลิตภัณฑ์
  • การเปลี่ยนผ่านสู่ดิจิทัล

บริษัท

  • เกี่ยวกับเรา
  • ร่วมงานกับเรา
  • บล็อก
  • กรณีศึกษา
  • Today I Learned
  • ติดต่อเรา

เพิ่มเติม

  • อุตสาหกรรม
  • เครือข่ายพันธมิตร
© 2026 OOZOU สงวนลิขสิทธิ์
นโยบายความเป็นส่วนตัวจรรยาบรรณนโยบาย ABAC