forked fromfvictorio/vim-extract-variable
- Notifications
You must be signed in to change notification settings - Fork0
Vim plugin to extract an expression to a variable
License
NotificationsYou must be signed in to change notification settings
Imlimp/vim-extract-variable
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Extract an expression to a variable.
Use one of the hundred of methods that exist to install a vim plugin. I recommendvim-plug:
Plug 'fvictorio/vim-extract-variable'A normal and visual mapping is set:<leader>ev. If you use it in visual mode, it extracts the selected text to a variable. The name of the variable will be prompted to you. If you use it in normal mode, the text between parentheses is used.
The declaration is created in the previous line, usingO, so it should preserve the indentation if you haveautoindent on.
The following languages are supported:
| Language | Result |
|---|---|
| Elixir | foo = 42 |
| Go | foo := 42 |
| JavaScript | const foo = 42 |
| R | foo <- 42 |
| Ruby | foo = 42 |
| TypeScript | const foo = 42 |
| Python | foo = 42 |
| C# | var foo = 42; |
| C++ | auto foo = 42; |
About
Vim plugin to extract an expression to a variable
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Languages
- Vim Script100.0%
