Created
November 28, 2016 21:12
-
-
Save fabd/3645df542844a4b400548b45e5652576 to your computer and use it in GitHub Desktop.
Piece-wise copying of the line above the current one (an incredibly useful VIM macro converted to Sublime Text)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"args": | |
{ | |
"by": "lines", | |
"forward": false | |
}, | |
"command": "move" | |
}, | |
{ | |
"args": | |
{ | |
"commands": | |
[ | |
[ | |
"enter_visual_mode", | |
null | |
], | |
[ | |
"vi_eval", | |
{ | |
"action_args": null, | |
"action_command": null, | |
"motion_args": | |
{ | |
"by": "stops", | |
"empty_line": true, | |
"extend": true, | |
"forward": true, | |
"punct_end": true, | |
"word_end": true | |
}, | |
"motion_clip_to_line": true, | |
"motion_command": "move", | |
"motion_inclusive": true, | |
"motion_mode": 0 | |
} | |
], | |
[ | |
"vi_eval", | |
{ | |
"action_args": | |
{ | |
}, | |
"action_command": "vi_copy", | |
"motion_args": null, | |
"motion_clip_to_line": false, | |
"motion_command": null, | |
"motion_inclusive": false, | |
"motion_mode": 0 | |
} | |
] | |
] | |
}, | |
"command": "sequence" | |
}, | |
{ | |
"args": | |
{ | |
"action_args": null, | |
"action_command": null, | |
"motion_args": | |
{ | |
"by": "lines", | |
"extend": true, | |
"forward": true | |
}, | |
"motion_clip_to_line": false, | |
"motion_command": "move", | |
"motion_inclusive": false, | |
"motion_mode": 0 | |
}, | |
"command": "vi_eval" | |
}, | |
{ | |
"args": | |
{ | |
}, | |
"command": "vi_paste_right" | |
}, | |
{ | |
"args": | |
{ | |
"register": "\"", | |
"to": "hardeol" | |
}, | |
"command": "move_to" | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This Sublime Text 3 macro emulates the following VIM macro
PLEASE NOTE : THE MACRO WORKS ONLY WITH "VINTAGE" MODE ENABLED IN SETTINGS.