4 ms·
I think these are lookahead's in some parlance, Emacs doesn't support them. On the rare occasions I need something like that I just use capture brackets. Suppos
by _a_a_a_ 4y ago
I think these are lookahead's in some parlance, Emacs doesn't support them. On the rare occasions I need something like that I just use capture brackets. Suppose I want to delete a contiguous string of 'a' but only if it's followed by the letter 'b', then
a+\(b\) → \1
aaaab
aa
gets you
b
aa <-- unchanged cos no trailing b
So it works with a simple case. I guess it could get messy if you're doing anything really complex but TBH the above is about as far as I have ever needed to go.
Good luck vimming!
- pmoriarty 4y agoA need I've had on multiple occasions is to, for example, search for the next occurance of "abcdef" but have my cursor land on the "d". In vim that's a simple abc\zsdef It also highlights just the "def", which is nice. To highlight just the "de", you could use abc\zsde\zef Yes, you could probably use some lisp magic to do the same in emacs, but it's not nearly as easy or convenient.
- _a_a_a_ 4y agoI guess in the next eight hours somebody will post you a snippet of elisp which will do what you want. Emacs people are very accommodating. Let's see anyway