Skip to content

mateuszwu/ruby-multitool

Repository files navigation

Ruby Multitool

A collection of a few minor plugins that should slightly enhance your productivity. To maximize performance bind the commands with keyboard shortcuts.

Features

Change Ruby Block Syntax

multitool-fold

Allows toggle between selected do end and curly bracket {} block syntax

command name: ruby-multitool.changeRubyBlockSyntax

command title: Ruby Multitool: Change ruby block syntax

Copy Path With Number

Saves in the system clipboard the active file absolute path appended with the line number where the cursor is.

command name: ruby-multitool.copyAbsolutePathWithLineNumber

command title: Ruby Multitool: Copy absolute path with line number

Example result:

/Users/xxx/ruby-multitool/README.md:29

Saves in the system clipboard the active file relative path appended with the line number where the cursor is.

command name: ruby-multitool.copyRelativePathWithLineNumber

command title: Ruby Multitool: Copy relative path with line number

Example result:

README.md:44

Extract To Private Method

multitool-fold

Moves selected text to a new private method.

command name: ruby-multitool.extractSelectionToPrivateMethod

command title: Ruby Multitool: Extract selected text to private method

Fold All

multitool-fold

Folds all 'describe' blocks without the one you are currently in.

command name: ruby-multitool.foldAllDescribes

command title: Ruby Multitool: Fold all describe

Folds all 'context' blocks without the one you are currently in.

command name: ruby-multitool.foldAllContexts

command title: Ruby Multitool: Fold all context

Folds all 'it' blocks without the one you are currently in.

command name: ruby-multitool.foldAllIts

command title: Ruby Multitool: Fold all it

Note: if you want to revert fold operations you can use the following command:

command title: Unfold All

Convert Hash Keys

multitool-fold

Converts hash key under the cursor.

command name: ruby-multitool.convertSingleHashKey

command title: Ruby Multitool: Convert Single Hash Key

Selects the entire hash object and converts all of its keys.

command name: ruby-multitool.convertAllHashKeys

command title: Ruby Multitool: Convert All Hash Keys

Invert Selection Direction

multitool-fold

Changes the selection direction.

command name: ruby-multitool.invertSelectionDirection

command title: Ruby Multitool: Invert selection direction

Jump To Last Migration

Opens the newest rails migration file.

command name: ruby-multitool.jumpToLastMigration

command title: Ruby Multitool: Jump to last created RoR migration

Open Notepad

Opens notepad file that is unique for each workspace.

command name: ruby-multitool.openNotepad

command title: Ruby Multitool: Open project notepad

Params Sidemove

multitool-fold

Moves param under the cursor position to the right.

command name: ruby-multitool.moveParamRight

command title: Ruby Multitool: Move Param Right

Moves param under the cursor position to the left.

command name: ruby-multitool.moveParamLeft

command title: Ruby Multitool: Move Param Left

Select Block

multitool-fold

Selects ruby block along with the block opening and closing.

command name: ruby-multitool.selectAroundBlock

command title: Ruby Multitool: Select around block you are currently in

Selects only what is inside the ruby block.

command name: ruby-multitool.selectInsideBlock

command title: Ruby Multitool: Select inside block you are currently in

Selects def block along with the block opening and closing.

command name: ruby-multitool.selectAroundDefBlock

command title: Ruby Multitool: Select around def block you are currently in

Selects only what is inside the def block.

command name: ruby-multitool.selectInsideDefBlock

command title: Ruby Multitool: Select inside def block you are currently in

Changelog

See the project's changelog here.

About

VSCode Extension

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published