{"action":"opened","issue":{"url":"https://api.github.com/repos/tpope/vim-surround/issues/203","repository_url":"https://api.github.com/repos/tpope/vim-surround","labels_url":"https://api.github.com/repos/tpope/vim-surround/issues/203/labels{/name}","comments_url":"https://api.github.com/repos/tpope/vim-surround/issues/203/comments","events_url":"https://api.github.com/repos/tpope/vim-surround/issues/203/events","html_url":"https://github.com/tpope/vim-surround/issues/203","id":157353658,"number":203,"title":"Customize prompt?","user":{"login":"adriaanzon","id":4326420,"avatar_url":"https://avatars.githubusercontent.com/u/4326420?v=3","gravatar_id":"","url":"https://api.github.com/users/adriaanzon","html_url":"https://github.com/adriaanzon","followers_url":"https://api.github.com/users/adriaanzon/followers","following_url":"https://api.github.com/users/adriaanzon/following{/other_user}","gists_url":"https://api.github.com/users/adriaanzon/gists{/gist_id}","starred_url":"https://api.github.com/users/adriaanzon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adriaanzon/subscriptions","organizations_url":"https://api.github.com/users/adriaanzon/orgs","repos_url":"https://api.github.com/users/adriaanzon/repos","events_url":"https://api.github.com/users/adriaanzon/events{/privacy}","received_events_url":"https://api.github.com/users/adriaanzon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-28T19:30:40Z","updated_at":"2016-05-28T19:30:40Z","closed_at":null,"body":"I'm trying to customize this plugin to surround with [Blade](https://laravel.com/docs/5.2/blade) directives. Blade directives always start with an @ symbol, so for example:\r\n\r\n```blade\r\n@if(true)\r\n    ...\r\n@endif\r\n```\r\n\r\nI'm referring to [this](https://github.com/tpope/vim-surround/blob/master/doc/surround.txt#L160-L187) section in the documentation, that explains how you can do this.\r\n\r\nSo I tried it and it works quite well, but one thing annoys me. Since Blade directives always start with an `@`, I'd like the prompt to look like this (with `|` as the cursor position):\r\n```\r\nBlade directive: @|\r\n```\r\n\r\nbut whatever I do, \": \" will always be appended to the prompt. So these two:\r\n\r\n```vim\r\nlet b:surround_{char2nr(\"d\")} = \"@\\1Blade directive: \\1\\r@end\\1\\r(.*\\r\\1\"\r\nlet b:surround_{char2nr(\"d\")} = \"@\\1Blade directive\\1\\r@end\\1\\r(.*\\r\\1\"\r\n```\r\n\r\nboth end up like this: `Blade directive: |`\r\n\r\nThat means that I'm not able to do this:\r\n```vim\r\nlet b:surround_{char2nr(\"d\")} = \"@\\1Blade directive: @\\1\\r@end\\1\\r(.*\\r\\1\"\r\n```\r\n\r\nbecause that ends up like this: `Blade directive: @: |`\r\n\r\nIs there any way to work around this? Maybe change [this](https://github.com/tpope/vim-surround/blob/master/plugin/surround.vim#L94-L95) section to check if there already is a colon somewhere, and if there is, don't append \": \"."}}
{"actor":{"display_login":"adriaanzon"}}