{"action":"opened","issue":{"url":"https://api.github.com/repos/tpope/vim-fireplace/issues/282","repository_url":"https://api.github.com/repos/tpope/vim-fireplace","labels_url":"https://api.github.com/repos/tpope/vim-fireplace/issues/282/labels{/name}","comments_url":"https://api.github.com/repos/tpope/vim-fireplace/issues/282/comments","events_url":"https://api.github.com/repos/tpope/vim-fireplace/issues/282/events","html_url":"https://github.com/tpope/vim-fireplace/issues/282","id":189847743,"number":282,"title":"Pasting result of cpp into buffer","user":{"login":"nenadalm","id":1227933,"avatar_url":"https://avatars.githubusercontent.com/u/1227933?v=3","gravatar_id":"","url":"https://api.github.com/users/nenadalm","html_url":"https://github.com/nenadalm","followers_url":"https://api.github.com/users/nenadalm/followers","following_url":"https://api.github.com/users/nenadalm/following{/other_user}","gists_url":"https://api.github.com/users/nenadalm/gists{/gist_id}","starred_url":"https://api.github.com/users/nenadalm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nenadalm/subscriptions","organizations_url":"https://api.github.com/users/nenadalm/orgs","repos_url":"https://api.github.com/users/nenadalm/repos","events_url":"https://api.github.com/users/nenadalm/events{/privacy}","received_events_url":"https://api.github.com/users/nenadalm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-16T21:16:55Z","updated_at":"2016-11-16T21:16:55Z","closed_at":null,"body":"Hi. What I thought about doing is to write some function (e.g. \"do-something\"), do some implementation, write test:\r\n```clojure\r\n(deftest do-something-test\r\n  (is (= (do-something arg1 arg2)\r\n```\r\nevaluate call using ```cpp``` and if the result is ok, then paste it into the test so after paste it would look like:\r\n```clojure\r\n(deftest do-something-test\r\n  (is (= (do-something arg1 arg2)\r\n         result\r\n```\r\n\r\nI am not very expirienced with vim, but I come up with this so far:\r\n```vim\r\n:nmap <leader>w :redir @b <bar> :exec \"norm cpp\" <bar> :redir END <bar> :exec 'let @b = substitute(@b, \".*No matching autocommands\\n\", \"\", \"g\")'<cr>\r\n:nmap <leader>e :put b<cr>\r\n```\r\n\r\nso now I can evaluate form with ```\\w``` and paste the result with ```\\e```. Is there a way to overwrite ```cpp``` so it would paste the result into some registry or something?\r\n\r\nmaybe this could even be in the plugin? (or doc as tip?)"}}
{"actor":{"display_login":"nenadalm"}}