If you have an equal number of empty selections (cursors) and selections, this command will place each selection at the corresponding cursor location.
- Total 6K
- Win 3K
- Mac 1K
- Linux 954
|Mar 21||Mar 20||Mar 19||Mar 18||Mar 17||Mar 16||Mar 15||Mar 14||Mar 13||Mar 12||Mar 11||Mar 10||Mar 9||Mar 8||Mar 7||Mar 6||Mar 5||Mar 4||Mar 3||Mar 2||Mar 1||Feb 28||Feb 27||Feb 26||Feb 25||Feb 24||Feb 23||Feb 22||Feb 21||Feb 20||Feb 19||Feb 18||Feb 17||Feb 16||Feb 15||Feb 14||Feb 13||Feb 12||Feb 11||Feb 10||Feb 9||Feb 8||Feb 7||Feb 6||Feb 5|
I wrote and use this plugin as an alternative to copy and pasting.
First, you can use this command to duplicate the current line (or lines).
Another common use case is when you need to copy some small bit of text, like a variable or method name.
Select the text to copy, then
cmd+click to place an empty cursor, then run this command to insert the selected text at the cursor position.
This can be extended to multiple selections: if you have an equal number of selections and cursors, this command will place each selection at the corresponding cursor location.
Or, you can select some text and place multiple empty cursors, and the selection will be inserted at all the cursor locations.
- Using Package Control, install “DuplicateSelections”
Open the Sublime Text Packages folder
- OS X: ~/Library/Application Support/Sublime Text 3/Packages/
- Windows: %APPDATA%/Sublime Text 3/Packages/
- Linux: ~/.Sublime Text 3/Packages/ or ~/.config/sublime-text-3/Packages
clone this repo
Install keymaps for the commands (see Example.sublime-keymap for my preferred keys)
duplicate_selections: See description above