Issue #118  (Copy File Path)07/24/24

Advertisement
The Morning Paper for Hacker News Readers

Want a byte-sized version of Hacker News that takes just a few minutes to read? 

Try TLDR's free daily newsletter.

TLDR covers the most interesting tech, startup, and programming stories in under 5 minutes.

TLDR

No sports. No politics. No weather.

TLDR is read by 1,250,000 software engineers, founders, and tech workers.


A few keyboard shortcuts can help with copying and pasting if you're often needing to copy and paste file paths in your projects.

Firstly, in VS Code on Windows, using SHIFT-ALT-C you can copy the full file path of the currently active file in your editor. This shortcut works whether you're focused in the editor or not. On a Mac it's slightly different for focused and non-focused editor.

Below I've embedded a screenshot from the shortcuts document on both Mac and Windows. I should also point out that the shortcuts document you can find on the official VS Code website docs is actually out of date for this particular set of shortcuts. I'm guessing other shortcuts are also out of date, so you should always go by the reference inside your editor, accessible via your command palette.
 
Copy File Path Shortcuts in VS Code on Windows
 
Copy File Path Shortcuts in VS Code on Mac

And for those who need a text version, those shortcuts are:
  • Windows Copy Active File Path: SHIFT-ALT-C
  • Mac Copy Active File Path:
    • With Editor not Focused: OPT-CMD-C
    • With Editor Focused: CMD-K OPT-CMD-C
The Mac shortcut for copying the active file path when the editor is in focus is definitely one I'd never remember! But you can change that shortcut if you can find one that you like that doesn't conflict with something else.

Similarly, if you want to copy the current relative path rather than the full path, here's the shortcuts:
 
Copy Relative File Path Shortcuts in VS Code on Windows
 
Copy Relative File Path Shortcuts in VS Code on Mac

And again, the text version:
  • Windows Copy Relative Path: CTRL-K CTRL-SHIFT-C
  • Mac Copy Relative Path:
    • With Editor Not Focused: SHIFT-OPT-CMD-C
    • With Editor Focused: CMD-K SHIFT-OPT-CMD-C
Personally, in either case, I would definitely look into changing those shortcuts to something more memorable if you find yourself using these often.

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

VS Code Tools

Aide — An AI-powered VS Code extension that allows you to easily perform tasks like converting from one code language to another, add detailed code commenting, batch copy files/folders, and lots more.

DevDb — A zero-config VS Code extension that auto-loads your database and displays the data right inside VS Code.

Bytes: The Best JavaScript Newsletter — Staying informed on the JavaScript ecosystem has never been so entertaining. Delivered every Monday and Thursday, for free.   Sponsor 

Awesome Emacs Keymap — A VS Code extension that provides Emacs-like keybindings and operations, inspired by some older projects but built from scratch to enable some better features.


VS Code Theme of the Week

Niketa Theme Dark — I've previously included the light theme package from the same author. This is a dark set of themes that includes 9 different dark themes, all named after various pop culture references.

Niketa Dark Theme for VS Code

The one shown above is Dilbert. Bold is used prominently in all the themes, so depending on the font you're using, you may not prefer that look.

VS Code Articles & Videos

Using GitHub Copilot's LLM in Your Visual Studio Code Extension — Based on an upcoming feature in VS Code that will allow you to use GitHub Copilot's LLM in extension development.

Focus on Your Projects Without Leaving VS Code — More specifically, this short tutorial incorporates the GitLens tool to help you avoid having to constantly switch contexts in your environment.

The Morning Paper for Tech — Want a byte-sized version of Hacker News that takes just a few minutes to read? Try TLDR's free daily newsletter. It covers the most interesting tech, startup, and programming stories in just 5 minutes. No sports and no politics.  Sponsor 

📺 How To Be a Professional Wrapper — YouTube short on using quick shortcuts in VS Code to 'wrap' sections of HTML code quickly without too much cursor movement.

Best of the Rest

learnvim — A concise interactive course to help you learn Vim quickly by mean of exercises that teach you Vim through muscle memory.

Pipes — The successor to Yahoo! Pipes (a graphical user interface for building data mashups), to manipulate data with a visual programming interface.

Find Qualified Local Workers Without Sacrificing Quality — Express Employment Professionals believes in finding the right person for the job, every time. Unlike traditional talent agencies, Express offers local teams who are deeply invested in your community, offering a unique understanding of your business needs and local talent pool.   Sponsor 

Thread — A Jupyter alternative that integrates an AI copilot into your Jupyter Notebook editing experience.

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.