Skip to content
This repository has been archived by the owner on Nov 11, 2024. It is now read-only.

Latest commit

 

History

History
54 lines (41 loc) · 1.76 KB

README.md

File metadata and controls

54 lines (41 loc) · 1.76 KB

Blitz.GotoEditor

This project is a helper for Openning Any text Editor to a File/Line/Column.

Blitz.GotoEditor features:

  • Listing builtin editors
  • Expands Environment variables
  • Built in Aliases that you can list in your UI

Getting started

  • Intstall the Blitz.Goto Package from your nuget package manager.

How to set up a new project that utilizes Blitz.Goto:

var definitions = new GotoDefinitions();
foreach (var edit in  new GotoDefinitions().GetBuiltInEditors())
{
    Console.WriteLine($"Title: {edit.Title} -> {Path.Combine(edit.ExecutableWorkingDirectory, edit.Executable)} {edit.Arguments}");
}
  • Select Notepad++ from the list
var firstEditor = definitions.GetBuiltInEditors().FirstOrDefault(def => def.Title == "Notepad++")!;
  • Create a Goto Action from the Editor. Goto Action takes care of translating the tags and environment variables.
var gotoAction = new GotoAction(firstEditor);
  • Define what you want to go to. CreateAndTestFile will create a temp file path that you can test Goto Functionality with.
new GotoTestFile().CreateAndTestFile(out var myFileName,out var lineNumber, out var columnNumber );
  • Create a directive for the goto action.
var directive = new GotoDirective(myFileName, lineNumber, columnNumber);
  • Execute goto
gotoAction.ExecuteGoto(directive);

Blitz GotoDemo