Issue #13  (Customizing the Cursor Part 2)07/20/22

Advertisement
Get a weekly dose of tools, articles, and other resources covering remote work, productivity, career well-being, and lots more.

Picking up from last week, there are a few other customizations you can make to the appearance and behaviour of the cursor in VS Code. Open your UI Settings, type "cursor", then scroll down a bit. You'll see the setting "Cursor Surrounding Lines".

Cursor surrounding lines setting in VS Code

This setting is commonly called "scrollOff" or "scrollOffset" in other editors like Vim. This allows you to set how many lines of code should always appear before or after the cursor when you've paged or scrolled up or down.

The default for this is zero but many prefer to change this to something like 5 or higher. I've set mine to 15 which essentially keeps the cursor more or less in the middle of the editor window. A high value like that may be a bit disorienting so a value around 3-5 would probably suffice to improve your paging/scrolling experience.

Another cursor-related setting you can change is "Cursor Move On Type". This setting controls whether the cursor should move to the place where your "find on page" result ends up.
 
Cursor move on type setting in VS Code

By default the cursor will move to the spot at the end of the current 'found' item. Depending on how you use the find feature, you may not like it this way and may prefer your cursor to just stay where it is while you're searching.

Finally, there's a setting called "Multi Cursor Paste" that's interesting. By default, if you copy (for example) 5 lines of code to your clipboard, then use multi-cursor (ALT/OPT-click) mode, you can paste the 5 lines in multiple spots. However, if you initiate 5 different cursors, you'll paste that 5 line block across the 5 cursors.
 
Multi-cursor pasting in VS Code

It's a bit of a tricky one to explain, so you'll have to try it out. The two options available are "spread" (the default) and "full". With "full" it will always paste the full text at each cursor. I'm imagining that "full" seems to be the most common option here, but "spread" is the default value.

Now on to this week's hand-picked links!
 

VS Code Tools

GitHub Copilot Labs — A companion extension to GitHub Copilot that houses experimental and up-and-coming features in a sidebar. There's a write-up here.

VSCode React Refactor — A simple extension that provides JSX refactor code actions for React developers, with support for TypeScript and TSX and compatible with the React Hooks API.

MJML — An older extension but a useful one if you build HTML emails using the MJML framework. Allows you to preview, lint, and compile MJML files inside VS Code.

Night Owl — A VS Code theme for night coders with good contrast for reading comprehension during the night. Also includes optional "Light Owl" version.

VS Code Articles

How You Can Boost Your Developer Productivity With Snippets for VS Code — An extensive guide to using the snippets feature in VS Code. A good starting point for snippets if it's something you haven't tried out yet.

How To Fix Unknown At Rule `@tailwindcss(unknownAtRules)` in VS Code — Flavio Copes with a quick tip on how to fix a specific error message that shows up when you include Tailwind in a project in VS Code.

Elixir Test Setup in VS Code — A test setup in VS Code for those building projects in the Elixir language.

Speeding up VS Code (Extensions) in 2022 — An in-depth look at the performance effect extension have on VS Code and what improvements can be made.

Lead Generation is Really Easy Now — Malthus helps you connect with new prospects and leads for your business or agency needs to help drive sales and growth. View thousands of handpicked companies that just raised millions and are likely to outsource and engage in B2B sales.   Sponsor 

The Alternatives

SpaceVim — A modern, community-driven Vim distribution inspired by spacemacs and recently hit version 2.0.

Org Mode — A GNU Emacs major mode for keeping notes, authoring documents, computational notebooks, literate programming, maintaining to-do lists, planning projects, and more — in a fast and effective plain text system.

Dan Abramov on Sublime Text — Dan makes a case for Sublime Text over VS Code in this Twitter thread.


Suggestions?

If you have any link suggestions, including a tool, article, or other resources related to VS Code or another IDE, send it via DM on X: @LouisLazaris or just hit reply on this email.

That's it for this issue.

Happy VS Coding!
Louis
VSCode.Email
@LouisLazaris
Copyright © VSCode.Email. All rights reserved.

Not affiliated with Microsoft, Visual Studio Code, or any of its trademarks.