lloeki / ex-mode

Ex mode for Atom
MIT License
169 stars 59 forks source link

search and replace #199

Open ghost opened 7 years ago

ghost commented 7 years ago

hi, I am using this package since a couple of days so I don't even know if I need to open an issue for this, but I googled and couldn't find a solution.

I am trying to search and replace some strings in a range of lines with the following command:

:13,38s/h_. = (.)/Helper.bookHistogram \1/ but when I hit enter nothing happens. When I open my piece of code with vim on the terminal, this of course behaves as expected.

Is there anything I should enable in the settings (I took a look, but didn't find anything trivially solving it)?

justinjhendrick commented 6 years ago

Another example of broken search and replace:

Bug Report: Can't search for . and replace with /

Repro steps: paste this line into atom: "java.lang.String"

put your cursor on that line and input this command :s/\./\//g

Expected: (this is what vim 7.4 does) "java/lang/String"

Actual: "javaglang.String"

vim-mode-plus version: 1.22.0 ex-mode version: 0.18.0 $ atom --version Atom : 1.22.1 Electron: 1.6.15 Chrome : 56.0.2924.87 Node : 7.4.0 Mac version: 10.12.6

dylanpjx commented 5 years ago

Another example:

        new_wave[length-1] = int(len(wave)[length-2] * 0.2 +
                                wave[len(wave)-1] * 0.6)

:%s/len(wave)/length/g doesn't work

Expected output:

        new_wave[length-1] = int(wave[length-2] * 0.2 +
                                wave[length-1] * 0.6)

Actual output: No change from top snippet