-
Hello I just trying to match line with empty string (string that only compose with line feed or space)
package hello.typeconverter.converter;
import hello.typeconverter.type.IpPort;
import lombok.extern.slf4j.Slf4j;
import org.springframework.core.convert.converter.Converter;
@Slf4j
public class StringToIpPortConverter implements Converter<String, IpPort> {
@Override
public IpPort convert(String source) {
}
} | IdeaVim |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
That's a tricky question. IdeaVim follows Vim documentation and aims to support the Vim regex, which is kind of unique. You should compare behavior with Vim, not some other regexes (VsCodeVim is not powered by Vim, as far as I know, it may use JS regex or something like this). Implementing one's own Regex engine is a giant amount of work, and it was done by the great work of one of the interns at JetBrains. So there may be bugs, and feel free to report them if you notice any in the future. |
Beta Was this translation helpful? Give feedback.
That's a tricky question. IdeaVim follows Vim documentation and aims to support the Vim regex, which is kind of unique. You should compare behavior with Vim, not some other regexes (VsCodeVim is not powered by Vim, as far as I know, it may use JS regex or something like this).
Vim's regex is different and very editor-centric. For example, there is a token for selection (
\%V
) which allows you to do some cool things, e.g.'<,'>s/\\%V\\d\\+\\%V/\\=submatch(0)+line('.')-a:firstline+1/g
is a mapping that I use to increment numbers inside a selection.You should run
:help [:space:]
in Vim for documentation, but the shortest answer w…