Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Code AxeNew to Visual Studio Code? Get it now.
Code Axe

Code Axe

Oleksii Nikiforov

|
7 installs
| (1) | Free
Code Axe allows you to cut, copy and paste methods
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

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:

// 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");
    }
}
//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");
    }
}

Known Issues

  • Method overloading is not supported. It will be added in the future.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft