1
I want to find and replace pattern containing floating point numbers using vim. I found this nice regular expression for such numbers:
[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?
This expression makes any regex it appears in quite long and confusing. Also I would probably want to use it quite often.
Is there some way that vim
can learn this substring as an alias so that I can just search for something like Value: +[[:float:]]
instead of Value: +[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?
?
Thank you! This is perfect for repeatedly using a longer regexp. The only thing that is missing would be that the abbreviation is not resolved before adding the command to the history, but this seems not possible. Even without this it helps a lot! – Tim – 2013-08-27T15:24:42.717