Issue #13 (Customizing the Cursor Part 2)07/20/22
|
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".
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.
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.
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!