Bram Moolenaar wrote: > [...] > > I would still like feedback on the format of floating point numbers: > > &123.456 > &1.23e-3 >
I did a search for vim scripts that use concatenation operation between two numbers without interleaving space. It appears that Google Code Search was able to find only 39 matches and all where false positives. Here is the query: http://www.google.com/codesearch?hl=ru&q=+lang:vim+%5E%5Cs*%5B%5E%22%5C+%5D(%22(%5C%5C.%7C%5B%5E%22%5D)*%22%7C%27%5B%5E%27%5D*%27%7C%5B%5E%22%5D)*%5Cs%5Cd%2B%5C.%5Cd%2B%5Cs+-menu&start=30&sa=N And here is a regex I've used (along with explanations). Maybe someone will double check to make sure I did not mistake. lang:vim | Vim script language. ^\s*[^"\ ] | In order to exclude comments the line should | start with anything but ". ( | Catches different kind of strings. " ( \\. | [^"] )* " | Double quoted strings along with escapes | inside the string. | ' [^']* ' | Single quoted strings. | [^"] | All the rest is OK. And there maybe some | staff preceding the digits. )* | \s\d+\.\d+\s | A pattern that I was looking for - two numbers | concatenated without an interleaving space | that are not part of a longer sequence. -menu | menu command uses dot separated numbers to set | priority. There are plenty of them and all | are false positives, so remove all lines with | "menu" string in them. --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
