{"action":"created","issue":{"url":"https://api.github.com/repos/vim/vim/issues/1098","repository_url":"https://api.github.com/repos/vim/vim","labels_url":"https://api.github.com/repos/vim/vim/issues/1098/labels{/name}","comments_url":"https://api.github.com/repos/vim/vim/issues/1098/comments","events_url":"https://api.github.com/repos/vim/vim/issues/1098/events","html_url":"https://github.com/vim/vim/issues/1098","id":177646786,"number":1098,"title":"vim huge delay when inserting newline in Python code after complex strings","user":{"login":"qubodup","id":18312,"avatar_url":"https://avatars.githubusercontent.com/u/18312?v=3","gravatar_id":"","url":"https://api.github.com/users/qubodup","html_url":"https://github.com/qubodup","followers_url":"https://api.github.com/users/qubodup/followers","following_url":"https://api.github.com/users/qubodup/following{/other_user}","gists_url":"https://api.github.com/users/qubodup/gists{/gist_id}","starred_url":"https://api.github.com/users/qubodup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qubodup/subscriptions","organizations_url":"https://api.github.com/users/qubodup/orgs","repos_url":"https://api.github.com/users/qubodup/repos","events_url":"https://api.github.com/users/qubodup/events{/privacy}","received_events_url":"https://api.github.com/users/qubodup/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-09-18T11:34:15Z","updated_at":"2016-09-23T07:17:14Z","closed_at":null,"body":"Vim takes an annoyingly noticeable long time to insert a newline (`o` in normal mode or return key in insert mode) at the end of the following code, which contains multiple single quotes in double-quoted strings:\r\n\r\n      for item in tree.xpath(\"//li\"):\r\n        a = item.xpath(\".//div[contains(concat(' ', normalize-space(@class), ' '), ' alpha ')]/text()\")[0]\r\n        b = item.xpath(\".//div[contains(concat(' ', normalize-space(@class), ' '), ' betahaus ')]/text()\")[0]\r\n        c = item.xpath(\".//div[contains(concat(' ', normalize-space(@class), ' '), ' capitalism ')]/text()\")[0]\r\n        d =    item.xpath(\".//div[contains(concat(' ', normalize-space(@class), ' '), ' doughnuts-of-the-realm ')]/a\")[0].attrib['href']\r\n        g = item.xpath(\".//span[contains(concat(' ', normalize-space(@type), ' '), ' dontcare ')]/text()\")[0]\r\n        h = item.xpath(\".//span[contains(concat(' ', normalize-space(@type), ' '), ' foo ')]/text()\")\r\n\r\nThe delay is less than a second but noticeable.\r\n\r\nThe machine is a AMD Phenom(tm) 9550 2.2GHz, 64bit Quad-Core Processor.\r\n\r\nIf I copy paste the lines defining variables 5 times, resulting in about 48 lines, the delay is 3 seconds long. Increasing to over 400 lines causes the same delay which makes me assume there's a timeout that is being reached.\r\n\r\nThis is on Arch Linux with .vimrc moved.\r\n\r\nA video showing the issue: https://youtu.be/rCSfSASrZjQ\r\n\r\nFrom http://stackoverflow.com/questions/39557163/vim-huge-delay-when-inserting-newline-in-python-code-after-complex-strings?noredirect=1#comment66425062_39557163"},"comment":{"url":"https://api.github.com/repos/vim/vim/issues/comments/249120111","html_url":"https://github.com/vim/vim/issues/1098#issuecomment-249120111","issue_url":"https://api.github.com/repos/vim/vim/issues/1098","id":249120111,"user":{"login":"chrisbra","id":244927,"avatar_url":"https://avatars.githubusercontent.com/u/244927?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisbra","html_url":"https://github.com/chrisbra","followers_url":"https://api.github.com/users/chrisbra/followers","following_url":"https://api.github.com/users/chrisbra/following{/other_user}","gists_url":"https://api.github.com/users/chrisbra/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisbra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisbra/subscriptions","organizations_url":"https://api.github.com/users/chrisbra/orgs","repos_url":"https://api.github.com/users/chrisbra/repos","events_url":"https://api.github.com/users/chrisbra/events{/privacy}","received_events_url":"https://api.github.com/users/chrisbra/received_events","type":"User","site_admin":false},"created_at":"2016-09-23T07:17:14Z","updated_at":"2016-09-23T07:17:14Z","body":"@zvezdan you might also try to restrict the look-behind atom to some bytes using e.g. /\\@123<= and alternatively check, if restricting the pattern to use the old 're' engine using /\\%#=1 helps."}}
{"actor":{"display_login":"chrisbra"}}