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

C# Library for handling command line goto for a collection of popular IDE'S and Text editors.

License

Notifications You must be signed in to change notification settings

Natestah/Blitz.GotoEditor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

C# Library for handling command line goto for a collection of popular IDE'S and Text editors.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages