Sublime Forum

Find and Replace Wishlist

#1

I just tried out Sublime for the first time, and itā€™s really sweet. I like the minimap, I like the color scheme, and I really like how clean it feels.
Thereā€™s just a couple things that have been a dealbreaker in pretty much every editor Iā€™ve ever used, and Sublime is really close to doing what I want but not quite there. Specifically, itā€™d be really nice if:

  • There were a command for ā€œreplaceā€ (as in ā€œreplace and find nextā€; as opposed to ā€œshowPanel replaceā€).

  • There were a command to put the current selection into the ā€œReplace with:ā€ half of the replace panel.

  • There were a command to put the current selection into the ā€œFind what:ā€ half of the replace panel without immediately searching for it. Right now I use findUnder, which almost does what I want but not quite.

  • The ā€œshowPanelā€ command didnā€™t automatically fill the input box with whatā€™s currently selected.

  • The replace panel input boxes could be expanded.
    Right now they accept multiple lines only (so far as I can tell) through the use of findUnder (pasting a multiline clipboard only pastes the last line), which is inconvenient especially in the fact that thereā€™s no way to then replace with a multiline string. So the functionality is there for them to support multiple lines; Iā€™d just like to be able to make the box bigger, to be able to use the up and down arrows to navigate the current content instead of browsing the history, and to be able to paste multiline clipboard contents unchanged.

To make it more clear, my ideal workflow goes something like this (the shortcut keys are not the important part, obviously. As an aside, I really like Sublimeā€™s easy .sublime-keymap format. It makes editing keys way faster than does a GUI):

  • Select a word.

  • Hit ctrl-e to put my selection into the ā€œfindā€ half.

  • Edit what was just selected to change it to what I want.

  • Select that.

  • Hit ctrl-shift-e to put the new word into the ā€œreplaceā€ half.

  • Hit ctrl-g to find next.

  • Hit ctrl-r to replace and find next, or ctrl-g to not replace if this one shouldnā€™t be replaced.

As long as Iā€™m writing a wish-list, I may as well say this: Ideally Iā€™d like to only use the find/replace panel, even when not replacing, but when I hit ā€œEnterā€ in it, it replaces by default instead of finding by default. If there were a way to change this thatā€™d be awesome.

Thanks!

0 Likes

How to step through search / replace
#2

+1 for this :smile:

Maybe we can get find.stringReplace
and a find.doReplace, find.doFind (I know we have findAll alreadyā€¦)

0 Likes

#3

I would second support for multiline find and replace text with expandable text-areas instead of text-boxes.

0 Likes

#4

[quote]# Hit ctrl-e to put my selection into the ā€œfindā€ half.

Hit ctrl-shift-e to put the new word into the ā€œreplaceā€ half.[/quote]

available in latest beta :smile:

0 Likes