On Sep 29, 4:07 pm, bterkuile <bterku...@gmail.com> wrote: > I am now trying macvim and something is not working anymore. A normal > operation for me is to select text and do a search and replace on > this. My actions for this are: > 1. Select text > 2. type: :s/foo/bar/g (Or any of all the other options that make > vim cool) > > In macvim however when I want to type :s/foo/bar/g when a selection is > made the colon is inserted (and yes, I am in command mode)
I can't reproduce this on my MacVim. If I select something visually, as soon as I type `:` the status line shows `:'<,'>` -- which means use the visual selection as the range for the operation. You must have something configured differently. How are you selecting text? > How can I fix this? Or is there even a better way of doing this > (meaning typing commands, not just replacing text). I cannot find the > solution on google. Yes, use ranges. Turn on line numbers with `:set number`, then to substitute (for example) over lines 4 to 6 use `:4,6s/foo/bar/g`. See `:help range` for other line numbers you can use, such as % (the whole file), $ (the last line in the file), and so on. You can even use offsets. Yours, Andy Stewart -- You received this message from the "vim_mac" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php