{"action":"created","issue":{"url":"https://api.github.com/repos/Shougo/dein.vim/issues/78","repository_url":"https://api.github.com/repos/Shougo/dein.vim","labels_url":"https://api.github.com/repos/Shougo/dein.vim/issues/78/labels{/name}","comments_url":"https://api.github.com/repos/Shougo/dein.vim/issues/78/comments","events_url":"https://api.github.com/repos/Shougo/dein.vim/issues/78/events","html_url":"https://github.com/Shougo/dein.vim/issues/78","id":148829373,"number":78,"title":"Lazy load by hotkeys doesn't execute the associated action the first time (when loading)","user":{"login":"alem0lars","id":336957,"avatar_url":"https://avatars.githubusercontent.com/u/336957?v=3","gravatar_id":"","url":"https://api.github.com/users/alem0lars","html_url":"https://github.com/alem0lars","followers_url":"https://api.github.com/users/alem0lars/followers","following_url":"https://api.github.com/users/alem0lars/following{/other_user}","gists_url":"https://api.github.com/users/alem0lars/gists{/gist_id}","starred_url":"https://api.github.com/users/alem0lars/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alem0lars/subscriptions","organizations_url":"https://api.github.com/users/alem0lars/orgs","repos_url":"https://api.github.com/users/alem0lars/repos","events_url":"https://api.github.com/users/alem0lars/events{/privacy}","received_events_url":"https://api.github.com/users/alem0lars/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Shougo/dein.vim/labels/cannot%20reproduce","name":"cannot reproduce","color":"fad8c7"},{"url":"https://api.github.com/repos/Shougo/dein.vim/labels/reproduce%20ways","name":"reproduce ways","color":"c7def8"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-04-16T08:07:38Z","updated_at":"2016-04-17T06:33:51Z","closed_at":"2016-04-17T05:38:08Z","body":"# Problems summary\r\n\r\nWhen I lazily load a plugin using a hotkey, the first time I use the hotkey the action isn't executed.\r\n\r\nFor example: `,cs` loads the plugin `vim-surround` but if I type `,cs'\"` the single quotes aren't replaced with the double quotes. Typing that hotkey another time (when the plugin is already loaded) the action will be executed.\r\n\r\n## Expected\r\n\r\nThe action should be executed even for the first time I type the hotkey.\r\n\r\n## Environment Information\r\n\r\n * OS: GNU/Linux (distro: Gentoo)\r\n \r\n* Vim version:\r\n\r\n```\r\nNVIM 0.1.2\r\nBuild type: RelWithDebInfo\r\nCompilation: /usr/bin/x86_64-pc-linux-gnu-gcc -O2 -pipe -march=native -g -Wno-error -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -DDISABLE_LOG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -I/var/tmp/portage/app-editors/neovim-0.1.2/work/neovim-0.1.2_build/config -I/var/tmp/portage/app-editors/neovim-0.1.2/work/neovim-0.1.2/src -I/usr/include -I/usr/include -I/usr/include/luajit-2.0 -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/var/tmp/portage/app-editors/neovim-0.1.2/work/neovim-0.1.2_build/src/nvim/auto -I/var/tmp/portage/app-editors/neovim-0.1.2/work/neovim-0.1.2_build/include\r\nCompiled by portage@kate\r\n\r\nOptional features included (+) or not (-): +acl   +iconv    +jemalloc\r\nFor differences from Vim, see :help vim-differences\r\n\r\n   system vimrc file: \"/etc/vim/sysinit.vim\"\r\n  fall-back for $VIM: \"/usr/share/nvim\"\r\n```\r\n\r\n## Provide a minimal .vimrc with less than 50 lines (Required!)\r\n\r\n```vim\r\nif has('vim_starting')\r\n  execute ' set runtimepath^=' . substitute(\r\n          \\ fnamemodify('/path/to/dein/dir', ':p') , '/$', '', '')\r\nendif\r\n\r\ncall dein#begin(expand('~/.cache/dein'))\r\ncall dein#add('tpope/vim-repeat', {\r\n      \\ 'lazy': 1,\r\n      \\ 'on_map': '.'})\r\ncall dein#add('tpope/vim-surround', {\r\n      \\ 'lazy': 1,\r\n      \\ 'depends': ['vim-repeat'],\r\n      \\ 'on_map': ',cs'})\r\ncall dein#end()\r\ncall dein#save_state()\r\n\r\nif dein#check_install()\r\n  call dein#install()\r\nendif\r\n\r\nsyntax enable\r\nfiletype plugin indent on\r\n```\r\n\r\n## The reproduce ways from Vim starting (Required!)\r\n\r\n 1. Start Vim\r\n 2. Type `,cs'\"` for the first time: the plugin will be loaded but the action isn't executed\r\n 3. Type `,cs'\"` another time: the action will be executed (the plugin is already loaded by step (2))\r\n\r\n## Screen shot (if possible)\r\n\r\n## Upload the log messages by `:redir` and `:message`\r\n"},"comment":{"url":"https://api.github.com/repos/Shougo/dein.vim/issues/comments/210965779","html_url":"https://github.com/Shougo/dein.vim/issues/78#issuecomment-210965779","issue_url":"https://api.github.com/repos/Shougo/dein.vim/issues/78","id":210965779,"user":{"login":"Shougo","id":41495,"avatar_url":"https://avatars.githubusercontent.com/u/41495?v=3","gravatar_id":"","url":"https://api.github.com/users/Shougo","html_url":"https://github.com/Shougo","followers_url":"https://api.github.com/users/Shougo/followers","following_url":"https://api.github.com/users/Shougo/following{/other_user}","gists_url":"https://api.github.com/users/Shougo/gists{/gist_id}","starred_url":"https://api.github.com/users/Shougo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shougo/subscriptions","organizations_url":"https://api.github.com/users/Shougo/orgs","repos_url":"https://api.github.com/users/Shougo/repos","events_url":"https://api.github.com/users/Shougo/events{/privacy}","received_events_url":"https://api.github.com/users/Shougo/received_events","type":"User","site_admin":false},"created_at":"2016-04-17T06:33:51Z","updated_at":"2016-04-17T06:33:51Z","body":"For `<Leader>_`, `\\_s` works.\r\nFor `<C-_>`, `<C-_>s` works.\r\nBut the input timing is hard.\r\nIt is the feature."}}