duydao / Text-Pastry

Extend the power of multiple selections in Sublime Text. Modify selections, insert numeric sequences, incremental numbers, generate uuids, date ranges, insert continuously from a word list and more.
MIT License
829 stars 46 forks source link

Inserting text removes selections #7

Closed rothos closed 11 years ago

rothos commented 11 years ago

If I have four selections, type CMD+ALT+N and then "a b c d"+ENTER, the characters are properly inserted but I lose my selections — only the last remains.

If instead I have four selections, type CMD+ALT+N and then "\i"+ENTER, however, the numbers {1,2,3,4} are inserted and my four selections are preserved.

Running Sublime Text 2 on MacBook Pro with OS X 10.7.

AllanLRH commented 11 years ago

+1 to this. Using Cmd + U (Undo Selection) removes the newly inserted text.

duydao commented 11 years ago

I've added a new setting ( _keepselection ), available under Preferences -> Package Settings -> Text Pastry. To activate the requested behaviour, your settings file could look like this:

{
    "clipboard_strip_newline": true,
    "repeat_words": false,
    "repeat_clipboard": false,
    "history_enabled": true,
    "keep_selection": true
}