Giter Site home page Giter Site logo

hipdot-vs-code-url-scheme-grabber's Introduction

VS Code URL Scheme Grabber README

Visual Studio Code has a documented way to open VS code using URLs (in the MacOS / iOS world, this is commonly called a URL Scheme or URI Scheme). You can see the documentation here: Opening VS Code with URLs. This is something I personally use when planning out the steps I will take to implement a feature. However there is no built in way to get the URL from VS Code, so I have been copying the absolute path and manually creating the URLs (with snippets in my notes program of choice).

Other times you might want links that open VS Code to a specific file location:

  • When adding tasks for yourself in your task manager
  • taking notes on the way a codebase works

Features

This extension adds two commands:

  • Copy Link to Current File and Line Number
  • Copy Link to Current File and Line Number in Markdown Format
  • Copy Link to Current File and Line Number and Selection in Markdown Format

A short demo of it in action:

Screencast of URL Scheme Grabber in Use

Extension Settings

This extension contributes following setting, which can be found under the heading "URL Scheme Grabber":

  • hipdotUrlSchemeGrabber.includeColumn: Include the column number in the link to the current file and line number

Known Issues

None yet

Release Notes

1.0.5

1.0.2

Initial release of VS Code URL Scheme Grabber


Acknowlegements

My extension is heavily based off the hardwork of Nisanth Chunduru in his repo here:

I just took the Yoeman generated starter for a VS Code Extension and added his logic because I wanted to be able to grab the full URL link.

Thanks Nisanth!

TODO List / Future Improvement Ideas:

  • Add Command to copy the raw URL of the current location~
  • Add Command to copy a markdown link to the current location
  • Add a setting to optionally include the column number in the link
  • Add copying the link and markdown link with the column number as optional additional commands
  • Context menu to right click on files in the file explorer or the current cursor and copy the file/cursor location
  • Be able to call the extension via a VS Code URL from outside VS Code to get the current location of the cursor or the current file (I know, how meta!) so that it can be used by apps like Hookmark, MacOS Shortcuts that get the current file url from the active app - or to be able to script getting the current location from outside Visual Studio Code in interesting ways

Contributing:

Issue reports and PRs are welcome at https://github.com/ebetancourt/hipdot-vs-code-url-scheme-grabber

Enjoy!

hipdot-vs-code-url-scheme-grabber's People

Contributors

commanderpho avatar dandavison avatar ebetancourt avatar velios avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

hipdot-vs-code-url-scheme-grabber's Issues

Grab remote URL

Your extension has provided a lot of convenience for my workflow. Thinks a lot. Is it possible to directly grab the URL when I work in a remote host? Maybe the discussion in vscode-remote-release/issues/4779 is helpful. For me, it works when simply substituting file in the url provide by your extension with vscode-remote/ssh-remote+[HOST].

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.