An open API service indexing awesome lists of open source software.

https://github.com/nikiforovall/vsc-code-axe

Enhance your code editing and refactoring workflow
https://github.com/nikiforovall/vsc-code-axe

made-by-ukrainians refactoring vscode vscode-extension

Last synced: 7 months ago
JSON representation

Enhance your code editing and refactoring workflow

Awesome Lists containing this project

README

          

# code-axe 🛠️

**Enhance your code editing and refactoring workflow**

`code-axe` is a Visual Studio Code extension that streamlines the process of code manipulation. With simple keyboard shortcuts, you can quickly extract, copy, or expand methods without manual text selection, making refactoring tasks more efficient and error-free. `code-axe` helps you work with method-level code blocks as cohesive units.

## Features

* `code-axe.cutMethod` (ctrl+M X) - Cut the method under the cursor and copy it to the clipboard.
* `code-axe.copyMethod` (ctrl+M C) - Copy the method under the cursor to the clipboard.
* `code-axe.expandMethod` (ctrl+M E) - Expand the method under the cursor.

* `code-axe.sortDescendantMethodsUnderCursor` (ctrl+M S) - Sort the descendant methods under the cursor topologically.

Example:

```csharp
// before
public class TestMethod
{
public void MethodC()
{
Console.WriteLine("Line");
Console.WriteLine("Line");
Console.WriteLine("Line");
}

public void MethodB()
{
MethodC();
Console.WriteLine("Line");
Console.WriteLine("Line");
Console.WriteLine("Line");
}

public void MethodA()
{
Console.WriteLine("Line");
MethodB();
Console.WriteLine("Line");
Console.WriteLine("Line");
}
}
```

```csharp
//after
public class TestMethod
{
public void MethodA()
{
Console.WriteLine("Line");
MethodB();
Console.WriteLine("Line");
Console.WriteLine("Line");
}

public void MethodB()
{
MethodC();
Console.WriteLine("Line");
Console.WriteLine("Line");
Console.WriteLine("Line");
}

public void MethodC()
{
Console.WriteLine("Line");
Console.WriteLine("Line");
Console.WriteLine("Line");
}
}
```