{"action":"created","issue":{"url":"https://api.github.com/repos/miripiruni/vimi/issues/31","labels_url":"https://api.github.com/repos/miripiruni/vimi/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/miripiruni/vimi/issues/31/comments","events_url":"https://api.github.com/repos/miripiruni/vimi/issues/31/events","html_url":"https://github.com/miripiruni/vimi/pull/31","id":57413494,"number":31,"title":"use no-remapped mapping commands","user":{"login":"itchyny","id":375258,"avatar_url":"https://avatars.githubusercontent.com/u/375258?v=3","gravatar_id":"","url":"https://api.github.com/users/itchyny","html_url":"https://github.com/itchyny","followers_url":"https://api.github.com/users/itchyny/followers","following_url":"https://api.github.com/users/itchyny/following{/other_user}","gists_url":"https://api.github.com/users/itchyny/gists{/gist_id}","starred_url":"https://api.github.com/users/itchyny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itchyny/subscriptions","organizations_url":"https://api.github.com/users/itchyny/orgs","repos_url":"https://api.github.com/users/itchyny/repos","events_url":"https://api.github.com/users/itchyny/events{/privacy}","received_events_url":"https://api.github.com/users/itchyny/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"miripiruni","id":144537,"avatar_url":"https://avatars.githubusercontent.com/u/144537?v=3","gravatar_id":"","url":"https://api.github.com/users/miripiruni","html_url":"https://github.com/miripiruni","followers_url":"https://api.github.com/users/miripiruni/followers","following_url":"https://api.github.com/users/miripiruni/following{/other_user}","gists_url":"https://api.github.com/users/miripiruni/gists{/gist_id}","starred_url":"https://api.github.com/users/miripiruni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miripiruni/subscriptions","organizations_url":"https://api.github.com/users/miripiruni/orgs","repos_url":"https://api.github.com/users/miripiruni/repos","events_url":"https://api.github.com/users/miripiruni/events{/privacy}","received_events_url":"https://api.github.com/users/miripiruni/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-02-12T03:41:09Z","updated_at":"2015-02-21T09:48:41Z","closed_at":"2015-02-21T09:44:47Z","pull_request":{"url":"https://api.github.com/repos/miripiruni/vimi/pulls/31","html_url":"https://github.com/miripiruni/vimi/pull/31","diff_url":"https://github.com/miripiruni/vimi/pull/31.diff","patch_url":"https://github.com/miripiruni/vimi/pull/31.patch"},"body":"This pull request fixes `nmap` to `nnoremap`.\r\n\r\nReasoning:\r\nIf we do not use no-remapped commands like `map`, `nmap`, `imap` etc., the mappings are again remapped. For example, when we use the settings\r\n```vim\r\nnnoremap : ;\r\nnnoremap ; :\r\n```\r\nin order to swap the colon and semicolon (so that we need not press shift again and again), the mapping\r\n```vim\r\nmap <leader>ts :%s/\\s\\+$//e<CR>\r\n```\r\nget affected and is remapped to\r\n```vim\r\n;%s/\\s\\+$//e<CR>\r\n```\r\nThis causes an error. Another reason why noremapped commands are preferable is that the settings like the following will cause an error `E223: recursive mapping`.\r\n```vim\r\nnmap : ;\r\nnmap ; :\r\n```\r\n\r\nAlso, this pull request uses `<C-u>` to clear the ranges for commands which does not accept ranges.\r\nFor example, assume that we use the following setting\r\n```vim\r\nnnoremap <leader>ts :%s/\\s\\+$//e<CR>\r\n```\r\nWhen we mistakenly type as `5<leader>ts`, the command line becomes `.,.+4%s/\\s\\+$//e`, which causes an error. This is why we have to clear the ranges."},"comment":{"url":"https://api.github.com/repos/miripiruni/vimi/issues/comments/75364396","html_url":"https://github.com/miripiruni/vimi/pull/31#issuecomment-75364396","issue_url":"https://api.github.com/repos/miripiruni/vimi/issues/31","id":75364396,"user":{"login":"itchyny","id":375258,"avatar_url":"https://avatars.githubusercontent.com/u/375258?v=3","gravatar_id":"","url":"https://api.github.com/users/itchyny","html_url":"https://github.com/itchyny","followers_url":"https://api.github.com/users/itchyny/followers","following_url":"https://api.github.com/users/itchyny/following{/other_user}","gists_url":"https://api.github.com/users/itchyny/gists{/gist_id}","starred_url":"https://api.github.com/users/itchyny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itchyny/subscriptions","organizations_url":"https://api.github.com/users/itchyny/orgs","repos_url":"https://api.github.com/users/itchyny/repos","events_url":"https://api.github.com/users/itchyny/events{/privacy}","received_events_url":"https://api.github.com/users/itchyny/received_events","type":"User","site_admin":false},"created_at":"2015-02-21T09:48:41Z","updated_at":"2015-02-21T09:48:41Z","body":"Thanks for merging."}}