Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Copy the file name when creating a gist #197

@georgebearden

Description

@georgebearden

To further refine the Gist work being done in #194 it would be nice to set the default file name of the gist being created to the name of the file the text is being selected out of. Here is a working snippet that has been tested on a single-pane and multi-pane text editor.

var dte = GetService(typeof (DTE)) as DTE;
if (dte == null)
    return;

var fileNameWithPath = dte.ActiveDocument.FullName;
var fileName = Path.GetFileName(fileNameWithPath);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions