=== modified file 'vim/bundle/neocomplete.vim/.git/config' (properties changed: -x to +x) === modified file 'vim/bundle/neocomplete.vim/.git/hooks/applypatch-msg.sample' --- vim/bundle/neocomplete.vim/.git/hooks/applypatch-msg.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/.git/hooks/applypatch-msg.sample 2015-08-25 11:01:00 +0000 @@ -10,6 +10,6 @@ # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup -commitmsg="$(git rev-parse --git-path hooks/commit-msg)" -test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} +test -x "$GIT_DIR/hooks/commit-msg" && + exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} : === modified file 'vim/bundle/neocomplete.vim/.git/hooks/pre-applypatch.sample' --- vim/bundle/neocomplete.vim/.git/hooks/pre-applypatch.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/.git/hooks/pre-applypatch.sample 2015-08-25 11:01:00 +0000 @@ -9,6 +9,6 @@ # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup -precommit="$(git rev-parse --git-path hooks/pre-commit)" -test -x "$precommit" && exec "$precommit" ${1+"$@"} +test -x "$GIT_DIR/hooks/pre-commit" && + exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} : === modified file 'vim/bundle/neocomplete.vim/.git/hooks/pre-push.sample' --- vim/bundle/neocomplete.vim/.git/hooks/pre-push.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/.git/hooks/pre-push.sample 2015-08-25 11:01:00 +0000 @@ -24,6 +24,7 @@ z40=0000000000000000000000000000000000000000 +IFS=' ' while read local_ref local_sha remote_ref remote_sha do if [ "$local_sha" = $z40 ] === modified file 'vim/bundle/neocomplete.vim/.git/hooks/update.sample' --- vim/bundle/neocomplete.vim/.git/hooks/update.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/.git/hooks/update.sample 2015-08-25 11:01:00 +0000 @@ -1,6 +1,6 @@ #!/bin/sh # -# An example hook script to block unannotated tags from entering. +# An example hook script to blocks unannotated tags from entering. # Called by "git receive-pack" with arguments: refname sha1-old sha1-new # # To enable this hook, rename this file to "update". === modified file 'vim/bundle/neocomplete.vim/.git/index' Binary files vim/bundle/neocomplete.vim/.git/index 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/index 2015-08-25 11:01:00 +0000 differ === modified file 'vim/bundle/neocomplete.vim/.git/logs/HEAD' --- vim/bundle/neocomplete.vim/.git/logs/HEAD 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/.git/logs/HEAD 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 8d2a574c1708080ef1fac3336c99d2d9e1898fce Jan Pobrislo 1470298375 +0200 clone: from https://github.com/Shougo/neocomplete.vim +0000000000000000000000000000000000000000 39661033cce39ebd013451b49809e94ade3ba08c Jan Pobrislo 1440500402 +0200 clone: from https://github.com/Shougo/neocomplete.vim === modified file 'vim/bundle/neocomplete.vim/.git/logs/refs/heads/master' --- vim/bundle/neocomplete.vim/.git/logs/refs/heads/master 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/.git/logs/refs/heads/master 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 8d2a574c1708080ef1fac3336c99d2d9e1898fce Jan Pobrislo 1470298375 +0200 clone: from https://github.com/Shougo/neocomplete.vim +0000000000000000000000000000000000000000 39661033cce39ebd013451b49809e94ade3ba08c Jan Pobrislo 1440500402 +0200 clone: from https://github.com/Shougo/neocomplete.vim === modified file 'vim/bundle/neocomplete.vim/.git/logs/refs/remotes/origin/HEAD' --- vim/bundle/neocomplete.vim/.git/logs/refs/remotes/origin/HEAD 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/.git/logs/refs/remotes/origin/HEAD 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 8d2a574c1708080ef1fac3336c99d2d9e1898fce Jan Pobrislo 1470298375 +0200 clone: from https://github.com/Shougo/neocomplete.vim +0000000000000000000000000000000000000000 39661033cce39ebd013451b49809e94ade3ba08c Jan Pobrislo 1440500402 +0200 clone: from https://github.com/Shougo/neocomplete.vim === removed directory 'vim/bundle/neocomplete.vim/.git/objects/01' === removed file 'vim/bundle/neocomplete.vim/.git/objects/01/af9bed48558de269e58a5453ddc77b74c89d60' Binary files vim/bundle/neocomplete.vim/.git/objects/01/af9bed48558de269e58a5453ddc77b74c89d60 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/01/af9bed48558de269e58a5453ddc77b74c89d60 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neocomplete.vim/.git/objects/02' === removed file 'vim/bundle/neocomplete.vim/.git/objects/02/4dbd5799f7dcb42dcca70cfb261f0c5d58476c' Binary files vim/bundle/neocomplete.vim/.git/objects/02/4dbd5799f7dcb42dcca70cfb261f0c5d58476c 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/02/4dbd5799f7dcb42dcca70cfb261f0c5d58476c 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neocomplete.vim/.git/objects/05' === added file 'vim/bundle/neocomplete.vim/.git/objects/05/107dcdf856d2d89ff075647635d24aea4cebef' Binary files vim/bundle/neocomplete.vim/.git/objects/05/107dcdf856d2d89ff075647635d24aea4cebef 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/05/107dcdf856d2d89ff075647635d24aea4cebef 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neocomplete.vim/.git/objects/06' === added file 'vim/bundle/neocomplete.vim/.git/objects/06/074543dace058228f3852a18674ed1d13a4b45' Binary files vim/bundle/neocomplete.vim/.git/objects/06/074543dace058228f3852a18674ed1d13a4b45 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/06/074543dace058228f3852a18674ed1d13a4b45 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/neocomplete.vim/.git/objects/08/2c835b2235312839364a8de3bf35d7e0578dd2' Binary files vim/bundle/neocomplete.vim/.git/objects/08/2c835b2235312839364a8de3bf35d7e0578dd2 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/08/2c835b2235312839364a8de3bf35d7e0578dd2 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/neocomplete.vim/.git/objects/08/e6c1b5274223cbd540702e4f0aaca0ab23cce8' --- vim/bundle/neocomplete.vim/.git/objects/08/e6c1b5274223cbd540702e4f0aaca0ab23cce8 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/.git/objects/08/e6c1b5274223cbd540702e4f0aaca0ab23cce8 1970-01-01 00:00:00 +0000 @@ -1,13 +0,0 @@ -xZksH8xvcj1$,5 Jv\=v<&S5TbP?ݭY|G/_^۝V?}4GKo`&1]YJQϺ.MhV/ԉHU.CO>?W*Gi RD=$ -k4NxLO&FYL⑖*I1!h-&OA|x=”4U -`5WϘ8T*W9g-@S(2JT%QjVa!4氒pc"I4f)J\yFcVru7iFna|]bkv'ٌDD/$1erPdxn0x,Ƃa S -_UXq<Pa:.T /g*S>{}]|Di- ڈk"ӕN}w}Uh'aVwiȉe0\h;k[U}:JsJ޵ofwz쾧g5j 0>/:zΛv5noH6=!n @lO/iא.9H7Ot}zӿ Z ĻyZIV[4[٧~Ő.zV@Z N}Ye5ۧT`#黋4kN^muxQ<9wAF~{:yl.4-vk`Dʽl70F.YE+v0{?(6R^eL'_{)Z 9e(E,LT6@̪h΁[iuS?SD]Дf7^-Ku8#yQ%VŸP!eQuc2 ao׈A,y_ -u ~rTK'eq}˳qAZn%gj!m8@'{B0`]6Ӂې-cE F:LLs3A9(1~tFOЎ·8 uJ&2k~:pd.b~Z?֙^.:BFvMVӖBCE#b)L%UX4^ ^]fq4$`SyY/DtLߵ9uC -~6+p3[jkڈ_Ra` Nf4ūKx&jaKzux](பno7b"b'wҺEYZZ NOR80gP٢PlqnIuF0pyK5/猩D]_"ư*jWE_X rg״%:/8O:VB,-p# -L.MMv{cX w)}(UK?.Ynhu>6KDTS_X6-2uZTo<}RZ#'~a-2ؗ$#uS[)vLQBOpKiZ)ΨI,nj2[I_c]6?iQ C0K"лC}Lտ-YsJ,9yKw$@<6sjA *0 =sC~*,"T&OnC;IAI6Śԑ^ȼ* ͜X@Wo>I=ټ|kår'CM_86ЂP a YyLoɔ46ZLKΙҎg_on^kS6WEÕ[v[T 0N13{H(/'KF/ FJB{]v +DH;N67ۯ 4ca0&Z#VV=g*ɘ(-USFwχO#]e5U BF1-XFgYZKՐTVliƈ£m+-%ow#7ϴF.z,N?xSLy@JA\kKT*Tբ1XVRӵ)E2L#,H6t<'iPCЦEW]qs d*96 ]iix=U!W8nSI]zBZMg+g}ZҢ,ŀB堥/T7n۵ Q,,Jx9cY/[UU Azg7Q875@StHv6(z4}v"Ѡ=f֒?:ƳOb)-3S)އ3L*#D$~=P<#?zO,zL4 2dNX4 WS};dGqF!ø:)mȂ="H&sw,dكE}ZI&OhJq@f EepnpBg|t=Xp&4 8h I.J. C5 }h/VoB1,$.Wz?'d,l&q%x=Nm' G~R[Yy͎muK:u +k!mi^___yG*aH5|>glm j#G\b`w[وڭHX)r5<MqZCG6>_n+;+Sro/)s۞T[#I`ވ?I-N!5vSQ% b}s?y5tk a-/V +k]v5o֬}${'Tt`1WclZOq[|~ \ No newline at end of file === added file 'vim/bundle/neocomplete.vim/.git/objects/27/231446a53743c9edfc64616977921fc4f916c9' Binary files vim/bundle/neocomplete.vim/.git/objects/27/231446a53743c9edfc64616977921fc4f916c9 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/27/231446a53743c9edfc64616977921fc4f916c9 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/neocomplete.vim/.git/objects/27/45727b0918eebe5d297af3ec462acdcadb4322' Binary files vim/bundle/neocomplete.vim/.git/objects/27/45727b0918eebe5d297af3ec462acdcadb4322 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/27/45727b0918eebe5d297af3ec462acdcadb4322 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neocomplete.vim/.git/objects/28' === removed file 'vim/bundle/neocomplete.vim/.git/objects/28/d3a794f061e2525cff5cbcd47fcd11a8de4180' Binary files vim/bundle/neocomplete.vim/.git/objects/28/d3a794f061e2525cff5cbcd47fcd11a8de4180 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/28/d3a794f061e2525cff5cbcd47fcd11a8de4180 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/neocomplete.vim/.git/objects/2b/23b10c8039290c2268aef675f535422cf38212' Binary files vim/bundle/neocomplete.vim/.git/objects/2b/23b10c8039290c2268aef675f535422cf38212 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/2b/23b10c8039290c2268aef675f535422cf38212 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/neocomplete.vim/.git/objects/2b/f0fff805cc36e35c78455af956c619e70767b6' Binary files vim/bundle/neocomplete.vim/.git/objects/2b/f0fff805cc36e35c78455af956c619e70767b6 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/2b/f0fff805cc36e35c78455af956c619e70767b6 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neocomplete.vim/.git/objects/2c' === added file 'vim/bundle/neocomplete.vim/.git/objects/2c/9407f79693b019976aab1edfe89ea73409ae68' Binary files vim/bundle/neocomplete.vim/.git/objects/2c/9407f79693b019976aab1edfe89ea73409ae68 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/2c/9407f79693b019976aab1edfe89ea73409ae68 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neocomplete.vim/.git/objects/2d' === added file 'vim/bundle/neocomplete.vim/.git/objects/2d/5cd110e4ad4281d4e56a5c38c99074985d265d' Binary files vim/bundle/neocomplete.vim/.git/objects/2d/5cd110e4ad4281d4e56a5c38c99074985d265d 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/2d/5cd110e4ad4281d4e56a5c38c99074985d265d 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/neocomplete.vim/.git/objects/2d/b7f31daf043df2babce23f56bdc70834324484' Binary files vim/bundle/neocomplete.vim/.git/objects/2d/b7f31daf043df2babce23f56bdc70834324484 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/2d/b7f31daf043df2babce23f56bdc70834324484 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neocomplete.vim/.git/objects/31' === added file 'vim/bundle/neocomplete.vim/.git/objects/31/9a6a32891cc40dfb60da800f59f81edc41f44b' Binary files vim/bundle/neocomplete.vim/.git/objects/31/9a6a32891cc40dfb60da800f59f81edc41f44b 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/31/9a6a32891cc40dfb60da800f59f81edc41f44b 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neocomplete.vim/.git/objects/33' === removed file 'vim/bundle/neocomplete.vim/.git/objects/33/3df243106abf6af5fe074415d8138c403e4577' Binary files vim/bundle/neocomplete.vim/.git/objects/33/3df243106abf6af5fe074415d8138c403e4577 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/33/3df243106abf6af5fe074415d8138c403e4577 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/neocomplete.vim/.git/objects/33/5504f6fe9af78269a0361305b3b1f610d92f05' Binary files vim/bundle/neocomplete.vim/.git/objects/33/5504f6fe9af78269a0361305b3b1f610d92f05 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/33/5504f6fe9af78269a0361305b3b1f610d92f05 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neocomplete.vim/.git/objects/38' === removed file 'vim/bundle/neocomplete.vim/.git/objects/38/d338eaa22e2e5c20b56c39b7eb29136f8abb80' Binary files vim/bundle/neocomplete.vim/.git/objects/38/d338eaa22e2e5c20b56c39b7eb29136f8abb80 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/38/d338eaa22e2e5c20b56c39b7eb29136f8abb80 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/neocomplete.vim/.git/objects/39/17b5d2af18a00340c82855bde8011590871948' Binary files vim/bundle/neocomplete.vim/.git/objects/39/17b5d2af18a00340c82855bde8011590871948 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/39/17b5d2af18a00340c82855bde8011590871948 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/neocomplete.vim/.git/objects/39/661033cce39ebd013451b49809e94ade3ba08c' --- vim/bundle/neocomplete.vim/.git/objects/39/661033cce39ebd013451b49809e94ade3ba08c 1970-01-01 00:00:00 +0000 +++ vim/bundle/neocomplete.vim/.git/objects/39/661033cce39ebd013451b49809e94ade3ba08c 2015-08-25 11:01:00 +0000 @@ -0,0 +1,2 @@ +x=N0@ajbz$;[!DKAЬ=DZc˙_RuU]|!h'9s֑wggbaJrb:V( pΑJ*d4Y֡w9p!IކĆw]ڀϥ۾-2n) +N"}A7DđIlxJƿh:A@;v06 ;5qd]M^ݘ:σWf[տjWO>غ|o5秿;Ng>ŴX䗩 \ No newline at end of file === removed directory 'vim/bundle/neocomplete.vim/.git/objects/4b' === removed file 'vim/bundle/neocomplete.vim/.git/objects/4b/68fd520413db31b4225d22688475330233d18b' Binary files vim/bundle/neocomplete.vim/.git/objects/4b/68fd520413db31b4225d22688475330233d18b 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/4b/68fd520413db31b4225d22688475330233d18b 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/neocomplete.vim/.git/objects/4b/80e9f1bfa1be349f95d84b8dc14718d3912cc6' Binary files vim/bundle/neocomplete.vim/.git/objects/4b/80e9f1bfa1be349f95d84b8dc14718d3912cc6 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/4b/80e9f1bfa1be349f95d84b8dc14718d3912cc6 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neocomplete.vim/.git/objects/4c' === removed file 'vim/bundle/neocomplete.vim/.git/objects/4c/1eab36b4465fdbf9c30002813161e3673e68f5' Binary files vim/bundle/neocomplete.vim/.git/objects/4c/1eab36b4465fdbf9c30002813161e3673e68f5 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/4c/1eab36b4465fdbf9c30002813161e3673e68f5 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/neocomplete.vim/.git/objects/4c/8bcb75812aef346655c41a63eaefef1e080eaf' Binary files vim/bundle/neocomplete.vim/.git/objects/4c/8bcb75812aef346655c41a63eaefef1e080eaf 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/4c/8bcb75812aef346655c41a63eaefef1e080eaf 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neocomplete.vim/.git/objects/4f' === removed file 'vim/bundle/neocomplete.vim/.git/objects/4f/5412308ff4a2ad383416e4057d139a0497f5a9' Binary files vim/bundle/neocomplete.vim/.git/objects/4f/5412308ff4a2ad383416e4057d139a0497f5a9 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/4f/5412308ff4a2ad383416e4057d139a0497f5a9 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neocomplete.vim/.git/objects/53' === removed file 'vim/bundle/neocomplete.vim/.git/objects/53/88e7596802575a4cbe25108660b17062c75772' Binary files vim/bundle/neocomplete.vim/.git/objects/53/88e7596802575a4cbe25108660b17062c75772 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/53/88e7596802575a4cbe25108660b17062c75772 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/neocomplete.vim/.git/objects/5b/4516e8341c1e7b3e34293400c3e8a582cb8dc8' Binary files vim/bundle/neocomplete.vim/.git/objects/5b/4516e8341c1e7b3e34293400c3e8a582cb8dc8 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/5b/4516e8341c1e7b3e34293400c3e8a582cb8dc8 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/neocomplete.vim/.git/objects/5b/eb1e3a491f9212ed6fed69f89d663077541064' Binary files vim/bundle/neocomplete.vim/.git/objects/5b/eb1e3a491f9212ed6fed69f89d663077541064 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/5b/eb1e3a491f9212ed6fed69f89d663077541064 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/neocomplete.vim/.git/objects/5c/6a3c4ffff0e6428c29485579a1dadf03038eec' Binary files vim/bundle/neocomplete.vim/.git/objects/5c/6a3c4ffff0e6428c29485579a1dadf03038eec 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/5c/6a3c4ffff0e6428c29485579a1dadf03038eec 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/neocomplete.vim/.git/objects/5c/a38042b9b6a93719d864cb9db5c986502ef98d' Binary files vim/bundle/neocomplete.vim/.git/objects/5c/a38042b9b6a93719d864cb9db5c986502ef98d 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/5c/a38042b9b6a93719d864cb9db5c986502ef98d 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neocomplete.vim/.git/objects/5d' === added file 'vim/bundle/neocomplete.vim/.git/objects/5d/26667ab2ecfb68972b50ed2cde6fd8b7a563ce' Binary files vim/bundle/neocomplete.vim/.git/objects/5d/26667ab2ecfb68972b50ed2cde6fd8b7a563ce 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/5d/26667ab2ecfb68972b50ed2cde6fd8b7a563ce 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neocomplete.vim/.git/objects/63' === removed file 'vim/bundle/neocomplete.vim/.git/objects/63/5d363c5d5aec25b8b4eb3e482651cb0578e419' Binary files vim/bundle/neocomplete.vim/.git/objects/63/5d363c5d5aec25b8b4eb3e482651cb0578e419 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/63/5d363c5d5aec25b8b4eb3e482651cb0578e419 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neocomplete.vim/.git/objects/65' === added file 'vim/bundle/neocomplete.vim/.git/objects/65/714e931de8f4fd967d77d5a4bbd0c509e0f763' Binary files vim/bundle/neocomplete.vim/.git/objects/65/714e931de8f4fd967d77d5a4bbd0c509e0f763 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/65/714e931de8f4fd967d77d5a4bbd0c509e0f763 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/neocomplete.vim/.git/objects/65/cace0760171b9dea5722f803920ae74bb50da8' Binary files vim/bundle/neocomplete.vim/.git/objects/65/cace0760171b9dea5722f803920ae74bb50da8 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/65/cace0760171b9dea5722f803920ae74bb50da8 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neocomplete.vim/.git/objects/6e' === removed file 'vim/bundle/neocomplete.vim/.git/objects/6e/663fc320620da36ba53e2c1daf21c5edda9b3c' Binary files vim/bundle/neocomplete.vim/.git/objects/6e/663fc320620da36ba53e2c1daf21c5edda9b3c 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/6e/663fc320620da36ba53e2c1daf21c5edda9b3c 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neocomplete.vim/.git/objects/73' === added file 'vim/bundle/neocomplete.vim/.git/objects/73/fc2290ddd24b9e6a9009241ebdec2f396c0abf' Binary files vim/bundle/neocomplete.vim/.git/objects/73/fc2290ddd24b9e6a9009241ebdec2f396c0abf 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/73/fc2290ddd24b9e6a9009241ebdec2f396c0abf 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neocomplete.vim/.git/objects/74' === added file 'vim/bundle/neocomplete.vim/.git/objects/74/16d81ac46a0ffe2f027ea0840b189439c88538' Binary files vim/bundle/neocomplete.vim/.git/objects/74/16d81ac46a0ffe2f027ea0840b189439c88538 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/74/16d81ac46a0ffe2f027ea0840b189439c88538 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neocomplete.vim/.git/objects/76' === removed file 'vim/bundle/neocomplete.vim/.git/objects/76/428feea6fb40ea855f36fac1509193624d418d' Binary files vim/bundle/neocomplete.vim/.git/objects/76/428feea6fb40ea855f36fac1509193624d418d 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/76/428feea6fb40ea855f36fac1509193624d418d 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/neocomplete.vim/.git/objects/76/d0344a4b374bb298c36427f02bbbfb8a63a4f6' Binary files vim/bundle/neocomplete.vim/.git/objects/76/d0344a4b374bb298c36427f02bbbfb8a63a4f6 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/76/d0344a4b374bb298c36427f02bbbfb8a63a4f6 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neocomplete.vim/.git/objects/79' === added file 'vim/bundle/neocomplete.vim/.git/objects/79/a5229056df5104be076d7966f6376b83b31de1' Binary files vim/bundle/neocomplete.vim/.git/objects/79/a5229056df5104be076d7966f6376b83b31de1 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/79/a5229056df5104be076d7966f6376b83b31de1 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neocomplete.vim/.git/objects/7b' === removed file 'vim/bundle/neocomplete.vim/.git/objects/7b/8149fa1d68f097d2ce22940f823311742bafd1' Binary files vim/bundle/neocomplete.vim/.git/objects/7b/8149fa1d68f097d2ce22940f823311742bafd1 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/7b/8149fa1d68f097d2ce22940f823311742bafd1 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/neocomplete.vim/.git/objects/7c/391f37a381fbc46ccb302bb5a9664b0e54650d' Binary files vim/bundle/neocomplete.vim/.git/objects/7c/391f37a381fbc46ccb302bb5a9664b0e54650d 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/7c/391f37a381fbc46ccb302bb5a9664b0e54650d 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/neocomplete.vim/.git/objects/7c/42a4d6dfeb5e11fa981360d3daed4d37c73806' Binary files vim/bundle/neocomplete.vim/.git/objects/7c/42a4d6dfeb5e11fa981360d3daed4d37c73806 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/7c/42a4d6dfeb5e11fa981360d3daed4d37c73806 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neocomplete.vim/.git/objects/80' === added file 'vim/bundle/neocomplete.vim/.git/objects/80/85f3ef3962dc3b078526c68df5a27bcb51b913' Binary files vim/bundle/neocomplete.vim/.git/objects/80/85f3ef3962dc3b078526c68df5a27bcb51b913 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/80/85f3ef3962dc3b078526c68df5a27bcb51b913 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neocomplete.vim/.git/objects/81' === added file 'vim/bundle/neocomplete.vim/.git/objects/81/9129e9f5e3a3559acbe1880e6f3f1686498c53' Binary files vim/bundle/neocomplete.vim/.git/objects/81/9129e9f5e3a3559acbe1880e6f3f1686498c53 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/81/9129e9f5e3a3559acbe1880e6f3f1686498c53 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neocomplete.vim/.git/objects/82' === added file 'vim/bundle/neocomplete.vim/.git/objects/82/80fbbb28fa08d997353df48d4bb24005e4a061' Binary files vim/bundle/neocomplete.vim/.git/objects/82/80fbbb28fa08d997353df48d4bb24005e4a061 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/82/80fbbb28fa08d997353df48d4bb24005e4a061 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neocomplete.vim/.git/objects/85' === added file 'vim/bundle/neocomplete.vim/.git/objects/85/a2d1686ab0c4590ff5bfd573a57d2a93ad04aa' Binary files vim/bundle/neocomplete.vim/.git/objects/85/a2d1686ab0c4590ff5bfd573a57d2a93ad04aa 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/85/a2d1686ab0c4590ff5bfd573a57d2a93ad04aa 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neocomplete.vim/.git/objects/87' === added file 'vim/bundle/neocomplete.vim/.git/objects/87/643d1664e17e7e56732e1e543a35dd4f7f8096' Binary files vim/bundle/neocomplete.vim/.git/objects/87/643d1664e17e7e56732e1e543a35dd4f7f8096 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/87/643d1664e17e7e56732e1e543a35dd4f7f8096 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neocomplete.vim/.git/objects/89' === removed file 'vim/bundle/neocomplete.vim/.git/objects/89/f9a38f9bb6a88faa64de4ad0d187bbeaefe93c' Binary files vim/bundle/neocomplete.vim/.git/objects/89/f9a38f9bb6a88faa64de4ad0d187bbeaefe93c 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/89/f9a38f9bb6a88faa64de4ad0d187bbeaefe93c 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neocomplete.vim/.git/objects/8a' === removed file 'vim/bundle/neocomplete.vim/.git/objects/8a/775b76b89233b70c1f7d1f1818dd61e917b833' Binary files vim/bundle/neocomplete.vim/.git/objects/8a/775b76b89233b70c1f7d1f1818dd61e917b833 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/8a/775b76b89233b70c1f7d1f1818dd61e917b833 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/neocomplete.vim/.git/objects/8a/bea4b32b5ca5c2add94fd7bcff7460d7c73db4' Binary files vim/bundle/neocomplete.vim/.git/objects/8a/bea4b32b5ca5c2add94fd7bcff7460d7c73db4 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/8a/bea4b32b5ca5c2add94fd7bcff7460d7c73db4 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neocomplete.vim/.git/objects/8d' === removed file 'vim/bundle/neocomplete.vim/.git/objects/8d/2a574c1708080ef1fac3336c99d2d9e1898fce' --- vim/bundle/neocomplete.vim/.git/objects/8d/2a574c1708080ef1fac3336c99d2d9e1898fce 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/.git/objects/8d/2a574c1708080ef1fac3336c99d2d9e1898fce 1970-01-01 00:00:00 +0000 @@ -1,2 +0,0 @@ -xuJ0])I"w#*xW>Ai"޷ . ,&eI7 -ACH&p+R:6!@aBBk2H1 QcqD#r1A2x[wzGսF%GE\S.16f8սť! -J"vG{T%B|=N3.TF3lWUA,y9,vg]l%< :6ẇvpSOi \ No newline at end of file === added file 'vim/bundle/neocomplete.vim/.git/objects/92/bbce33bcb88cdbec6f72036ef4c19dbf43fdb8' Binary files vim/bundle/neocomplete.vim/.git/objects/92/bbce33bcb88cdbec6f72036ef4c19dbf43fdb8 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/92/bbce33bcb88cdbec6f72036ef4c19dbf43fdb8 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neocomplete.vim/.git/objects/93' === added file 'vim/bundle/neocomplete.vim/.git/objects/93/8c5aaf93bf9ddfe72910290f01e6b36523a9d2' Binary files vim/bundle/neocomplete.vim/.git/objects/93/8c5aaf93bf9ddfe72910290f01e6b36523a9d2 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/93/8c5aaf93bf9ddfe72910290f01e6b36523a9d2 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neocomplete.vim/.git/objects/96' === removed file 'vim/bundle/neocomplete.vim/.git/objects/96/70160cacf65a7132e64f406dc33da7926172c0' --- vim/bundle/neocomplete.vim/.git/objects/96/70160cacf65a7132e64f406dc33da7926172c0 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/.git/objects/96/70160cacf65a7132e64f406dc33da7926172c0 1970-01-01 00:00:00 +0000 @@ -1,7 +0,0 @@ -xKK0]W\[ǢAQ ->vBI6LҔn2_W%'Rprz|$<$k - -U&夫ח' -\ҐIeq9s."Jwa;WTjƑg jJ0ϗ5 -Zh5$0sX:󀞐sp_)pC0 ]!jlrїYR -87j%ݮ.ek\I "V@NCdZ$&GK8ᇇ_#)Zr]yY!3 \ No newline at end of file === removed directory 'vim/bundle/neocomplete.vim/.git/objects/9b' === removed file 'vim/bundle/neocomplete.vim/.git/objects/9b/cbe23a54896492172e8853ab40035314382294' Binary files vim/bundle/neocomplete.vim/.git/objects/9b/cbe23a54896492172e8853ab40035314382294 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/9b/cbe23a54896492172e8853ab40035314382294 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neocomplete.vim/.git/objects/9c' === added file 'vim/bundle/neocomplete.vim/.git/objects/9c/e2c2c28601588075de9cab4f93886d21146352' Binary files vim/bundle/neocomplete.vim/.git/objects/9c/e2c2c28601588075de9cab4f93886d21146352 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/9c/e2c2c28601588075de9cab4f93886d21146352 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/neocomplete.vim/.git/objects/9d/02b2eac5645aa0e78a1ec7023a784a5b080b5a' Binary files vim/bundle/neocomplete.vim/.git/objects/9d/02b2eac5645aa0e78a1ec7023a784a5b080b5a 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/9d/02b2eac5645aa0e78a1ec7023a784a5b080b5a 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/neocomplete.vim/.git/objects/9d/6011e56f175f46a1d0849becba444a2475c675' Binary files vim/bundle/neocomplete.vim/.git/objects/9d/6011e56f175f46a1d0849becba444a2475c675 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/9d/6011e56f175f46a1d0849becba444a2475c675 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neocomplete.vim/.git/objects/a2' === added file 'vim/bundle/neocomplete.vim/.git/objects/a2/9cc8d8b155351853eece4a31e81c0ce2049038' Binary files vim/bundle/neocomplete.vim/.git/objects/a2/9cc8d8b155351853eece4a31e81c0ce2049038 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/a2/9cc8d8b155351853eece4a31e81c0ce2049038 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neocomplete.vim/.git/objects/a5' === added file 'vim/bundle/neocomplete.vim/.git/objects/a5/9504b9c98ddce452e1d4bcbab021c1cdafa4be' Binary files vim/bundle/neocomplete.vim/.git/objects/a5/9504b9c98ddce452e1d4bcbab021c1cdafa4be 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/a5/9504b9c98ddce452e1d4bcbab021c1cdafa4be 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neocomplete.vim/.git/objects/a7' === added file 'vim/bundle/neocomplete.vim/.git/objects/a7/2a57b3283b78f9f0fde0a26b9da67ca92a2eed' Binary files vim/bundle/neocomplete.vim/.git/objects/a7/2a57b3283b78f9f0fde0a26b9da67ca92a2eed 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/a7/2a57b3283b78f9f0fde0a26b9da67ca92a2eed 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neocomplete.vim/.git/objects/aa' === added file 'vim/bundle/neocomplete.vim/.git/objects/aa/7591ffbbc2b7d8028ffbd7f1f75360733809dc' Binary files vim/bundle/neocomplete.vim/.git/objects/aa/7591ffbbc2b7d8028ffbd7f1f75360733809dc 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/aa/7591ffbbc2b7d8028ffbd7f1f75360733809dc 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/neocomplete.vim/.git/objects/aa/f20a436d0be33da42bca6dd85e68c9f3da892a' Binary files vim/bundle/neocomplete.vim/.git/objects/aa/f20a436d0be33da42bca6dd85e68c9f3da892a 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/aa/f20a436d0be33da42bca6dd85e68c9f3da892a 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neocomplete.vim/.git/objects/ae' === removed file 'vim/bundle/neocomplete.vim/.git/objects/ae/19f5bad87c9b04427f12fc149c00ff57618745' Binary files vim/bundle/neocomplete.vim/.git/objects/ae/19f5bad87c9b04427f12fc149c00ff57618745 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/ae/19f5bad87c9b04427f12fc149c00ff57618745 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neocomplete.vim/.git/objects/b1' === added file 'vim/bundle/neocomplete.vim/.git/objects/b1/0ad6f87cfbeeffba92b0b315c43874a8d02267' Binary files vim/bundle/neocomplete.vim/.git/objects/b1/0ad6f87cfbeeffba92b0b315c43874a8d02267 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/b1/0ad6f87cfbeeffba92b0b315c43874a8d02267 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neocomplete.vim/.git/objects/b5' === removed file 'vim/bundle/neocomplete.vim/.git/objects/b5/3cbde9904065e90a7a64ff978ea300dcb40e34' Binary files vim/bundle/neocomplete.vim/.git/objects/b5/3cbde9904065e90a7a64ff978ea300dcb40e34 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/b5/3cbde9904065e90a7a64ff978ea300dcb40e34 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/neocomplete.vim/.git/objects/b7/c11adcb4909ca1df9a6b306501ffc0bc924870' Binary files vim/bundle/neocomplete.vim/.git/objects/b7/c11adcb4909ca1df9a6b306501ffc0bc924870 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/b7/c11adcb4909ca1df9a6b306501ffc0bc924870 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/neocomplete.vim/.git/objects/b7/df649fd5cd3afe666ce5da001277682f82b58d' Binary files vim/bundle/neocomplete.vim/.git/objects/b7/df649fd5cd3afe666ce5da001277682f82b58d 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/b7/df649fd5cd3afe666ce5da001277682f82b58d 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neocomplete.vim/.git/objects/bf' === added file 'vim/bundle/neocomplete.vim/.git/objects/bf/6fedd708a3ba96f6fa1a3c889e8c9c81cf3e7b' Binary files vim/bundle/neocomplete.vim/.git/objects/bf/6fedd708a3ba96f6fa1a3c889e8c9c81cf3e7b 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/bf/6fedd708a3ba96f6fa1a3c889e8c9c81cf3e7b 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neocomplete.vim/.git/objects/c4' === removed file 'vim/bundle/neocomplete.vim/.git/objects/c4/c5645256e990bb7bd67ced82111cd2063c3754' Binary files vim/bundle/neocomplete.vim/.git/objects/c4/c5645256e990bb7bd67ced82111cd2063c3754 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/c4/c5645256e990bb7bd67ced82111cd2063c3754 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neocomplete.vim/.git/objects/c5' === added file 'vim/bundle/neocomplete.vim/.git/objects/c5/9af1b2e500dc95c725bfff2b88bae1e9d99724' --- vim/bundle/neocomplete.vim/.git/objects/c5/9af1b2e500dc95c725bfff2b88bae1e9d99724 1970-01-01 00:00:00 +0000 +++ vim/bundle/neocomplete.vim/.git/objects/c5/9af1b2e500dc95c725bfff2b88bae1e9d99724 2015-08-25 11:01:00 +0000 @@ -0,0 +1,19 @@ +xZmsVF%xؤff3!JŽ}s_+!;N̺M{=929?Zkߡ.o gq&hwх&dGmڋhsMB`J@Ko$"{0b!(ZbעEiD^xO['SZhmy}$Zw^,eI^D UZFF+? 5ҵTj֔. ZH)I ¢E[EiL$i²˘tj)VxVH!F)6V)ЯqBS,55؀_9!nF<,;gOѫ޸O ]G?NTM֢8ՔbNo_i'hLAoÓ'zєpwhc5AE|rSz/Bn:}z=썧ޘ.ƗIp0|5Yp +d xC&gsy +X9৳)O :pF:9 .ZtڻirY_>©=2p:Gxx=[&WaecrȻ}E h2a! +:A&ʗf1Ǐ_95"x]l#3:Hq7 +ςr#PbﷱCϞqEE,Ky +X[~IW\e rkG`,%JQ]=F⨞g. }At"[$ӁUY|%udFf׃:@4#zxq|Zc}¹o15:pg%P0> dOﴴSfqeIId!ƅ?W bXJy8BV;!9 u5w++s;027%* +#"2ݍ< ?w.wJ)崴 ?*e$.(d- +dLs<ԋSb_"^ƲktX]cGrEW+Қ9bjF.,o2?)jE_f-V3NWYA)VCwgyfU(Bx1߭- +*R=e 댲LFO#V7Kb QDU3\g?/Ą P7ڪxM;Ueƨ@΍3ɷ c*_T9@nuž!(oR\TNw&[IҰ.X"b*gQHذ((T=G8Ad`zZsB>uw;kF&%;f\҉ݢV!ǹZ9$g1BΗ5I \,yjuPifmFARʘ=vtQyeB +z)nlUjX?8az9:MhA)B.?r˻N/!\oqʗi'σ&6ebp}gSeg4ht%b~P֋a +5njπު{ukgi¦e3a#6?Sudx%l뛬 :b0Q]ė uxCdD<YB`uɸPVTdٴP \ĝV&EYi+#ITڃ_h9TB2[ ,]̝u\PAYn){9L ^ҨDӵe_NU|_Ǔr9l#+QXŘ"XͶ>u2X'E1 lkI^7$4L?Lyf'0w0gtVx=/FwV|<Ηt4^vOGQyޝNftqY'z|{/,c+W?ѨY2;wh\v'JҺuhnH]V}~SqN;z.cfG,N}A>ɖ l;CF̳Svgi6'q'Ш7ŵ&Y?̤!DM؍ֻon[<[Q_SΦ6g|0(}`.WimɆ^#8UwȎg!S$Vx46?4][eQ_<{=mkl8j;;[xireya~dcu}wfg)xHGckpTHVޯ;[nj/Od]>W_~~z/Ƌg/f/'+^lX/w篞mogl)/^e϶j{iᶷvк?6~~ Ξ2Fjcgo{W/wX~3m=zױ_} _d?o<{fSnf';̷m|~~~_ -7~|ӽ lcJdOZNXӰ_޲s~B0|bo{/wnnd;ۻӝL!K0|/|$_'E3kP3^؏q￷ZZؽR -nN!Vk{8fFw\%\ptEC0l0`Z#ZOq5_9s'* 5;w=s_,=ȻQkNjD==κ? 8-/W]TvZauiד:m8^-osuh\ggκ,'TCsiz^lSUuz$OAuzˉ΄ɇ0ʎk էϫVOk.k#v&fJtgJH kB;[Yz D,@N|0;;6q2`FTYzvΎq'(LMP2I®7LGgߐyw\FNZ`4E-@w9f^ϖ&- ne)*V2#`g9c^P#`< aLȥMcQ5IB;uH[: 6흲{]]}49Gqw6vZ_7uʮ6V;eۻLJ?sY< fbuQhRy8\̳| =7^f2Ⱦ<|,VKPN:AOzhyv!_3SP?l%]}K&Y𗈑lѣȣ:r/ٯdD+%J8h-+h1p 3c)N^vkA(F'ZWX"t,2y2p_菢jo^O+?}`0hb` -h?޻ t>eb"H26$&k#@ 1%F0d8+l5sj[p9||y:IjH)sgka͟8@up!(z=Ԇ'ℛa5 Hiy2Y$*e91QH!f/4C`?bә#g\Yרz@q'9./ h!TPrZzA; 0g|P~ґ9wq+{@>C@2*f73 Ѱh?eznZ< t1 -غ9@p."IQ-.˳uø%^GβktKAn'L dW/Q<-WR3ё@%D\{\g\v]σLOg+g} 8v60.OkҜsT\a.qti`e]pPCfgN)d(c%BTY0g1'{7fNh-[r-[爱Tu2 %Դ>$edL|ЕR$+}YW\()~Vm}ٝPL4f@8J[-Z79'r  t'x4 cxzfm`pWdd4*z_ƾI+yp"k3.~ FNceC̃ 3Q'(KOӶRl!_!7\&yN+ׅT&%vQp;&A;ZEg4~tWBc=Z`e8͛08e6m0ž_^"g}we)i_>QiH:CVRQ5MԸg[ŗ-RIlˊ7^:Me; gmHR A['gQN iCrhىwu7.6h.jhz,Z/4st Qck -kmA0= ׭Gu=`m2Otcs˘JQ۝g+vY%5?}xJc92R}7G̗vV OQ1%R]zbmr1Oxnf_4oKZUwot<7Qd=ޭ0WVmcvd?Dئ#Os"L@q@'T'9JgL?I}-hqXSԒ8ms&Hgk^f$[7\vs#h*f,LOWEq`-g)zڗIE-Rl6Hb.wāRt4| ifkqTi6?ڨ~7'jMp2n>} -QkdoNɤQjc벻V!&FpE'w44w܉f7qJSJ33oԴ'&R$󗮠𒶅#.M="?ݗw6 WyEjlQ?Z9.M!"yv:a8>Ltvz4`V,dGF"~0*h){[tY|K[V~XG:_%sIYjI5i[??CNpL&XDSHyp0/<0X#) 7481l8mI\=زtByX|Pkp}4}[|Jb -Q7s@. ;1zsסq]Sb6;]NJ_x@UKRz[ٕ: +K3dЭЮ9A5W*C^928 ! @Հ_߉p}{sF'Sþs)U$d%ip9"7ΰڂEm+,/TS&J"s|ж#CWe ŕw},[Ѷ6;kW bj| n F# D(Ju,~\}5.f8#ƫtFOl>"Ul֬,]: "PĸZ`9`^GeŪ+>D@{͐)`?C- -\uA!u+Ikj~'^NT>ݹa=k~lgTzF?vm33h2:CMx5p1[Jm:a drj7˼Zq9H56b1 THCh,FES밐qӜ lAUf*:w/ {v!t6Q5LرGOçĭǀeioObhyS_/U4&1]| 6E_A3#$}i7ϟGDQ`Ad4L>M=3b1OL`ۛ_Ck2(!≙(32Ά;è(MHUotSVӡt$_wlE#f6ڭI(8Iڷ~ O!%`%[˖e[Ƥ"lfJ;N:%[4Ζ( 6Yo6 AI&0cr+'m ;8 d>C%Xq UcC"Lm $5J(mx9Zz!,CqZ|-t=J4nKqC"ŃkUYYaX [Ͱ,d;̹a\bݫ'8Yf{2 >й2;´jLל&x 9[ H).ɭhBi>F[%]J, {[?|3h&&#ƭ4o' o@ʻ\NpY[b+GS+?ɩ7r -"\9Of.]ϜtPƏJdrM?7y,?1czBVak+Rě`]%=,m|ϕ8~Rد/SYd(N'֟r%$LT=g̵zC??*Nva~{t賴q_ :jY6dOßu8( S,e9w Yx)T_0B VfPSZGċ6 6E~ HyQ^ޕf,5YBw0 s1B.<څ(kg<#&=+ϖG'?}u R:Jb<~^ MJʫtY}3u!78$[N bwɸT+sElI˟ -ABЋKR\| 4gJCH@A3+TaI##V^,XS\n`Cn4gʙ9"֐njk;J;~Dtj̫SM~򚥥Õ {25QE hsbej $V, -M>F|NNLÚՕ_@yb+<˪ dB*JEI!E8@sG9E1@l,`^Qv&Pn$Z2ռinok oT(滘}f[rY:s]]ykje^ǂGY] tO¤vzp?ؘtg8)_p!A}X#cػ1,xA`$#y?>]0e[Z-خaI=a -G\%M jl lƆ魬MC.79En fmuvV -j3~,46ٖfP4@w5LYu;߂eT9+1h|L-\,0<fb[ -p4YƢ0i^{Lhj\7kst/q|>4jZ6XNTɸQL䴗h%L]HF`nsv0@ N -6נ!\e0X<$?λL jftZC[% zwIgJ4l{VXS#p\5j|5y?G9FXؐD}?hԼ L8@CVRwB /5w4eA1Ja6­tя!^08_b(jm$oha_O4L7Z4_|OL՗~rȕ\^e"9; ~q `jǓf::1lmX\T^6-)B0\(7:cdoj*) -̒*Is;.Hpd@nd1uZO -F.Beh "F,Cۯk> `zgIεL9mR.ɖ">2qN4fx'cr͈O[&9V{9_7O`!d&@%!mEզg,\WFDK (ZZkӯHK, M&sOTx%[/5_ -#T -#8˓x7]qC& 15Wj\2>p) 5 0Q>1$|1;(Oh2k!Et|.@v i+mѵ]QT]h:Dq^A#AsJTS= f;& !7]W9DBZ/Y!z%(2tc!NG(ʮ{+x^/$4w*۵ ? NZh|uqb-WٛdpL, d$b2=ý8@]ЫHB6RïY颁΃s;ѯd0N`e'EO8%>._.SxĠ4bImsvpfNG oݿCM\uIެ֣Lٿb{)S BllmCgr!boa-2cC+:XZmMƺ?#R+0":f|3V= |,kӜ묐D~y.@"^FK/6CFJlv{blɏ#3d5C L95 ޶;WXw,5/W5z _P=j,(jHM*SS\b8So4"!rUF\ZW~iMW#ҋdh)k^fEסH urfF?Ƣw*zD9]!S/3 6]zVmX˰I%ٓe0{M5U1@ |}, -~_>^|08]T05y9DuS eOm폩 o,"چХ -wĆiJR#ZNS@h,'o1G93]P&Ur,K}:܅gѲ< -?c' 0?OQ?*(+HPƤh|E%Sz>-*i)vX -, -'`=Z(Ln5ߩ 6k$IRf]41;aWS>/Cr -OYeQ~dVv UTϖ+nD\1 WY|i<,(_77Z9c[Jsg`_yǖrq}a\a羠0Kc߽A*d%.:VdC4"!nV ͥn-5oi_$I VB;COTh:bsqPGОOINn嬹W\%=W% \iJ_̻id@n5DI]>_rџRvkĈ7NO}P-}BuML&S͝MsZ֧\s?p. Jt=Āv#'ǰnlp+׈E\)1cױ]o%'Ic~MCZv&OM,򳦭>nqQ0C3A#aIVU hP0!}p+sKjUf -ĵP=]dg糳sh?8C%g&Ⱦ v^hC*eP7sT۶dRmC&yټψcs)ȏXCM -s -/g:ZO[-+1Ӓ5sR$I$#KâͻNߴqwh[9%D|[z"Nɱ,6|Im]0m`j=j]Rz^HzbPCޟc4.6soP=^\lL 'o%nIYfkD12 ҆vMu/7™Ը)f3 eo7r-8KWW}_uUdOؗixBbY^iz2,C`4b,>/9/2V}6j޻F+AO.7SjsH&(LjR>J6$Fy^Ql[f,4~'.zA{U\@z 8a$CP%CٽcReGn О PLffLh9G:ٳ߉0>UAX*ɶlB;JM.}k~6{v|qK%*#[)EWuR\a|x^d)I8,^~[ Q4QFfa~eI,|TF$mP_=_ˇF'zx`I::!p'[NhwzݎTY:lkBy4 - R y;5,Z6ݹ#Iݰ: O 8f>*'׷U 1?Vgo>Ft'vkkkGT'k>ZUo 8ibm~d G -/%4.j5l["h|1 ÷5GFcPM^x|2m!jFxUя{H!B@~p%%1׻[;YH: z׹l߄`qqG4IÝMV!NP]ЧU>p~9jaA>a!=^_<9U9E`ZE.MϦTv4Q (:fZbv&\C6$DdXR>4.TS¼~NPfKGZE,'klk X @B׃ @Q2/О,]d3s)Z81_`5~ -.s4.T/VHz"۟EUWLI- 2`{;VłEDڲ9[[Zp,QY S۞');Lb\̏h>~+Jb4C\H/Sh qd#)5PjL!k^@ZzRR5w!i9d^ h -eڤ\< @db4[uTdG " +MzT*@7ƣb\V{U)ӪkZ)v:RdUZfW eqU^:А9j7twp޺?&7.MێXt([|s@17t+t'X@7*YrzbKWkOmh"WF0F/;(~g^/&@͇ߺR`lliQѕR& -O.GZ9X3\rhBJݻ%X8Vys?M4b)pqꤓuˊ'|ӝep7 -nn3T9}to]>q8Y{5.?BAe!*8TsO6=Հ6J,qV>c\7]a[qe= cIDa!Gc^kԶȟe {.QЩQyנsXHC,I}\xs BғN*v+@6K:k TSGv_7~`RmykAݑzRO,) WDI#K-!TmZ,XpAaw%.Kx ,Ԗ%Zݖ?2^R 0tAWFdFfñp\n2| - c:Vuz0]H7S|`nIkŧU,/~Eeyl,%|!s>6w6d^]u|$nl16~! 2XC[]%.='8(<6kȏaBX -(s]EV5`K`Iʍppr7[:wQu_UBGfQA`$ڌrB]`43p肾 jyK~=:'}=!kEwttdPOO%.sN٥oUtHOqwNglcoog{X4!h6V8R -. Lky''181!ˈ>Nfc_q1{[9oǃտ5j ߵ|T -5f9Rz+VB_#݁*D'X`RbY!W!]S '5 :8]yc -YwVhDtscC1u6" noŶ\unyD``2e-x%S֬uڜLƘ`e)Ғ%r d^x1ex0RWءD.-`iOoD ߺKgTOz - S} مQ.Kd9ŸرʊK9b*wn Ue'R$s?Ʃ'jѲ].) ~OSߩ%,*dhju7`p¬spp?& SujCާdXDSM5>*NW/ӨIʁU5h+.s 8ivqG\[7lӥ2&؈ z8rKКCm)U럸/U__g٠b.Qmω*fj 6% 3Y hHz+x&ߑp -VWU;R,b3eEx5rMXWO֒PZ>I8fU6jHr~\$պTW=ފJV;%? BM?f,$^uܖ0]bxk)&Mz̎ʊ HU6p:*4XU7rgm5TDzi+HK}Ƒ\ȆV_q5Wo%>} 4n}th"7_6#P}IV6Aׄ?Pߏ*f^+(t=hQ0 ./{:UIg|ʬEnFi(KF6h2Ѯ!(4‡<-z,G+ȏdz#$0bp@tj4z)d | aUU'#%A1|mg{>@g%$!K|Mk#/ŰWj:g6̹ 9*Ez$4:6|SbF*r5aNPbIv0s6t^OT']-<zm%(qG φg/N.O?3%ۇ88WoVϺGlVUhԕoէN*A ǎa4 gܽ3 +l0El0 (U>&nTpȄ7Xu̝d T~(q  dqbZ~]4T+2J9KMߤ $1o9qQ%TpN&AnsՓfaG.쑏l1 ;h\}GՓve+?oV)kL#yv^l<׫V>FNEAp [+ ;|+&R}~F -}䮓4t2mVyA}͓ L~I[-.]%ދ*J)>5VpH=>tBVr'sҺL7痊?CyZub3c"bC;og]RݰzR{b"f[oX -BFUK`_RJ|Hy(wDG}Jd*S`<RɧKR4+uLIK. -e~\Hrد(+G`hv>U -/h2_:;q+/̮vxۈ")]nYa۰-% "Ql !(N*9,K4OM8]-0z ^T.!H5];a*dO(56isMLPU'HrԊ$4'>Q97m·g%U%٧M y,^]V( , 6O-i*%bR惌 ' J+nGk~jS8^][+F -Ljȅ$b*'n픆~{2` -F`Cr:"\*B{a4iY|X3;RetcʱL`ߤ}E)~Y'a39˃Yn/ioM}{8zdP5HW2l.ΆәN[zH?]vz1^"KPNf<0YJ2aR8 -jʅ_˿`C[DMIYꙟݐָ017꩛!Xت7E03Y&ѱԦ(BUt'C? 2뚂| - +Tؓ3^$vI-رbmpxS1 ZjSU^3w -m<ՍW'''~ _ 4\ϖ4<ҝJ/o4M_ 5|N}˸D?xp6(1&uۘi%QlY;F<E+4PkX+vi4 l`G9 -mc13$;H [&4F]ZN筴 -)69Эր:,Vb⋼Ӡ/?e% ዻ/fQ/O䟱~!5obUq,f; 3umg)x㹥Y.WAX#pN_V,2ۈ/9j]-.h^>b\꒮;*!)"d(^WROg2D2O(#qr7 Nj?WشfFyx7F ϔ?Lxaɠy+Oo/ҙ#N*2[1c rP^>c{o6X1lA@~߱ceނPL6hC _IS{wvJ.>+(9+l0{;c0 M>2.Iʐp@:z`vG;0HUJh!Wpq -0|)5 y#LN0# -;){V.{^b]%Ii' -W ɱv1*PWZV}*bj}:Bzс/pө/رS2~J@_(yhGӮBkd%#hWj+bXmnmOWf4P5=A6Dr:P(֮/s2Or2Q׌jįM rZ9s嵀9(;)Lg?kE/>&Vܜl>U|DH@& H[HCZH -3.7ALqMN3VT lK3}<z -06%6Gcʆ@/wAEq)̹-ʾˍ3 /B=|z+}iT?;ǹJ:5!̌qLDz[?aUϗx_>8s]\Ǫ8t-o'U#ԎUho 'l"**V,"򪼠0{=fu -VuL''(7El68]H};8VS6sI^+vh_˔y^(D8C`a(3[mv<11H]LZm%~㊧%g?S$r8۫.ꠙV "DP#"v]Y(v`vPKX#ma2j!D)~aTY٠b SMoyヨ1zKH+t4qǪD 7 jP\)o@=pu?zDrTUT8O"LM:&c˷wPnv\!/vjUPԗx^Zzkw/H=anU -^μOez;Kۧ_,Ip㒏lV~rNonێ?Uqw$—VyO6Gr՗_8L^h$eO7D[tW&/&'jmމôTi$ibCE"~ci~Ť -OMgUNJp~"赾~[=JFp]A L.M9Qx<"VzvoꝮQgk_*N'*KMBqS',Lr2B]ChX;9 諯1rW -Q_uDwBE] ?k x]J \Է|P2CaSoT?-aʿܶ%n,{G-SA=Mˑ]@x؈` KlK`v_^29瓓$xhYWI_!Z]ڰ0F%YzviTFgu'EI'+-ȝzw݀ -6m6k*$*ۯn]GC5k-% n[[D)2)kYa]1]Bnз6;:n9Ccؒ5JE(0jTyE 1ρr_+)סi zK v`cZA!Y{ 2Nњf5CEw̛5 ᮪HĴhsU]Hy1 Go'0*QtŔu~X3yLpdAR:aZfGV͠2p5RSґ.#p5'{40^LA;$˜iN!VcpՆ~$]1YpҍQM>t"#IX[I:'2HEKt ^:<\psYhvkT ;0su5&Eu<_t۞x̿fKU˸]Peڅڄ.x8U9qW.y/ZA -u@DW -+^8vc}rч oZ'aN5iO+i%Q\̖dGLCZPHJ1 ఼!Pggw+9挤ocJ7,a2h.ydqBVUWv3jceBN[CTĮBȡK,´`r5x9+ʱװjaa28U/UT L O֬B5+o<dx0z3T-|/&(/NHyܶN֢qp>p l=l0ܗ [<QZ"yH7|ǭȌ§*9! }O/֏:(<_t8- \ No newline at end of file === removed file 'vim/bundle/neocomplete.vim/.git/objects/cc/3f0235f0e9c4491dc9c05644467520adc9c937' Binary files vim/bundle/neocomplete.vim/.git/objects/cc/3f0235f0e9c4491dc9c05644467520adc9c937 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/cc/3f0235f0e9c4491dc9c05644467520adc9c937 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/neocomplete.vim/.git/objects/cc/87033ea18d835f733856bba8f5f5f3383efa89' Binary files vim/bundle/neocomplete.vim/.git/objects/cc/87033ea18d835f733856bba8f5f5f3383efa89 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/cc/87033ea18d835f733856bba8f5f5f3383efa89 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/neocomplete.vim/.git/objects/cc/a8cd57467e8cc7237194db1d164784231c6e13' Binary files vim/bundle/neocomplete.vim/.git/objects/cc/a8cd57467e8cc7237194db1d164784231c6e13 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/cc/a8cd57467e8cc7237194db1d164784231c6e13 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neocomplete.vim/.git/objects/d4' === removed file 'vim/bundle/neocomplete.vim/.git/objects/d4/63eb7c38bbda507ef4def081bc9223e2b8319d' Binary files vim/bundle/neocomplete.vim/.git/objects/d4/63eb7c38bbda507ef4def081bc9223e2b8319d 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/d4/63eb7c38bbda507ef4def081bc9223e2b8319d 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neocomplete.vim/.git/objects/d6' === removed file 'vim/bundle/neocomplete.vim/.git/objects/d6/35ed06fb773e12af2c99b49b80b7ac9974b5cd' Binary files vim/bundle/neocomplete.vim/.git/objects/d6/35ed06fb773e12af2c99b49b80b7ac9974b5cd 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/d6/35ed06fb773e12af2c99b49b80b7ac9974b5cd 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/neocomplete.vim/.git/objects/d6/8520649bd0c6af56957af9e78fa066df559aad' Binary files vim/bundle/neocomplete.vim/.git/objects/d6/8520649bd0c6af56957af9e78fa066df559aad 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/d6/8520649bd0c6af56957af9e78fa066df559aad 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neocomplete.vim/.git/objects/d8' === removed file 'vim/bundle/neocomplete.vim/.git/objects/d8/1d6fe952fe447b6ad4dc6e04b5470a6e498c6a' Binary files vim/bundle/neocomplete.vim/.git/objects/d8/1d6fe952fe447b6ad4dc6e04b5470a6e498c6a 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/d8/1d6fe952fe447b6ad4dc6e04b5470a6e498c6a 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neocomplete.vim/.git/objects/dc' === added file 'vim/bundle/neocomplete.vim/.git/objects/dc/8b0417ef9a977f789c887541b592ff76911ecf' Binary files vim/bundle/neocomplete.vim/.git/objects/dc/8b0417ef9a977f789c887541b592ff76911ecf 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/dc/8b0417ef9a977f789c887541b592ff76911ecf 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/neocomplete.vim/.git/objects/dd/15fcc2ed45fc2432965a70f4a979b2305fea99' Binary files vim/bundle/neocomplete.vim/.git/objects/dd/15fcc2ed45fc2432965a70f4a979b2305fea99 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/dd/15fcc2ed45fc2432965a70f4a979b2305fea99 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/neocomplete.vim/.git/objects/dd/816cd2cfbafce5a4950362d4420536d29c3f43' Binary files vim/bundle/neocomplete.vim/.git/objects/dd/816cd2cfbafce5a4950362d4420536d29c3f43 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/dd/816cd2cfbafce5a4950362d4420536d29c3f43 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/neocomplete.vim/.git/objects/de/aa7fc3dcd23fcf3ddb7fef51ec8e6add55a762' Binary files vim/bundle/neocomplete.vim/.git/objects/de/aa7fc3dcd23fcf3ddb7fef51ec8e6add55a762 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/de/aa7fc3dcd23fcf3ddb7fef51ec8e6add55a762 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/neocomplete.vim/.git/objects/de/b1e0fbf326ce45216a8c72f8ccc327e5e112ca' Binary files vim/bundle/neocomplete.vim/.git/objects/de/b1e0fbf326ce45216a8c72f8ccc327e5e112ca 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/de/b1e0fbf326ce45216a8c72f8ccc327e5e112ca 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/neocomplete.vim/.git/objects/de/f4a8f42fe54ce1a67a4c04b0317097d6f6ee75' Binary files vim/bundle/neocomplete.vim/.git/objects/de/f4a8f42fe54ce1a67a4c04b0317097d6f6ee75 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/de/f4a8f42fe54ce1a67a4c04b0317097d6f6ee75 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neocomplete.vim/.git/objects/df' === removed file 'vim/bundle/neocomplete.vim/.git/objects/df/f16ca58e903c715702ea7e8842dd12ada46baf' Binary files vim/bundle/neocomplete.vim/.git/objects/df/f16ca58e903c715702ea7e8842dd12ada46baf 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/df/f16ca58e903c715702ea7e8842dd12ada46baf 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/neocomplete.vim/.git/objects/e1/3aec39055575b27e5fc0c8d3ee4d08dece791c' Binary files vim/bundle/neocomplete.vim/.git/objects/e1/3aec39055575b27e5fc0c8d3ee4d08dece791c 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/e1/3aec39055575b27e5fc0c8d3ee4d08dece791c 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/neocomplete.vim/.git/objects/e1/89d9764adc0a82b46b8b0c0c4a5e5b7ca5af5b' Binary files vim/bundle/neocomplete.vim/.git/objects/e1/89d9764adc0a82b46b8b0c0c4a5e5b7ca5af5b 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/e1/89d9764adc0a82b46b8b0c0c4a5e5b7ca5af5b 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/neocomplete.vim/.git/objects/e1/efaf95ebb600cc773713a40ef46433ddf94b70' --- vim/bundle/neocomplete.vim/.git/objects/e1/efaf95ebb600cc773713a40ef46433ddf94b70 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/.git/objects/e1/efaf95ebb600cc773713a40ef46433ddf94b70 1970-01-01 00:00:00 +0000 @@ -1,6 +0,0 @@ -xUmkFg -C?Trd$5!ٵl7iPN3dS O?|3`H3cR[Q6oQ48WkrQ -P|L Q}x!zyy}\5Bk![*v*o /=*InrIyL{4ʩgo*i5OH))Z"*ޚXVRӵx2L#,y^hxDO  -F"y*<9բAQbWmtfYBW^fk{YgIE׵pܟp@t*ټm;ՂłRw^3u-`m)G= { F>rgVw=q]r*  =Gm4hb,XJ$̦~G eȏ- M{1qBl YMՔEQQ0b@ d, Yeih~*Ze2xĢY`Dܹ["P(ah7 MC>34HR ҿ aCMB-< ՛P  >&#[Ie ^SIvgij FedeaN]C- -8~D0r`[Wޑc?utK3vU]6\b/hUzYh)Fb1-o#:pPasξ1]c1%ׅ{{eN{$U9G5wlJcO|ܧ -l0Qb-뛣:qףܕqz $,nb[?y\UњsxзoϜ%<^};oL5fllop*o\/-1s \ No newline at end of file === removed directory 'vim/bundle/neocomplete.vim/.git/objects/e2' === removed file 'vim/bundle/neocomplete.vim/.git/objects/e2/d7acb5baf0393218e82fa4584ab17825329d34' Binary files vim/bundle/neocomplete.vim/.git/objects/e2/d7acb5baf0393218e82fa4584ab17825329d34 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/e2/d7acb5baf0393218e82fa4584ab17825329d34 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neocomplete.vim/.git/objects/e3' === removed file 'vim/bundle/neocomplete.vim/.git/objects/e3/7982e0fea66963d8440772e0780b4f727e2e10' Binary files vim/bundle/neocomplete.vim/.git/objects/e3/7982e0fea66963d8440772e0780b4f727e2e10 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/e3/7982e0fea66963d8440772e0780b4f727e2e10 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neocomplete.vim/.git/objects/e5' === added file 'vim/bundle/neocomplete.vim/.git/objects/e5/06d4770902ae31b3d3b6b90afd61f164409e80' Binary files vim/bundle/neocomplete.vim/.git/objects/e5/06d4770902ae31b3d3b6b90afd61f164409e80 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/e5/06d4770902ae31b3d3b6b90afd61f164409e80 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neocomplete.vim/.git/objects/e9' === added file 'vim/bundle/neocomplete.vim/.git/objects/e9/a0c16939f50a0be138526f61038f96328c7056' Binary files vim/bundle/neocomplete.vim/.git/objects/e9/a0c16939f50a0be138526f61038f96328c7056 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/e9/a0c16939f50a0be138526f61038f96328c7056 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neocomplete.vim/.git/objects/ea' === removed file 'vim/bundle/neocomplete.vim/.git/objects/ea/0d78fcf8d77ea7716ca6fbf8c4392c99bab828' --- vim/bundle/neocomplete.vim/.git/objects/ea/0d78fcf8d77ea7716ca6fbf8c4392c99bab828 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/.git/objects/ea/0d78fcf8d77ea7716ca6fbf8c4392c99bab828 1970-01-01 00:00:00 +0000 @@ -1,1 +0,0 @@ -x =}s<{]`c^4im~ v0iK6dh :("iUfW;zAsȬ*Iғ1VéCw3Us<8O9wmBճXjg \ No newline at end of file === added directory 'vim/bundle/neocomplete.vim/.git/objects/eb' === added file 'vim/bundle/neocomplete.vim/.git/objects/eb/22d0d44fac97aae602cbc50a5301bd7bd3ba80' Binary files vim/bundle/neocomplete.vim/.git/objects/eb/22d0d44fac97aae602cbc50a5301bd7bd3ba80 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/eb/22d0d44fac97aae602cbc50a5301bd7bd3ba80 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/neocomplete.vim/.git/objects/eb/51c6134e463529a229b2f2a5f1cdbab76c2740' Binary files vim/bundle/neocomplete.vim/.git/objects/eb/51c6134e463529a229b2f2a5f1cdbab76c2740 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/eb/51c6134e463529a229b2f2a5f1cdbab76c2740 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neocomplete.vim/.git/objects/ec' === removed file 'vim/bundle/neocomplete.vim/.git/objects/ec/5f6fdd61f120e67046009b20e80563a55eb908' Binary files vim/bundle/neocomplete.vim/.git/objects/ec/5f6fdd61f120e67046009b20e80563a55eb908 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/ec/5f6fdd61f120e67046009b20e80563a55eb908 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neocomplete.vim/.git/objects/ef' === removed file 'vim/bundle/neocomplete.vim/.git/objects/ef/3d1307dd9dcc1e10f51d8d2ef7a8a2679e42cb' Binary files vim/bundle/neocomplete.vim/.git/objects/ef/3d1307dd9dcc1e10f51d8d2ef7a8a2679e42cb 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/ef/3d1307dd9dcc1e10f51d8d2ef7a8a2679e42cb 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neocomplete.vim/.git/objects/f0' === added file 'vim/bundle/neocomplete.vim/.git/objects/f0/4699b48bab2c2a2ff317b7331c57237d82e131' Binary files vim/bundle/neocomplete.vim/.git/objects/f0/4699b48bab2c2a2ff317b7331c57237d82e131 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/f0/4699b48bab2c2a2ff317b7331c57237d82e131 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/neocomplete.vim/.git/objects/f1/79f2b3c7939d1f6e42c0c810939abd68207e3e' Binary files vim/bundle/neocomplete.vim/.git/objects/f1/79f2b3c7939d1f6e42c0c810939abd68207e3e 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/f1/79f2b3c7939d1f6e42c0c810939abd68207e3e 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/neocomplete.vim/.git/objects/f1/9f9af5cac378c096aa35d13593b809b6d14d7d' Binary files vim/bundle/neocomplete.vim/.git/objects/f1/9f9af5cac378c096aa35d13593b809b6d14d7d 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/f1/9f9af5cac378c096aa35d13593b809b6d14d7d 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/neocomplete.vim/.git/objects/f6/425631b55a6e6fddb2f11e43b4db8bfc62521e' Binary files vim/bundle/neocomplete.vim/.git/objects/f6/425631b55a6e6fddb2f11e43b4db8bfc62521e 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/f6/425631b55a6e6fddb2f11e43b4db8bfc62521e 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/neocomplete.vim/.git/objects/f6/f7344a24ea6f1ed028e969de2862c04340ff9a' Binary files vim/bundle/neocomplete.vim/.git/objects/f6/f7344a24ea6f1ed028e969de2862c04340ff9a 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/f6/f7344a24ea6f1ed028e969de2862c04340ff9a 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neocomplete.vim/.git/objects/f7' === added file 'vim/bundle/neocomplete.vim/.git/objects/f7/ca90a5a79cca8fe1ba33f0b4e04ecebebc3537' Binary files vim/bundle/neocomplete.vim/.git/objects/f7/ca90a5a79cca8fe1ba33f0b4e04ecebebc3537 1970-01-01 00:00:00 +0000 and vim/bundle/neocomplete.vim/.git/objects/f7/ca90a5a79cca8fe1ba33f0b4e04ecebebc3537 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/neocomplete.vim/.git/objects/ff/e399b6ff31c847c6fdc6ac37c18088119f82d4' Binary files vim/bundle/neocomplete.vim/.git/objects/ff/e399b6ff31c847c6fdc6ac37c18088119f82d4 2016-08-04 08:15:51 +0000 and vim/bundle/neocomplete.vim/.git/objects/ff/e399b6ff31c847c6fdc6ac37c18088119f82d4 1970-01-01 00:00:00 +0000 differ === modified file 'vim/bundle/neocomplete.vim/.git/packed-refs' --- vim/bundle/neocomplete.vim/.git/packed-refs 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/.git/packed-refs 2015-08-25 11:01:00 +0000 @@ -1,2 +1,2 @@ # pack-refs with: peeled fully-peeled -8d2a574c1708080ef1fac3336c99d2d9e1898fce refs/remotes/origin/master +39661033cce39ebd013451b49809e94ade3ba08c refs/remotes/origin/master === modified file 'vim/bundle/neocomplete.vim/.git/refs/heads/master' --- vim/bundle/neocomplete.vim/.git/refs/heads/master 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/.git/refs/heads/master 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -8d2a574c1708080ef1fac3336c99d2d9e1898fce +39661033cce39ebd013451b49809e94ade3ba08c === modified file 'vim/bundle/neocomplete.vim/.git/shallow' --- vim/bundle/neocomplete.vim/.git/shallow 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/.git/shallow 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -8d2a574c1708080ef1fac3336c99d2d9e1898fce +39661033cce39ebd013451b49809e94ade3ba08c === removed directory 'vim/bundle/neocomplete.vim/.github' === removed file 'vim/bundle/neocomplete.vim/.github/ISSUE_TEMPLATE.md' --- vim/bundle/neocomplete.vim/.github/ISSUE_TEMPLATE.md 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/.github/ISSUE_TEMPLATE.md 1970-01-01 00:00:00 +0000 @@ -1,31 +0,0 @@ -# Problems summary - - -## Expected - - -## Environment Information - * OS: - * Vim version: - - -## Provide a minimal .vimrc with less than 50 lines (Required!) - -```vim -" Your minimal .vimrc -set runtimepath+=~/path/to/neocomplete.nvim/ -let g:neocomplete#enable_at_startup = 1 -``` - - -## The reproduce ways from Vim starting (Required!) - - 1. foo - 2. bar - 3. baz - - -## Screen shot (if possible) - - -## Upload the log messages by `:redir` and `:message` === modified file 'vim/bundle/neocomplete.vim/.travis.yml' --- vim/bundle/neocomplete.vim/.travis.yml 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/.travis.yml 2015-08-25 11:01:00 +0000 @@ -1,5 +1,3 @@ -sudo: false - before_script: - git clone https://github.com/syngan/vim-vimlint /tmp/vim-vimlint - git clone https://github.com/ynkdir/vim-vimlparser /tmp/vim-vimlparser === modified file 'vim/bundle/neocomplete.vim/README.md' --- vim/bundle/neocomplete.vim/README.md 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/README.md 2015-08-25 11:01:00 +0000 @@ -1,14 +1,12 @@ neocomplete =========== +[![Stories in Ready](http://badge.waffle.io/Shougo/neocomplete.vim.png)](http://waffle.io/Shougo/neocomplete.vim) neocomplete is the abbreviation of "neo-completion with cache". It provides keyword completion system by maintaining a cache of keywords in the current buffer. neocomplete can be customized easily and has many more features than Vim's built-in completion. -Note: If you use neovim, you should use deoplete instead. -https://github.com/Shougo/deoplete.nvim - ## Installation **Note:** neocomplete requires Vim 7.3.885+ with Lua enabled. @@ -41,8 +39,7 @@ Or, you can install MacVim with homebrew: - brew install macvim --with-cscope --with-lua - brew linkapps macvim + brew install macvim --with-cscope --with-lua --HEAD To install Vim (as opposed to MacVim) with homebrew: @@ -74,7 +71,7 @@ ### Vim for Cygwin: -In a cygwin environment, the Lua interface is supported by default. +In a cygwin environment, Lua interface is supported by default. If you want to make manually, you also need gcc and make. @@ -123,7 +120,7 @@ ## Configuration Examples ```vim -"Note: This option must be set in .vimrc(_vimrc). NOT IN .gvimrc(_gvimrc)! +"Note: This option must set it in .vimrc(_vimrc). NOT IN .gvimrc(_gvimrc)! " Disable AutoComplPop. let g:acp_enableAtStartup = 0 " Use neocomplete. @@ -155,17 +152,29 @@ " : close popup and save indent. inoremap =my_cr_function() function! s:my_cr_function() - return (pumvisible() ? "\" : "" ) . "\" + return neocomplete#close_popup() . "\" " For no inserting key. - "return pumvisible() ? "\" : "\" + "return pumvisible() ? neocomplete#close_popup() : "\" endfunction " : completion. inoremap pumvisible() ? "\" : "\" " , : close popup and delete backword char. inoremap neocomplete#smart_close_popup()."\" inoremap neocomplete#smart_close_popup()."\" +inoremap neocomplete#close_popup() +inoremap neocomplete#cancel_popup() " Close popup by . -"inoremap pumvisible() ? "\" : "\" +"inoremap pumvisible() ? neocomplete#close_popup() : "\" + +" For cursor moving in insert mode(Not recommended) +"inoremap neocomplete#close_popup() . "\" +"inoremap neocomplete#close_popup() . "\" +"inoremap neocomplete#close_popup() . "\" +"inoremap neocomplete#close_popup() . "\" +" Or set this. +"let g:neocomplete#enable_cursor_hold_i = 1 +" Or set this. +"let g:neocomplete#enable_insert_char_pre = 1 " AutoComplPop like behavior. "let g:neocomplete#enable_auto_select = 1 === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete.vim 2015-08-25 11:01:00 +0000 @@ -51,8 +51,12 @@ \ get(g:, 'neocomplete#disable_auto_complete', 0) let g:neocomplete#enable_fuzzy_completion = \ get(g:, 'neocomplete#enable_fuzzy_completion', 1) -let g:neocomplete#auto_complete_delay = - \ get(g:, 'neocomplete#auto_complete_delay', 50) +let g:neocomplete#enable_insert_char_pre = + \ get(g:, 'neocomplete#enable_insert_char_pre', 0) +let g:neocomplete#enable_cursor_hold_i = + \ get(g:, 'neocomplete#enable_cursor_hold_i', 0) +let g:neocomplete#cursor_hold_i_time = + \ get(g:, 'neocomplete#cursor_hold_i_time', 300) let g:neocomplete#enable_auto_select = \ get(g:, 'neocomplete#enable_auto_select', 0) let g:neocomplete#enable_auto_delimiter = @@ -69,14 +73,14 @@ \ get(g:, 'neocomplete#skip_auto_completion_time', '0.3') let g:neocomplete#enable_auto_close_preview = \ get(g:, 'neocomplete#enable_auto_close_preview', 0) -let g:neocomplete#enable_refresh_always = - \ get(g:, 'neocomplete#enable_refresh_always', 0) let g:neocomplete#fallback_mappings = \ get(g:, 'neocomplete#fallback_mappings', []) let g:neocomplete#sources = \ get(g:, 'neocomplete#sources', {}) let g:neocomplete#keyword_patterns = \ get(g:, 'neocomplete#keyword_patterns', {}) +let g:neocomplete#same_filetypes = + \ get(g:, 'neocomplete#same_filetypes', {}) let g:neocomplete#delimiter_patterns = \ get(g:, 'neocomplete#delimiter_patterns', {}) let g:neocomplete#text_mode_filetypes = @@ -85,27 +89,29 @@ \ get(g:, 'neocomplete#tags_filter_patterns', {}) let g:neocomplete#force_omni_input_patterns = \ get(g:, 'neocomplete#force_omni_input_patterns', {}) +let g:neocomplete#ignore_composite_filetypes = + \ get(g:, 'neocomplete#ignore_composite_filetypes', {}) let g:neocomplete#ignore_source_files = \ get(g:, 'neocomplete#ignore_source_files', []) "}}} -function! neocomplete#initialize() abort "{{{ +function! neocomplete#initialize() "{{{ return neocomplete#init#enable() endfunction"}}} -function! neocomplete#get_current_neocomplete() abort "{{{ +function! neocomplete#get_current_neocomplete() "{{{ if !exists('b:neocomplete') call neocomplete#init#_current_neocomplete() endif return b:neocomplete endfunction"}}} -function! neocomplete#get_context() abort "{{{ +function! neocomplete#get_context() "{{{ return neocomplete#get_current_neocomplete().context endfunction"}}} " Source helper. "{{{ -function! neocomplete#define_source(source) abort "{{{ +function! neocomplete#define_source(source) "{{{ let sources = neocomplete#variables#get_sources() for source in neocomplete#util#convert2list(a:source) let source = neocomplete#init#_source(source) @@ -114,38 +120,38 @@ endif endfor endfunction"}}} -function! neocomplete#define_filter(filter) abort "{{{ +function! neocomplete#define_filter(filter) "{{{ let filters = neocomplete#variables#get_filters() for filter in neocomplete#util#convert2list(a:filter) let filters[filter.name] = neocomplete#init#_filter(filter) endfor endfunction"}}} -function! neocomplete#available_sources() abort "{{{ +function! neocomplete#available_sources() "{{{ return copy(neocomplete#variables#get_sources()) endfunction"}}} -function! neocomplete#custom_source(source_name, option_name, value) abort "{{{ +function! neocomplete#custom_source(source_name, option_name, value) "{{{ return neocomplete#custom#source(a:source_name, a:option_name, a:value) endfunction"}}} -function! neocomplete#dup_filter(list) abort "{{{ +function! neocomplete#dup_filter(list) "{{{ return neocomplete#util#dup_filter(a:list) endfunction"}}} -function! neocomplete#system(...) abort "{{{ +function! neocomplete#system(...) "{{{ return call('neocomplete#util#system', a:000) endfunction"}}} -function! neocomplete#has_vimproc() abort "{{{ +function! neocomplete#has_vimproc() "{{{ return neocomplete#util#has_vimproc() endfunction"}}} -function! neocomplete#get_cur_text(...) abort "{{{ +function! neocomplete#get_cur_text(...) "{{{ " Return cached text. let neocomplete = neocomplete#get_current_neocomplete() return (a:0 == 0 && mode() ==# 'i' && \ neocomplete.cur_text != '') ? \ neocomplete.cur_text : neocomplete#helper#get_cur_text() endfunction"}}} -function! neocomplete#get_keyword_pattern(...) abort "{{{ +function! neocomplete#get_keyword_pattern(...) "{{{ let filetype = a:0 != 0? a:1 : neocomplete#get_context_filetype() if a:0 < 2 return neocomplete#helper#unite_patterns( @@ -164,21 +170,21 @@ return source.neocomplete__keyword_patterns[filetype] endfunction"}}} -function! neocomplete#get_keyword_pattern_end(...) abort "{{{ +function! neocomplete#get_keyword_pattern_end(...) "{{{ return '\%('.call('neocomplete#get_keyword_pattern', a:000).'\m\)$' endfunction"}}} -function! neocomplete#match_word(...) abort "{{{ +function! neocomplete#match_word(...) "{{{ return call('neocomplete#helper#match_word', a:000) endfunction"}}} -function! neocomplete#is_enabled() abort "{{{ +function! neocomplete#is_enabled() "{{{ return neocomplete#init#is_enabled() endfunction"}}} -function! neocomplete#is_locked(...) abort "{{{ +function! neocomplete#is_locked(...) "{{{ return neocomplete#is_cache_disabled() || &paste \ || (&t_Co != '' && &t_Co < 8) \ || g:neocomplete#disable_auto_complete endfunction"}}} -function! neocomplete#is_cache_disabled() abort "{{{ +function! neocomplete#is_cache_disabled() "{{{ let ignore_filetypes = ['fuf', 'ku'] let bufnr = a:0 > 0 ? a:1 : bufnr('%') return !neocomplete#is_enabled() @@ -187,59 +193,63 @@ \ || (g:neocomplete#lock_buffer_name_pattern != '' && \ bufname(bufnr) =~ g:neocomplete#lock_buffer_name_pattern) endfunction"}}} -function! neocomplete#is_auto_select() abort "{{{ - return g:neocomplete#enable_auto_select +function! neocomplete#is_auto_select() "{{{ + return g:neocomplete#enable_auto_select && !neocomplete#is_eskk_enabled() endfunction"}}} -function! neocomplete#is_auto_complete() abort "{{{ +function! neocomplete#is_auto_complete() "{{{ let neocomplete = neocomplete#get_current_neocomplete() return neocomplete.is_auto_complete endfunction"}}} -function! neocomplete#is_eskk_enabled() abort "{{{ +function! neocomplete#is_eskk_enabled() "{{{ return exists('*eskk#is_enabled') && eskk#is_enabled() endfunction"}}} -function! neocomplete#is_multibyte_input(cur_text) abort "{{{ +function! neocomplete#is_eskk_convertion(cur_text) "{{{ + return neocomplete#is_eskk_enabled() + \ && eskk#get_preedit().get_henkan_phase() !=# + \ g:eskk#preedit#PHASE_NORMAL +endfunction"}}} +function! neocomplete#is_multibyte_input(cur_text) "{{{ return (exists('b:skk_on') && b:skk_on) \ || (!g:neocomplete#enable_multibyte_completion \ && char2nr(split(a:cur_text, '\zs')[-1]) > 0x80) endfunction"}}} -function! neocomplete#is_text_mode() abort "{{{ +function! neocomplete#is_text_mode() "{{{ let neocomplete = neocomplete#get_current_neocomplete() - let filetypes = g:neocomplete#text_mode_filetypes - return get(filetypes, neocomplete.context_filetype, 0) - \ || get(filetypes, '_', 0) + return get(g:neocomplete#text_mode_filetypes, + \ neocomplete.context_filetype, 0) endfunction"}}} -function! neocomplete#is_windows() abort "{{{ +function! neocomplete#is_windows() "{{{ return neocomplete#util#is_windows() endfunction"}}} -function! neocomplete#is_prefetch() abort "{{{ +function! neocomplete#is_prefetch() "{{{ return 1 endfunction"}}} -function! neocomplete#exists_echodoc() abort "{{{ +function! neocomplete#exists_echodoc() "{{{ return exists('g:loaded_echodoc') && g:loaded_echodoc endfunction"}}} -function! neocomplete#within_comment() abort "{{{ +function! neocomplete#within_comment() "{{{ return neocomplete#get_current_neocomplete().within_comment endfunction"}}} -function! neocomplete#print_error(string) abort "{{{ +function! neocomplete#print_error(string) "{{{ echohl Error | echomsg '[neocomplete] ' . a:string | echohl None endfunction"}}} -function! neocomplete#print_warning(string) abort "{{{ +function! neocomplete#print_warning(string) "{{{ echohl WarningMsg | echomsg '[neocomplete] ' . a:string | echohl None endfunction"}}} -function! neocomplete#head_match(checkstr, headstr) abort "{{{ +function! neocomplete#head_match(checkstr, headstr) "{{{ let checkstr = &ignorecase ? \ tolower(a:checkstr) : a:checkstr let headstr = &ignorecase ? \ tolower(a:headstr) : a:headstr return stridx(checkstr, headstr) == 0 endfunction"}}} -function! neocomplete#get_source_filetypes(filetype) abort "{{{ +function! neocomplete#get_source_filetypes(filetype) "{{{ return neocomplete#helper#get_source_filetypes(a:filetype) endfunction"}}} -function! neocomplete#escape_match(str) abort "{{{ +function! neocomplete#escape_match(str) "{{{ return escape(a:str, '~"*\.^$[]') endfunction"}}} -function! neocomplete#get_context_filetype(...) abort "{{{ +function! neocomplete#get_context_filetype(...) "{{{ let neocomplete = exists('b:neocomplete') ? \ b:neocomplete : neocomplete#get_current_neocomplete() @@ -250,12 +260,30 @@ return neocomplete.context_filetype endfunction"}}} -function! neocomplete#print_debug(expr) abort "{{{ +function! neocomplete#get_context_filetype_range(...) "{{{ + if !neocomplete#is_enabled() + return [[1, 1], [line('$'), len(getline('$'))+1]] + endif + + let neocomplete = neocomplete#get_current_neocomplete() + + if a:0 != 0 || mode() !=# 'i' || + \ neocomplete.context_filetype == '' + call neocomplete#context_filetype#set() + endif + + if neocomplete.context_filetype ==# &filetype + return [[1, 1], [line('$'), len(getline('$'))+1]] + endif + + return neocomplete.context_filetype_range +endfunction"}}} +function! neocomplete#print_debug(expr) "{{{ if g:neocomplete#enable_debug echomsg string(a:expr) endif endfunction"}}} -function! neocomplete#get_data_directory() abort "{{{ +function! neocomplete#get_data_directory() "{{{ let g:neocomplete#data_directory = \ get(g:, 'neocomplete#data_directory', \ ($XDG_CACHE_HOME != '' ? @@ -273,52 +301,52 @@ return directory endfunction"}}} -function! neocomplete#complete_check() abort "{{{ +function! neocomplete#complete_check() "{{{ return neocomplete#helper#complete_check() endfunction"}}} -function! neocomplete#skip_next_complete() abort "{{{ +function! neocomplete#skip_next_complete() "{{{ let neocomplete = neocomplete#get_current_neocomplete() let neocomplete.skip_next_complete = 1 endfunction"}}} -function! neocomplete#get_default_matchers() abort "{{{ +function! neocomplete#get_default_matchers() "{{{ return map(copy(neocomplete#get_current_neocomplete().default_matchers), \ 'v:val.name') endfunction"}}} -function! neocomplete#set_default_matchers(matchers) abort "{{{ +function! neocomplete#set_default_matchers(matchers) "{{{ let neocomplete = neocomplete#get_current_neocomplete() let neocomplete.default_matchers = neocomplete#init#_filters( \ neocomplete#util#convert2list(a:matchers)) endfunction"}}} -function! neocomplete#set_dictionary_helper(variable, keys, value) abort "{{{ +function! neocomplete#set_dictionary_helper(variable, keys, value) "{{{ return neocomplete#util#set_dictionary_helper( \ a:variable, a:keys, a:value) endfunction"}}} -function! neocomplete#disable_default_dictionary(variable) abort "{{{ +function! neocomplete#disable_default_dictionary(variable) "{{{ return neocomplete#util#disable_default_dictionary(a:variable) endfunction"}}} -function! neocomplete#filetype_complete(arglead, cmdline, cursorpos) abort "{{{ +function! neocomplete#filetype_complete(arglead, cmdline, cursorpos) "{{{ return neocomplete#helper#filetype_complete(a:arglead, a:cmdline, a:cursorpos) endfunction"}}} "}}} " Key mapping functions. "{{{ -function! neocomplete#smart_close_popup() abort +function! neocomplete#smart_close_popup() return neocomplete#mappings#smart_close_popup() endfunction -function! neocomplete#close_popup() abort +function! neocomplete#close_popup() return neocomplete#mappings#close_popup() endfunction -function! neocomplete#cancel_popup() abort +function! neocomplete#cancel_popup() return neocomplete#mappings#cancel_popup() endfunction -function! neocomplete#undo_completion() abort +function! neocomplete#undo_completion() return neocomplete#mappings#undo_completion() endfunction -function! neocomplete#complete_common_string() abort +function! neocomplete#complete_common_string() return neocomplete#mappings#complete_common_string() endfunction -function! neocomplete#start_manual_complete(...) abort +function! neocomplete#start_manual_complete(...) return call('neocomplete#mappings#start_manual_complete', a:000) endfunction "}}} === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/async_cache.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/async_cache.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/async_cache.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! s:main(argv) abort "{{{ +function! s:main(argv) "{{{ " args: funcname, outputname filename pattern_file_name mark minlen fileencoding let [funcname, outputname, filename, pattern_file_name, mark, minlen, fileencoding] \ = a:argv @@ -51,7 +51,7 @@ call writefile([string], outputname) endfunction"}}} -function! s:load_from_file(filename, pattern_file_name, mark, minlen, fileencoding, is_string) abort "{{{ +function! s:load_from_file(filename, pattern_file_name, mark, minlen, fileencoding, is_string) "{{{ if !filereadable(a:filename) " File not found. return [] @@ -95,7 +95,7 @@ return keyword_list endfunction"}}} -function! s:load_from_tags(filename, pattern_file_name, mark, minlen, fileencoding) abort "{{{ +function! s:load_from_tags(filename, pattern_file_name, mark, minlen, fileencoding) "{{{ let keyword_lists = [] let dup_check = {} @@ -187,7 +187,7 @@ let abbr = substitute(abbr, '"\s*{{{', '', '') let keyword = { - \ 'word' : tag[0], 'abbr' : abbr, 'menu' : '', + \ 'word' : tag[0], 'abbr' : abbr, 'menu' : a:mark, \ 'kind' : option['kind'], \ } if has_key(option, 'struct') @@ -211,7 +211,7 @@ return keyword_lists endfunction"}}} -function! s:truncate(str, width) abort "{{{ +function! s:truncate(str, width) "{{{ " Original function is from mattn. " http://github.com/mattn/googlereader-vim/tree/master @@ -234,7 +234,7 @@ return ret endfunction"}}} -function! s:strwidthpart(str, width) abort "{{{ +function! s:strwidthpart(str, width) "{{{ let ret = a:str let width = strdisplaywidth(a:str) while width > a:width @@ -246,7 +246,7 @@ return ret endfunction"}}} -function! s:iconv(expr, from, to) abort +function! s:iconv(expr, from, to) if a:from == '' || a:to == '' || a:from ==? a:to return a:expr endif @@ -265,7 +265,7 @@ qall! else - function! neocomplete#async_cache#main(argv) abort "{{{ + function! neocomplete#async_cache#main(argv) "{{{ call s:main(a:argv) endfunction"}}} endif === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/cache.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/cache.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/cache.vim 2015-08-25 11:01:00 +0000 @@ -26,10 +26,10 @@ let s:save_cpo = &cpo set cpo&vim -let s:Cache = neocomplete#util#get_vital().import('System.Cache.Deprecated') +let s:Cache = neocomplete#util#get_vital().import('System.Cache') " Cache loader. -function! neocomplete#cache#load_from_cache(cache_dir, filename, ...) abort "{{{ +function! neocomplete#cache#load_from_cache(cache_dir, filename, ...) "{{{ let is_string = get(a:000, 0, 0) try @@ -79,7 +79,7 @@ endfunction"}}} " New cache loader. -function! neocomplete#cache#check_cache(cache_dir, key, async_cache_dictionary, keyword_cache, is_string) abort "{{{ +function! neocomplete#cache#check_cache(cache_dir, key, async_cache_dictionary, keyword_cache, is_string) "{{{ if !has_key(a:async_cache_dictionary, a:key) return endif @@ -104,7 +104,7 @@ endfunction"}}} " For buffer source cache loader. -function! neocomplete#cache#get_cache_list(cache_dir, async_cache_list) abort "{{{ +function! neocomplete#cache#get_cache_list(cache_dir, async_cache_list) "{{{ let cache_list = a:async_cache_list let loaded_keywords = [] @@ -120,7 +120,7 @@ return [loaded, loaded_keywords] endfunction"}}} -function! neocomplete#cache#save_cache(cache_dir, filename, keyword_list) abort "{{{ +function! neocomplete#cache#save_cache(cache_dir, filename, keyword_list) "{{{ if neocomplete#util#is_sudo() return endif @@ -134,19 +134,19 @@ endfunction"}}} " Cache helper. -function! neocomplete#cache#getfilename(cache_dir, filename) abort "{{{ +function! neocomplete#cache#getfilename(cache_dir, filename) "{{{ let cache_dir = neocomplete#get_data_directory() . '/' . a:cache_dir return s:Cache.getfilename(cache_dir, a:filename) endfunction"}}} -function! neocomplete#cache#filereadable(cache_dir, filename) abort "{{{ +function! neocomplete#cache#filereadable(cache_dir, filename) "{{{ let cache_dir = neocomplete#get_data_directory() . '/' . a:cache_dir return s:Cache.filereadable(cache_dir, a:filename) endfunction"}}} -function! neocomplete#cache#readfile(cache_dir, filename) abort "{{{ +function! neocomplete#cache#readfile(cache_dir, filename) "{{{ let cache_dir = neocomplete#get_data_directory() . '/' . a:cache_dir return s:Cache.readfile(cache_dir, a:filename) endfunction"}}} -function! neocomplete#cache#writefile(cache_dir, filename, list) abort "{{{ +function! neocomplete#cache#writefile(cache_dir, filename, list) "{{{ if neocomplete#util#is_sudo() return endif @@ -154,16 +154,16 @@ let cache_dir = neocomplete#get_data_directory() . '/' . a:cache_dir return s:Cache.writefile(cache_dir, a:filename, a:list) endfunction"}}} -function! neocomplete#cache#encode_name(cache_dir, filename) abort +function! neocomplete#cache#encode_name(cache_dir, filename) " Check cache directory. let cache_dir = neocomplete#get_data_directory() . '/' . a:cache_dir return s:Cache.getfilename(cache_dir, a:filename) endfunction -function! neocomplete#cache#check_old_cache(cache_dir, filename) abort "{{{ +function! neocomplete#cache#check_old_cache(cache_dir, filename) "{{{ let cache_dir = neocomplete#get_data_directory() . '/' . a:cache_dir return s:Cache.check_old_cache(cache_dir, a:filename) endfunction"}}} -function! neocomplete#cache#make_directory(directory) abort "{{{ +function! neocomplete#cache#make_directory(directory) "{{{ let directory = \ neocomplete#get_data_directory() .'/'.a:directory if !isdirectory(directory) @@ -179,7 +179,7 @@ let s:sdir = neocomplete#util#substitute_path_separator( \ fnamemodify(expand(''), ':p:h')) -function! neocomplete#cache#async_load_from_file(cache_dir, filename, pattern, mark) abort "{{{ +function! neocomplete#cache#async_load_from_file(cache_dir, filename, pattern, mark) "{{{ if !neocomplete#cache#check_old_cache(a:cache_dir, a:filename) \ || neocomplete#util#is_sudo() return neocomplete#cache#encode_name(a:cache_dir, a:filename) @@ -204,7 +204,7 @@ \ ] return s:async_load(argv, a:cache_dir, a:filename) endfunction"}}} -function! neocomplete#cache#async_load_from_tags(cache_dir, filename, filetype, pattern, mark) abort "{{{ +function! neocomplete#cache#async_load_from_tags(cache_dir, filename, filetype, pattern, mark) "{{{ if !neocomplete#cache#check_old_cache(a:cache_dir, a:filename) \ || neocomplete#util#is_sudo() return neocomplete#cache#encode_name(a:cache_dir, a:filename) @@ -231,31 +231,38 @@ \ ] return s:async_load(argv, a:cache_dir, a:filename) endfunction"}}} -function! s:async_load(argv, cache_dir, filename) abort "{{{ - let vim_path = s:search_vim_path() - - if vim_path == '' || !executable(vim_path) - call neocomplete#async_cache#main(a:argv) - else +function! s:async_load(argv, cache_dir, filename) "{{{ + " if 0 + if neocomplete#has_vimproc() + let vim_path = s:search_vim_path() + + if vim_path == '' + " Error + return + elseif !executable(vim_path) + call neocomplete#print_error( + \ printf('Vim path : "%s" is not executable.', vim_path)) + let g:neocomplete#use_vimproc = 0 + return + endif + let args = [vim_path, '-u', 'NONE', '-i', 'NONE', '-n', \ '-N', '-S', s:sdir.'/async_cache.vim'] \ + a:argv call vimproc#system_bg(args) " call vimproc#system(args) " call system(join(args)) + else + call neocomplete#async_cache#main(a:argv) endif return neocomplete#cache#encode_name(a:cache_dir, a:filename) endfunction"}}} -function! s:search_vim_path() abort "{{{ +function! s:search_vim_path() "{{{ if exists('s:vim_path') return s:vim_path endif - if !neocomplete#has_vimproc() - return '' - endif - let paths = vimproc#get_command_name(v:progname, $PATH, -1) if empty(paths) if has('gui_macvim') === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/commands.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/commands.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/commands.vim 2015-08-25 11:01:00 +0000 @@ -26,12 +26,12 @@ let s:save_cpo = &cpo set cpo&vim -function! neocomplete#commands#_initialize() abort "{{{ +function! neocomplete#commands#_initialize() "{{{ command! -nargs=1 NeoCompleteAutoCompletionLength \ call s:set_auto_completion_length() endfunction"}}} -function! neocomplete#commands#_toggle_lock() abort "{{{ +function! neocomplete#commands#_toggle_lock() "{{{ if !neocomplete#is_enabled() call neocomplete#init#enable() return @@ -46,40 +46,36 @@ endif endfunction"}}} -function! neocomplete#commands#_lock() abort "{{{ +function! neocomplete#commands#_lock() "{{{ let neocomplete = neocomplete#get_current_neocomplete() let neocomplete.lock = 1 endfunction"}}} -function! neocomplete#commands#_unlock() abort "{{{ +function! neocomplete#commands#_unlock() "{{{ let neocomplete = neocomplete#get_current_neocomplete() let neocomplete.lock = 0 endfunction"}}} -function! neocomplete#commands#_clean() abort "{{{ +function! neocomplete#commands#_clean() "{{{ " Delete cache files. let data_directory = neocomplete#get_data_directory() for directory in filter(neocomplete#util#glob( \ data_directory.'/*'), 'isdirectory(v:val)') - if has('patch-7.4.1120') - call delete(data_directory, 'rf') - else - for filename in filter(neocomplete#util#glob(directory.'/*'), - \ '!isdirectory(v:val)') - call delete(filename) - endfor - endif + for filename in filter(neocomplete#util#glob(directory.'/*'), + \ '!isdirectory(v:val)') + call delete(filename) + endfor endfor echo 'Cleaned cache files in: ' . data_directory endfunction"}}} -function! neocomplete#commands#_set_file_type(filetype) abort "{{{ +function! neocomplete#commands#_set_file_type(filetype) "{{{ let neocomplete = neocomplete#get_current_neocomplete() let neocomplete.context_filetype = a:filetype endfunction"}}} -function! s:rand(max) abort "{{{ +function! s:rand(max) "{{{ if !has('reltime') " Same value. return 0 @@ -89,7 +85,7 @@ return (time < 0 ? -time : time)% (a:max + 1) endfunction"}}} -function! s:set_auto_completion_length(len) abort "{{{ +function! s:set_auto_completion_length(len) "{{{ let neocomplete = neocomplete#get_current_neocomplete() let neocomplete.completion_length = a:len endfunction"}}} === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/complete.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/complete.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/complete.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! neocomplete#complete#_get_results(cur_text, ...) abort "{{{ +function! neocomplete#complete#_get_results(cur_text, ...) "{{{ call neocomplete#print_debug('start get_complete_sources') let neocomplete = neocomplete#get_current_neocomplete() @@ -55,7 +55,7 @@ \ '!empty(v:val.neocomplete__context.candidates)') endfunction"}}} -function! neocomplete#complete#_get_complete_pos(sources) abort "{{{ +function! neocomplete#complete#_get_complete_pos(sources) "{{{ if empty(a:sources) return -1 endif @@ -64,7 +64,7 @@ \ 'v:val.neocomplete__context.complete_pos')) endfunction"}}} -function! neocomplete#complete#_get_words(sources, complete_pos, complete_str) abort "{{{ +function! neocomplete#complete#_get_words(sources, complete_pos, complete_str) "{{{ let frequencies = neocomplete#variables#get_frequencies() if exists('*neocomplete#sources#buffer#get_frequencies') let frequencies = extend(copy( @@ -75,12 +75,14 @@ " Append prefix. let candidates = [] let len_words = 0 - for source in sort(filter(deepcopy(a:sources), + for source in sort(filter(copy(a:sources), \ '!empty(v:val.neocomplete__context.candidates)'), \ 's:compare_source_rank') + let mark = source.mark let context = source.neocomplete__context - let words = type(context.candidates[0]) == type('') ? - \ map(copy(context.candidates), "{'word': v:val}") : + let words = + \ type(context.candidates[0]) == type('') ? + \ map(copy(context.candidates), "{'word': v:val, 'menu' : mark}") : \ deepcopy(context.candidates) let context.candidates = words @@ -114,26 +116,27 @@ let words = neocomplete#helper#call_filters( \ source.neocomplete__sorters, source, {}) - if empty(words) - continue - endif if source.max_candidates > 0 let words = words[: len(source.max_candidates)-1] endif + " Set default menu. + lua << EOF + do + local candidates = vim.eval('words') + local mark = vim.eval('mark') + for i = 0, #candidates-1 do + if candidates[i].menu == nil then + candidates[i].menu = mark + end + end + end +EOF + let words = neocomplete#helper#call_filters( \ source.neocomplete__converters, source, {}) - if empty(words) - continue - endif - - " Set default menu. - if get(words[0], 'menu', '') !~ '^\[.*\' - call s:set_default_menu(words, source) - endif - let candidates += words let len_words += len(words) @@ -169,7 +172,7 @@ return candidates endfunction"}}} -function! neocomplete#complete#_set_results_pos(cur_text, ...) abort "{{{ +function! neocomplete#complete#_set_results_pos(cur_text, ...) "{{{ " Initialize sources. let neocomplete = neocomplete#get_current_neocomplete() @@ -191,12 +194,9 @@ let context = source.neocomplete__context let context.input = a:cur_text - let context.filetype = filetype - let context.filetypes = neocomplete#context_filetype#filetypes() try - let complete_pos = s:use_previous_result(source, context) ? - \ context.prev_complete_pos : + let complete_pos = \ has_key(source, 'get_complete_position') ? \ source.get_complete_position(context) : \ neocomplete#helper#match_word(context.input, @@ -223,8 +223,6 @@ let complete_str = context.input[complete_pos :] if neocomplete#is_auto_complete() && - \ (source.input_pattern == '' || - \ context.input !~# '\%(' . source.input_pattern.'\m\)$') && \ len(complete_str) < source.min_pattern_length " Skip. let context.complete_pos = -1 @@ -240,7 +238,7 @@ return complete_sources endfunction"}}} -function! neocomplete#complete#_set_results_words(sources) abort "{{{ +function! neocomplete#complete#_set_results_words(sources) "{{{ " Try source completion. " Save options. @@ -257,12 +255,13 @@ let &ignorecase = (g:neocomplete#enable_smart_case \ || g:neocomplete#enable_camel_case) ? - \ context.complete_str !~ '\u' - \ : g:neocomplete#enable_ignore_case + \ context.complete_str !~ '\u' : g:neocomplete#enable_ignore_case - if s:use_previous_result(source, context) + if !source.is_volatile + \ && context.prev_complete_pos == context.complete_pos + \ && !empty(context.prev_candidates) " Use previous candidates. - let context.candidates = deepcopy(context.prev_candidates) + let context.candidates = context.prev_candidates else try let context.candidates = source.gather_candidates(context) @@ -280,12 +279,11 @@ call winrestview(pos) endif endtry - - let context.prev_line = context.input - let context.prev_candidates = copy(context.candidates) - let context.prev_complete_pos = context.complete_pos endif + let context.prev_candidates = copy(context.candidates) + let context.prev_complete_pos = context.complete_pos + if !empty(context.candidates) let matchers = empty(source.neocomplete__matchers) ? \ neocomplete#get_current_neocomplete().default_matchers @@ -315,33 +313,10 @@ endfunction"}}} " Source rank order. "{{{ -function! s:compare_source_rank(i1, i2) abort +function! s:compare_source_rank(i1, i2) return a:i2.rank - a:i1.rank endfunction"}}} -function! s:set_default_menu(words, source) abort "{{{ - lua << EOF - do - local candidates = vim.eval('a:words') - local mark = vim.eval('a:source.mark') .. ' ' - for i = 0, #candidates-1 do - candidates[i].menu = mark .. (candidates[i].menu ~= nil and - candidates[i].menu or '') - end - end -EOF -endfunction"}}} - -function! s:use_previous_result(source, context) abort "{{{ - let neocomplete = neocomplete#get_current_neocomplete() - return !a:source.is_volatile - \ && substitute(a:context.input, '\k\+$', '', '') - \ ==# substitute(a:context.prev_line, '\k\+$', '', '') - \ && stridx(a:context.input, a:context.prev_line) == 0 - \ && !empty(a:context.prev_candidates) - \ && line('.') == neocomplete.old_linenr -endfunction"}}} - let &cpo = s:save_cpo unlet s:save_cpo === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/context_filetype.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/context_filetype.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/context_filetype.vim 2015-08-25 11:01:00 +0000 @@ -36,7 +36,7 @@ endtry endif -function! neocomplete#context_filetype#set() abort "{{{ +function! neocomplete#context_filetype#set() "{{{ let neocomplete = neocomplete#get_current_neocomplete() let context_filetype = \ s:exists_context_filetype ? @@ -45,13 +45,10 @@ let context_filetype = 'nothing' endif let neocomplete.context_filetype = context_filetype - let neocomplete.context_filetypes = s:exists_context_filetype ? - \ context_filetype#get_filetypes(context_filetype) : - \ [context_filetype] + split(context_filetype, '\.') return neocomplete.context_filetype endfunction"}}} -function! neocomplete#context_filetype#get(filetype) abort "{{{ +function! neocomplete#context_filetype#get(filetype) "{{{ let context_filetype = \ s:exists_context_filetype ? \ context_filetype#get_filetype(a:filetype) : a:filetype @@ -61,9 +58,6 @@ return context_filetype endfunction"}}} -function! neocomplete#context_filetype#filetypes() abort "{{{ - return copy(neocomplete#get_current_neocomplete().context_filetypes) -endfunction"}}} let &cpo = s:save_cpo unlet s:save_cpo === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/custom.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/custom.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/custom.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! neocomplete#custom#get() abort "{{{ +function! neocomplete#custom#get() "{{{ if !exists('s:custom') let s:custom = {} let s:custom.sources = {} @@ -36,7 +36,7 @@ return s:custom endfunction"}}} -function! neocomplete#custom#source(source_name, option_name, value) abort "{{{ +function! neocomplete#custom#source(source_name, option_name, value) "{{{ let custom_sources = neocomplete#custom#get().sources for key in split(a:source_name, '\s*,\s*') === added file 'vim/bundle/neocomplete.vim/autoload/neocomplete/echodoc.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/echodoc.vim 1970-01-01 00:00:00 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/echodoc.vim 2015-08-25 11:01:00 +0000 @@ -0,0 +1,81 @@ +"============================================================================= +" FILE: echodoc.vim +" AUTHOR: Shougo Matsushita +" License: MIT license {{{ +" Permission is hereby granted, free of charge, to any person obtaining +" a copy of this software and associated documentation files (the +" "Software"), to deal in the Software without restriction, including +" without limitation the rights to use, copy, modify, merge, publish, +" distribute, sublicense, and/or sell copies of the Software, and to +" permit persons to whom the Software is furnished to do so, subject to +" the following conditions: +" +" The above copyright notice and this permission notice shall be included +" in all copies or substantial portions of the Software. +" +" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +" IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +" }}} +"============================================================================= + +let s:save_cpo = &cpo +set cpo&vim + +" For echodoc. "{{{ +let s:doc_dict = { + \ 'name' : 'neocomplete', + \ 'rank' : 10, + \ } +" @vimlint(EVL102, 1, v:completed_item) +function! s:doc_dict.search(cur_text) "{{{ + if !exists('v:completed_item') || empty(v:completed_item) + return [] + endif + + let item = v:completed_item + + let abbr = (item.abbr != '') ? item.abbr : item.word + if len(item.menu) > 5 + " Combine menu. + let abbr .= ' ' . item.menu + endif + + if item.info != '' + let abbr = split(item.info, '\n')[0] + endif + + " Skip + if len(abbr) < len(item.word) + 2 + return [] + endif + + let ret = [] + + let match = stridx(abbr, item.word) + if match < 0 + call add(ret, { 'text' : abbr }) + else + call add(ret, { 'text' : item.word, 'highlight' : 'Identifier' }) + call add(ret, { 'text' : abbr[match+len(item.word) :] }) + endif + + return ret +endfunction"}}} +" @vimlint(EVL102, 0, v:completed_item) +"}}} + +function! neocomplete#echodoc#init() "{{{ + if neocomplete#exists_echodoc() + call echodoc#register(s:doc_dict.name, s:doc_dict) + endif +endfunction"}}} + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: foldmethod=marker === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/filters.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/filters.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/filters.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! neocomplete#filters#fuzzy_escape(string) abort "{{{ +function! neocomplete#filters#fuzzy_escape(string) "{{{ " Escape string for lua regexp. let string = substitute(neocomplete#filters#escape(a:string), \ '\w', '\0.*', 'g') @@ -36,7 +36,7 @@ return string endfunction"}}} -function! neocomplete#filters#escape(string) abort "{{{ +function! neocomplete#filters#escape(string) "{{{ " Escape string for lua regexp. return substitute(a:string, \ '[%\[\]().*+?^$-]', '%\0', 'g') === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/filters/converter_abbr.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/filters/converter_abbr.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/filters/converter_abbr.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! neocomplete#filters#converter_abbr#define() abort "{{{ +function! neocomplete#filters#converter_abbr#define() "{{{ return s:converter endfunction"}}} @@ -35,7 +35,7 @@ \ 'description' : 'abbreviate abbr converter', \} -function! s:converter.filter(context) abort "{{{ +function! s:converter.filter(context) "{{{ if g:neocomplete#max_keyword_width < 0 return a:context.candidates endif === removed file 'vim/bundle/neocomplete.vim/autoload/neocomplete/filters/converter_add_paren.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/filters/converter_add_paren.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/filters/converter_add_paren.vim 1970-01-01 00:00:00 +0000 @@ -1,53 +0,0 @@ -"============================================================================= -" FILE: converter_add_paren.vim -" AUTHOR: Shougo Matsushita -" License: MIT license {{{ -" Permission is hereby granted, free of charge, to any person obtaining -" a copy of this software and associated documentation files (the -" "Software"), to deal in the Software without restriction, including -" without limitation the rights to use, copy, modify, merge, publish, -" distribute, sublicense, and/or sell copies of the Software, and to -" permit persons to whom the Software is furnished to do so, subject to -" the following conditions: -" -" The above copyright notice and this permission notice shall be included -" in all copies or substantial portions of the Software. -" -" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -" IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -" }}} -"============================================================================= - -let s:save_cpo = &cpo -set cpo&vim - -function! neocomplete#filters#converter_add_paren#define() abort "{{{ - return s:converter -endfunction"}}} - -let s:converter = { - \ 'name' : 'converter_add_paren', - \ 'description' : 'add parenthesis if needed', - \} - -function! s:converter.filter(context) abort "{{{ - for candidate in filter(copy(a:context.candidates), " - \ v:val.word !~ '()\\?$' && - \ (get(v:val, 'abbr', '') =~ '(.*)' - \ || get(v:val, 'info', '') =~ '(.*)') - \ ") - let candidate.word .= '(' - endfor - - return a:context.candidates -endfunction"}}} - -let &cpo = s:save_cpo -unlet s:save_cpo - -" vim: foldmethod=marker === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/filters/converter_case.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/filters/converter_case.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/filters/converter_case.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! neocomplete#filters#converter_case#define() abort "{{{ +function! neocomplete#filters#converter_case#define() "{{{ return s:converter endfunction"}}} @@ -35,7 +35,7 @@ \ 'description' : 'case converter', \} -function! s:converter.filter(context) abort "{{{ +function! s:converter.filter(context) "{{{ if !neocomplete#is_text_mode() && !neocomplete#within_comment() return a:context.candidates endif @@ -68,7 +68,7 @@ return a:context.candidates endfunction"}}} -function! s:get_convert_candidates(candidates) abort +function! s:get_convert_candidates(candidates) return filter(copy(a:candidates), \ "get(v:val, 'neocomplete__convertable', 1) \ && v:val.word =~ '^[a-zA-Z0-9_''-]\\+$'") === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/filters/converter_delimiter.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/filters/converter_delimiter.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/filters/converter_delimiter.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! neocomplete#filters#converter_delimiter#define() abort "{{{ +function! neocomplete#filters#converter_delimiter#define() "{{{ return s:converter endfunction"}}} @@ -36,14 +36,15 @@ \} " @vimlint(EVL102, 1, l:delim_cnt) -function! s:converter.filter(context) abort "{{{ +function! s:converter.filter(context) "{{{ if g:neocomplete#max_keyword_width < 0 return a:context.candidates endif " Delimiter check. - for delimiter in get(g:neocomplete#delimiter_patterns, - \ a:context.filetype, []) + let filetype = neocomplete#get_context_filetype() + + for delimiter in get(g:neocomplete#delimiter_patterns, filetype, []) " Count match. let delim_cnt = 0 let delimiter_vim = neocomplete#util#escape_pattern(delimiter) @@ -59,10 +60,7 @@ local candidates = vim.eval('a:context.candidates') local pattern = vim.eval('neocomplete#filters#escape(delimiter)')..'.' for i = 0, #candidates-1 do - if string.find(candidates[i].word, pattern, 1) ~= nil and ( - not candidates[i].abbr or - string.gsub(candidates[i].word, '%([^)]*%)?', '()') - == string.gsub(candidates[i].abbr, '%([^)]*%)?', '()')) then + if string.find(candidates[i].word, pattern, 1) ~= nil then vim.command('call s:process_delimiter(a:context, '.. 'a:context.candidates['.. i .. '], delimiter_vim, delim_cnt)') @@ -76,7 +74,7 @@ endfunction"}}} " @vimlint(EVL102, 0, l:delim_cnt) -function! s:process_delimiter(context, candidate, delimiter, delim_cnt) abort +function! s:process_delimiter(context, candidate, delimiter, delim_cnt) let candidate = a:candidate let split_list = split(candidate.word, a:delimiter.'\ze.', 1) @@ -105,7 +103,6 @@ " Clear previous result. let a:context.prev_candidates = [] let a:context.prev_complete_pos = -1 - let a:context.prev_line = '' endfunction let &cpo = s:save_cpo === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/filters/converter_disable_abbr.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/filters/converter_disable_abbr.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/filters/converter_disable_abbr.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! neocomplete#filters#converter_disable_abbr#define() abort "{{{ +function! neocomplete#filters#converter_disable_abbr#define() "{{{ return s:converter endfunction"}}} @@ -35,7 +35,7 @@ \ 'description' : 'disable abbr converter', \} -function! s:converter.filter(context) abort "{{{ +function! s:converter.filter(context) "{{{ for candidate in a:context.candidates let candidate.abbr = candidate.word endfor === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/filters/converter_remove_last_paren.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/filters/converter_remove_last_paren.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/filters/converter_remove_last_paren.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! neocomplete#filters#converter_remove_last_paren#define() abort "{{{ +function! neocomplete#filters#converter_remove_last_paren#define() "{{{ return s:converter endfunction"}}} @@ -35,7 +35,7 @@ \ 'description' : 'remove last parenthesis', \} -function! s:converter.filter(context) abort "{{{ +function! s:converter.filter(context) "{{{ for candidate in a:context.candidates let candidate.word = \ substitute(candidate.word, '[\[<({]$', '', '') === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/filters/converter_remove_overlap.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/filters/converter_remove_overlap.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/filters/converter_remove_overlap.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! neocomplete#filters#converter_remove_overlap#define() abort "{{{ +function! neocomplete#filters#converter_remove_overlap#define() "{{{ return s:converter endfunction"}}} @@ -35,13 +35,16 @@ \ 'description' : 'remove overlapped characters', \} -function! s:converter.filter(context) abort "{{{ +function! s:converter.filter(context) "{{{ let next = matchstr(getline('.')[ \ len(neocomplete#helper#get_cur_text()) :], '^\S\+') if next == '' return a:context.candidates endif + let neocomplete = neocomplete#get_current_neocomplete() + let neocomplete.overlapped_items = {} + let candidates = [] for candidate in a:context.candidates let overlapped_len = neocomplete#filters# @@ -52,7 +55,11 @@ let candidate.abbr = candidate.word endif + let word = candidate.word let candidate.word = candidate.word[: -overlapped_len-1] + if candidate.word != '' + let neocomplete.overlapped_items[candidate.word] = word + endif call add(candidates, candidate) elseif !neocomplete#is_auto_complete() call add(candidates, candidate) @@ -69,7 +76,7 @@ return candidates endfunction"}}} -function! neocomplete#filters#converter_remove_overlap#length(left, right) abort "{{{ +function! neocomplete#filters#converter_remove_overlap#length(left, right) "{{{ if a:left == '' || a:right == '' return 0 endif === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/filters/matcher_fuzzy.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/filters/matcher_fuzzy.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/filters/matcher_fuzzy.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! neocomplete#filters#matcher_fuzzy#define() abort "{{{ +function! neocomplete#filters#matcher_fuzzy#define() "{{{ return s:matcher endfunction"}}} @@ -35,7 +35,7 @@ \ 'description' : 'fuzzy matcher', \} -function! s:matcher.filter(context) abort "{{{ +function! s:matcher.filter(context) "{{{ if len(a:context.complete_str) > 10 " Mix fuzzy mode. let len = len(a:context.complete_str) === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/filters/matcher_head.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/filters/matcher_head.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/filters/matcher_head.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! neocomplete#filters#matcher_head#define() abort "{{{ +function! neocomplete#filters#matcher_head#define() "{{{ return s:matcher endfunction"}}} @@ -35,7 +35,7 @@ \ 'description' : 'head matcher', \} -function! s:matcher.filter(context) abort "{{{ +function! s:matcher.filter(context) "{{{ lua << EOF do local pattern = vim.eval( === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/filters/matcher_length.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/filters/matcher_length.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/filters/matcher_length.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! neocomplete#filters#matcher_length#define() abort "{{{ +function! neocomplete#filters#matcher_length#define() "{{{ return s:matcher endfunction"}}} @@ -35,7 +35,7 @@ \ 'description' : 'input length matcher', \} -function! s:matcher.filter(context) abort "{{{ +function! s:matcher.filter(context) "{{{ if empty(a:context.candidates) return [] endif === removed file 'vim/bundle/neocomplete.vim/autoload/neocomplete/filters/matcher_nothing.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/filters/matcher_nothing.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/filters/matcher_nothing.vim 1970-01-01 00:00:00 +0000 @@ -1,45 +0,0 @@ -"============================================================================= -" FILE: matcher_nothing.vim -" AUTHOR: Shougo Matsushita -" License: MIT license {{{ -" Permission is hereby granted, free of charge, to any person obtaining -" a copy of this software and associated documentation files (the -" "Software"), to deal in the Software without restriction, including -" without limitation the rights to use, copy, modify, merge, publish, -" distribute, sublicense, and/or sell copies of the Software, and to -" permit persons to whom the Software is furnished to do so, subject to -" the following conditions: -" -" The above copyright notice and this permission notice shall be included -" in all copies or substantial portions of the Software. -" -" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -" IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -" }}} -"============================================================================= - -let s:save_cpo = &cpo -set cpo&vim - -function! neocomplete#filters#matcher_nothing#define() abort "{{{ - return s:matcher -endfunction"}}} - -let s:matcher = { - \ 'name' : 'matcher_nothing', - \ 'description' : 'input nothing matcher', - \} - -function! s:matcher.filter(context) abort "{{{ - return a:context.candidates -endfunction"}}} - -let &cpo = s:save_cpo -unlet s:save_cpo - -" vim: foldmethod=marker === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/filters/sorter_filename.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/filters/sorter_filename.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/filters/sorter_filename.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! neocomplete#filters#sorter_filename#define() abort "{{{ +function! neocomplete#filters#sorter_filename#define() "{{{ return s:sorter endfunction"}}} @@ -35,7 +35,7 @@ \ 'description' : 'sort by filename order', \} -function! s:sorter.filter(context) abort "{{{ +function! s:sorter.filter(context) "{{{ let dir_list = filter(copy(a:context.candidates), \ 'v:val.action__is_directory') let file_list = filter(copy(a:context.candidates), === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/filters/sorter_length.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/filters/sorter_length.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/filters/sorter_length.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! neocomplete#filters#sorter_length#define() abort "{{{ +function! neocomplete#filters#sorter_length#define() "{{{ return s:sorter endfunction"}}} @@ -35,11 +35,11 @@ \ 'description' : 'sort by length order', \} -function! s:sorter.filter(context) abort "{{{ +function! s:sorter.filter(context) "{{{ return sort(a:context.candidates, 's:compare') endfunction"}}} -function! s:compare(i1, i2) abort +function! s:compare(i1, i2) let diff = len(a:i1.word) - len(a:i2.word) if !diff let diff = (a:i1.word ># a:i2.word) ? 1 : -1 === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/filters/sorter_rank.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/filters/sorter_rank.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/filters/sorter_rank.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! neocomplete#filters#sorter_rank#define() abort "{{{ +function! neocomplete#filters#sorter_rank#define() "{{{ return s:sorter endfunction"}}} @@ -35,7 +35,7 @@ \ 'description' : 'sort by matched rank order', \} -function! s:sorter.filter(context) abort "{{{ +function! s:sorter.filter(context) "{{{ lua << EOF do local candidates = vim.eval('a:context.candidates') === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/filters/sorter_word.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/filters/sorter_word.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/filters/sorter_word.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! neocomplete#filters#sorter_word#define() abort "{{{ +function! neocomplete#filters#sorter_word#define() "{{{ return s:sorter endfunction"}}} @@ -35,11 +35,11 @@ \ 'description' : 'sort by word order', \} -function! s:sorter.filter(context) abort "{{{ +function! s:sorter.filter(context) "{{{ return sort(a:context.candidates, 's:compare') endfunction"}}} -function! s:compare(i1, i2) abort +function! s:compare(i1, i2) return a:i1.word ># a:i2.word endfunction === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/handler.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/handler.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/handler.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! neocomplete#handler#_on_moved_i() abort "{{{ +function! neocomplete#handler#_on_moved_i() "{{{ let neocomplete = neocomplete#get_current_neocomplete() if neocomplete.linenr != line('.') call neocomplete#helper#clear_result() @@ -35,7 +35,7 @@ call s:close_preview_window() endfunction"}}} -function! neocomplete#handler#_on_insert_enter() abort "{{{ +function! neocomplete#handler#_on_insert_enter() "{{{ if !neocomplete#is_enabled() return endif @@ -50,7 +50,7 @@ foldopen endif endfunction"}}} -function! neocomplete#handler#_on_insert_leave() abort "{{{ +function! neocomplete#handler#_on_insert_leave() "{{{ call neocomplete#helper#clear_result() call s:close_preview_window() @@ -58,17 +58,25 @@ let neocomplete = neocomplete#get_current_neocomplete() let neocomplete.cur_text = '' -endfunction"}}} -function! neocomplete#handler#_on_complete_done() abort "{{{ - let neocomplete = neocomplete#get_current_neocomplete() - - if neocomplete.event !=# 'mapping' - \ && !s:is_delimiter() && !get(neocomplete, 'refresh', 0) - call neocomplete#mappings#close_popup() - endif - + let neocomplete.overlapped_items = {} +endfunction"}}} +function! neocomplete#handler#_on_write_post() "{{{ + " Restore foldinfo. + for winnr in filter(range(1, winnr('$')), + \ "!empty(getwinvar(v:val, 'neocomplete_foldinfo'))") + let neocomplete_foldinfo = + \ getwinvar(winnr, 'neocomplete_foldinfo') + call setwinvar(winnr, '&foldmethod', + \ neocomplete_foldinfo.foldmethod) + call setwinvar(winnr, '&foldexpr', + \ neocomplete_foldinfo.foldexpr) + call setwinvar(winnr, + \ 'neocomplete_foldinfo', {}) + endfor +endfunction"}}} +function! neocomplete#handler#_on_complete_done() "{{{ " Use v:completed_item feature. - if !exists('v:completed_item') || empty(v:completed_item) + if empty(v:completed_item) return endif @@ -77,6 +85,17 @@ return endif + let neocomplete = neocomplete#get_current_neocomplete() + + " Restore overlapped item + if has_key(neocomplete.overlapped_items, complete_str) + " Move cursor + call cursor(0, col('.') - len(complete_str) + + \ len(neocomplete.overlapped_items[complete_str])) + + let complete_str = neocomplete.overlapped_items[complete_str] + endif + let frequencies = neocomplete#variables#get_frequencies() if !has_key(frequencies, complete_str) let frequencies[complete_str] = 20 @@ -84,79 +103,80 @@ let frequencies[complete_str] += 20 endif endfunction"}}} -function! neocomplete#handler#_on_insert_char_pre() abort "{{{ +function! neocomplete#handler#_change_update_time() "{{{ + if &updatetime > g:neocomplete#cursor_hold_i_time + " Change updatetime. + let neocomplete = neocomplete#get_current_neocomplete() + let neocomplete.update_time_save = &updatetime + let &updatetime = g:neocomplete#cursor_hold_i_time + endif +endfunction"}}} +function! neocomplete#handler#_restore_update_time() "{{{ let neocomplete = neocomplete#get_current_neocomplete() - let neocomplete.skip_next_complete = 0 - - if pumvisible() && g:neocomplete#enable_refresh_always - " Auto refresh - call feedkeys("\(neocomplete_auto_refresh)") + if &updatetime < neocomplete.update_time_save + " Restore updatetime. + let &updatetime = neocomplete.update_time_save endif - +endfunction"}}} +function! neocomplete#handler#_on_insert_char_pre() "{{{ if neocomplete#is_cache_disabled() return endif + let neocomplete = neocomplete#get_current_neocomplete() if neocomplete.old_char != ' ' && v:char == ' ' && v:count == 0 call s:make_cache_current_line() endif let neocomplete.old_char = v:char endfunction"}}} -function! neocomplete#handler#_on_text_changed() abort "{{{ +function! neocomplete#handler#_on_text_changed() "{{{ if neocomplete#is_cache_disabled() return endif + let neocomplete = neocomplete#get_current_neocomplete() + + if g:neocomplete#enable_insert_char_pre + \ && neocomplete.skip_next_complete + call neocomplete#handler#_do_auto_complete('InsertCharPre') + endif + if getline('.') == '' call s:make_cache_current_line() endif - if !neocomplete#util#is_text_changed() - call s:indent_current_line() - endif -endfunction"}}} - -function! s:complete_delay(timer) abort "{{{ - let event = s:timer.event - unlet! s:timer - return s:do_auto_complete(event) -endfunction"}}} - -function! neocomplete#handler#_do_auto_complete(event) abort "{{{ - if s:check_in_do_auto_complete(a:event) - return - endif - - if g:neocomplete#auto_complete_delay > 0 && has('timers') - if exists('s:timer') - call timer_stop(s:timer.id) - endif - if a:event !=# 'Manual' - let s:timer = { 'event': a:event } - let s:timer.id = timer_start( - \ g:neocomplete#auto_complete_delay, - \ function('s:complete_delay')) - return - endif - endif - - return s:do_auto_complete(a:event) -endfunction"}}} - -function! s:do_auto_complete(event) abort "{{{ + " indent line matched by indentkeys + let cur_text = matchstr(getline('.'), '^.*\%'.col('.').'c') + if neocomplete.indent_text == matchstr(getline('.'), '\S.*$') + return + endif + + for word in filter(map(split(&l:indentkeys, ','), + \ "v:val =~ '^<.*>$' ? matchstr(v:val, '^<\\zs.*\\ze>$') + \ : matchstr(v:val, 'e\\|=\\zs.*')"), + \ "v:val != ''") + + if word ==# 'e' + let word = 'else' + endif + + if stridx(cur_text, word, len(cur_text)-len(word)-1) >= 0 + call neocomplete#helper#indent_current_line() + let neocomplete.indent_text = matchstr(getline('.'), '\S.*$') + break + endif + endfor +endfunction"}}} + +function! neocomplete#handler#_do_auto_complete(event) "{{{ + if s:check_in_do_auto_complete() + return + endif + let neocomplete = neocomplete#get_current_neocomplete() - - if s:check_in_do_auto_complete(a:event) - return - endif - let neocomplete.skipped = 0 let neocomplete.event = a:event - call neocomplete#helper#clear_result() - - " Set context filetype. - call neocomplete#context_filetype#set() let cur_text = neocomplete#get_cur_text(1) let complete_pos = -1 @@ -177,8 +197,8 @@ " Check multibyte input or eskk or spaces. if cur_text =~ '^\s*$' - \ || (!neocomplete#is_eskk_enabled() - \ && neocomplete#is_multibyte_input(cur_text)) + \ || neocomplete#is_eskk_enabled() + \ || neocomplete#is_multibyte_input(cur_text) call neocomplete#print_debug('Skipped.') return endif @@ -194,7 +214,18 @@ endtry if empty(neocomplete.complete_sources) - call s:check_fallback(cur_text) + let complete_pos = s:check_fallback(cur_text) + return + endif + + let complete_pos = + \ neocomplete#complete#_get_complete_pos( + \ neocomplete.complete_sources) + let base = cur_text[complete_pos :] + + let neocomplete.candidates = neocomplete#complete#_get_words( + \ neocomplete.complete_sources, complete_pos, base) + if empty(neocomplete.candidates) return endif @@ -206,7 +237,7 @@ endtry endfunction"}}} -function! s:check_in_do_auto_complete(event) abort "{{{ +function! s:check_in_do_auto_complete() "{{{ if neocomplete#is_locked() return 1 endif @@ -215,45 +246,40 @@ if &l:completefunc != '' && &l:buftype =~ 'nofile' return 1 endif - - let neocomplete = neocomplete#get_current_neocomplete() - " Detect foldmethod. - if (&l:foldmethod ==# 'expr' || &l:foldmethod ==# 'syntax') - \ && !neocomplete.detected_foldmethod - \ && a:event !=# 'InsertEnter' - let neocomplete.detected_foldmethod = 1 - call neocomplete#print_error( - \ printf('foldmethod = "%s" is detected.', &foldmethod)) - redir => foldmethod - verbose setlocal foldmethod? - redir END - for msg in split(substitute(foldmethod, '\t', '', 'g'), "\n") - call neocomplete#print_error(msg) - endfor - call neocomplete#print_error( - \ 'You should disable it or install FastFold plugin.') - endif endfunction"}}} -function! s:is_skip_auto_complete(cur_text) abort "{{{ +function! s:is_skip_auto_complete(cur_text) "{{{ let neocomplete = neocomplete#get_current_neocomplete() if (g:neocomplete#lock_iminsert && &l:iminsert) \ || (&l:formatoptions =~# '[tca]' && &l:textwidth > 0 - \ && strdisplaywidth(a:cur_text) >= &l:textwidth) + \ && strwidth(a:cur_text) >= &l:textwidth) let neocomplete.skip_next_complete = 0 return 1 endif let skip = neocomplete.skip_next_complete - if !skip || s:is_delimiter() + if !skip return 0 endif + " Check delimiter pattern. + let is_delimiter = 0 + let filetype = neocomplete#get_context_filetype() + + for delimiter in ['/', '.'] + + \ get(g:neocomplete#delimiter_patterns, filetype, []) + if stridx(a:cur_text, delimiter, + \ len(a:cur_text) - len(delimiter)) >= 0 + let is_delimiter = 1 + break + endif + endfor + let neocomplete.skip_next_complete = 0 - return skip + return !(is_delimiter && skip == 2) endfunction"}}} -function! s:close_preview_window() abort "{{{ +function! s:close_preview_window() "{{{ if g:neocomplete#enable_auto_close_preview \ && bufname('%') !=# '[Command Line]' \ && winnr('$') != 1 && !&l:previewwindow @@ -262,7 +288,7 @@ pclose! endif endfunction"}}} -function! s:make_cache_current_line() abort "{{{ +function! s:make_cache_current_line() "{{{ let neocomplete = neocomplete#get_current_neocomplete() if neocomplete#helper#is_enabled_source('buffer', \ neocomplete.context_filetype) @@ -275,7 +301,7 @@ call neocomplete#sources#member#make_cache_current_line() endif endfunction"}}} -function! s:check_force_omni(cur_text) abort "{{{ +function! s:check_force_omni(cur_text) "{{{ let cur_text = a:cur_text let complete_pos = neocomplete#helper#get_force_omni_complete_pos(cur_text) @@ -287,79 +313,37 @@ return complete_pos endfunction"}}} -function! s:check_fallback(cur_text) abort "{{{ +function! s:check_fallback(cur_text) "{{{ let cur_text = a:cur_text let complete_pos = match(cur_text, '\h\w*$') let neocomplete = neocomplete#get_current_neocomplete() - if empty(g:neocomplete#fallback_mappings) - \ || len(matchstr(cur_text, '\h\w*$')) - \ < g:neocomplete#auto_completion_start_length - \ || neocomplete.skip_next_complete - \ || neocomplete#complete#_check_previous_position( + if !empty(g:neocomplete#fallback_mappings) + \ && len(matchstr(cur_text, '\h\w*$')) + \ >= g:neocomplete#auto_completion_start_length + \ && !neocomplete.skip_next_complete + \ && !neocomplete#complete#_check_previous_position( \ cur_text, complete_pos) - return + let key = '' + for i in range(0, len(g:neocomplete#fallback_mappings)-1) + let key .= '=neocomplete#mappings#fallback(' . i . ')' + endfor + execute 'inoremap (neocomplete_fallback)' key + + " Fallback + call s:complete_key("\(neocomplete_fallback)") + + return complete_pos endif - let key = '' - for i in range(0, len(g:neocomplete#fallback_mappings)-1) - let key .= '=neocomplete#mappings#fallback(' . i . ')' - endfor - execute 'inoremap (neocomplete_fallback)' key - - " Fallback - call s:complete_key("\(neocomplete_fallback)") + return -1 endfunction"}}} -function! s:complete_key(key) abort "{{{ +function! s:complete_key(key) "{{{ call neocomplete#helper#complete_configure() call feedkeys(a:key) endfunction"}}} -function! s:indent_current_line() abort "{{{ - " indent line matched by indentkeys - let neocomplete = neocomplete#get_current_neocomplete() - - let cur_text = matchstr(getline('.'), '^.*\%'.col('.').'c') - if neocomplete.indent_text == matchstr(getline('.'), '\S.*$') - return - endif - - for word in filter(map(split(&l:indentkeys, ','), - \ "v:val =~ '^<.*>$' ? matchstr(v:val, '^<\\zs.*\\ze>$') - \ : matchstr(v:val, ':\\|e\\|=\\zs.*')"), - \ "v:val != ''") - - if word ==# 'e' - let word = 'else' - endif - - let lastpos = len(cur_text)-len(word) - if lastpos >= 0 && strridx(cur_text, word) == lastpos - call neocomplete#helper#indent_current_line() - let neocomplete.indent_text = matchstr(getline('.'), '\S.*$') - break - endif - endfor -endfunction"}}} -function! s:is_delimiter() abort "{{{ - " Check delimiter pattern. - let is_delimiter = 0 - let filetype = neocomplete#get_context_filetype() - let cur_text = neocomplete#get_cur_text(1) - - for delimiter in ['/', '.'] + - \ get(g:neocomplete#delimiter_patterns, filetype, []) - if stridx(cur_text, delimiter, - \ len(cur_text) - len(delimiter)) >= 0 - let is_delimiter = 1 - break - endif - endfor - - return is_delimiter -endfunction"}}} - let &cpo = s:save_cpo unlet s:save_cpo === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/helper.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/helper.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/helper.vim 2015-08-25 11:01:00 +0000 @@ -26,22 +26,18 @@ let s:save_cpo = &cpo set cpo&vim -function! neocomplete#helper#get_cur_text(...) abort "{{{ +function! neocomplete#helper#get_cur_text(...) "{{{ let neocomplete = neocomplete#get_current_neocomplete() let is_skip_char = get(a:000, 0, 0) - let mode = mode() - if neocomplete.event ==# 'InsertEnter' - let mode = 'i' - endif let cur_text = - \ (mode ==# 'i' ? + \ ((neocomplete.event ==# 'InsertEnter' || mode() ==# 'i') ? \ (col('.')-1) : col('.')) >= len(getline('.')) ? \ getline('.') : \ matchstr(getline('.'), - \ '^.*\%' . (mode ==# 'i' && !is_skip_char ? + \ '^.*\%' . (mode() ==# 'i' && !is_skip_char ? \ col('.') : col('.') - 1) - \ . 'c' . (mode ==# 'i' ? '' : '.')) + \ . 'c' . (mode() ==# 'i' ? '' : '.')) if cur_text =~ '^.\{-}\ze\S\+$' let complete_str = matchstr(cur_text, '\S\+$') @@ -60,7 +56,21 @@ return neocomplete.cur_text endfunction"}}} -function! neocomplete#helper#get_force_omni_complete_pos(cur_text) abort "{{{ +function! neocomplete#helper#get_force_omni_complete_pos(cur_text) "{{{ + " Check eskk complete length. + if neocomplete#is_eskk_enabled() + \ && exists('g:eskk#start_completion_length') + if !neocomplete#is_eskk_convertion(a:cur_text) + \ || !neocomplete#is_multibyte_input(a:cur_text) + return -1 + endif + + let complete_pos = call(&l:omnifunc, [1, '']) + let complete_str = a:cur_text[complete_pos :] + return (neocomplete#util#mb_strlen(complete_str) >= + \ g:eskk#start_completion_length) ? complete_pos : -1 + endif + let filetype = neocomplete#get_context_filetype() let omnifunc = &l:omnifunc @@ -84,22 +94,51 @@ return match(a:cur_text, '\%(' . pattern . '\m\)$') endfunction"}}} -function! neocomplete#helper#is_enabled_source(source, filetype) abort "{{{ +function! neocomplete#helper#is_enabled_source(source, filetype) "{{{ let source = type(a:source) == type('') ? \ get(neocomplete#variables#get_sources(), a:source, {}) \ : a:source return !empty(source) && (empty(source.filetypes) || - \ neocomplete#helper#check_filetype(source.filetypes)) + \ !empty(neocomplete#helper#ftdictionary2list( + \ source.filetypes, a:filetype))) \ && (!get(source.disabled_filetypes, '_', 0) && - \ !neocomplete#helper#check_filetype(source.disabled_filetypes)) -endfunction"}}} - -function! neocomplete#helper#get_source_filetypes(filetype) abort "{{{ - return neocomplete#context_filetype#filetypes() -endfunction"}}} - -function! neocomplete#helper#complete_check() abort "{{{ + \ empty(neocomplete#helper#ftdictionary2list( + \ source.disabled_filetypes, a:filetype))) +endfunction"}}} + +function! neocomplete#helper#get_source_filetypes(filetype) "{{{ + let filetype = (a:filetype == '') ? 'nothing' : a:filetype + + let filetypes = [filetype] + if filetype =~ '\.' + if exists('g:neocomplete#ignore_composite_filetypes') + \ && has_key(g:neocomplete#ignore_composite_filetypes, filetype) + let filetypes = [g:neocomplete#ignore_composite_filetypes[filetype]] + else + " Set composite filetype. + let filetypes += split(filetype, '\.') + endif + endif + + if exists('g:neocomplete#same_filetypes') + for ft in copy(filetypes) + let filetypes += split(get(g:neocomplete#same_filetypes, ft, + \ get(g:neocomplete#same_filetypes, '_', '')), ',') + endfor + endif + if neocomplete#is_text_mode() + call add(filetypes, 'text') + endif + + if len(filetypes) > 1 + let filetypes = neocomplete#util#uniq(filetypes) + endif + + return filetypes +endfunction"}}} + +function! neocomplete#helper#complete_check() "{{{ let neocomplete = neocomplete#get_current_neocomplete() if g:neocomplete#enable_debug echomsg split(reltimestr(reltime(neocomplete.start_time)))[0] @@ -119,13 +158,13 @@ return ret endfunction"}}} -function! neocomplete#helper#get_syn_name(is_trans) abort "{{{ +function! neocomplete#helper#get_syn_name(is_trans) "{{{ return len(getline('.')) < 200 ? \ synIDattr(synIDtrans(synID(line('.'), mode() ==# 'i' ? \ col('.')-1 : col('.'), a:is_trans)), 'name') : '' endfunction"}}} -function! neocomplete#helper#match_word(cur_text, ...) abort "{{{ +function! neocomplete#helper#match_word(cur_text, ...) "{{{ let pattern = a:0 >= 1 ? a:1 : neocomplete#get_keyword_pattern_end() " Check wildcard. @@ -137,7 +176,7 @@ return [complete_pos, complete_str] endfunction"}}} -function! neocomplete#helper#filetype_complete(arglead, cmdline, cursorpos) abort "{{{ +function! neocomplete#helper#filetype_complete(arglead, cmdline, cursorpos) "{{{ " Dup check. let ret = {} for item in map( @@ -153,7 +192,7 @@ return sort(keys(ret)) endfunction"}}} -function! neocomplete#helper#unite_patterns(pattern_var, filetype) abort "{{{ +function! neocomplete#helper#unite_patterns(pattern_var, filetype) "{{{ let keyword_patterns = [] lua << EOF @@ -161,6 +200,7 @@ local patterns = vim.eval('keyword_patterns') local filetypes = vim.eval("split(a:filetype, '\\.')") local pattern_var = vim.eval('a:pattern_var') + local same_filetypes = vim.eval('get(g:, "neocomplete#same_filetypes", {})') local dup_check = {} for i = 0, #filetypes-1 do @@ -171,6 +211,16 @@ dup_check[ft] = 1 patterns:add(pattern_var[ft]) end + + -- Same filetype. + if same_filetypes[ft] ~= nil then + for ft in string.gmatch(same_filetypes[ft], '[^,]+') do + if pattern_var[ft] ~= nil and dup_check[ft] == nil then + dup_check[ft] = 1 + patterns:add(pattern_var[ft]) + end + end + end end if #patterns == 0 then @@ -188,12 +238,12 @@ return join(keyword_patterns, '\m\|') endfunction"}}} -function! neocomplete#helper#check_filetype(dictionary) abort "{{{ - return !empty(filter(neocomplete#context_filetype#filetypes(), - \ 'get(a:dictionary, v:val, 0)')) +function! neocomplete#helper#ftdictionary2list(dictionary, filetype) "{{{ + return map(filter(neocomplete#get_source_filetypes(a:filetype), + \ 'has_key(a:dictionary, v:val)'), 'a:dictionary[v:val]') endfunction"}}} -function! neocomplete#helper#get_sources_list(...) abort "{{{ +function! neocomplete#helper#get_sources_list(...) "{{{ let filetype = neocomplete#get_context_filetype() let source_names = exists('b:neocomplete_sources') ? @@ -223,14 +273,15 @@ let neocomplete = neocomplete#get_current_neocomplete() let neocomplete.sources = filter(sources, " - \ empty(v:val.filetypes) || - \ neocomplete#helper#check_filetype(v:val.filetypes)") + \ (empty(v:val.filetypes) || + \ !empty(neocomplete#helper#ftdictionary2list( + \ v:val.filetypes, neocomplete.context_filetype)))") let neocomplete.sources_filetype = neocomplete.context_filetype return neocomplete.sources endfunction"}}} -function! neocomplete#helper#clear_result() abort "{{{ +function! neocomplete#helper#clear_result() "{{{ let neocomplete = neocomplete#get_current_neocomplete() let neocomplete.complete_str = '' @@ -243,9 +294,15 @@ " Restore completeopt. let &completeopt = neocomplete.completeopt endif + + " Clear context. + for source in values(neocomplete#variables#get_sources()) + let source.neocomplete__context = neocomplete#init#_context( + \ source.neocomplete__context) + endfor endfunction"}}} -function! neocomplete#helper#call_hook(sources, hook_name, context) abort "{{{ +function! neocomplete#helper#call_hook(sources, hook_name, context) "{{{ for source in neocomplete#util#convert2list(a:sources) try if has_key(source.hooks, a:hook_name) @@ -264,7 +321,7 @@ endfor endfunction"}}} -function! neocomplete#helper#call_filters(filters, source, context) abort "{{{ +function! neocomplete#helper#call_filters(filters, source, context) "{{{ let context = extend(a:source.neocomplete__context, a:context) for filter in a:filters try @@ -283,7 +340,7 @@ return context.candidates endfunction"}}} -function! neocomplete#helper#sort_human(candidates) abort "{{{ +function! neocomplete#helper#sort_human(candidates) "{{{ " Use lua interface. lua << EOF do @@ -301,11 +358,11 @@ return a:candidates endfunction"}}} -function! neocomplete#helper#check_invalid_omnifunc(omnifunc) abort "{{{ +function! neocomplete#helper#check_invalid_omnifunc(omnifunc) "{{{ return a:omnifunc == '' || (a:omnifunc !~ '#' && !exists('*' . a:omnifunc)) endfunction"}}} -function! neocomplete#helper#indent_current_line() abort "{{{ +function! neocomplete#helper#indent_current_line() "{{{ let pos = getpos('.') let len = len(getline('.')) let equalprg = &l:equalprg @@ -319,7 +376,9 @@ endtry endfunction"}}} -function! neocomplete#helper#complete_configure() abort "{{{ +function! neocomplete#helper#complete_configure() "{{{ + call s:save_foldinfo() + set completeopt-=menu set completeopt-=longest set completeopt+=menuone @@ -340,7 +399,7 @@ endif endfunction"}}} -function! neocomplete#helper#clean(directory) abort "{{{ +function! neocomplete#helper#clean(directory) "{{{ let directory = neocomplete#get_data_directory() .'/'.a:directory for file in split(glob(directory . '/*'), '\n') let orig = substitute(substitute(fnamemodify(file, ':t'), @@ -351,6 +410,26 @@ endfor endfunction"}}} +function! s:save_foldinfo() "{{{ + " Save foldinfo. + let winnrs = filter(range(1, winnr('$')), + \ "winbufnr(v:val) == bufnr('%')") + + " Note: for foldmethod=expr or syntax. + call filter(winnrs, " + \ (getwinvar(v:val, '&foldmethod') ==# 'expr' || + \ getwinvar(v:val, '&foldmethod') ==# 'syntax') && + \ getwinvar(v:val, '&modifiable')") + for winnr in winnrs + call setwinvar(winnr, 'neocomplete_foldinfo', { + \ 'foldmethod' : getwinvar(winnr, '&foldmethod'), + \ 'foldexpr' : getwinvar(winnr, '&foldexpr') + \ }) + call setwinvar(winnr, '&foldmethod', 'manual') + call setwinvar(winnr, '&foldexpr', 0) + endfor +endfunction"}}} + let &cpo = s:save_cpo unlet s:save_cpo === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/init.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/init.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/init.vim 2015-08-25 11:01:00 +0000 @@ -30,14 +30,14 @@ let s:is_enabled = 0 endif -function! neocomplete#init#enable() abort "{{{ +function! neocomplete#init#enable() "{{{ if neocomplete#is_enabled() return endif if !(has('lua') && (v:version > 703 || v:version == 703 && has('patch885'))) echomsg 'neocomplete does not work with this version of Vim.' - echomsg 'neocomplete requires Vim 7.3.885 or later with Lua support ("+lua").' + echomsg 'It requires Vim 7.3.885 or later with Lua support ("+lua").' return endif @@ -55,7 +55,7 @@ doautocmd neocomplete InsertEnter endfunction"}}} -function! neocomplete#init#disable() abort "{{{ +function! neocomplete#init#disable() "{{{ if !neocomplete#is_enabled() return endif @@ -73,11 +73,11 @@ \ 'on_final', {}) endfunction"}}} -function! neocomplete#init#is_enabled() abort "{{{ +function! neocomplete#init#is_enabled() "{{{ return s:is_enabled endfunction"}}} -function! neocomplete#init#_autocmds() abort "{{{ +function! neocomplete#init#_autocmds() "{{{ augroup neocomplete autocmd! autocmd InsertEnter * @@ -86,24 +86,50 @@ \ call neocomplete#handler#_on_insert_leave() autocmd CursorMovedI * \ call neocomplete#handler#_on_moved_i() + autocmd BufWritePost * + \ call neocomplete#handler#_on_write_post() + autocmd VimLeavePre * + \ call neocomplete#init#disable() autocmd InsertCharPre * \ call neocomplete#handler#_on_insert_char_pre() autocmd TextChangedI * \ call neocomplete#handler#_on_text_changed() - autocmd CompleteDone * + autocmd VimLeavePre * + \ call neocomplete#init#disable() + augroup END + + if g:neocomplete#enable_cursor_hold_i + augroup neocomplete + autocmd CursorHoldI * + \ call neocomplete#handler#_do_auto_complete('CursorHoldI') + autocmd InsertEnter * + \ call neocomplete#handler#_change_update_time() + autocmd InsertLeave * + \ call neocomplete#handler#_restore_update_time() + augroup END + else + " Note: Vim 7.4.143 fixed TextChangedI bug. + let event = + \ (g:neocomplete#enable_insert_char_pre) ? + \ 'InsertCharPre' : + \ (v:version > 704 || v:version == 704 && has('patch143')) ? + \ 'TextChangedI' : 'CursorMovedI' + execute 'autocmd neocomplete' event '*' + \ 'call neocomplete#handler#_do_auto_complete("'.event.'")' + endif + + if !g:neocomplete#enable_cursor_hold_i + autocmd neocomplete InsertEnter * + \ call neocomplete#handler#_do_auto_complete('InsertEnter') + endif + + if exists('v:completed_item') + autocmd neocomplete CompleteDone * \ call neocomplete#handler#_on_complete_done() - augroup END - - let event = neocomplete#util#is_text_changed() ? - \ 'TextChangedI' : 'CursorMovedI' - execute 'autocmd neocomplete' event '*' - \ 'call neocomplete#handler#_do_auto_complete("'.event.'")' - - autocmd neocomplete InsertEnter * - \ call neocomplete#handler#_do_auto_complete('InsertEnter') + endif endfunction"}}} -function! neocomplete#init#_others() abort "{{{ +function! neocomplete#init#_others() "{{{ call neocomplete#init#_variables() call neocomplete#commands#_initialize() @@ -129,9 +155,12 @@ command! -nargs=0 -bar NeoCompleteDisable \ call neocomplete#init#disable() + + " Set for echodoc. + call neocomplete#echodoc#init() endfunction"}}} -function! neocomplete#init#_variables() abort "{{{ +function! neocomplete#init#_variables() "{{{ " Initialize keyword patterns. "{{{ call neocomplete#util#set_default_dictionary( \'g:neocomplete#keyword_patterns', @@ -363,6 +392,125 @@ \'\h[[:alnum:]_.-]*') "}}} + " Initialize same file types. "{{{ + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'c', 'cpp') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'cpp', 'c') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'erb', 'ruby,html,xhtml') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'html,xml', 'xhtml') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'html,xhtml', 'css,stylus,less') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'css', 'scss') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'scss', 'css') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'stylus', 'css') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'less', 'css') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'xhtml', 'html,xml') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'help', 'vim') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'tex', 'bib,plaintex') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'plaintex', 'bib,tex') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'lingr-say', 'lingr-messages,lingr-members') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'J6uil_say', 'J6uil') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'vimconsole', 'vim') + + " Interactive filetypes. + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'int-irb', 'ruby') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'int-ghci,int-hugs', 'haskell') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'int-python,int-ipython', 'python') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'int-gosh', 'scheme') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'int-clisp', 'lisp') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'int-erl', 'erlang') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'int-zsh', 'zsh') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'int-bash', 'bash') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'int-sh', 'sh') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'int-cmdproxy', 'dosbatch') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'int-powershell', 'powershell') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'int-perlsh', 'perl') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'int-perl6', 'perl6') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'int-ocaml', 'ocaml') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'int-clj,int-lein', 'clojure') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'int-sml,int-smlsharp', 'sml') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'int-js,int-kjs,int-rhino', 'javascript') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'int-coffee', 'coffee') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'int-gdb', 'gdb') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'int-scala', 'scala') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'int-nyaos', 'nyaos') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#same_filetypes', + \ 'int-php', 'php') + "}}} + " Initialize delimiter patterns. "{{{ call neocomplete#util#set_default_dictionary( \ 'g:neocomplete#delimiter_patterns', @@ -398,11 +546,8 @@ " Initialize text mode filetypes. "{{{ call neocomplete#util#set_default_dictionary( \ 'g:neocomplete#text_mode_filetypes', - \ join(['hybrid', 'text', 'help', 'tex', 'gitcommit', 'gitrebase', - \ 'vcs-commit', 'markdown', 'mkd', 'textile', 'creole', - \ 'org', 'rdoc', 'mediawiki', 'rst', 'asciidoc', 'pod', - \ 'gita-commit', 'J6uil_say', - \ ], ','), 1) + \ 'hybrid,text,help,tex,gitcommit,gitrebase,vcs-commit,markdown,mkd,'. + \ 'textile,creole,org,rdoc,mediawiki,rst,asciidoc,pod', 1) "}}} " Initialize tags filter patterns. "{{{ @@ -428,7 +573,7 @@ endif endfunction"}}} -function! neocomplete#init#_current_neocomplete() abort "{{{ +function! neocomplete#init#_current_neocomplete() "{{{ let b:neocomplete = { \ 'context' : { \ 'input' : '', @@ -440,8 +585,10 @@ \ 'skip_next_complete' : 0, \ 'filetype' : '', \ 'context_filetype' : '', - \ 'context_filetypes' : [], + \ 'context_filetype_range' : + \ [[1, 1], [line('$'), len(getline('$'))+1]], \ 'completion_length' : -1, + \ 'update_time_save' : &updatetime, \ 'foldinfo' : [], \ 'skipped' : 0, \ 'event' : '', @@ -458,12 +605,12 @@ \ 'start_time' : reltime(), \ 'linenr' : 0, \ 'completeopt' : &completeopt, + \ 'overlapped_items' : {}, \ 'sources' : [], \ 'sources_filetype' : '', \ 'within_comment' : 0, \ 'is_auto_complete' : 0, \ 'indent_text' : '', - \ 'detected_foldmethod' : 0, \ 'default_matchers' : neocomplete#init#_filters( \ (g:neocomplete#enable_fuzzy_completion ? \ ['matcher_fuzzy'] : ['matcher_head']) @@ -471,7 +618,7 @@ \} endfunction"}}} -function! neocomplete#init#_sources(names) abort "{{{ +function! neocomplete#init#_sources(names) "{{{ if !exists('s:loaded_source_files') " Initialize. let s:loaded_source_files = {} @@ -519,7 +666,7 @@ endfor endfunction"}}} -function! neocomplete#init#_source(source) abort "{{{ +function! neocomplete#init#_source(source) "{{{ let default = { \ 'is_volatile' : 0, \ 'max_candidates' : 0, @@ -527,6 +674,7 @@ \ 'disabled' : 0, \ 'disabled_filetypes' : {}, \ 'hooks' : {}, + \ 'mark' : '', \ 'matchers' : [], \ 'sorters' : ['sorter_rank'], \ 'converters' : [ @@ -535,8 +683,6 @@ \ 'converter_abbr', \ ], \ 'keyword_patterns' : g:neocomplete#keyword_patterns, - \ 'min_pattern_length' : g:neocomplete#auto_completion_start_length, - \ 'input_pattern' : '', \ 'neocomplete__context' : neocomplete#init#_context({}), \ } @@ -564,17 +710,18 @@ \ empty(source.filetypes) ? 10 : 100 endif - if !has_key(source, 'mark') - " Set default mark. - let source.mark = '[' . source.name . ']' - endif - if !has_key(source.keyword_patterns, '_') " Set default keyword pattern. let source.keyword_patterns['_'] = \ get(g:neocomplete#keyword_patterns, '_', '\h\w*') endif + if !has_key(source, 'min_pattern_length') + " Set min_pattern_length. + let source.min_pattern_length = (source.kind ==# 'keyword') ? + \ g:neocomplete#auto_completion_start_length : 0 + endif + let source.neocomplete__matchers = neocomplete#init#_filters( \ neocomplete#util#convert2list(source.matchers)) let source.neocomplete__sorters = neocomplete#init#_filters( @@ -587,7 +734,7 @@ return source endfunction"}}} -function! neocomplete#init#_filters(names) abort "{{{ +function! neocomplete#init#_filters(names) "{{{ let _ = [] let filters = neocomplete#variables#get_filters() @@ -624,7 +771,7 @@ return _ endfunction"}}} -function! neocomplete#init#_filter(filter) abort "{{{ +function! neocomplete#init#_filter(filter) "{{{ let default = { \ } @@ -638,18 +785,14 @@ return filter endfunction"}}} -function! neocomplete#init#_context(context) abort "{{{ - let filetype = neocomplete#get_context_filetype() +function! neocomplete#init#_context(context) "{{{ return extend(a:context, { \ 'input' : '', \ 'prev_complete_pos' : -1, \ 'prev_candidates' : [], - \ 'prev_line' : '', \ 'complete_pos' : -1, \ 'complete_str' : '', - \ 'candidates' : [], - \ 'filetype' : filetype, - \ 'filetypes' : neocomplete#context_filetype#filetypes(), + \ 'candidates' : [] \ }) endfunction"}}} === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/mappings.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/mappings.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/mappings.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! neocomplete#mappings#define_default_mappings() abort "{{{ +function! neocomplete#mappings#define_default_mappings() "{{{ inoremap (neocomplete_start_unite_complete) \ unite#sources#neocomplete#start_complete() inoremap (neocomplete_start_unite_quick_match) @@ -61,12 +61,9 @@ inoremap neocomplete#smart_close_popup()."\" endif endif - - inoremap (neocomplete_auto_refresh) - \ =neocomplete#mappings#refresh() endfunction"}}} -function! neocomplete#mappings#auto_complete() abort "{{{ +function! neocomplete#mappings#auto_complete() "{{{ let neocomplete = neocomplete#get_current_neocomplete() let cur_text = neocomplete#get_cur_text(1) let complete_pos = @@ -77,17 +74,13 @@ let neocomplete.candidates = neocomplete#complete#_get_words( \ neocomplete.complete_sources, complete_pos, base) let neocomplete.complete_str = base - let neocomplete.refresh = 0 - if empty(neocomplete.candidates) - return '' - endif " Start auto complete. call complete(complete_pos+1, neocomplete.candidates) return '' endfunction"}}} -function! neocomplete#mappings#manual_complete() abort "{{{ +function! neocomplete#mappings#manual_complete() "{{{ let neocomplete = neocomplete#get_current_neocomplete() let cur_text = neocomplete#get_cur_text(1) let complete_sources = neocomplete#complete#_get_results( @@ -101,49 +94,39 @@ let neocomplete.candidates = neocomplete#complete#_get_words( \ complete_sources, complete_pos, base) let neocomplete.complete_str = base - if empty(neocomplete.candidates) - return '' - endif " Start auto complete. call complete(complete_pos+1, neocomplete.candidates) return '' endfunction"}}} -function! neocomplete#mappings#smart_close_popup() abort "{{{ +function! neocomplete#mappings#smart_close_popup() "{{{ return neocomplete#mappings#cancel_popup() endfunction "}}} -function! neocomplete#mappings#close_popup() abort "{{{ +function! neocomplete#mappings#close_popup() "{{{ let neocomplete = neocomplete#get_current_neocomplete() let neocomplete.complete_str = '' - let neocomplete.old_cur_text = neocomplete#get_cur_text(1) - let neocomplete.skip_next_complete = 1 + let neocomplete.skip_next_complete = 2 return pumvisible() ? "\" : '' endfunction "}}} -function! neocomplete#mappings#cancel_popup() abort "{{{ +function! neocomplete#mappings#cancel_popup() "{{{ let neocomplete = neocomplete#get_current_neocomplete() let neocomplete.complete_str = '' - let neocomplete.old_cur_text = neocomplete#get_cur_text(1) - let neocomplete.old_complete_pos = col('.') - if mode() !=# 'i' - let neocomplete.old_complete_pos += 1 - endif - let neocomplete.old_linenr = line('.') let neocomplete.skip_next_complete = 1 return pumvisible() ? "\" : '' endfunction "}}} -function! neocomplete#mappings#popup_post() abort "{{{ +function! neocomplete#mappings#popup_post() "{{{ return !pumvisible() ? "" : \ g:neocomplete#enable_auto_select ? "\\" : "\" endfunction"}}} -function! neocomplete#mappings#undo_completion() abort "{{{ +function! neocomplete#mappings#undo_completion() "{{{ if !neocomplete#is_enabled() return '' endif @@ -152,19 +135,16 @@ " Get cursor word. let complete_str = - \ (!exists('v:completed_item') || empty(v:completed_item)) ? - \ neocomplete#helper#match_word(neocomplete#get_cur_text(1))[1] : - \ v:completed_item.word - + \ neocomplete#helper#match_word(neocomplete#get_cur_text(1))[1] let old_keyword_str = neocomplete.complete_str let neocomplete.complete_str = complete_str return (!pumvisible() ? '' : \ complete_str ==# old_keyword_str ? "\" : "\") - \. repeat("\", strchars(complete_str)) . old_keyword_str + \. repeat("\", len(complete_str)) . old_keyword_str endfunction"}}} -function! neocomplete#mappings#complete_common_string() abort "{{{ +function! neocomplete#mappings#complete_common_string() "{{{ if !neocomplete#is_enabled() return '' endif @@ -174,6 +154,7 @@ let neocomplete.event = 'mapping' let complete_str = \ neocomplete#helper#match_word(neocomplete#get_cur_text(1))[1] + let neocomplete.event = '' if complete_str == '' return '' @@ -197,6 +178,7 @@ \ 'complete_str' : complete_str}) if empty(candidates) + let &ignorecase = ignorecase_save return '' endif @@ -206,20 +188,25 @@ let common_str = common_str[: -2] endwhile endfor + + if &ignorecase + let common_str = tolower(common_str) + endif finally let &ignorecase = ignorecase_save endtry if common_str == '' \ || complete_str ==? common_str + \ || len(common_str) == len(candidates[0].word) return '' endif return (pumvisible() ? "\" : '') - \ . repeat("\", strchars(complete_str)) . common_str + \ . repeat("\", len(complete_str)) . common_str endfunction"}}} -function! neocomplete#mappings#fallback(i) abort "{{{ +function! neocomplete#mappings#fallback(i) "{{{ let mapping = g:neocomplete#fallback_mappings[a:i] return (pumvisible() || (mapping ==? "\\" \ && &l:omnifunc == '')) ? "" : @@ -227,14 +214,8 @@ \ "" : "\")) endfunction"}}} -function! neocomplete#mappings#refresh() abort "{{{ - let neocomplete = neocomplete#get_current_neocomplete() - let neocomplete.refresh = 1 - return pumvisible() ? "\" : '' -endfunction"}}} - " Manual complete wrapper. -function! neocomplete#mappings#start_manual_complete(...) abort "{{{ +function! neocomplete#mappings#start_manual_complete(...) "{{{ if !neocomplete#is_enabled() return '' endif === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/sources/buffer.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/sources/buffer.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/sources/buffer.vim 2015-08-25 11:01:00 +0000 @@ -49,10 +49,9 @@ \ 'min_pattern_length' : \ g:neocomplete#auto_completion_start_length, \ 'hooks' : {}, - \ 'is_volatile' : 1, \} -function! s:source.hooks.on_init(context) abort "{{{ +function! s:source.hooks.on_init(context) "{{{ let s:buffer_sources = {} augroup neocomplete "{{{ @@ -77,37 +76,37 @@ endfunction "}}} -function! s:source.hooks.on_final(context) abort "{{{ +function! s:source.hooks.on_final(context) "{{{ silent! delcommand NeoCompleteBufferMakeCache let s:buffer_sources = {} endfunction"}}} -function! s:source.hooks.on_post_filter(context) abort "{{{ +function! s:source.hooks.on_post_filter(context) "{{{ " Filters too long word. call filter(a:context.candidates, \ 'len(v:val.word) < g:neocomplete#sources#buffer#max_keyword_width') endfunction"}}} -function! s:source.gather_candidates(context) abort "{{{ - call s:check_async_cache(a:context) +function! s:source.gather_candidates(context) "{{{ + call s:check_async_cache() let keyword_list = [] - for source in s:get_sources_list(a:context) + for source in s:get_sources_list() let keyword_list += source.words endfor return keyword_list endfunction"}}} -function! neocomplete#sources#buffer#define() abort "{{{ +function! neocomplete#sources#buffer#define() "{{{ return s:source endfunction"}}} -function! neocomplete#sources#buffer#get_frequencies() abort "{{{ +function! neocomplete#sources#buffer#get_frequencies() "{{{ return get(get(s:buffer_sources, bufnr('%'), {}), 'frequencies', {}) endfunction"}}} -function! neocomplete#sources#buffer#make_cache_current_line() abort "{{{ +function! neocomplete#sources#buffer#make_cache_current_line() "{{{ if neocomplete#is_locked() return endif @@ -128,9 +127,10 @@ \ || filepath !~# g:neocomplete#sources#buffer#disabled_pattern) endfunction"}}} -function! s:get_sources_list(context) abort "{{{ +function! s:get_sources_list() "{{{ let filetypes_dict = {} - for filetype in a:context.filetypes + for filetype in neocomplete#get_source_filetypes( + \ neocomplete#get_context_filetype()) let filetypes_dict[filetype] = 1 endfor @@ -141,7 +141,7 @@ \ || (bufname('%') ==# '[Command Line]' && bufwinnr('#') == v:key)")) endfunction"}}} -function! s:initialize_source(srcname) abort "{{{ +function! s:initialize_source(srcname) "{{{ let path = fnamemodify(bufname(a:srcname), ':p') let filename = fnamemodify(path, ':t') if filename == '' @@ -167,7 +167,7 @@ \} endfunction"}}} -function! s:make_cache_file(srcname) abort "{{{ +function! s:make_cache_file(srcname) "{{{ " Initialize source. if !has_key(s:buffer_sources, a:srcname) call s:initialize_source(a:srcname) @@ -196,7 +196,7 @@ \ }] endfunction"}}} -function! s:make_cache_buffer(srcname) abort "{{{ +function! s:make_cache_buffer(srcname) "{{{ if !s:should_create_cache(a:srcname) return endif @@ -235,7 +235,7 @@ \ }] endfunction"}}} -function! s:check_changed_buffer(bufnr) abort "{{{ +function! s:check_changed_buffer(bufnr) "{{{ let source = s:buffer_sources[a:bufnr] let ft = getbufvar(a:bufnr, '&filetype') @@ -251,7 +251,7 @@ return source.name != filename || source.filetype != ft endfunction"}}} -function! s:check_source() abort "{{{ +function! s:check_source() "{{{ " Check new buffer. call map(filter(range(1, bufnr('$')), " \ (v:val != bufnr('%') || neocomplete#has_vimproc()) @@ -264,17 +264,19 @@ \ && s:should_create_cache(v:val) \ "), 's:make_cache_file(v:val)') + call s:check_async_cache() + " Remove unlisted buffers. call filter(s:buffer_sources, \ "v:key == bufnr('%') || buflisted(str2nr(v:key))") endfunction"}}} -function! s:exists_current_source() abort "{{{ +function! s:exists_current_source() "{{{ return has_key(s:buffer_sources, bufnr('%')) && \ !s:check_changed_buffer(bufnr('%')) endfunction"}}} -function! s:make_cache_current_buffer(start, end) abort "{{{ +function! s:make_cache_current_buffer(start, end) "{{{ let srcname = bufnr('%') " Make cache from current buffer. @@ -298,6 +300,7 @@ do local words = vim.eval('words') local dup = {} + local b = vim.buffer() local min_length = vim.eval('g:neocomplete#min_keyword_length') for linenr = vim.eval('a:start'), vim.eval('a:end') do local match = 0 @@ -324,8 +327,8 @@ let source.words = neocomplete#util#uniq(source.words + words) endfunction"}}} -function! s:check_async_cache(context) abort "{{{ - for source in s:get_sources_list(a:context) +function! s:check_async_cache() "{{{ + for source in s:get_sources_list() if !has_key(s:async_dictionary_list, source.path) continue endif @@ -344,22 +347,15 @@ endfunction"}}} function! s:clean() abort "{{{ + call neocomplete#helper#clean('buffer_cache') " Remove temporary files - for file in glob(printf('%s/%d_*', + call map(glob(printf('%s/%d_*', \ neocomplete#get_data_directory() . '/buffer_temp', - \ getpid()), 1, 1) - call delete(file) - - let cachefile = neocomplete#get_data_directory() . '/buffer_cache/' - \ . substitute(substitute(file, ':', '=-', 'g'), '[/\\]', '=+', 'g') - if filereadable(cachefile) - call delete(cachefile) - endif - endfor + \ getpid()), 1, 1), 'delete(v:val)') endfunction"}}} " Command functions. "{{{ -function! neocomplete#sources#buffer#make_cache(name) abort "{{{ +function! neocomplete#sources#buffer#make_cache(name) "{{{ if !neocomplete#is_enabled() call neocomplete#initialize() endif === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/sources/dictionary.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/sources/dictionary.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/sources/dictionary.vim 2015-08-25 11:01:00 +0000 @@ -37,7 +37,7 @@ let s:async_dictionary_list = {} endif -function! neocomplete#sources#dictionary#define() abort "{{{ +function! neocomplete#sources#dictionary#define() "{{{ return s:source endfunction"}}} @@ -49,9 +49,10 @@ \ 'hooks' : {}, \} -function! s:source.hooks.on_init(context) abort "{{{ +function! s:source.hooks.on_init(context) "{{{ augroup neocomplete "{{{ autocmd FileType * call s:make_cache(&l:filetype) + autocmd VimLeavePre * call neocomplete#helper#clean('dictionary_cache') augroup END"}}} " Create cache directory. @@ -61,14 +62,15 @@ call s:make_cache(&l:filetype) endfunction"}}} -function! s:source.hooks.on_final(context) abort "{{{ +function! s:source.hooks.on_final(context) "{{{ silent! delcommand NeoCompleteDictionaryMakeCache endfunction"}}} -function! s:source.gather_candidates(context) abort "{{{ +function! s:source.gather_candidates(context) "{{{ let list = [] - for ft in a:context.filetypes + for ft in neocomplete#get_source_filetypes( + \ neocomplete#get_context_filetype()) if !has_key(s:dictionary_cache, ft) call s:make_cache(ft) endif @@ -82,14 +84,14 @@ return list endfunction"}}} -function! s:make_cache(filetype) abort "{{{ +function! s:make_cache(filetype) "{{{ if !has_key(s:dictionary_cache, a:filetype) \ && !has_key(s:async_dictionary_list, a:filetype) call neocomplete#sources#dictionary#remake_cache(a:filetype) endif endfunction"}}} -function! neocomplete#sources#dictionary#remake_cache(filetype) abort "{{{ +function! neocomplete#sources#dictionary#remake_cache(filetype) "{{{ if !neocomplete#is_enabled() call neocomplete#initialize() endif @@ -118,7 +120,7 @@ endfor endfunction"}}} -function! neocomplete#sources#dictionary#get_dictionaries(filetype) abort "{{{ +function! neocomplete#sources#dictionary#get_dictionaries(filetype) "{{{ let filetype = a:filetype if filetype == '' let filetype = neocomplete#get_context_filetype(1) === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/sources/file.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/sources/file.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/sources/file.vim 2015-08-25 11:01:00 +0000 @@ -34,11 +34,10 @@ \ 'sorters' : 'sorter_filename', \ 'converters' : ['converter_remove_overlap', 'converter_abbr'], \ 'is_volatile' : 1, - \ 'input_pattern': '/', \} -function! s:source.get_complete_position(context) abort "{{{ - let filetype = a:context.filetype +function! s:source.get_complete_position(context) "{{{ + let filetype = neocomplete#get_context_filetype() if filetype ==# 'vimshell' || filetype ==# 'unite' || filetype ==# 'int-ssh' return -1 endif @@ -48,11 +47,12 @@ let [complete_pos, complete_str] = \ neocomplete#helper#match_word(a:context.input, pattern) - if complete_str =~ '//' || complete_str == '/' || + if (complete_str =~ '//' || complete_str == '/' || \ (neocomplete#is_auto_complete() && - \ complete_str !~ '/' || + \ (complete_str !~ '/' || len(complete_str) < + \ g:neocomplete#auto_completion_start_length || \ complete_str =~# - \ '\\[^ ;*?[]"={}'']\|\.\.\+$\|/c\%[ygdrive/]$') + \ '\\[^ ;*?[]"={}'']\|\.\.\+$\|/c\%[ygdrive/]$'))) " Not filename pattern. return -1 endif @@ -64,7 +64,7 @@ return complete_pos endfunction"}}} -function! s:source.gather_candidates(context) abort "{{{ +function! s:source.gather_candidates(context) "{{{ let pattern = neocomplete#get_keyword_pattern_end('filename', self.name) let complete_str = \ neocomplete#helper#match_word(a:context.input, pattern)[1] @@ -90,7 +90,7 @@ let s:cached_files = {} -function! s:get_glob_files(complete_str, path) abort "{{{ +function! s:get_glob_files(complete_str, path) "{{{ let path = ',,' . substitute(a:path, '\.\%(,\|$\)\|,,', '', 'g') let complete_str = neocomplete#util#substitute_path_separator( @@ -149,7 +149,7 @@ return candidates endfunction"}}} -function! neocomplete#sources#file#define() abort "{{{ +function! neocomplete#sources#file#define() "{{{ return s:source endfunction"}}} === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/sources/member.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/sources/member.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/sources/member.vim 2015-08-25 11:01:00 +0000 @@ -45,26 +45,21 @@ \ 'rank' : 5, \ 'min_pattern_length' : 0, \ 'hooks' : {}, - \ 'is_volatile' : 1, \} -function! s:source.hooks.on_init(context) abort "{{{ +function! s:source.hooks.on_init(context) "{{{ augroup neocomplete "{{{ " Make cache events autocmd CursorHold * call s:make_cache_current_buffer( \ line('.')-10, line('.')+10) autocmd InsertEnter,InsertLeave * \ call neocomplete#sources#member#make_cache_current_line() - autocmd FileType * - \ call neocomplete#sources#member#remake_cache(&l:filetype) + autocmd FileType * call neocomplete#sources#member#remake_cache(&l:filetype) augroup END"}}} " Initialize member prefix patterns. "{{{ call neocomplete#util#set_default_dictionary( \ 'g:neocomplete#sources#member#prefix_patterns', - \ '_', '\.') - call neocomplete#util#set_default_dictionary( - \ 'g:neocomplete#sources#member#prefix_patterns', \ 'c,objc', '\.\|->') call neocomplete#util#set_default_dictionary( \ 'g:neocomplete#sources#member#prefix_patterns', @@ -74,6 +69,9 @@ \ 'perl,php', '->') call neocomplete#util#set_default_dictionary( \ 'g:neocomplete#sources#member#prefix_patterns', + \ 'cs,java,javascript,d,vim,ruby,python,perl6,scala,vb', '\.') + call neocomplete#util#set_default_dictionary( + \ 'g:neocomplete#sources#member#prefix_patterns', \ 'ruby', '\.\|::') call neocomplete#util#set_default_dictionary( \ 'g:neocomplete#sources#member#prefix_patterns', @@ -83,7 +81,7 @@ " Initialize member patterns. "{{{ call neocomplete#util#set_default_dictionary( \ 'g:neocomplete#sources#member#input_patterns', - \ '_', '\h\w*\%(()\?\|\[\h\w*\]\)\?') + \ '_', '\h\w*\%(()\|\[\h\w*\]\)\?') "}}} " Initialize script variables. "{{{ @@ -92,27 +90,24 @@ endfunction "}}} -function! s:source.get_complete_position(context) abort "{{{ +function! s:source.get_complete_position(context) "{{{ " Check member prefix pattern. - let filetype = a:context.filetype - let prefix = get(g:neocomplete#sources#member#prefix_patterns, filetype, - \ get(g:neocomplete#sources#member#prefix_patterns, '_', '')) - if prefix == '' + let filetype = neocomplete#get_context_filetype() + if get(g:neocomplete#sources#member#prefix_patterns, filetype, '') == '' return -1 endif let member = s:get_member_pattern(filetype) + let prefix = g:neocomplete#sources#member#prefix_patterns[filetype] let complete_pos = matchend(a:context.input, \ member . '\m\%(' . prefix . '\m\)\ze\w*$') return complete_pos endfunction"}}} -function! s:source.gather_candidates(context) abort "{{{ +function! s:source.gather_candidates(context) "{{{ " Check member prefix pattern. - let filetype = a:context.filetype - let prefix = get(g:neocomplete#sources#member#prefix_patterns, filetype, - \ get(g:neocomplete#sources#member#prefix_patterns, '_', '')) - if prefix == '' + let filetype = neocomplete#get_context_filetype() + if get(g:neocomplete#sources#member#prefix_patterns, filetype, '') == '' return [] endif @@ -120,19 +115,19 @@ let var_name = matchstr(a:context.input, \ s:get_member_pattern(filetype) . '\m\%(' . - \ prefix . '\m\)\ze\w*$') + \ g:neocomplete#sources#member#prefix_patterns[filetype] . '\m\)\ze\w*$') if var_name == '' return [] endif - return s:get_member_list(a:context, a:context.input, var_name) + return s:get_member_list(a:context.input, var_name) endfunction"}}} -function! neocomplete#sources#member#define() abort "{{{ +function! neocomplete#sources#member#define() "{{{ return s:source endfunction"}}} -function! neocomplete#sources#member#make_cache_current_line() abort "{{{ +function! neocomplete#sources#member#make_cache_current_line() "{{{ if !neocomplete#is_enabled() call neocomplete#initialize() endif @@ -140,7 +135,7 @@ " Make cache from current line. return s:make_cache_current_buffer(line('.')-1, line('.')+1) endfunction"}}} -function! neocomplete#sources#member#make_cache_current_buffer() abort "{{{ +function! neocomplete#sources#member#make_cache_current_buffer() "{{{ if !neocomplete#is_enabled() call neocomplete#initialize() endif @@ -148,7 +143,7 @@ " Make cache from current buffer. return s:make_cache_current_buffer(1, line('$')) endfunction"}}} -function! s:make_cache_current_buffer(start, end) abort "{{{ +function! s:make_cache_current_buffer(start, end) "{{{ let filetype = neocomplete#get_context_filetype(1) if !has_key(s:member_sources, bufnr('%')) @@ -157,20 +152,21 @@ call s:make_cache_lines(bufnr('%'), filetype, getline(a:start, a:end)) endfunction"}}} -function! s:make_cache_lines(srcname, filetype, lines) abort "{{{ +function! s:make_cache_lines(srcname, filetype, lines) "{{{ let filetype = a:filetype + if get(g:neocomplete#sources#member#prefix_patterns, filetype, '') == '' + return + endif + if !has_key(s:member_sources, a:srcname) call s:initialize_source(a:srcname, filetype) endif - let prefix = get(g:neocomplete#sources#member#prefix_patterns, filetype, - \ get(g:neocomplete#sources#member#prefix_patterns, '_', '')) - if prefix == '' - return - endif let source = s:member_sources[a:srcname] let member_pattern = s:get_member_pattern(filetype) - let prefix_pattern = member_pattern . '\m\%(' . prefix . '\m\)' + let prefix_pattern = member_pattern . '\m\%(' + \ . g:neocomplete#sources#member#prefix_patterns[filetype] + \ . '\m\)' let keyword_pattern = \ prefix_pattern . member_pattern @@ -202,9 +198,9 @@ endfor endfunction"}}} -function! s:get_member_list(context, cur_text, var_name) abort "{{{ +function! s:get_member_list(cur_text, var_name) "{{{ let keyword_list = [] - for source in filter(s:get_sources_list(a:context), + for source in filter(s:get_sources_list(), \ 'has_key(v:val.member_cache, a:var_name)') let keyword_list += \ keys(source.member_cache[a:var_name]) @@ -213,9 +209,10 @@ return keyword_list endfunction"}}} -function! s:get_sources_list(context) abort "{{{ +function! s:get_sources_list() "{{{ let filetypes_dict = {} - for filetype in a:context.filetypes + for filetype in neocomplete#get_source_filetypes( + \ neocomplete#get_context_filetype()) let filetypes_dict[filetype] = 1 endfor @@ -226,7 +223,7 @@ \ || (bufname('%') ==# '[Command Line]' && bufwinnr('#') == v:key)")) endfunction"}}} -function! s:initialize_source(srcname, filetype) abort "{{{ +function! s:initialize_source(srcname, filetype) "{{{ let path = (a:srcname=~ '^\d\+$') ? \ fnamemodify(bufname(a:srcname), ':p') : a:srcname let filename = fnamemodify(path, ':t') @@ -247,12 +244,12 @@ \} endfunction"}}} -function! s:get_member_pattern(filetype) abort "{{{ +function! s:get_member_pattern(filetype) "{{{ return get(g:neocomplete#sources#member#input_patterns, a:filetype, \ get(g:neocomplete#sources#member#input_patterns, '_', '')) endfunction"}}} -function! neocomplete#sources#member#remake_cache(filetype) abort "{{{ +function! neocomplete#sources#member#remake_cache(filetype) "{{{ if !neocomplete#is_enabled() call neocomplete#initialize() endif === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/sources/omni.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/sources/omni.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/sources/omni.vim 2015-08-25 11:01:00 +0000 @@ -38,22 +38,21 @@ \ 'kind' : 'manual', \ 'mark' : '[O]', \ 'rank' : 50, - \ 'min_pattern_length' : 0, \ 'hooks' : {}, \} let s:List = neocomplete#util#get_vital().import('Data.List') -function! s:source.hooks.on_init(context) abort "{{{ +function! s:source.hooks.on_init(context) "{{{ " Initialize omni completion pattern. "{{{ call neocomplete#util#set_default_dictionary( \'g:neocomplete#sources#omni#input_patterns', \'html,xhtml,xml,markdown,mkd', - \'<\|\s[[:alnum:]-]*') + \'<[^>]*') call neocomplete#util#set_default_dictionary( \'g:neocomplete#sources#omni#input_patterns', \'css,scss,sass', - \'\w\+\|\w\+[):;]\?\s\+\w*\|[@!]') + \'^\s\+\w\+\|\w\+[):;]\?\s\+\w*\|[@!]') call neocomplete#util#set_default_dictionary( \'g:neocomplete#sources#omni#input_patterns', \'javascript', @@ -117,26 +116,27 @@ "}}} endfunction"}}} -function! s:source.get_complete_position(context) abort "{{{ +function! s:source.get_complete_position(context) "{{{ + let filetype = neocomplete#get_context_filetype() let a:context.source__complete_results = \ s:set_complete_results_pos( - \ s:get_omni_funcs(a:context.filetype), a:context.input) + \ s:get_omni_funcs(filetype), a:context.input) return s:get_complete_pos(a:context.source__complete_results) endfunction"}}} -function! s:source.gather_candidates(context) abort "{{{ +function! s:source.gather_candidates(context) "{{{ return s:get_candidates( \ s:set_complete_results_words( \ a:context.source__complete_results), \ a:context.complete_pos, a:context.complete_str) endfunction"}}} -function! neocomplete#sources#omni#define() abort "{{{ +function! neocomplete#sources#omni#define() "{{{ return s:source endfunction"}}} -function! s:get_omni_funcs(filetype) abort "{{{ +function! s:get_omni_funcs(filetype) "{{{ let funcs = [] for ft in insert(split(a:filetype, '\.'), '_') let omnifuncs = neocomplete#util#convert2list( @@ -166,7 +166,7 @@ return s:List.uniq(funcs) endfunction"}}} -function! s:get_omni_list(list) abort "{{{ +function! s:get_omni_list(list) "{{{ let omni_list = [] " Convert string list. @@ -181,7 +181,7 @@ return omni_list endfunction"}}} -function! s:set_complete_results_pos(funcs, cur_text) abort "{{{ +function! s:set_complete_results_pos(funcs, cur_text) "{{{ " Try omnifunc completion. "{{{ let complete_results = {} for [omnifunc, pattern] in a:funcs @@ -225,7 +225,7 @@ return complete_results endfunction"}}} -function! s:set_complete_results_words(complete_results) abort "{{{ +function! s:set_complete_results_words(complete_results) "{{{ " Try source completion. for [omnifunc, result] in items(a:complete_results) if neocomplete#complete_check() @@ -235,9 +235,9 @@ let pos = getpos('.') try + call cursor(0, result.complete_pos) let ret = call(omnifunc, [0, result.complete_str]) - let list = type(ret) == type(0) ? [] : - \ type(ret) == type([]) ? ret : ret.words + let list = type(ret) == type([]) ? ret : ret.words catch call neocomplete#print_error( \ 'Error occurred calling omnifunction: ' . omnifunc) @@ -255,7 +255,7 @@ return a:complete_results endfunction"}}} -function! s:get_complete_pos(complete_results) abort "{{{ +function! s:get_complete_pos(complete_results) "{{{ if empty(a:complete_results) return -1 endif @@ -269,7 +269,7 @@ return complete_pos endfunction"}}} -function! s:get_candidates(complete_results, complete_pos, complete_str) abort "{{{ +function! s:get_candidates(complete_results, complete_pos, complete_str) "{{{ " Append prefix. let candidates = [] for result in values(a:complete_results) === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/sources/tag.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/sources/tag.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/sources/tag.vim 2015-08-25 11:01:00 +0000 @@ -39,11 +39,13 @@ \ 'hooks' : {}, \} -function! s:source.hooks.on_init(context) abort "{{{ +function! s:source.hooks.on_init(context) "{{{ let g:neocomplete#sources#tags#cache_limit_size = \ get(g:, 'neocomplete#sources#tags#cache_limit_size', 500000) augroup neocomplete "{{{ + autocmd VimLeavePre * call neocomplete#helper#clean('tags_cache') + autocmd VimLeavePre * call neocomplete#helper#clean('tags_patterns') autocmd BufWritePost * call neocomplete#sources#tag#make_cache(0) augroup END"}}} @@ -51,15 +53,15 @@ call neocomplete#cache#make_directory('tags_cache') endfunction"}}} -function! s:source.hooks.on_final(context) abort "{{{ +function! s:source.hooks.on_final(context) "{{{ silent! delcommand NeoCompleteTagMakeCache endfunction"}}} -function! neocomplete#sources#tag#define() abort "{{{ +function! neocomplete#sources#tag#define() "{{{ return s:source endfunction"}}} -function! s:source.gather_candidates(context) abort "{{{ +function! s:source.gather_candidates(context) "{{{ if !has_key(s:async_tags_list, bufnr('%')) \ && !has_key(s:tags_list, bufnr('%')) call neocomplete#sources#tag#make_cache(0) @@ -75,7 +77,7 @@ return copy(get(s:tags_list, bufnr('%'), [])) endfunction"}}} -function! s:initialize_tags(filename) abort "{{{ +function! s:initialize_tags(filename) "{{{ " Initialize tags list. let ft = &filetype if ft == '' @@ -90,7 +92,7 @@ \ ft, s:source.mark) \ } endfunction"}}} -function! neocomplete#sources#tag#make_cache(force) abort "{{{ +function! neocomplete#sources#tag#make_cache(force) "{{{ if !neocomplete#is_enabled() call neocomplete#initialize() endif === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/util.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/util.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/util.vim 2015-08-25 11:01:00 +0000 @@ -26,64 +26,64 @@ let s:save_cpo = &cpo set cpo&vim +let s:V = vital#of('neocomplete') -function! neocomplete#util#get_vital() abort "{{{ - if !exists('s:V') - let s:V = vital#neocomplete#of() - endif +function! neocomplete#util#get_vital() "{{{ return s:V endfunction"}}} -function! s:get_prelude() abort "{{{ +function! s:get_prelude() "{{{ if !exists('s:Prelude') let s:Prelude = neocomplete#util#get_vital().import('Prelude') endif return s:Prelude endfunction"}}} -function! s:get_list() abort "{{{ +function! s:get_list() "{{{ if !exists('s:List') let s:List = neocomplete#util#get_vital().import('Data.List') endif return s:List endfunction"}}} -function! s:get_string() abort "{{{ +function! s:get_string() "{{{ if !exists('s:String') let s:String = neocomplete#util#get_vital().import('Data.String') endif return s:String endfunction"}}} -function! s:get_process() abort "{{{ +function! s:get_process() "{{{ if !exists('s:Process') let s:Process = neocomplete#util#get_vital().import('Process') endif return s:Process endfunction"}}} -function! neocomplete#util#truncate_smart(...) abort "{{{ +function! neocomplete#util#truncate_smart(...) "{{{ return call(s:get_string().truncate_skipping, a:000) endfunction"}}} -function! neocomplete#util#truncate(...) abort "{{{ + +function! neocomplete#util#truncate(...) "{{{ return call(s:get_string().truncate, a:000) endfunction"}}} -function! neocomplete#util#strchars(...) abort "{{{ + +function! neocomplete#util#strchars(...) "{{{ return call(s:get_string().strchars, a:000) endfunction"}}} -function! neocomplete#util#wcswidth(string) abort "{{{ +function! neocomplete#util#wcswidth(string) "{{{ return strwidth(a:string) endfunction"}}} -function! neocomplete#util#strwidthpart(...) abort "{{{ +function! neocomplete#util#strwidthpart(...) "{{{ return call(s:get_string().strwidthpart, a:000) endfunction"}}} -function! neocomplete#util#strwidthpart_reverse(...) abort "{{{ +function! neocomplete#util#strwidthpart_reverse(...) "{{{ return call(s:get_string().strwidthpart_reverse, a:000) endfunction"}}} -function! neocomplete#util#substitute_path_separator(...) abort "{{{ +function! neocomplete#util#substitute_path_separator(...) "{{{ return call(s:get_prelude().substitute_path_separator, a:000) endfunction"}}} -function! neocomplete#util#mb_strlen(...) abort "{{{ +function! neocomplete#util#mb_strlen(...) "{{{ return call(s:get_string().strchars, a:000) endfunction"}}} -function! neocomplete#util#uniq(list) abort "{{{ +function! neocomplete#util#uniq(list) "{{{ let dict = {} for item in a:list if !has_key(dict, item) @@ -93,42 +93,42 @@ return values(dict) endfunction"}}} -function! neocomplete#util#system(...) abort "{{{ +function! neocomplete#util#system(...) "{{{ return call(s:get_process().system, a:000) endfunction"}}} -function! neocomplete#util#is_windows(...) abort "{{{ +function! neocomplete#util#is_windows(...) "{{{ return call(s:get_prelude().is_windows, a:000) endfunction"}}} -function! neocomplete#util#is_mac(...) abort "{{{ +function! neocomplete#util#is_mac(...) "{{{ return call(s:get_prelude().is_mac, a:000) endfunction"}}} -function! neocomplete#util#is_complete_select() abort "{{{ +function! neocomplete#util#is_complete_select() "{{{ return has('patch-7.4.775') endfunction"}}} -function! neocomplete#util#get_last_status(...) abort "{{{ +function! neocomplete#util#get_last_status(...) "{{{ return call(s:get_process().get_last_status, a:000) endfunction"}}} -function! neocomplete#util#escape_pattern(...) abort "{{{ - return call(s:get_string().escape_pattern, a:000) +function! neocomplete#util#escape_pattern(...) "{{{ + return call(s:get_prelude().escape_pattern, a:000) endfunction"}}} -function! neocomplete#util#iconv(...) abort "{{{ +function! neocomplete#util#iconv(...) "{{{ return call(s:get_process().iconv, a:000) endfunction"}}} -function! neocomplete#util#uniq(...) abort "{{{ +function! neocomplete#util#uniq(...) "{{{ return call(s:get_list().uniq, a:000) endfunction"}}} -function! neocomplete#util#sort_by(...) abort "{{{ +function! neocomplete#util#sort_by(...) "{{{ return call(s:get_list().sort_by, a:000) endfunction"}}} " Sudo check. -function! neocomplete#util#is_sudo() abort "{{{ +function! neocomplete#util#is_sudo() "{{{ return $SUDO_USER != '' && $USER !=# $SUDO_USER \ && $HOME !=# expand('~'.$USER) \ && $HOME ==# expand('~'.$SUDO_USER) endfunction"}}} -function! neocomplete#util#glob(pattern, ...) abort "{{{ +function! neocomplete#util#glob(pattern, ...) "{{{ if a:pattern =~ "'" " Use glob('*'). let cwd = getcwd() @@ -161,11 +161,11 @@ return split(neocomplete#util#substitute_path_separator(glob(glob)), '\n') endif endfunction"}}} -function! neocomplete#util#expand(path) abort "{{{ +function! neocomplete#util#expand(path) "{{{ return expand(escape(a:path, '*?[]"={}'), 1) endfunction"}}} -function! neocomplete#util#set_default(var, val, ...) abort "{{{ +function! neocomplete#util#set_default(var, val, ...) "{{{ if !exists(a:var) || type({a:var}) != type(a:val) let alternate_var = get(a:000, 0, '') @@ -173,7 +173,7 @@ \ {alternate_var} : a:val endif endfunction"}}} -function! neocomplete#util#set_dictionary_helper(variable, keys, pattern) abort "{{{ +function! neocomplete#util#set_dictionary_helper(variable, keys, pattern) "{{{ for key in split(a:keys, '\s*,\s*') if !has_key(a:variable, key) let a:variable[key] = a:pattern @@ -181,7 +181,7 @@ endfor endfunction"}}} -function! neocomplete#util#set_default_dictionary(variable, keys, value) abort "{{{ +function! neocomplete#util#set_default_dictionary(variable, keys, value) "{{{ if !exists('s:disable_dictionaries') let s:disable_dictionaries = {} endif @@ -192,7 +192,7 @@ call neocomplete#util#set_dictionary_helper({a:variable}, a:keys, a:value) endfunction"}}} -function! neocomplete#util#disable_default_dictionary(variable) abort "{{{ +function! neocomplete#util#disable_default_dictionary(variable) "{{{ if !exists('s:disable_dictionaries') let s:disable_dictionaries = {} endif @@ -200,7 +200,7 @@ let s:disable_dictionaries[a:variable] = 1 endfunction"}}} -function! neocomplete#util#split_rtp(...) abort "{{{ +function! neocomplete#util#split_rtp(...) "{{{ let rtp = a:0 ? a:1 : &runtimepath if type(rtp) == type([]) return rtp @@ -213,15 +213,15 @@ let split = split(rtp, '\\\@ 704 || v:version == 704 && has('patch143') -endfunction"}}} - let &cpo = s:save_cpo unlet s:save_cpo === modified file 'vim/bundle/neocomplete.vim/autoload/neocomplete/variables.vim' --- vim/bundle/neocomplete.vim/autoload/neocomplete/variables.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/neocomplete/variables.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! neocomplete#variables#get_frequencies() abort "{{{ +function! neocomplete#variables#get_frequencies() "{{{ if !exists('s:filetype_frequencies') let s:filetype_frequencies = {} endif @@ -40,21 +40,21 @@ return frequencies endfunction"}}} -function! neocomplete#variables#get_sources() abort "{{{ +function! neocomplete#variables#get_sources() "{{{ if !exists('s:sources') let s:sources = {} endif return s:sources endfunction"}}} -function! neocomplete#variables#get_source(name) abort "{{{ +function! neocomplete#variables#get_source(name) "{{{ if !exists('s:sources') let s:sources = {} endif return get(s:sources, a:name, {}) endfunction"}}} -function! neocomplete#variables#get_filters() abort "{{{ +function! neocomplete#variables#get_filters() "{{{ if !exists('s:filters') let s:filters = {} endif === added file 'vim/bundle/neocomplete.vim/autoload/unite/sources/file_include.vim' --- vim/bundle/neocomplete.vim/autoload/unite/sources/file_include.vim 1970-01-01 00:00:00 +0000 +++ vim/bundle/neocomplete.vim/autoload/unite/sources/file_include.vim 2015-08-25 11:01:00 +0000 @@ -0,0 +1,72 @@ +"============================================================================= +" FILE: neocomplete.vim +" AUTHOR: Shougo Matsushita +" manga_osyo (Original) +" License: MIT license {{{ +" Permission is hereby granted, free of charge, to any person obtaining +" a copy of this software and associated documentation files (the +" "Software"), to deal in the Software without restriction, including +" without limitation the rights to use, copy, modify, merge, publish, +" distribute, sublicense, and/or sell copies of the Software, and to +" permit persons to whom the Software is furnished to do so, subject to +" the following conditions: +" +" The above copyright notice and this permission notice shall be included +" in all copies or substantial portions of the Software. +" +" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +" IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +" }}} +"============================================================================= + +let s:save_cpo = &cpo +set cpo&vim + +function! unite#sources#file_include#define() + return s:source +endfunction + +let s:source = { + \ 'name' : 'file_include', + \ 'description' : 'candidates from include files', + \ 'hooks' : {}, + \} +function! s:source.hooks.on_init(args, context) "{{{ + " From neocomplete include files. + let a:context.source__include_files = + \ neocomplete#sources#include#get_include_files(bufnr('%')) + let a:context.source__path = &path +endfunction"}}} + +function! s:source.gather_candidates(args, context) "{{{ + let files = map(copy(a:context.source__include_files), '{ + \ "word" : neocomplete#util#substitute_path_separator(v:val), + \ "abbr" : neocomplete#util#substitute_path_separator(v:val), + \ "source" : "file_include", + \ "kind" : "file", + \ "action__path" : v:val + \ }') + + for word in files + " Path search. + for path in map(split(a:context.source__path, ','), + \ 'neocomplete#util#substitute_path_separator(v:val)') + if path != '' && neocomplete#head_match(word.word, path . '/') + let word.abbr = word.abbr[len(path)+1 : ] + break + endif + endfor + endfor + + return files +endfunction"}}} + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: foldmethod=marker === modified file 'vim/bundle/neocomplete.vim/autoload/unite/sources/neocomplete.vim' --- vim/bundle/neocomplete.vim/autoload/unite/sources/neocomplete.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/unite/sources/neocomplete.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#sources#neocomplete#define() abort "{{{ +function! unite#sources#neocomplete#define() "{{{ return s:neocomplete_source endfunction "}}} @@ -36,7 +36,7 @@ \ 'hooks' : {}, \ } -function! s:neocomplete_source.hooks.on_init(args, context) abort "{{{ +function! s:neocomplete_source.hooks.on_init(args, context) "{{{ if !neocomplete#is_enabled() let a:context.source__complete_pos = -1 let a:context.source__candidates = [] @@ -47,8 +47,6 @@ let max_list_save = g:neocomplete#max_list let max_keyword_width_save = g:neocomplete#max_keyword_width let manual_start_length = g:neocomplete#manual_completion_start_length - let neocomplete = neocomplete#get_current_neocomplete() - let sources_save = get(neocomplete, 'sources', {}) try let g:neocomplete#max_list = -1 @@ -56,12 +54,7 @@ let g:neocomplete#manual_completion_start_length = 0 let cur_text = neocomplete#get_cur_text(1) - let sources = get(a:context, 'source__sources', []) - let args = [cur_text] - if !empty(sources) - call add(args, neocomplete#helper#get_sources_list(sources)) - endif - let complete_sources = call('neocomplete#complete#_get_results', args) + let complete_sources = neocomplete#complete#_get_results(cur_text) let a:context.source__complete_pos = \ neocomplete#complete#_get_complete_pos(complete_sources) let a:context.source__candidates = neocomplete#complete#_get_words( @@ -72,12 +65,10 @@ let g:neocomplete#max_list = max_list_save let g:neocomplete#max_keyword_width = max_keyword_width_save let g:neocomplete#manual_completion_start_length = manual_start_length - let neocomplete.sources = empty(sources_save) ? - \ neocomplete#helper#get_sources_list() : sources_save endtry endfunction"}}} -function! s:neocomplete_source.gather_candidates(args, context) abort "{{{ +function! s:neocomplete_source.gather_candidates(args, context) "{{{ let keyword_pos = a:context.source__complete_pos let candidates = [] for keyword in a:context.source__candidates @@ -108,15 +99,15 @@ return candidates endfunction "}}} -function! unite#sources#neocomplete#start_complete() abort "{{{ +function! unite#sources#neocomplete#start_complete() "{{{ return s:start_complete(0) endfunction "}}} -function! unite#sources#neocomplete#start_quick_match() abort "{{{ +function! unite#sources#neocomplete#start_quick_match() "{{{ return s:start_complete(1) endfunction "}}} -function! s:start_complete(is_quick_match) abort "{{{ +function! s:start_complete(is_quick_match) "{{{ if !neocomplete#is_enabled() return '' endif === modified file 'vim/bundle/neocomplete.vim/autoload/vital/_neocomplete.vim' --- vim/bundle/neocomplete.vim/autoload/vital/_neocomplete.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/vital/_neocomplete.vim 2015-08-25 11:01:00 +0000 @@ -1,5 +1,303 @@ -let s:_plugin_name = expand(':t:r') - -function! vital#{s:_plugin_name}#new() abort - return vital#{s:_plugin_name[1:]}#of() +let s:self_version = expand(':t:r') +let s:self_file = expand('') + +" Note: The extra argument to globpath() was added in Patch 7.2.051. +let s:globpath_third_arg = v:version > 702 || v:version == 702 && has('patch51') + +let s:loaded = {} + +function! s:import(name, ...) abort + let target = {} + let functions = [] + for a in a:000 + if type(a) == type({}) + let target = a + elseif type(a) == type([]) + let functions = a + endif + unlet a + endfor + let module = s:_import(a:name) + if empty(functions) + call extend(target, module, 'keep') + else + for f in functions + if has_key(module, f) && !has_key(target, f) + let target[f] = module[f] + endif + endfor + endif + return target +endfunction + +function! s:load(...) dict abort + for arg in a:000 + let [name; as] = type(arg) == type([]) ? arg[: 1] : [arg, arg] + let target = split(join(as, ''), '\W\+') + let dict = self + while 1 <= len(target) + let ns = remove(target, 0) + if !has_key(dict, ns) + let dict[ns] = {} + endif + if type(dict[ns]) == type({}) + let dict = dict[ns] + else + unlet dict + break + endif + endwhile + + if exists('dict') + call extend(dict, s:_import(name)) + endif + unlet arg + endfor + return self +endfunction + +function! s:unload() abort + let s:loaded = {} +endfunction + +function! s:exists(name) abort + return s:_get_module_path(a:name) !=# '' +endfunction + +function! s:search(pattern) abort + let paths = s:_vital_files(a:pattern) + let modules = sort(map(paths, 's:_file2module(v:val)')) + return s:_uniq(modules) +endfunction + +function! s:expand_modules(entry, all) abort + if type(a:entry) == type([]) + let candidates = s:_concat(map(copy(a:entry), 's:search(v:val)')) + if empty(candidates) + throw printf('vital: Any of module %s is not found', string(a:entry)) + endif + if eval(join(map(copy(candidates), 'has_key(a:all, v:val)'), '+')) + let modules = [] + else + let modules = [candidates[0]] + endif + else + let modules = s:search(a:entry) + if empty(modules) + throw printf('vital: Module %s is not found', a:entry) + endif + endif + call filter(modules, '!has_key(a:all, v:val)') + for module in modules + let a:all[module] = 1 + endfor + return modules +endfunction + +function! s:_import(name) abort + if type(a:name) == type(0) + return s:_build_module(a:name) + endif + let path = s:_get_module_path(a:name) + if path ==# '' + throw 'vital: module not found: ' . a:name + endif + let sid = s:_get_sid_by_script(path) + if !sid + try + execute 'source' fnameescape(path) + catch /^Vim\%((\a\+)\)\?:E484/ + throw 'vital: module not found: ' . a:name + catch /^Vim\%((\a\+)\)\?:E127/ + " Ignore. + endtry + + let sid = s:_get_sid_by_script(path) + endif + return s:_build_module(sid) +endfunction + +function! s:_get_module_path(name) abort + if s:_is_absolute_path(a:name) && filereadable(a:name) + return a:name + endif + if a:name ==# '' + let paths = [s:self_file] + elseif a:name =~# '\v^\u\w*%(\.\u\w*)*$' + let paths = s:_vital_files(a:name) + else + throw 'vital: Invalid module name: ' . a:name + endif + + call filter(paths, 'filereadable(expand(v:val, 1))') + let path = get(paths, 0, '') + return path !=# '' ? path : '' +endfunction + +function! s:_get_sid_by_script(path) abort + let path = s:_unify_path(a:path) + for line in filter(split(s:_redir('scriptnames'), "\n"), + \ 'stridx(v:val, s:self_version) > 0') + let list = matchlist(line, '^\s*\(\d\+\):\s\+\(.\+\)\s*$') + if !empty(list) && s:_unify_path(list[2]) ==# path + return list[1] - 0 + endif + endfor + return 0 +endfunction + +function! s:_file2module(file) abort + let filename = fnamemodify(a:file, ':p:gs?[\\/]?/?') + let tail = matchstr(filename, 'autoload/vital/_\w\+/\zs.*\ze\.vim$') + return join(split(tail, '[\\/]\+'), '.') +endfunction + +if filereadable(expand(':r') . '.VIM') + " resolve() is slow, so we cache results. + let s:_unify_path_cache = {} + " Note: On windows, vim can't expand path names from 8.3 formats. + " So if getting full path via and $HOME was set as 8.3 format, + " vital load duplicated scripts. Below's :~ avoid this issue. + function! s:_unify_path(path) abort + if has_key(s:_unify_path_cache, a:path) + return s:_unify_path_cache[a:path] + endif + let value = tolower(fnamemodify(resolve(fnamemodify( + \ a:path, ':p')), ':~:gs?[\\/]?/?')) + let s:_unify_path_cache[a:path] = value + return value + endfunction +else + function! s:_unify_path(path) abort + return resolve(fnamemodify(a:path, ':p:gs?[\\/]?/?')) + endfunction +endif + +if s:globpath_third_arg + function! s:_runtime_files(path) abort + return split(globpath(&runtimepath, a:path, 1), "\n") + endfunction +else + function! s:_runtime_files(path) abort + return split(globpath(&runtimepath, a:path), "\n") + endfunction +endif + +let s:_vital_files_cache_runtimepath = '' +let s:_vital_files_cache = [] +function! s:_vital_files(pattern) abort + if s:_vital_files_cache_runtimepath !=# &runtimepath + let path = printf('autoload/vital/%s/**/*.vim', s:self_version) + let s:_vital_files_cache = s:_runtime_files(path) + let mod = ':p:gs?[\\/]\+?/?' + call map(s:_vital_files_cache, 'fnamemodify(v:val, mod)') + let s:_vital_files_cache_runtimepath = &runtimepath + endif + let target = substitute(a:pattern, '\.', '/', 'g') + let target = substitute(target, '\*', '[^/]*', 'g') + let regexp = printf('autoload/vital/%s/%s.vim', s:self_version, target) + return filter(copy(s:_vital_files_cache), 'v:val =~# regexp') +endfunction + +" Copy from System.Filepath +if has('win16') || has('win32') || has('win64') + function! s:_is_absolute_path(path) abort + return a:path =~? '^[a-z]:[/\\]' + endfunction +else + function! s:_is_absolute_path(path) abort + return a:path[0] ==# '/' + endfunction +endif + +function! s:_build_module(sid) abort + if has_key(s:loaded, a:sid) + return copy(s:loaded[a:sid]) + endif + let functions = s:_get_functions(a:sid) + + let prefix = '' . a:sid . '_' + let module = {} + for func in functions + let module[func] = function(prefix . func) + endfor + if has_key(module, '_vital_loaded') + let V = vital#{s:self_version}#new() + if has_key(module, '_vital_depends') + let all = {} + let modules = + \ s:_concat(map(module._vital_depends(), + \ 's:expand_modules(v:val, all)')) + call call(V.load, modules, V) + endif + try + call module._vital_loaded(V) + catch + " FIXME: Show an error message for debug. + endtry + endif + if !get(g:, 'vital_debug', 0) + call filter(module, 'v:key =~# "^\\a"') + endif + let s:loaded[a:sid] = module + return copy(module) +endfunction + +if exists('+regexpengine') + function! s:_get_functions(sid) abort + let funcs = s:_redir(printf("function /\\%%#=2^\%d_", a:sid)) + let map_pat = '' . a:sid . '_\zs\w\+' + return map(split(funcs, "\n"), 'matchstr(v:val, map_pat)') + endfunction +else + function! s:_get_functions(sid) abort + let prefix = '' . a:sid . '_' + let funcs = s:_redir('function') + let filter_pat = '^\s*function ' . prefix + let map_pat = prefix . '\zs\w\+' + return map(filter(split(funcs, "\n"), + \ 'stridx(v:val, prefix) > 0 && v:val =~# filter_pat'), + \ 'matchstr(v:val, map_pat)') + endfunction +endif + +if exists('*uniq') + function! s:_uniq(list) abort + return uniq(a:list) + endfunction +else + function! s:_uniq(list) abort + let i = len(a:list) - 1 + while 0 < i + if a:list[i] ==# a:list[i - 1] + call remove(a:list, i) + let i -= 2 + else + let i -= 1 + endif + endwhile + return a:list + endfunction +endif + +function! s:_concat(lists) abort + let result_list = [] + for list in a:lists + let result_list += list + endfor + return result_list +endfunction + +function! s:_redir(cmd) abort + let [save_verbose, save_verbosefile] = [&verbose, &verbosefile] + set verbose=0 verbosefile= + redir => res + silent! execute a:cmd + redir END + let [&verbose, &verbosefile] = [save_verbose, save_verbosefile] + return res +endfunction + +function! vital#{s:self_version}#new() abort + return s:_import('') endfunction === modified file 'vim/bundle/neocomplete.vim/autoload/vital/_neocomplete/Data/List.vim' --- vim/bundle/neocomplete.vim/autoload/vital/_neocomplete/Data/List.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/vital/_neocomplete/Data/List.vim 2015-08-25 11:01:00 +0000 @@ -1,18 +1,3 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_neocomplete#Data#List#import() abort - return map({'combinations': '', 'and': '', 'sort_by': '', 'foldr1': '', 'sort': '', 'flatten': '', 'has_index': '', 'find_indices': '', 'any': '', 'unshift': '', 'span': '', 'pop': '', 'binary_search': '', 'uniq_by': '', 'or': '', 'all': '', 'zip': '', 'find_last_index': '', 'find': '', 'partition': '', 'map_accum': '', 'permutations': '', 'break': '', 'max_by': '', 'foldl': '', 'foldr': '', 'find_index': '', 'group_by': '', 'take_while': '', 'conj': '', 'push': '', 'char_range': '', 'cons': '', 'foldl1': '', 'intersect': '', 'concat': '', 'shift': '', 'clear': '', 'has_common_items': '', 'product': '', 'zip_fill': '', 'uniq': '', 'has': '', 'min_by': '', 'with_index': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_neocomplete#Data#List#import() abort', printf("return map({'combinations': '', 'and': '', 'sort_by': '', 'foldr1': '', 'sort': '', 'flatten': '', 'has_index': '', 'find_indices': '', 'any': '', 'unshift': '', 'span': '', 'pop': '', 'binary_search': '', 'uniq_by': '', 'or': '', 'all': '', 'zip': '', 'find_last_index': '', 'find': '', 'partition': '', 'map_accum': '', 'permutations': '', 'break': '', 'max_by': '', 'foldl': '', 'foldr': '', 'find_index': '', 'group_by': '', 'take_while': '', 'conj': '', 'push': '', 'char_range': '', 'cons': '', 'foldl1': '', 'intersect': '', 'concat': '', 'shift': '', 'clear': '', 'has_common_items': '', 'product': '', 'zip_fill': '', 'uniq': '', 'has': '', 'min_by': '', 'with_index': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ " Utilities for list. let s:save_cpo = &cpo @@ -240,7 +225,7 @@ " similar to Haskell's Prelude.foldl1 function! s:foldl1(f, xs) abort if len(a:xs) == 0 - throw 'vital: Data.List: foldl1' + throw 'foldl1' endif return s:foldl(a:f, a:xs[0], a:xs[1:]) endfunction @@ -253,7 +238,7 @@ " similar to Haskell's Prelude.fold11 function! s:foldr1(f, xs) abort if len(a:xs) == 0 - throw 'vital: Data.List: foldr1' + throw 'foldr1' endif return s:foldr(a:f, a:xs[-1], a:xs[0:-2]) endfunction @@ -279,10 +264,11 @@ " Inspired by Ruby's with_index method. function! s:with_index(list, ...) abort let base = a:0 > 0 ? a:1 : 0 - return map(copy(a:list), '[v:val, v:key + base]') + return s:zip(a:list, range(base, len(a:list)+base-1)) endfunction " similar to Ruby's detect or Haskell's find. +" TODO spec and doc function! s:find(list, default, f) abort for x in a:list if eval(substitute(a:f, 'v:val', string(x), 'g')) === modified file 'vim/bundle/neocomplete.vim/autoload/vital/_neocomplete/Data/String.vim' --- vim/bundle/neocomplete.vim/autoload/vital/_neocomplete/Data/String.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/vital/_neocomplete/Data/String.vim 2015-08-25 11:01:00 +0000 @@ -1,18 +1,3 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_neocomplete#Data#String#import() abort - return map({'starts_with': '', 'split3': '', 'chop': '', 'unescape': '', 'split_posix_text': '', 'replace': '', 'scan': '', 'strchars': '', 'strwidthpart': '', 'common_head': '', 'reverse': '', 'escape_pattern': '', 'trim_end': '', '_vital_depends': '', 'wrap': '', 'join_posix_lines': '', 'contains_multibyte': '', 'truncate_skipping': '', 'split_leftright': '', 'ends_with': '', 'nsplit': '', 'substitute_last': '', 'strwidthpart_reverse': '', 'unescape_pattern': '', 'levenshtein_distance': '', 'trim_start': '', 'nr2hex': '', 'remove_ansi_sequences': '', 'iconv': '', 'pad_left': '', 'nr2enc_char': '', 'lines': '', 'repair_posix_text': '', 'nr2byte': '', 'trim': '', 'diffidx': '', 'truncate': '', 'split_by_displaywidth': '', 'padding_by_displaywidth': '', 'hash': '', 'chomp': '', 'pad_between_letters': '', 'wcswidth': '', 'dstring': '', 'pad_both_sides': '', 'justify_equal_spacing': '', 'pad_right': '', 'replace_first': '', '_vital_loaded': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_neocomplete#Data#String#import() abort', printf("return map({'starts_with': '', 'split3': '', 'chop': '', 'unescape': '', 'split_posix_text': '', 'replace': '', 'scan': '', 'strchars': '', 'strwidthpart': '', 'common_head': '', 'reverse': '', 'escape_pattern': '', 'trim_end': '', '_vital_depends': '', 'wrap': '', 'join_posix_lines': '', 'contains_multibyte': '', 'truncate_skipping': '', 'split_leftright': '', 'ends_with': '', 'nsplit': '', 'substitute_last': '', 'strwidthpart_reverse': '', 'unescape_pattern': '', 'levenshtein_distance': '', 'trim_start': '', 'nr2hex': '', 'remove_ansi_sequences': '', 'iconv': '', 'pad_left': '', 'nr2enc_char': '', 'lines': '', 'repair_posix_text': '', 'nr2byte': '', 'trim': '', 'diffidx': '', 'truncate': '', 'split_by_displaywidth': '', 'padding_by_displaywidth': '', 'hash': '', 'chomp': '', 'pad_between_letters': '', 'wcswidth': '', 'dstring': '', 'pad_both_sides': '', 'justify_equal_spacing': '', 'pad_right': '', 'replace_first': '', '_vital_loaded': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ " Utilities for string. let s:save_cpo = &cpo @@ -20,11 +5,12 @@ function! s:_vital_loaded(V) abort let s:V = a:V + let s:P = s:V.import('Prelude') let s:L = s:V.import('Data.List') endfunction function! s:_vital_depends() abort - return ['Data.List'] + return ['Prelude', 'Data.List'] endfunction " Substitute a:from => a:to by string. @@ -54,15 +40,6 @@ return join(reverse(split(a:str, '.\zs')), '') endfunction -function! s:starts_with(str, prefix) abort - return stridx(a:str, a:prefix) == 0 -endfunction - -function! s:ends_with(str, suffix) abort - let idx = strridx(a:str, a:suffix) - return 0 <= idx && idx + len(a:suffix) == len(a:str) -endfunction - function! s:common_head(strs) abort if empty(a:strs) return '' @@ -73,7 +50,7 @@ endif let strs = len == 2 ? a:strs : sort(copy(a:strs)) let pat = substitute(strs[0], '.', '\="[" . escape(submatch(0), "^\\") . "]"', 'g') - return pat ==# '' ? '' : matchstr(strs[-1], '\C^\%[' . pat . ']') + return pat == '' ? '' : matchstr(strs[-1], '\C^\%[' . pat . ']') endfunction " Split to two elements of List. ([left, right]) @@ -177,15 +154,15 @@ " NOTE _concat() is just a copy of Data.List.concat(). " FIXME don't repeat yourself function! s:_split_by_wcswidth_once(body, x) abort - let fst = s:strwidthpart(a:body, a:x) - let snd = s:strwidthpart_reverse(a:body, s:wcswidth(a:body) - s:wcswidth(fst)) + let fst = s:P.strwidthpart(a:body, a:x) + let snd = s:P.strwidthpart_reverse(a:body, s:P.wcswidth(a:body) - s:P.wcswidth(fst)) return [fst, snd] endfunction function! s:_split_by_wcswidth(body, x) abort let memo = [] let body = a:body - while s:wcswidth(body) > a:x + while s:P.wcswidth(body) > a:x let [tmp, body] = s:_split_by_wcswidth_once(body, a:x) call add(memo, tmp) endwhile @@ -197,14 +174,6 @@ return matchstr(a:str,'^\s*\zs.\{-}\ze\s*$') endfunction -function! s:trim_start(str) abort - return matchstr(a:str,'^\s*\zs.\{-}$') -endfunction - -function! s:trim_end(str) abort - return matchstr(a:str,'^.\{-}\ze\s*$') -endfunction - function! s:wrap(str,...) abort let _columns = a:0 > 0 ? a:1 : &columns return s:L.concat( @@ -222,7 +191,7 @@ endfunction function! s:nr2enc_char(charcode) abort - if &encoding ==# 'utf-8' + if &encoding == 'utf-8' return nr2char(a:charcode) endif let char = s:nr2byte(a:charcode) @@ -234,7 +203,7 @@ function! s:nr2hex(nr) abort let n = a:nr - let r = '' + let r = "" while n let r = '0123456789ABCDEF'[n % 16] . r let n = n / 16 @@ -330,7 +299,7 @@ let letters2 = split(a:str2, '\zs') let length1 = len(letters1) let length2 = len(letters2) - let distances = map(range(1, length1 + 1), 'map(range(1, length2 + 1), ''0'')') + let distances = map(range(1, length1 + 1), 'map(range(1, length2 + 1), "0")') for i1 in range(0, length1) let distances[i1][0] = i1 @@ -385,7 +354,7 @@ let text = '' while cs_index < len(cs) - if cs[cs_index] is# "\n" + if cs[cs_index] is "\n" let text = s:padding_by_displaywidth(text, a:width, a:float) let lines += [text] let text = '' @@ -406,7 +375,7 @@ if a:is_wrap if a:width < w if a:width < strdisplaywidth(cs[cs_index]) - while get(cs, cs_index, "\n") isnot# "\n" + while get(cs, cs_index, "\n") isnot "\n" let cs_index += 1 endwhile continue @@ -415,7 +384,7 @@ endif endif else - while get(cs, cs_index, "\n") isnot# "\n" + while get(cs, cs_index, "\n") isnot "\n" let cs_index += 1 endwhile continue @@ -576,86 +545,7 @@ endfunction endif -function! s:remove_ansi_sequences(text) abort - return substitute(a:text, '\e\[\%(\%(\d;\)\?\d\{1,2}\)\?[mK]', '', 'g') -endfunction - -function! s:escape_pattern(str) abort - " escape characters for no-magic - return escape(a:str, '^$~.*[]\') -endfunction - -function! s:unescape_pattern(str) abort - " unescape characters for no-magic - return s:unescape(a:str, '^$~.*[]\') -endfunction - -function! s:unescape(str, chars) abort - let chars = map(split(a:chars, '\zs'), 'escape(v:val, ''^$~.*[]\'')') - return substitute(a:str, '\\\(' . join(chars, '\|') . '\)', '\1', 'g') -endfunction - -function! s:iconv(expr, from, to) abort - if a:from ==# '' || a:to ==# '' || a:from ==? a:to - return a:expr - endif - let result = iconv(a:expr, a:from, a:to) - return empty(result) ? a:expr : result -endfunction - -" NOTE: -" A definition of a TEXT file is "A file that contains characters organized -" into one or more lines." -" A definition of a LINE is "A sequence of zero or more non- s -" plus a terminating " -" That's why {stdin} always ends with ideally. However, there are -" some programs which does not follow the POSIX rule and a Vim's way to join -" List into TEXT; join({text}, "\n"); does not add to the end of -" the last line. -" That's why add a trailing if it does not exist. -" REF: -" http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_392 -" http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_205 -" :help split() -" NOTE: -" it does nothing if the text is a correct POSIX text -function! s:repair_posix_text(text, ...) abort - let newline = get(a:000, 0, "\n") - return a:text =~# '\n$' ? a:text : a:text . newline -endfunction - -" NOTE: -" A definition of a TEXT file is "A file that contains characters organized -" into one or more lines." -" A definition of a LINE is "A sequence of zero or more non- s -" plus a terminating " -" REF: -" http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_392 -" http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_205 -function! s:join_posix_lines(lines, ...) abort - let newline = get(a:000, 0, "\n") - return join(a:lines, newline) . newline -endfunction - -" NOTE: -" A definition of a TEXT file is "A file that contains characters organized -" into one or more lines." -" A definition of a LINE is "A sequence of zero or more non- s -" plus a terminating " -" TEXT into List; split({text}, '\r\?\n', 1); add an extra empty line at the -" end of List because the end of TEXT ends with and keepempty=1 is -" specified. (btw. keepempty=0 cannot be used because it will remove -" emptylines in the head and the tail). -" That's why removing a trailing before proceeding to 'split' is required -" REF: -" http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_392 -" http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_205 -function! s:split_posix_text(text, ...) abort - let newline = get(a:000, 0, '\r\?\n') - let text = substitute(a:text, newline . '$', '', '') - return split(text, newline, 1) -endfunction - let &cpo = s:save_cpo unlet s:save_cpo + " vim:set et ts=2 sts=2 sw=2 tw=0: === modified file 'vim/bundle/neocomplete.vim/autoload/vital/_neocomplete/Prelude.vim' --- vim/bundle/neocomplete.vim/autoload/vital/_neocomplete/Prelude.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/vital/_neocomplete/Prelude.vim 2015-08-25 11:01:00 +0000 @@ -1,18 +1,3 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_neocomplete#Prelude#import() abort - return map({'escape_pattern': '', 'is_funcref': '', 'path2directory': '', 'wcswidth': '', 'is_string': '', 'input_helper': '', 'is_number': '', 'is_cygwin': '', 'path2project_directory': '', 'strwidthpart_reverse': '', 'input_safe': '', 'is_list': '', 'truncate_skipping': '', 'glob': '', 'truncate': '', 'is_dict': '', 'set_default': '', 'is_numeric': '', 'getchar_safe': '', 'substitute_path_separator': '', 'is_mac': '', 'strwidthpart': '', 'getchar': '', 'is_unix': '', 'is_windows': '', 'globpath': '', 'escape_file_searching': '', 'is_float': '', 'smart_execute_command': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_neocomplete#Prelude#import() abort', printf("return map({'escape_pattern': '', 'is_funcref': '', 'path2directory': '', 'wcswidth': '', 'is_string': '', 'input_helper': '', 'is_number': '', 'is_cygwin': '', 'path2project_directory': '', 'strwidthpart_reverse': '', 'input_safe': '', 'is_list': '', 'truncate_skipping': '', 'glob': '', 'truncate': '', 'is_dict': '', 'set_default': '', 'is_numeric': '', 'getchar_safe': '', 'substitute_path_separator': '', 'is_mac': '', 'strwidthpart': '', 'getchar': '', 'is_unix': '', 'is_windows': '', 'globpath': '', 'escape_file_searching': '', 'is_float': '', 'smart_execute_command': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ let s:save_cpo = &cpo set cpo&vim @@ -42,7 +27,7 @@ \ s:__TYPE_DICT, \ s:__TYPE_FLOAT] = [ \ type(3), - \ type(''), + \ type(""), \ type(function('tr')), \ type([]), \ type({}), @@ -83,9 +68,12 @@ return type(a:Value) ==# s:__TYPE_DICT endfunction +function! s:truncate_smart(str, max, footer_width, separator) abort + echoerr 'Prelude.truncate_smart() is obsolete. Use its truncate_skipping() instead; they are equivalent.' + return s:truncate_skipping(a:str, a:max, a:footer_width, a:separator) +endfunction + function! s:truncate_skipping(str, max, footer_width, separator) abort - call s:_warn_deprecated('truncate_skipping', 'Data.String.truncate_skipping') - let width = s:wcswidth(a:str) if width <= a:max let ret = a:str @@ -102,8 +90,6 @@ " Original function is from mattn. " http://github.com/mattn/googlereader-vim/tree/master - call s:_warn_deprecated('truncate', 'Data.String.truncate') - if a:str =~# '^[\x00-\x7f]*$' return len(a:str) < a:width ? \ printf('%-'.a:width.'s', a:str) : strpart(a:str, 0, a:width) @@ -124,8 +110,6 @@ endfunction function! s:strwidthpart(str, width) abort - call s:_warn_deprecated('strwidthpart', 'Data.String.strwidthpart') - if a:width <= 0 return '' endif @@ -140,8 +124,6 @@ return ret endfunction function! s:strwidthpart_reverse(str, width) abort - call s:_warn_deprecated('strwidthpart_reverse', 'Data.String.strwidthpart_reverse') - if a:width <= 0 return '' endif @@ -159,13 +141,10 @@ if v:version >= 703 " Use builtin function. function! s:wcswidth(str) abort - call s:_warn_deprecated('wcswidth', 'Data.String.wcswidth') return strwidth(a:str) endfunction else function! s:wcswidth(str) abort - call s:_warn_deprecated('wcswidth', 'Data.String.wcswidth') - if a:str =~# '^[\x00-\x7f]*$' return strlen(a:str) end @@ -230,17 +209,13 @@ return s:is_unix endfunction -function! s:_warn_deprecated(name, alternative) abort - try - echohl Error - echomsg 'Prelude.' . a:name . ' is deprecated! Please use ' . a:alternative . ' instead.' - finally - echohl None - endtry +function! s:_deprecated2(fname) abort + echomsg printf("Vital.Prelude.%s is deprecated!", + \ a:fname) endfunction function! s:smart_execute_command(action, word) abort - execute a:action . ' ' . (a:word ==# '' ? '' : '`=a:word`') + execute a:action . ' ' . (a:word == '' ? '' : '`=a:word`') endfunction function! s:escape_file_searching(buffer_name) abort @@ -248,10 +223,6 @@ endfunction function! s:escape_pattern(str) abort - call s:_warn_deprecated( - \ 'escape_pattern', - \ 'Data.String.escape_pattern', - \) return escape(a:str, '~"\.^$[]*') endfunction @@ -262,7 +233,7 @@ function! s:getchar_safe(...) abort let c = s:input_helper('getchar', a:000) - return type(c) == type('') ? c : nr2char(c) + return type(c) == type("") ? c : nr2char(c) endfunction function! s:input_safe(...) abort @@ -272,13 +243,13 @@ function! s:input_helper(funcname, args) abort let success = 0 if inputsave() !=# success - throw 'vital: Prelude: inputsave() failed' + throw 'inputsave() failed' endif try return call(a:funcname, a:args) finally if inputrestore() !=# success - throw 'vital: Prelude: inputrestore() failed' + throw 'inputrestore() failed' endif endtry endfunction @@ -289,6 +260,16 @@ endif endfunction +function! s:set_dictionary_helper(variable, keys, pattern) abort + call s:_deprecated2('set_dictionary_helper') + + for key in split(a:keys, '\s*,\s*') + if !has_key(a:variable, key) + let a:variable[key] = a:pattern + endif + endfor +endfunction + function! s:substitute_path_separator(path) abort return s:is_windows ? substitute(a:path, '\\', '/', 'g') : a:path endfunction @@ -319,7 +300,7 @@ let find_directory = s:escape_file_searching(search_directory) let d = finddir('.svn', find_directory . ';') - if d ==# '' + if d == '' return '' endif @@ -329,9 +310,9 @@ let parent_directory = s:path2directory( \ fnamemodify(directory, ':h')) - if parent_directory !=# '' + if parent_directory != '' let d = finddir('.svn', parent_directory . ';') - if d !=# '' + if d != '' let directory = s:_path2project_directory_svn(parent_directory) endif endif @@ -344,7 +325,7 @@ let find_directory = s:escape_file_searching(search_directory) let d = finddir(vcs, find_directory . ';') - if d ==# '' + if d == '' return '' endif return fnamemodify(d, ':p:h:h') @@ -364,25 +345,25 @@ else let directory = s:_path2project_directory_others(vcs, search_directory) endif - if directory !=# '' + if directory != '' break endif endfor " Search project file. - if directory ==# '' + if directory == '' for d in ['build.xml', 'prj.el', '.project', 'pom.xml', 'package.json', \ 'Makefile', 'configure', 'Rakefile', 'NAnt.build', \ 'P4CONFIG', 'tags', 'gtags'] let d = findfile(d, s:escape_file_searching(search_directory) . ';') - if d !=# '' + if d != '' let directory = fnamemodify(d, ':p:h') break endif endfor endif - if directory ==# '' + if directory == '' " Search /src/ directory. let base = s:substitute_path_separator(search_directory) if base =~# '/src/' @@ -390,7 +371,7 @@ endif endif - if directory ==# '' && !is_allow_empty + if directory == '' && !is_allow_empty " Use original path. let directory = search_directory endif === modified file 'vim/bundle/neocomplete.vim/autoload/vital/_neocomplete/Process.vim' --- vim/bundle/neocomplete.vim/autoload/vital/_neocomplete/Process.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/vital/_neocomplete/Process.vim 2015-08-25 11:01:00 +0000 @@ -1,18 +1,3 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_neocomplete#Process#import() abort - return map({'shellescape': '', 'has_vimproc': '', 'system': '', 'iconv': '', 'spawn': '', 'get_last_status': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_neocomplete#Process#import() abort', printf("return map({'shellescape': '', 'has_vimproc': '', 'system': '', 'iconv': '', 'spawn': '', 'get_last_status': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ " TODO: move all comments to doc file. " " @@ -34,8 +19,23 @@ let s:TYPE_DICT = type({}) let s:TYPE_LIST = type([]) -let s:TYPE_STRING = type('') - +let s:TYPE_STRING = type("") + + +" Execute program in the background from Vim. +" Return an empty string always. +" +" If a:expr is a List, shellescape() each argument. +" If a:expr is a String, the arguments are passed as-is. +" +" Windows: +" Using :!start , execute program without via cmd.exe. +" Spawning 'expr' with 'noshellslash' +" keep special characters from unwanted expansion. +" (see :help shellescape()) +" +" Unix: +" using :! , execute program in the background by shell. function! s:spawn(expr, ...) abort let shellslash = 0 if s:is_windows @@ -70,11 +70,11 @@ " iconv() wrapper for safety. function! s:iconv(expr, from, to) abort - if a:from ==# '' || a:to ==# '' || a:from ==? a:to + if a:from == '' || a:to == '' || a:from ==? a:to return a:expr endif let result = iconv(a:expr, a:from, a:to) - return result !=# '' ? result : a:expr + return result != '' ? result : a:expr endfunction " Check vimproc. === removed directory 'vim/bundle/neocomplete.vim/autoload/vital/_neocomplete/System/Cache' === added file 'vim/bundle/neocomplete.vim/autoload/vital/_neocomplete/System/Cache.vim' --- vim/bundle/neocomplete.vim/autoload/vital/_neocomplete/System/Cache.vim 1970-01-01 00:00:00 +0000 +++ vim/bundle/neocomplete.vim/autoload/vital/_neocomplete/System/Cache.vim 2015-08-25 11:01:00 +0000 @@ -0,0 +1,85 @@ +" Utilities for output cache. + +let s:save_cpo = &cpo +set cpo&vim + +function! s:_vital_loaded(V) abort + let s:V = a:V + let s:S = s:V.import('Data.String') +endfunction + +function! s:_vital_depends() abort + return ['Data.String'] +endfunction + +function! s:getfilename(cache_dir, filename) abort + return s:_encode_name(a:cache_dir, a:filename) +endfunction + +function! s:filereadable(cache_dir, filename) abort + let cache_name = s:_encode_name(a:cache_dir, a:filename) + return filereadable(cache_name) +endfunction + +function! s:readfile(cache_dir, filename) abort + let cache_name = s:_encode_name(a:cache_dir, a:filename) + return filereadable(cache_name) ? readfile(cache_name) : [] +endfunction + +function! s:writefile(cache_dir, filename, list) abort + let cache_name = s:_encode_name(a:cache_dir, a:filename) + + call writefile(a:list, cache_name) +endfunction + +function! s:delete(cache_dir, filename) abort + echoerr 'System.Cache.delete() is obsolete. Use its deletefile() instead.' + return call('s:deletefile', a:cache_dir, a:filename) +endfunction + +function! s:deletefile(cache_dir, filename) abort + let cache_name = s:_encode_name(a:cache_dir, a:filename) + return delete(cache_name) +endfunction + +function! s:_encode_name(cache_dir, filename) abort + " Check cache directory. + if !isdirectory(a:cache_dir) + call mkdir(a:cache_dir, 'p') + endif + let cache_dir = a:cache_dir + if cache_dir !~ '/$' + let cache_dir .= '/' + endif + + return cache_dir . s:_create_hash(cache_dir, a:filename) +endfunction + +function! s:check_old_cache(cache_dir, filename) abort + " Check old cache file. + let cache_name = s:_encode_name(a:cache_dir, a:filename) + let ret = getftime(cache_name) == -1 + \ || getftime(cache_name) <= getftime(a:filename) + if ret && filereadable(cache_name) + " Delete old cache. + call delete(cache_name) + endif + + return ret +endfunction + +function! s:_create_hash(dir, str) abort + if len(a:dir) + len(a:str) < 150 + let hash = substitute(substitute( + \ a:str, ':', '=-', 'g'), '[/\\]', '=+', 'g') + else + let hash = s:S.hash(a:str) + endif + + return hash +endfunction + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim:set et ts=2 sts=2 sw=2 tw=0: === removed file 'vim/bundle/neocomplete.vim/autoload/vital/_neocomplete/System/Cache/Deprecated.vim' --- vim/bundle/neocomplete.vim/autoload/vital/_neocomplete/System/Cache/Deprecated.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/vital/_neocomplete/System/Cache/Deprecated.vim 1970-01-01 00:00:00 +0000 @@ -1,101 +0,0 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_neocomplete#System#Cache#Deprecated#import() abort - return map({'filereadable': '', '_vital_depends': '', 'delete': '', 'readfile': '', 'getfilename': '', 'deletefile': '', 'check_old_cache': '', 'writefile': '', '_vital_loaded': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_neocomplete#System#Cache#Deprecated#import() abort', printf("return map({'filereadable': '', '_vital_depends': '', 'delete': '', 'readfile': '', 'getfilename': '', 'deletefile': '', 'check_old_cache': '', 'writefile': '', '_vital_loaded': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ -" Note: -" This module is deprecated. Use a new `Syste.Cache` instead. - -let s:save_cpo = &cpo -set cpo&vim - -function! s:_vital_loaded(V) abort - let s:V = a:V - let s:S = s:V.import('Data.String') -endfunction - -function! s:_vital_depends() abort - return ['Data.String'] -endfunction - -function! s:getfilename(cache_dir, filename) abort - return s:_encode_name(a:cache_dir, a:filename) -endfunction - -function! s:filereadable(cache_dir, filename) abort - let cache_name = s:_encode_name(a:cache_dir, a:filename) - return filereadable(cache_name) -endfunction - -function! s:readfile(cache_dir, filename) abort - let cache_name = s:_encode_name(a:cache_dir, a:filename) - return filereadable(cache_name) ? readfile(cache_name) : [] -endfunction - -function! s:writefile(cache_dir, filename, list) abort - let cache_name = s:_encode_name(a:cache_dir, a:filename) - - call writefile(a:list, cache_name) -endfunction - -function! s:delete(cache_dir, filename) abort - echoerr 'System.Cache.delete() is obsolete. Use its deletefile() instead.' - return call('s:deletefile', a:cache_dir, a:filename) -endfunction - -function! s:deletefile(cache_dir, filename) abort - let cache_name = s:_encode_name(a:cache_dir, a:filename) - return delete(cache_name) -endfunction - -function! s:_encode_name(cache_dir, filename) abort - " Check cache directory. - if !isdirectory(a:cache_dir) - call mkdir(a:cache_dir, 'p') - endif - let cache_dir = a:cache_dir - if cache_dir !~# '/$' - let cache_dir .= '/' - endif - - return cache_dir . s:_create_hash(cache_dir, a:filename) -endfunction - -function! s:check_old_cache(cache_dir, filename) abort - " Check old cache file. - let cache_name = s:_encode_name(a:cache_dir, a:filename) - let ret = getftime(cache_name) == -1 - \ || getftime(cache_name) <= getftime(a:filename) - if ret && filereadable(cache_name) - " Delete old cache. - call delete(cache_name) - endif - - return ret -endfunction - -function! s:_create_hash(dir, str) abort - if len(a:dir) + len(a:str) < 150 - let hash = substitute(substitute( - \ a:str, ':', '=-', 'g'), '[/\\]', '=+', 'g') - else - let hash = s:S.hash(a:str) - endif - - return hash -endfunction - -let &cpo = s:save_cpo -unlet s:save_cpo - -" vim:set et ts=2 sts=2 sw=2 tw=0: === removed file 'vim/bundle/neocomplete.vim/autoload/vital/neocomplete.vim' --- vim/bundle/neocomplete.vim/autoload/vital/neocomplete.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/vital/neocomplete.vim 1970-01-01 00:00:00 +0000 @@ -1,305 +0,0 @@ -let s:plugin_name = expand(':t:r') -let s:vital_base_dir = expand(':h') -let s:project_root = expand(':h:h:h') -let s:has_latest_module = isdirectory(expand(':h') . '/__latest__') -let s:is_vital_vim = s:plugin_name is# '_latest__' - -let s:loaded = {} -let s:cache_sid = {} - -" function() wrapper -if v:version > 703 || v:version == 703 && has('patch1170') - function! s:_function(fstr) abort - return function(a:fstr) - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - let s:_s = '' . s:_SID() . '_' - function! s:_function(fstr) abort - return function(substitute(a:fstr, 's:', s:_s, 'g')) - endfunction -endif - -function! vital#{s:plugin_name}#of() abort - return s:new(s:plugin_name) -endfunction - -let s:Vital = {} - -function! s:new(plugin_name) abort - let base = deepcopy(s:Vital) - let base.plugin_name = a:plugin_name - return base -endfunction - -function! s:vital_files() abort - if !exists('s:vital_files') - let s:vital_files = map( - \ s:is_vital_vim ? s:_global_vital_files() : s:_self_vital_files(), - \ 'fnamemodify(v:val, ":p:gs?[\\\\/]?/?")') - endif - return copy(s:vital_files) -endfunction -let s:Vital.vital_files = s:_function('s:vital_files') - -function! s:import(name, ...) abort dict - let target = {} - let functions = [] - for a in a:000 - if type(a) == type({}) - let target = a - elseif type(a) == type([]) - let functions = a - endif - unlet a - endfor - let module = self._import(a:name) - if empty(functions) - call extend(target, module, 'keep') - else - for f in functions - if has_key(module, f) && !has_key(target, f) - let target[f] = module[f] - endif - endfor - endif - return target -endfunction -let s:Vital.import = s:_function('s:import') - -function! s:load(...) abort dict - for arg in a:000 - let [name; as] = type(arg) == type([]) ? arg[: 1] : [arg, arg] - let target = split(join(as, ''), '\W\+') - let dict = self - let dict_type = type({}) - while !empty(target) - let ns = remove(target, 0) - if !has_key(dict, ns) - let dict[ns] = {} - endif - if type(dict[ns]) == dict_type - let dict = dict[ns] - else - unlet dict - break - endif - endwhile - if exists('dict') - call extend(dict, self._import(name)) - endif - unlet arg - endfor - return self -endfunction -let s:Vital.load = s:_function('s:load') - -function! s:unload() abort dict - let s:loaded = {} - let s:cache_sid = {} - unlet! s:vital_files -endfunction -let s:Vital.unload = s:_function('s:unload') - -function! s:exists(name) abort dict - let b = exists(printf('*vital#_%s#%s#import', self.plugin_name, substitute(a:name, '\.', '#', 'g'))) - if b - return b - endif - let name_path = substitute(a:name, '\.', '/', 'g') - let path = printf('%s/_%s/%s.vim', s:vital_base_dir, self.plugin_name, name_path) - let b = filereadable(path) - if b - return b - endif - let path = printf('%s/_%s/%s.vim', s:vital_base_dir, '_latest__', name_path) - let b = filereadable(path) -endfunction -let s:Vital.exists = s:_function('s:exists') - -function! s:search(pattern) abort dict - let paths = s:_extract_files(a:pattern, self.vital_files()) - let modules = sort(map(paths, 's:_file2module(v:val)')) - return s:_uniq(modules) -endfunction -let s:Vital.search = s:_function('s:search') - -function! s:_self_vital_files() abort - let builtin = printf('%s/__%s__/', s:vital_base_dir, s:plugin_name) - let installed = printf('%s/_%s/', s:vital_base_dir, s:plugin_name) - let base = builtin . ',' . installed - return split(globpath(base, '**/*.vim', 1), "\n") -endfunction - -function! s:_global_vital_files() abort - let pattern = 'autoload/vital/__latest__/**/*.vim' - return split(globpath(&runtimepath, pattern, 1), "\n") -endfunction - -function! s:_extract_files(pattern, files) abort - let tr = {'.': '/', '*': '[^/]*', '**': '.*'} - let target = substitute(a:pattern, '\.\|\*\*\?', '\=tr[submatch(0)]', 'g') - let regexp = printf('autoload/vital/[^/]\+/%s.vim$', target) - return filter(a:files, 'v:val =~# regexp') -endfunction - -function! s:_file2module(file) abort - let filename = fnamemodify(a:file, ':p:gs?[\\/]?/?') - let tail = matchstr(filename, 'autoload/vital/_\w\+/\zs.*\ze\.vim$') - return join(split(tail, '[\\/]\+'), '.') -endfunction - -" @param {string} name e.g. Data.List -function! s:_import(name) abort dict - if has_key(s:loaded, a:name) - return copy(s:loaded[a:name]) - endif - let module = self._get_module(a:name) - if has_key(module, '_vital_created') - call module._vital_created(module) - endif - let export_module = filter(copy(module), 'v:key =~# "^\\a"') - " Cache module before calling module.vital_loaded() to avoid cyclic - " dependences but remove the cache if module._vital_loaded() fails. - " let s:loaded[a:name] = export_module - let s:loaded[a:name] = export_module - if has_key(module, '_vital_loaded') - try - call module._vital_loaded(vital#{s:plugin_name}#of()) - catch - unlet s:loaded[a:name] - throw 'vital: fail to call ._vital_loaded(): ' . v:exception - endtry - endif - return copy(s:loaded[a:name]) -endfunction -let s:Vital._import = s:_function('s:_import') - -" s:_get_module() returns module object wihch has all script local functions. -function! s:_get_module(name) abort dict - try - let module = vital#_{self.plugin_name}#{substitute(a:name, '\.', '#', 'g')}#import() - catch /E117: Unknown function:/ - if !s:has_latest_module - throw 'vital: module not found: ' . a:name - endif - " Retry to support loading self modules. - let module = s:_get_latest_module(a:name) - endtry - return module -endfunction -let s:Vital._get_module = s:_function('s:_get_module') - -function! s:_get_latest_module(name) abort - return s:sid2sfuncs(s:_module_sid(a:name)) -endfunction - -function! s:_module_sid(name) abort - let module_path = substitute(a:name, '\.', '/', 'g') . '.vim' - let module_rel_path = 'autoload/vital/__*__/' . module_path - let module_full_path = s:_unify_path(get(split(globpath(s:_module_sid_base_dir(), module_rel_path, 1), "\n"), 0, '')) - if !filereadable(module_full_path) - throw 'vital: module not found: ' . a:name - endif - let p = substitute('autoload/vital/__\w\+__/' . module_path, '/', '[/\\\\]\\+', 'g') - let sid = s:_sid(module_full_path, p) - if !sid - call s:_source(module_full_path) - let sid = s:_sid(module_full_path, p) - if !sid - throw 'vital: cannot get from path' - endif - endif - return sid -endfunction - -function! s:_module_sid_base_dir() abort - return s:is_vital_vim ? &rtp : s:project_root -endfunction - -function! s:_source(path) abort - execute 'source' fnameescape(a:path) -endfunction - -" @vimlint(EVL102, 1, l:_) -" @vimlint(EVL102, 1, l:__) -function! s:_sid(fullpath, filter_pattern) abort - if has_key(s:cache_sid, a:fullpath) - return s:cache_sid[a:fullpath] - endif - for line in filter(split(s:_redir(':scriptnames'), "\n"), 'v:val =~# a:filter_pattern') - let [_, sid, path; __] = matchlist(line, '^\s*\(\d\+\):\s\+\(.\+\)\s*$') - if s:_unify_path(path) is# a:fullpath - let s:cache_sid[a:fullpath] = sid - return s:cache_sid[a:fullpath] - endif - endfor - return 0 -endfunction - -function! s:_redir(cmd) abort - let [save_verbose, save_verbosefile] = [&verbose, &verbosefile] - set verbose=0 verbosefile= - redir => res - silent! execute a:cmd - redir END - let [&verbose, &verbosefile] = [save_verbose, save_verbosefile] - return res -endfunction - -if filereadable(expand(':r') . '.VIM') - let s:_unify_path_cache = {} - " resolve() is slow, so we cache results. - " Note: On windows, vim can't expand path names from 8.3 formats. - " So if getting full path via and $HOME was set as 8.3 format, - " vital load duplicated scripts. Below's :~ avoid this issue. - function! s:_unify_path(path) abort - if has_key(s:_unify_path_cache, a:path) - return s:_unify_path_cache[a:path] - endif - let value = tolower(fnamemodify(resolve(fnamemodify( - \ a:path, ':p')), ':~:gs?[\\/]?/?')) - let s:_unify_path_cache[a:path] = value - return value - endfunction -else - function! s:_unify_path(path) abort - return resolve(fnamemodify(a:path, ':p:gs?[\\/]?/?')) - endfunction -endif - -" copied and modified from Vim.ScriptLocal -let s:SNR = join(map(range(len("\")), '"[\\x" . printf("%0x", char2nr("\"[v:val])) . "]"'), '') -function! s:sid2sfuncs(sid) abort - let fs = split(s:_redir(printf(':function /^%s%s_', s:SNR, a:sid)), "\n") - let r = {} - let pattern = printf('\m^function\s%d_\zs\w\{-}\ze(', a:sid) - for fname in map(fs, 'matchstr(v:val, pattern)') - let r[fname] = function(s:_sfuncname(a:sid, fname)) - endfor - return r -endfunction - -"" Return funcname of script local functions with SID -function! s:_sfuncname(sid, funcname) abort - return printf('%s_%s', a:sid, a:funcname) -endfunction - -if exists('*uniq') - function! s:_uniq(list) abort - return uniq(a:list) - endfunction -else - function! s:_uniq(list) abort - let i = len(a:list) - 1 - while 0 < i - if a:list[i] ==# a:list[i - 1] - call remove(a:list, i) - endif - let i -= 1 - endwhile - return a:list - endfunction -endif === modified file 'vim/bundle/neocomplete.vim/autoload/vital/neocomplete.vital' --- vim/bundle/neocomplete.vim/autoload/vital/neocomplete.vital 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/autoload/vital/neocomplete.vital 2015-08-25 11:01:00 +0000 @@ -1,8 +1,8 @@ neocomplete -1a385f58a58571e4cb6309831ad4d7260180bc71 +bb1d9cb Prelude Data.List Data.String Process -System.Cache.Deprecated +System.Cache === modified file 'vim/bundle/neocomplete.vim/doc/neocomplete.txt' --- vim/bundle/neocomplete.vim/doc/neocomplete.txt 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/doc/neocomplete.txt 2015-08-25 11:01:00 +0000 @@ -134,8 +134,8 @@ Package manager: For instructions on how to set up a Vim package manager see the documentation -of the package manager of your choice. For example after installing -neobundle you can install the neocomplete plugin with the following steps: +of the package manager of your choice. For example after the set up of +neobundle you can install the neocomplete plugin by following steps: 1. Let the plugin manger know about the package (.vimrc) > NeoBundle 'Shougo/neocomplete.vim' @@ -161,13 +161,13 @@ *neocomplete-snippets* -If you would like to use the snippet feature with neocomplete, you need to -install the neosnippet plugin (https://github.com/Shougo/neosnippet.vim) or -UltiSnips (https://github.com/SirVer/ultisnips). +If you like to use the snippet feature with neocomplete, you need to install +the neosnippet plugin (https://github.com/Shougo/neosnippet.vim) or UltiSnips +(https://github.com/SirVer/ultisnips). *neocomplete-context-filetype* -If you would like to use the context filetype feature, you need to install the +If you like to use the context filetype feature, you need to install the context_filetype.vim plugin which you can find under the following repository: https://github.com/Shougo/context_filetype.vim @@ -182,11 +182,6 @@ If you want to complete the candidates from syntax files, you need to install the neco-syntax plugin (https://github.com/Shougo/neco-syntax). - *neocomplete-neopairs* - -If you want to insert the parentheses pairs automatically, you need to install -the neopairs plugin (https://github.com/Shougo/neopairs.vim). - ============================================================================== INTERFACE *neocomplete-interface* @@ -254,9 +249,6 @@ :NeoCompleteTagMakeCache *:NeoCompleteTagMakeCache* Make a cache from a tags file in current buffer. -:NeoCompleteMemberMakeCache *:NeoCompleteMemberMakeCache* - Make a member cache based in current buffer. - ------------------------------------------------------------------------------ VARIABLES *neocomplete-variables* @@ -347,13 +339,32 @@ Default value is 0. - *g:neocomplete#auto_complete_delay* -g:neocomplete#auto_complete_delay - It is the auto completion delay time after your input. - The unit is ms. - Note: It requires |+timers| feature. - - Default value is 50. + *g:neocomplete#enable_cursor_hold_i* +g:neocomplete#enable_cursor_hold_i + This variable controls whether neocomplete use |CursorHoldI| + event when complete candidates. + Note: This option must be set before call + |:NeoCompleteEnable|. + + Default value is 0. + + *g:neocomplete#cursor_hold_i_time* +g:neocomplete#cursor_hold_i_time + If g:neocomplete#enable_cursor_hold_i is non-zero and in + insert mode, this value changes 'updatetime' option. + + Default value is 300. + + *g:neocomplete#enable_insert_char_pre* +g:neocomplete#enable_insert_char_pre + This variable controls whether neocomplete use + |InsertCharPre| event when complete candidates. + If it is enabled, the candidates will be updated after user + input. + Note: This option must be set before call + |:NeoCompleteEnable|. + + Default value is 0. *g:neocomplete#enable_auto_select* g:neocomplete#enable_auto_select @@ -371,7 +382,7 @@ *g:neocomplete#enable_auto_delimiter* g:neocomplete#enable_auto_delimiter This option controls whether neocomplete insert delimiter - automatically. For example, / (filenames) or # (Vim scripts.) + automatically. For example, /(filename) or #(Vim script). Default value is 0. @@ -385,14 +396,6 @@ Default value is 1. - *g:neocomplete#enable_refresh_always* -g:neocomplete#enable_refresh_always - Neocomplete refreshes the candidates automatically if this - value is 1. - Note: It increases the screen flicker. - - Default value is 0. - *g:neocomplete#enable_multibyte_completion* g:neocomplete#enable_multibyte_completion If it is non-0, neocomplete can complete multibyte characters. @@ -464,14 +467,42 @@ neocomplete#init#_variables() in autoload/neocomplete/init.vim for the initial value. + *g:neocomplete#same_filetypes* +g:neocomplete#same_filetypes + It is a dictionary to connect file type mutually. It is + effective at time to let you refer to c and cpp mutually. + The value are comma-separated filetypes. + If the value contains "_", neocomplete completes from all + buffers. If the key is "_", the value will be used for default + same filetypes. + Note: neocomplete completes from same filetype buffers in + default. +> + if !exists('g:neocomplete#same_filetypes') + let g:neocomplete#same_filetypes = {} + endif + " In c buffers, completes from cpp and d buffers. + let g:neocomplete#same_filetypes.c = 'cpp,d' + " In cpp buffers, completes from c buffers. + let g:neocomplete#same_filetypes.cpp = 'c' + " In gitconfig buffers, completes from all buffers. + let g:neocomplete#same_filetypes.gitconfig = '_' + " In default, completes from all buffers. + let g:neocomplete#same_filetypes._ = '_' +< + Because it is complicated, refer to + neocomplete#init#_variables() in + autoload/neocomplete/init.vim for the initial value. + Note: To disable neocomplete initialization, you must use + |neocomplete#disable_default_dictionary()|. + + *g:neocomplete#text_mode_filetypes* g:neocomplete#text_mode_filetypes It is a dictionary to define text mode filetypes. The dictionary's key is filetype and value is number. If the value is non-zero, this filetype is text mode. In text mode, neocomplete supports word conversion to write English. - If the key is "_" and the value is non-zero, all filetypes are - text mode. For example, if you input "Fo", neocomplete will convert candidate "foo" to "Foo". If you input "foo", neocomplete @@ -547,6 +578,24 @@ Default value is vimproc auto detection result. + *g:neocomplete#ignore_composite_filetypes* +g:neocomplete#ignore_composite_filetypes + It is a dictionary to ignore composite file type. + The dictionary's key is composite filetype and value is + filetype. +> + " Examples: + let g:neocomplete#ignore_composite_filetypes = { + \ 'ruby.spec' : 'ruby' + \ } +< + If you open filetype like "ruby.spec", completion is + intended for "ruby" and "spec". + But if you only want to complete "ruby" filetype, + you can set this variable to ignore "spec". + + Default value is {}. + *g:neocomplete#skip_auto_completion_time* g:neocomplete#skip_auto_completion_time It is a string for skip auto completion. @@ -656,8 +705,8 @@ 'omnifunc'. Note: ruby and php omnifunc are disabled, because they are too slow. - Note: Partial omnifunc has problem when neocomplete call (Ex: - rubycomplete, jedi.vim, cocoa.vim, and clang_complete.) You + Note: Partial omnifunc has problem when neocomplete call(Ex: + rubycomplete, jedi.vim, cocoa.vim and clang_complete). You should |g:neocomplete#force_omni_input_patterns| instead. Because it is complicated, refer to s:source.initialize() @@ -698,7 +747,7 @@ < *g:neocomplete#ignore_source_files* g:neocomplete#ignore_source_files - Ignore source filenames (not full path.) You can optimize + Ignore source filenames(not full path). You can optimize source initialization. Note: You cannot use the sources in ignored source files. @@ -756,7 +805,10 @@ neocomplete#disable_default_dictionary({variable-name}) Disable default {variable-name} dictionary initialization. Note: It must be called in .vimrc. - +> + call neocomplete#disable_default_dictionary( + \ 'g:neocomplete#same_filetypes') +< *neocomplete#get_default_matchers()* neocomplete#get_default_matchers() Get default matchers in current buffer. @@ -783,15 +835,15 @@ *neocomplete#close_popup()* neocomplete#close_popup() Insert candidate and close popup menu for neocomplete. - Note: It is deprecated function. You should use "\" - character instead. - +> + inoremap neocomplete#close_popup() +< *neocomplete#cancel_popup()* neocomplete#cancel_popup() Cancel completion menu for neocomplete. - Note: It is deprecated function. You should use "\" - character instead. - +> + inoremap neocomplete#cancel_popup() +< *neocomplete#smart_close_popup()* neocomplete#smart_close_popup() Insert candidate and re-generate popup menu for neocomplete. @@ -837,8 +889,8 @@ ============================================================================== EXAMPLES *neocomplete-examples* > - " Note: This option must set it in .vimrc (_vimrc). - " NOT IN .gvimrc (_gvimrc)! + " Note: This option must set it in .vimrc(_vimrc). + " NOT IN .gvimrc(_gvimrc)! " Disable AutoComplPop. let g:acp_enableAtStartup = 0 " Use neocomplete. @@ -868,22 +920,24 @@ " : close popup and save indent. inoremap =my_cr_function() function! s:my_cr_function() - return (pumvisible() ? "\" : "" ) . "\" + return neocomplete#close_popup() . "\" " For no inserting key. - "return pumvisible() ? "\" : "\" + "return pumvisible() ? neocomplete#close_popup() : "\" endfunction " : completion. inoremap pumvisible() ? "\" : "\" " , : close popup and delete backword char. inoremap neocomplete#smart_close_popup()."\" inoremap neocomplete#smart_close_popup()."\" + inoremap neocomplete#close_popup() + inoremap neocomplete#cancel_popup() " Close popup by . - "inoremap pumvisible() ? "\" : "\" + "inoremap pumvisible() ? neocomplete#close_popup() : "\" " AutoComplPop like behavior. "let g:neocomplete#enable_auto_select = 1 - " Shell like behavior (not recommended.) + " Shell like behavior(not recommended). "set completeopt+=longest "let g:neocomplete#enable_auto_select = 1 "let g:neocomplete#disable_auto_complete = 1 @@ -956,11 +1010,9 @@ omni *neocomplete-source-omni* This source calls 'omnifunc' automatically when cursor - text is matched with - |g:neocomplete#sources#omni#input_patterns|. If - |g:neocomplete_omni_function_list| is defined, neocomplete - will give priority it. - Note: It supports the fuzzy match using the previous result. + text is matched with |g:neocomplete#sources#omni#input_patterns|. If + |g:neocomplete_omni_function_list|is defined, + neocomplete will give priority it. suffix of complete candidates in popup menu declaration. @@ -1014,7 +1066,7 @@ filters are available. "matcher" is to filter candidates by user input. "sorter" is to sort candidates. "converter" is to candidates conversion. -Default sources are below. But you can create original filters (cf: +Default sources are below. But you can create original filters(cf: |neocomplete-create-filter|) and set them by |neocomplete#custom#source()|. > @@ -1063,9 +1115,6 @@ matcher_length Input keyword length matcher. It removes candidates which is less than input keyword length. - *neocomplete-filter-matcher_nothing* -matcher_nothing Nothing matcher. It disables the matcher filtering. - *neocomplete-filter-sorter_rank* sorter_rank Matched rank order sorter. The higher the matched word is already selected or in current buffer @@ -1102,12 +1151,6 @@ candidate's word. It is useful if you use auto closing parentheses plugins. - *neocomplete-filter-converter_add_paren* -converter_add_paren - The converter which adds parentheses in a candidate's word. It - is useful if you use |neopairs.vim| or |neosnippet.vim| - plugins. - ============================================================================== CREATE SOURCE *neocomplete-create-source* @@ -1124,62 +1167,65 @@ SOURCE ATTRIBUTES *neocomplete-source-attributes* *neocomplete-source-attribute-name* -name String (Required) - The name of a source. Allowed characters are: - - a-z - - 0-9 - - _ - - / - - - (Not head) +name String (Required) + The name of a source. Allowed characters are: + - a-z + - 0-9 + - _ + - / + - - (Not head) *neocomplete-source-attribute-kind* -kind String (Optional) - The kind of the source. It decides the behaviour of the - complete position. The following values are available: - - "manual": The source decides the complete position manually - with the "get_complete_position" attribute. - See also: - |neocomplete-source-attribute-get_complete_position| - - "keyword": The source decides the complete position with - |g:neocomplete#keyword_patterns|. This pattern is - also used to filter the candidates. - - Note that "plugin", "complfunc" and "ftplugin" are old values - that are no longer accepted. +kind String (Optional) + The kind of the source. It decides the behaviour of + the complete position. The following values are + available: + + "manual": The source decides the complete position + manually with the "get_complete_position" + attribute. See also: + |neocomplete-source-attribute-get_complete_position| + + "keyword": The source decides the complete position + with |g:neocomplete#keyword_patterns|. This + pattern is also used to filter the candidates. + + Note that "plugin", "complfunc" and "ftplugin" are old + values that are no longer accepted. *neocomplete-source-attribute-filetypes* -filetypes Dictionary (Optional) - Available filetype dictionary. +filetypes Dictionary (Optional) + Available filetype dictionary. - For example: + For example: > - let source = { - \ 'name' : 'test', - \ 'kind' : 'manual', - \ 'filetypes' : { 'vim' : 1, 'html' : 1 }, - \} + let source = { + \ 'name' : 'test', + \ 'kind' : 'manual', + \ 'filetypes' : { 'vim' : 1, 'html' : 1 }, + \} < - The source is available in vim and html filetypes. + The source is available in vim and html filetypes. - If you omit it, this source available in all filetypes. + If you omit it, this source available in all + filetypes. *neocomplete-source-attribute-disabled_filetypes* disabled_filetypes Dictionary (Optional) - Not available filetype dictionary. - If the key is "_", the source is disabled in all sources. + Not available filetype dictionary. + If the key is "_", the source is disabled in all + sources. *neocomplete-source-attribute-rank* -rank Number (Optional) - Source priority. Higher values imply higher priority. - If you omit it, it is set below value. - Note: It is high priority than match position. +rank Number (Optional) + Source priority. Higher values imply higher priority. + If you omit it, it is set below value. + Note: It is high priority than match position. - If kind attribute is "keyword": 5 - If filetype attribute is empty: 10 - Otherwise: 100 + If kind attribute is "keyword": 5 + If filetype attribute is empty: 10 + Otherwise: 100 Example: > @@ -1188,154 +1234,155 @@ < *neocomplete-source-attribute-min_pattern_length* min_pattern_length - Number (Optional) - Required pattern length for completion. - - If you omit it, it is set to - |g:neocomplete#auto_completion_start_length| - - *neocomplete-source-attribute-input_pattern* -input_pattern - String (Optional) - If it is matched, neocomplete ignores - |neocomplete-source-attribute-min_pattern_length|. - It is useful for omni function sources. - - If you omit it, it is set to "". + Number (Optional) + Required pattern length for completion. + + If you omit it, it is set below value. + If kind attribute is "keyword": + |g:neocomplete#auto_completion_start_length| + Otherwise: 0 *neocomplete-source-attribute-max_candidates* max_candidates - Number (Optional) - The maximum number of candidates. + Number (Optional) + The maximum number of candidates. - This attribute is optional; if it is not given, 0 is used as - the default value. This means maximum number is infinity. + This attribute is optional; if it is not given, + 0 is used as the default value. This means + maximum number is infinity. *neocomplete-source-attribute-keyword_patterns* keyword_patterns - Dictionary (Optional) - This dictionary changes keyword patterns to completion for - specific types. + Dictionary (Optional) + This dictionary changes keyword patterns to + completion for specific types. > let keyword_patterns = {} let keyword_patterns.tex = '\\\?\h\w*' call neocomplete#custom#source('dictionary', \ 'keyword_patterns', keyword_patterns) < - This attribute is optional; if it is not given, - |g:neocomplete#keyword_patterns| is used as the default value. + This attribute is optional; if it is not given, + |g:neocomplete#keyword_patterns| is used as the + default value. *neocomplete-source-attribute-is_volatile* -is_volatile Number (Optional) - Whether the source recalculates the candidates everytime the - input is changed. - This attribute is optional. - If it's not given, 0 is set as the default value. In this - case, candidates are cached. +is_volatile Number (Optional) + Whether the source recalculates the candidates + everytime the input is changed. + This attribute is optional. + If it's not given, 0 is set as the default value. In + this case, candidates are cached. *neocomplete-source-attribute-disabled* -disabled Number (Optional) - This attribute is optional. - If it's not given, 0 is set as the default value. - Otherwise, the source is disabled. +disabled Number (Optional) + This attribute is optional. + If it's not given, 0 is set as the default value. + Otherwise, the source is disabled. *neocomplete-source-attribute-hooks* -hooks Dictionary (Optional) - You may put hook functions in this dictionary in which the key - is the position to hook and the value is the reference to the - function to be called. The following hook functions are - defined: - - *neocomplete-source-attribute-hooks-on_init* - on_init - Called when initializing the source. - This function takes {context} as its parameters. - - *neocomplete-source-attribute-hooks-on_final* - on_final - Called after executing |:NeoCompleteDisable|. - This function takes {context} as its parameters. - - *neocomplete-source-attribute-hooks-on_post_filter* - on_post_filter - Called after the filters to narrow down the - candidates. This is used to set attributes. This - filters is to avoid adversely affecting the - performance. - This function takes {context} as its parameters. +hooks Dictionary (Optional) + You may put hook functions in this dictionary in which + the key is the position to hook and the value is the + reference to the function to be called. The following + hook functions are defined: + + *neocomplete-source-attribute-hooks-on_init* + on_init + Called when initializing the source. + This function takes {context} as its parameters. + + *neocomplete-source-attribute-hooks-on_final* + on_final + Called after executing |:NeoCompleteDisable|. + This function takes {context} as its parameters. + + *neocomplete-source-attribute-hooks-on_post_filter* + on_post_filter + Called after the filters to narrow down the + candidates. This is used to set attributes. This + filters is to avoid adversely affecting the + performance. + This function takes {context} as its parameters. *neocomplete-source-attribute-get_complete_position* get_complete_position Function (Optional) - This function takes {context} as its parameter and returns - complete position in current line. - Here, {context} is the context information when the source is - called(|neocomplete-notation-{context}|). - If you omit it, neocomplete will use the position using - |g:neocomplete#keyword_patterns|. - Note: If the source returns candidates which are not matched - |g:neocomplete#keyword_patterns|, you must define - |neocomplete-source-attribute-get_complete_position|. + This function takes {context} as its + parameter and returns complete position in current + line. + Here, {context} is the context information when the + source is called(|neocomplete-notation-{context}|). + If you omit it, neocomplete will use the position + using |g:neocomplete#keyword_patterns|. + Note: If the source returns candidates which are not + matched |g:neocomplete#keyword_patterns|, you must + define + |neocomplete-source-attribute-get_complete_position|. *neocomplete-source-attribute-gather_candidates* gather_candidates Function (Required) - This function is called in gathering candidates. If you - enabled fuzzy completion by - |g:neocomplete#enable_fuzzy_completion| , this function is - called whenever the input string is changed. This function - takes {context} as its parameter and returns a list of - {candidate}. Here, {context} is the context information when - the source is called(|neocomplete-notation-{context}|). + This function is called in gathering candidates. If + you enabled fuzzy completion by + |g:neocomplete#enable_fuzzy_completion| , this + function is called whenever the input string is + changed. This function takes {context} as its + parameter and returns a list of {candidate}. + Here, {context} is the context information when the + source is called(|neocomplete-notation-{context}|). {context} *neocomplete-notation-{context}* - A dictionary to give context information. - The followings are the primary information. - The global context information can be acquired by - |neocomplete#get_context()|. - - input (String) - The input string of current line. - - complete_pos (Number) - The complete position of current source. - - complete_str (String) - The complete string of current source. - - source__{name} (Unknown) (Optional) - Additional source information. - Note: Recommend sources save - variables instead of s: variables. + A dictionary to give context information. + The followings are the primary information. + The global context information can be acquired + by |neocomplete#get_context()|. + + input (String) + The input string of current line. + + complete_pos (Number) + The complete position of current source. + + complete_str (String) + The complete string of current source. + + source__{name} (Unknown) (Optional) + Additional source information. + Note: Recommend sources save + variables instead of s: variables. ------------------------------------------------------------------------------ CANDIDATE ATTRIBUTES *neocomplete-candidate-attributes* *neocomplete-candidate-attribute-name* -word String (Required) - The completion word of a candidate. It is used for matching - inputs. +word String (Required) + The completion word of a candidate. It is used for + matching inputs. *neocomplete-candidate-attribute-abbr* -abbr String (Optional) - The abbreviation of a candidate. It is displayed in popup - window. It is omitted by |g:neocomplete#max_keyword_width|. +abbr String (Optional) + The abbreviation of a candidate. It is displayed in + popup window. It is omitted by + |g:neocomplete#max_keyword_width|. *neocomplete-candidate-attribute-kind* -kind String (Optional) - The kind of a candidate. It is displayed in popup window. +kind String (Optional) + The kind of a candidate. It is displayed in popup + window. *neocomplete-candidate-attribute-menu* -menu String (Optional) - The menu information of a candidate. It is displayed in popup - window. +menu String (Optional) + The menu information of a candidate. It is displayed + in popup window. *neocomplete-candidate-attribute-info* -info String (Optional) - The preview information of a candidate. If 'completeopt' - contains "preview", it will be displayed in |preview-window|. +info String (Optional) + The preview information of a candidate. If + 'completeopt' contains "preview", it will be displayed + in |preview-window|. *neocomplete-candidate-attribute-rank* -rank Number (Optional) - The completion priority. +rank Number (Optional) + The completion priority. CONTEXT *neocomplete-context* @@ -1353,19 +1400,20 @@ *neocomplete-filter-attribute-name* -name String (Required) - The filter name. +name String (Required) + The filter name. *neocomplete-filter-attribute-filter* -filter Function (Required) - The filter function. This function takes {context} as its - parameter and returns a list of {candidate}. - The specification of the parameters and the returned value is - same as |neocomplete-source-attribute-gather_candidates|. +filter Function (Required) + The filter function. This function takes {context} as + its parameter and returns a list of {candidate}. + The specification of the parameters and the returned + value is same as + |neocomplete-source-attribute-gather_candidates|. - *neocomplete-filter-attribute-description* -description String (Optional) - The filter description string. + *neocomplete-filter-attribute-description* +description String (Optional) + The filter description string. ============================================================================== UNITE SOURCES *neocomplete-unite-sources* @@ -1523,8 +1571,7 @@ \ '\[\h\w*\s\h\?\|\h\w*\%(\.\|->\)\|\h\w*::\w*' let g:clang_complete_auto = 0 let g:clang_auto_select = 0 - let g:clang_omnicppcomplete_compliance = 0 - let g:clang_make_default_keymappings = 0 + let g:clang_default_keymappings = 0 "let g:clang_use_library = 1 < @@ -1575,11 +1622,25 @@ " : close popup and save indent. inoremap =my_cr_function() function! s:my_cr_function() - return (pumvisible() ? "\" : "" ) . "\" + return neocomplete#close_popup() . "\" " For no inserting key. - "return pumvisible() ? "\" : "\" + "return pumvisible() ? neocomplete#close_popup() : "\" endfunction > +Q: No completion offered from "vim" buffers in "non-vim" buffers. + +A: It is feature. neocomplete completes from same filetype buffers in +default. But you can completes from other filetype buffers using +|g:neocomplete#same_filetypes|. + +Q: I want to complete from all buffers. + +A: |g:neocomplete#same_filetypes| +> + let g:neocomplete#same_filetypes = {} + let g:neocomplete#same_filetypes._ = '_' +< + Q: Suggestions are case insensitive in "gitcommit" buffers, but not "javascript". @@ -1613,12 +1674,11 @@ autocmd FileType python setlocal omnifunc=jedi#completions let g:jedi#completions_enabled = 0 let g:jedi#auto_vim_configuration = 0 - let g:jedi#smart_auto_mappings = 0 let g:neocomplete#force_omni_input_patterns.python = \ '\%([^. \t]\.\|^\s*@\|^\s*from\s.\+import \|^\s*from \|^\s*import \)\w*' " alternative pattern: '\h\w*\|[^. \t]\.\w*' < -Q: Candidates are not found in heavy completion (neco-look, etc.) +Q: Candidates are not found in heavy completion(neco-look, etc). A: It may be caused by skip completion. @@ -1646,11 +1706,8 @@ https://github.com/Shougo/neocomplcache.vim/issues/368 A: I think you use 'foldmethod' is "expr" or "syntax". It is too heavy to use -neocomplete (or other auto completion.) You should change 'foldmethod' -option or install FastFold plugin. - -https://github.com/Konfekt/FastFold - +neocomplete(or other auto completion). You should change 'foldmethod' +option. Note: In current version, neocomplete does not restore 'foldmethod'. Because it is too heavy. @@ -1698,12 +1755,13 @@ let g:lua_check_syntax = 0 let g:lua_complete_omni = 1 let g:lua_complete_dynamic = 0 - let g:lua_define_completion_mappings = 0 let g:neocomplete#sources#omni#functions.lua = \ 'xolox#lua#omnifunc' let g:neocomplete#sources#omni#input_patterns.lua = \ '\w\+[.:]\|require\s*(\?["'']\w*' + " let g:neocomplete#force_omni_input_patterns.lua = + " \ '\w\+[.:]\|require\s*(\?["'']\w*' < Q: I want to disable sources in certain filetype. @@ -1742,7 +1800,7 @@ if !exists('g:neocomplete#force_omni_input_patterns') let g:neocomplete#force_omni_input_patterns = {} endif - let g:neocomplete#force_omni_input_patterns.java = + g:neocomplete#force_omni_input_patterns.java = \ \'\%(\h\w*\|)\)\.\w* Q: I want to get quiet messages in auto completion. @@ -1767,7 +1825,7 @@ A: You can use |g:neocomplete#sources#buffer#max_keyword_width|. -Q: neocomplete will change external completeopt value (longest.) +Q: neocomplete will change external completeopt value(longest). https://github.com/Shougo/neocomplcache.vim/issues/453 A: It is feature. Because "longest" completeopt conflicts with auto @@ -1788,7 +1846,7 @@ if !exists('g:neocomplete#force_omni_input_patterns') let g:neocomplete#force_omni_input_patterns = {} endif - let g:neocomplete#force_omni_input_patterns.erlang = + g:neocomplete#force_omni_input_patterns.erlang = \ '\<[[:digit:][:alnum:]_-]\+:[[:digit:][:alnum:]_-]*' Q: I want to look selected function's arguments in neocomplete. But I don't @@ -1797,6 +1855,8 @@ A: You can do it by |echodoc|. http://github.com/Shougo/echodoc.vim +Note: This feature is available from neocomplete candidates only. +You cannot get it from |g:neocomplete#force_omni_input_patterns|. Q: In ||g:neocomplete#force_omni_input_patterns|, |g:neocomplete#enable_auto_select| feature is not work. @@ -1828,22 +1888,5 @@ A: https://github.com/Shougo/neocomplete.vim/issues/334 Note: It is fixed in Vim 7.4.653. -Q: When I press enter, Vim inserts new line instead of selected item. - -A: It is Vim's default behavior (feature.) If you want to select the item, you -should map . > - - inoremap pumvisible()? "\" : "\" - -Q: After updating Vim, some completion plugins automatically select the last -candidate in the popup menu. - -A: Vim 7.4.775 introduced "noselect" and "noinsert" options for 'completeopt'. -It is likely that those completion plugins use keymappings such as to -display the popup menu. However, there is no need to do this after 7.4.775 -since neocomplete.vim handles that part. If that's the case, you will need to -contact the author of the plugin and have it not send those key strokes if -"noselect" or "noinsert" option is present in 'completeopt'. - ============================================================================== vim:tw=78:ts=8:ft=help:norl:noet:fen:noet: === removed file 'vim/bundle/neocomplete.vim/plugin/neocomplete/member.vim' --- vim/bundle/neocomplete.vim/plugin/neocomplete/member.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/plugin/neocomplete/member.vim 1970-01-01 00:00:00 +0000 @@ -1,24 +0,0 @@ -"============================================================================= -" FILE: member.vim -" AUTHOR: Shougo Matsushita -"============================================================================= - -if exists('g:loaded_neocomplete_member') - finish -endif - -let s:save_cpo = &cpo -set cpo&vim - -" Add commands. "{{{ -command! -nargs=? -complete=file -bar - \ NeoCompleteMemberMakeCache - \ call neocomplete#sources#member#remake_cache(&l:filetype) -"}}} - -let &cpo = s:save_cpo -unlet s:save_cpo - -let g:loaded_neocomplete_member = 1 - -" vim: foldmethod=marker === modified file 'vim/bundle/neocomplete.vim/test/neocomplete.vim' --- vim/bundle/neocomplete.vim/test/neocomplete.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neocomplete.vim/test/neocomplete.vim 2015-08-25 11:01:00 +0000 @@ -2,7 +2,7 @@ let s:suite = themis#suite('parser') let s:assert = themis#helper('assert') -function! s:suite.escape() abort +function! s:suite.escape() call s:assert.equals( \ neocomplete#filters#fuzzy_escape('abc'), 'a.*b.*c.*') call s:assert.equals( @@ -13,12 +13,12 @@ \ neocomplete#filters#fuzzy_escape('.abc'), '%.a.*b.*c.*') endfunction -function! s:suite.sort() abort +function! s:suite.sort() let candidates = [] for i in range(1, 1000) call add(candidates, { 'word' : i, 'rank' : i }) endfor - function! CompareRank(i1, i2) abort + function! CompareRank(i1, i2) let diff = (get(a:i2, 'rank', 0) - get(a:i1, 'rank', 0)) return (diff != 0) ? diff : (len(a:i1.word) < len(a:i2.word)) ? 1 : -1 endfunction" @@ -37,12 +37,12 @@ \ {'candidates' : copy(candidates), 'input' : '' })) endfunction -function! s:suite.fuzzy() abort +function! s:suite.fuzzy() call s:assert.equals(neocomplete#filters#matcher_fuzzy#define().filter( \ {'complete_str' : 'ae', 'candidates' : ['~/~']}), []) endfunction -function! s:suite.overlap() abort +function! s:suite.overlap() call s:assert.equals(neocomplete#filters#converter_remove_overlap# \length('foo bar', 'bar baz'), 3) call s:assert.equals(neocomplete#filters#converter_remove_overlap# === modified file 'vim/bundle/neomru.vim/.git/config' (properties changed: -x to +x) === modified file 'vim/bundle/neomru.vim/.git/hooks/applypatch-msg.sample' --- vim/bundle/neomru.vim/.git/hooks/applypatch-msg.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/neomru.vim/.git/hooks/applypatch-msg.sample 2015-08-25 11:01:00 +0000 @@ -10,6 +10,6 @@ # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup -commitmsg="$(git rev-parse --git-path hooks/commit-msg)" -test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} +test -x "$GIT_DIR/hooks/commit-msg" && + exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} : === modified file 'vim/bundle/neomru.vim/.git/hooks/pre-applypatch.sample' --- vim/bundle/neomru.vim/.git/hooks/pre-applypatch.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/neomru.vim/.git/hooks/pre-applypatch.sample 2015-08-25 11:01:00 +0000 @@ -9,6 +9,6 @@ # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup -precommit="$(git rev-parse --git-path hooks/pre-commit)" -test -x "$precommit" && exec "$precommit" ${1+"$@"} +test -x "$GIT_DIR/hooks/pre-commit" && + exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} : === modified file 'vim/bundle/neomru.vim/.git/hooks/pre-push.sample' --- vim/bundle/neomru.vim/.git/hooks/pre-push.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/neomru.vim/.git/hooks/pre-push.sample 2015-08-25 11:01:00 +0000 @@ -24,6 +24,7 @@ z40=0000000000000000000000000000000000000000 +IFS=' ' while read local_ref local_sha remote_ref remote_sha do if [ "$local_sha" = $z40 ] === modified file 'vim/bundle/neomru.vim/.git/hooks/update.sample' --- vim/bundle/neomru.vim/.git/hooks/update.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/neomru.vim/.git/hooks/update.sample 2015-08-25 11:01:00 +0000 @@ -1,6 +1,6 @@ #!/bin/sh # -# An example hook script to block unannotated tags from entering. +# An example hook script to blocks unannotated tags from entering. # Called by "git receive-pack" with arguments: refname sha1-old sha1-new # # To enable this hook, rename this file to "update". === modified file 'vim/bundle/neomru.vim/.git/index' Binary files vim/bundle/neomru.vim/.git/index 2016-08-04 08:15:51 +0000 and vim/bundle/neomru.vim/.git/index 2015-08-25 11:01:00 +0000 differ === modified file 'vim/bundle/neomru.vim/.git/logs/HEAD' --- vim/bundle/neomru.vim/.git/logs/HEAD 2016-08-04 08:15:51 +0000 +++ vim/bundle/neomru.vim/.git/logs/HEAD 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 e86ebb07c3498e81b13a195330831eb845555633 Jan Pobrislo 1470298376 +0200 clone: from https://github.com/Shougo/neomru.vim +0000000000000000000000000000000000000000 a52b644475156d397117b2e7920849fb9f1c8901 Jan Pobrislo 1440500310 +0200 clone: from https://github.com/Shougo/neomru.vim === modified file 'vim/bundle/neomru.vim/.git/logs/refs/heads/master' --- vim/bundle/neomru.vim/.git/logs/refs/heads/master 2016-08-04 08:15:51 +0000 +++ vim/bundle/neomru.vim/.git/logs/refs/heads/master 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 e86ebb07c3498e81b13a195330831eb845555633 Jan Pobrislo 1470298376 +0200 clone: from https://github.com/Shougo/neomru.vim +0000000000000000000000000000000000000000 a52b644475156d397117b2e7920849fb9f1c8901 Jan Pobrislo 1440500310 +0200 clone: from https://github.com/Shougo/neomru.vim === modified file 'vim/bundle/neomru.vim/.git/logs/refs/remotes/origin/HEAD' --- vim/bundle/neomru.vim/.git/logs/refs/remotes/origin/HEAD 2016-08-04 08:15:51 +0000 +++ vim/bundle/neomru.vim/.git/logs/refs/remotes/origin/HEAD 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 e86ebb07c3498e81b13a195330831eb845555633 Jan Pobrislo 1470298376 +0200 clone: from https://github.com/Shougo/neomru.vim +0000000000000000000000000000000000000000 a52b644475156d397117b2e7920849fb9f1c8901 Jan Pobrislo 1440500310 +0200 clone: from https://github.com/Shougo/neomru.vim === removed directory 'vim/bundle/neomru.vim/.git/objects/00' === removed file 'vim/bundle/neomru.vim/.git/objects/00/e7bd5af2c74722e7f245a4d21f715378e553e9' Binary files vim/bundle/neomru.vim/.git/objects/00/e7bd5af2c74722e7f245a4d21f715378e553e9 2016-08-04 08:15:51 +0000 and vim/bundle/neomru.vim/.git/objects/00/e7bd5af2c74722e7f245a4d21f715378e553e9 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neomru.vim/.git/objects/07' === removed file 'vim/bundle/neomru.vim/.git/objects/07/0f8239f21eeb9829cbd0112e5ae13302e77bdd' Binary files vim/bundle/neomru.vim/.git/objects/07/0f8239f21eeb9829cbd0112e5ae13302e77bdd 2016-08-04 08:15:51 +0000 and vim/bundle/neomru.vim/.git/objects/07/0f8239f21eeb9829cbd0112e5ae13302e77bdd 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neomru.vim/.git/objects/09' === added file 'vim/bundle/neomru.vim/.git/objects/09/c2084181ef4b0c18aabd3c1edc4791cddbdc17' Binary files vim/bundle/neomru.vim/.git/objects/09/c2084181ef4b0c18aabd3c1edc4791cddbdc17 1970-01-01 00:00:00 +0000 and vim/bundle/neomru.vim/.git/objects/09/c2084181ef4b0c18aabd3c1edc4791cddbdc17 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neomru.vim/.git/objects/0a' === removed file 'vim/bundle/neomru.vim/.git/objects/0a/56e3fc5d8cbcd1fda80cafa819b3972e27e455' Binary files vim/bundle/neomru.vim/.git/objects/0a/56e3fc5d8cbcd1fda80cafa819b3972e27e455 2016-08-04 08:15:51 +0000 and vim/bundle/neomru.vim/.git/objects/0a/56e3fc5d8cbcd1fda80cafa819b3972e27e455 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neomru.vim/.git/objects/0d' === added file 'vim/bundle/neomru.vim/.git/objects/0d/1dae0152eaa676c9d8bc9a321703cb49eaf225' Binary files vim/bundle/neomru.vim/.git/objects/0d/1dae0152eaa676c9d8bc9a321703cb49eaf225 1970-01-01 00:00:00 +0000 and vim/bundle/neomru.vim/.git/objects/0d/1dae0152eaa676c9d8bc9a321703cb49eaf225 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neomru.vim/.git/objects/11' === removed file 'vim/bundle/neomru.vim/.git/objects/11/ecf1ad537698af48313e03e16d3f4302d877dd' Binary files vim/bundle/neomru.vim/.git/objects/11/ecf1ad537698af48313e03e16d3f4302d877dd 2016-08-04 08:15:51 +0000 and vim/bundle/neomru.vim/.git/objects/11/ecf1ad537698af48313e03e16d3f4302d877dd 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neomru.vim/.git/objects/1c' === removed file 'vim/bundle/neomru.vim/.git/objects/1c/8ed16a1cfc114ad7a8de23a4d38c4c68b83986' Binary files vim/bundle/neomru.vim/.git/objects/1c/8ed16a1cfc114ad7a8de23a4d38c4c68b83986 2016-08-04 08:15:51 +0000 and vim/bundle/neomru.vim/.git/objects/1c/8ed16a1cfc114ad7a8de23a4d38c4c68b83986 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neomru.vim/.git/objects/2f' === added file 'vim/bundle/neomru.vim/.git/objects/2f/42a29f3937a874326d722b60594efeac5b2675' Binary files vim/bundle/neomru.vim/.git/objects/2f/42a29f3937a874326d722b60594efeac5b2675 1970-01-01 00:00:00 +0000 and vim/bundle/neomru.vim/.git/objects/2f/42a29f3937a874326d722b60594efeac5b2675 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neomru.vim/.git/objects/38' === added file 'vim/bundle/neomru.vim/.git/objects/38/5d35ec42579a84a2277f97112a7a921ae8509a' Binary files vim/bundle/neomru.vim/.git/objects/38/5d35ec42579a84a2277f97112a7a921ae8509a 1970-01-01 00:00:00 +0000 and vim/bundle/neomru.vim/.git/objects/38/5d35ec42579a84a2277f97112a7a921ae8509a 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/neomru.vim/.git/objects/51/c7268c7ce10df71de033092ca537a788483910' Binary files vim/bundle/neomru.vim/.git/objects/51/c7268c7ce10df71de033092ca537a788483910 2016-08-04 08:15:51 +0000 and vim/bundle/neomru.vim/.git/objects/51/c7268c7ce10df71de033092ca537a788483910 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/neomru.vim/.git/objects/51/ddb9f5f9977f14f11d01013deda277f40b587a' Binary files vim/bundle/neomru.vim/.git/objects/51/ddb9f5f9977f14f11d01013deda277f40b587a 1970-01-01 00:00:00 +0000 and vim/bundle/neomru.vim/.git/objects/51/ddb9f5f9977f14f11d01013deda277f40b587a 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neomru.vim/.git/objects/61' === removed file 'vim/bundle/neomru.vim/.git/objects/61/276122e06a90c0e1dc1d41e1ff67fdfdc1eed4' Binary files vim/bundle/neomru.vim/.git/objects/61/276122e06a90c0e1dc1d41e1ff67fdfdc1eed4 2016-08-04 08:15:51 +0000 and vim/bundle/neomru.vim/.git/objects/61/276122e06a90c0e1dc1d41e1ff67fdfdc1eed4 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neomru.vim/.git/objects/63' === added file 'vim/bundle/neomru.vim/.git/objects/63/2f0f9aba31f08c108d4fd2d72a30549026a2e1' Binary files vim/bundle/neomru.vim/.git/objects/63/2f0f9aba31f08c108d4fd2d72a30549026a2e1 1970-01-01 00:00:00 +0000 and vim/bundle/neomru.vim/.git/objects/63/2f0f9aba31f08c108d4fd2d72a30549026a2e1 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neomru.vim/.git/objects/76' === removed file 'vim/bundle/neomru.vim/.git/objects/76/3397812f31cb94df5c63fbd2f63efe528a6a81' Binary files vim/bundle/neomru.vim/.git/objects/76/3397812f31cb94df5c63fbd2f63efe528a6a81 2016-08-04 08:15:51 +0000 and vim/bundle/neomru.vim/.git/objects/76/3397812f31cb94df5c63fbd2f63efe528a6a81 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neomru.vim/.git/objects/8e' === removed file 'vim/bundle/neomru.vim/.git/objects/8e/fe40b0e1463c1e3f3367614469fd8805b7117e' Binary files vim/bundle/neomru.vim/.git/objects/8e/fe40b0e1463c1e3f3367614469fd8805b7117e 2016-08-04 08:15:51 +0000 and vim/bundle/neomru.vim/.git/objects/8e/fe40b0e1463c1e3f3367614469fd8805b7117e 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neomru.vim/.git/objects/a5' === added file 'vim/bundle/neomru.vim/.git/objects/a5/2b644475156d397117b2e7920849fb9f1c8901' Binary files vim/bundle/neomru.vim/.git/objects/a5/2b644475156d397117b2e7920849fb9f1c8901 1970-01-01 00:00:00 +0000 and vim/bundle/neomru.vim/.git/objects/a5/2b644475156d397117b2e7920849fb9f1c8901 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neomru.vim/.git/objects/ad' === added file 'vim/bundle/neomru.vim/.git/objects/ad/5eaab7aa4a1dc8c9483f83a2451f73e9e306c7' Binary files vim/bundle/neomru.vim/.git/objects/ad/5eaab7aa4a1dc8c9483f83a2451f73e9e306c7 1970-01-01 00:00:00 +0000 and vim/bundle/neomru.vim/.git/objects/ad/5eaab7aa4a1dc8c9483f83a2451f73e9e306c7 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/neomru.vim/.git/objects/c4/347c891054052c7215f2c3ac3908d443dcde0e' Binary files vim/bundle/neomru.vim/.git/objects/c4/347c891054052c7215f2c3ac3908d443dcde0e 1970-01-01 00:00:00 +0000 and vim/bundle/neomru.vim/.git/objects/c4/347c891054052c7215f2c3ac3908d443dcde0e 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/neomru.vim/.git/objects/c4/967dd7c5142f5e5f51bf726896e6d00fcb267c' Binary files vim/bundle/neomru.vim/.git/objects/c4/967dd7c5142f5e5f51bf726896e6d00fcb267c 2016-08-04 08:15:51 +0000 and vim/bundle/neomru.vim/.git/objects/c4/967dd7c5142f5e5f51bf726896e6d00fcb267c 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neomru.vim/.git/objects/c8' === removed file 'vim/bundle/neomru.vim/.git/objects/c8/1ef321c7a368d7d2f8e30830c7df911ab8bd4a' Binary files vim/bundle/neomru.vim/.git/objects/c8/1ef321c7a368d7d2f8e30830c7df911ab8bd4a 2016-08-04 08:15:51 +0000 and vim/bundle/neomru.vim/.git/objects/c8/1ef321c7a368d7d2f8e30830c7df911ab8bd4a 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neomru.vim/.git/objects/d0' === removed file 'vim/bundle/neomru.vim/.git/objects/d0/06325588bb473893ebb682a58563c3c16db720' Binary files vim/bundle/neomru.vim/.git/objects/d0/06325588bb473893ebb682a58563c3c16db720 2016-08-04 08:15:51 +0000 and vim/bundle/neomru.vim/.git/objects/d0/06325588bb473893ebb682a58563c3c16db720 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neomru.vim/.git/objects/df' === added file 'vim/bundle/neomru.vim/.git/objects/df/0defdf12d404b88c9454245d098d4e91c33c0d' Binary files vim/bundle/neomru.vim/.git/objects/df/0defdf12d404b88c9454245d098d4e91c33c0d 1970-01-01 00:00:00 +0000 and vim/bundle/neomru.vim/.git/objects/df/0defdf12d404b88c9454245d098d4e91c33c0d 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neomru.vim/.git/objects/e8' === removed file 'vim/bundle/neomru.vim/.git/objects/e8/6ebb07c3498e81b13a195330831eb845555633' --- vim/bundle/neomru.vim/.git/objects/e8/6ebb07c3498e81b13a195330831eb845555633 2016-08-04 08:15:51 +0000 +++ vim/bundle/neomru.vim/.git/objects/e8/6ebb07c3498e81b13a195330831eb845555633 1970-01-01 00:00:00 +0000 @@ -1,2 +0,0 @@ -xM -0@a9ŀKLL~@ĕ;W M'mIS=ox1TA Q{cFZ%bJ$dqްS씱Qdmup@(6^+W a /.%VOb \ No newline at end of file === added directory 'vim/bundle/neomru.vim/.git/objects/f8' === added file 'vim/bundle/neomru.vim/.git/objects/f8/989555688e0c0772a8f9ad81bc06f7a8770c7a' Binary files vim/bundle/neomru.vim/.git/objects/f8/989555688e0c0772a8f9ad81bc06f7a8770c7a 1970-01-01 00:00:00 +0000 and vim/bundle/neomru.vim/.git/objects/f8/989555688e0c0772a8f9ad81bc06f7a8770c7a 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neomru.vim/.git/objects/fa' === added file 'vim/bundle/neomru.vim/.git/objects/fa/18186c8ec1c265bbb9ec43896a86150eadbbad' Binary files vim/bundle/neomru.vim/.git/objects/fa/18186c8ec1c265bbb9ec43896a86150eadbbad 1970-01-01 00:00:00 +0000 and vim/bundle/neomru.vim/.git/objects/fa/18186c8ec1c265bbb9ec43896a86150eadbbad 2015-08-25 11:01:00 +0000 differ === modified file 'vim/bundle/neomru.vim/.git/packed-refs' --- vim/bundle/neomru.vim/.git/packed-refs 2016-08-04 08:15:51 +0000 +++ vim/bundle/neomru.vim/.git/packed-refs 2015-08-25 11:01:00 +0000 @@ -1,2 +1,2 @@ # pack-refs with: peeled fully-peeled -e86ebb07c3498e81b13a195330831eb845555633 refs/remotes/origin/master +a52b644475156d397117b2e7920849fb9f1c8901 refs/remotes/origin/master === modified file 'vim/bundle/neomru.vim/.git/refs/heads/master' --- vim/bundle/neomru.vim/.git/refs/heads/master 2016-08-04 08:15:51 +0000 +++ vim/bundle/neomru.vim/.git/refs/heads/master 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -e86ebb07c3498e81b13a195330831eb845555633 +a52b644475156d397117b2e7920849fb9f1c8901 === modified file 'vim/bundle/neomru.vim/.git/shallow' --- vim/bundle/neomru.vim/.git/shallow 2016-08-04 08:15:51 +0000 +++ vim/bundle/neomru.vim/.git/shallow 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -e86ebb07c3498e81b13a195330831eb845555633 +a52b644475156d397117b2e7920849fb9f1c8901 === removed file 'vim/bundle/neomru.vim/.gitignore' --- vim/bundle/neomru.vim/.gitignore 2016-08-04 08:15:51 +0000 +++ vim/bundle/neomru.vim/.gitignore 1970-01-01 00:00:00 +0000 @@ -1,1 +0,0 @@ -/doc/tags === modified file 'vim/bundle/neomru.vim/autoload/neomru.vim' --- vim/bundle/neomru.vim/autoload/neomru.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neomru.vim/autoload/neomru.vim 2015-08-25 11:01:00 +0000 @@ -27,7 +27,7 @@ let s:save_cpo = &cpo set cpo&vim -function! neomru#set_default(var, val, ...) abort "{{{ +function! neomru#set_default(var, val, ...) "{{{ if !exists(a:var) || type({a:var}) != type(a:val) let alternate_var = get(a:000, 0, '') @@ -35,7 +35,7 @@ \ {alternate_var} : a:val endif endfunction"}}} -function! s:substitute_path_separator(path) abort "{{{ +function! s:substitute_path_separator(path) "{{{ return s:is_windows ? substitute(a:path, '\\', '/', 'g') : a:path endfunction"}}} @@ -122,14 +122,14 @@ \ 'version' : s:VERSION, \ } -function! s:mru.is_a(type) abort "{{{ +function! s:mru.is_a(type) "{{{ return self.type == a:type endfunction "}}} -function! s:mru.validate() abort +function! s:mru.validate() throw 'unite(mru) umimplemented method: validate()!' endfunction -function! s:mru.gather_candidates(args, context) abort "{{{ +function! s:mru.gather_candidates(args, context) "{{{ if !self.is_loaded call self.load() endif @@ -145,7 +145,7 @@ \ 'action__path' : v:val, \}") endfunction"}}} -function! s:mru.delete(candidates) abort "{{{ +function! s:mru.delete(candidates) "{{{ for candidate in a:candidates call filter(self.candidates, \ 'v:val !=# candidate.action__path') @@ -153,11 +153,11 @@ call self.save() endfunction"}}} -function! s:mru.has_external_update() abort "{{{ +function! s:mru.has_external_update() "{{{ return self.mtime < getftime(self.mru_file) endfunction"}}} -function! s:mru.save(...) abort "{{{ +function! s:mru.save(...) "{{{ if s:is_sudo() return endif @@ -166,12 +166,9 @@ if self.has_external_update() && filereadable(self.mru_file) " only need to get the list which contains the latest MRUs - let lines = readfile(self.mru_file) - if !empty(lines) - let [ver; items] = lines - if self.version_check(ver) - call extend(self.candidates, items) - endif + let [ver; items] = readfile(self.mru_file) + if self.version_check(ver) + call extend(self.candidates, items) endif endif @@ -190,7 +187,7 @@ let self.mtime = getftime(self.mru_file) endfunction"}}} -function! s:mru.load(...) abort "{{{ +function! s:mru.load(...) "{{{ let is_force = get(a:000, 0, 0) " everything is loaded, done! @@ -227,14 +224,14 @@ let self.mtime = getftime(mru_file) let self.is_loaded = 1 endfunction"}}} -function! s:mru.reload() abort "{{{ +function! s:mru.reload() "{{{ call self.load(1) call filter(self.candidates, \ ((self.type == 'file') ? \ "s:is_file_exist(v:val)" : "s:is_directory_exist(v:val)")) endfunction"}}} -function! s:mru.append(path) abort "{{{ +function! s:mru.append(path) "{{{ call self.load() let index = index(self.candidates, a:path) if index == 0 @@ -254,7 +251,7 @@ call self.save() endif endfunction"}}} -function! s:mru.version_check(ver) abort "{{{ +function! s:mru.version_check(ver) "{{{ if str2float(a:ver) < self.version call s:print_error('Sorry, the version of MRU file is too old.') return 0 @@ -263,7 +260,7 @@ endif endfunction"}}} -function! s:resolve(fpath) abort "{{{ +function! s:resolve(fpath) "{{{ return g:neomru#follow_links ? resolve(a:fpath) : a:fpath endfunction"}}} @@ -277,7 +274,7 @@ \ 'limit' : g:neomru#file_mru_limit, \ } \) -function! s:file_mru.validate() abort "{{{ +function! s:file_mru.validate() "{{{ if self.do_validate call filter(self.candidates, 's:is_file_exist(v:val)') endif @@ -291,7 +288,7 @@ \ } \) -function! s:directory_mru.validate() abort "{{{ +function! s:directory_mru.validate() "{{{ if self.do_validate call filter(self.candidates, 'getftype(v:val) ==# "dir"') endif @@ -302,9 +299,9 @@ let s:MRUs.file = s:file_mru let s:MRUs.directory = s:directory_mru -function! neomru#init() abort "{{{ +function! neomru#init() "{{{ endfunction"}}} -function! neomru#_import_file(path) abort "{{{ +function! neomru#_import_file(path) "{{{ let path = a:path if path == '' let path = s:substitute_path_separator( @@ -320,7 +317,7 @@ let s:file_mru.candidates = s:uniq(candidates) call s:file_mru.save() endfunction"}}} -function! neomru#_import_directory(path) abort "{{{ +function! neomru#_import_directory(path) "{{{ let path = a:path if path == '' let path = s:substitute_path_separator( @@ -331,10 +328,10 @@ \ s:directory_mru.candidates + s:import(path)) call s:directory_mru.save() endfunction"}}} -function! neomru#_get_mrus() abort "{{{ +function! neomru#_get_mrus() "{{{ return s:MRUs endfunction"}}} -function! neomru#_append() abort "{{{ +function! neomru#_append() "{{{ if &l:buftype =~ 'help\|nofile' || &l:previewwindow return endif @@ -370,12 +367,12 @@ call s:directory_mru.append(path) endif endfunction"}}} -function! neomru#_reload() abort "{{{ +function! neomru#_reload() "{{{ for m in values(s:MRUs) call m.reload() endfor endfunction"}}} -function! neomru#_save(...) abort "{{{ +function! neomru#_save(...) "{{{ let opts = a:0 >= 1 && type(a:1) == type({}) ? a:1 : {} for m in values(s:MRUs) @@ -386,7 +383,7 @@ "}}} " Misc "{{{ -function! s:writefile(path, list) abort "{{{ +function! s:writefile(path, list) "{{{ let path = fnamemodify(a:path, ':p') if !isdirectory(fnamemodify(path, ':h')) call mkdir(fnamemodify(path, ':h'), 'p') @@ -394,10 +391,10 @@ call writefile(a:list, path) endfunction"}}} -function! s:uniq(list, ...) abort "{{{ +function! s:uniq(list, ...) "{{{ return s:uniq_by(a:list, 'tolower(v:val)') endfunction"}}} -function! s:uniq_by(list, f) abort "{{{ +function! s:uniq_by(list, f) "{{{ let list = map(copy(a:list), printf('[v:val, %s]', a:f)) let i = 0 let seen = {} @@ -412,17 +409,17 @@ endwhile return map(list, 'v:val[0]') endfunction"}}} -function! s:is_file_exist(path) abort "{{{ +function! s:is_file_exist(path) "{{{ let ignore = !empty(g:neomru#file_mru_ignore_pattern) \ && a:path =~ g:neomru#file_mru_ignore_pattern return !ignore && (getftype(a:path) ==# 'file' || a:path =~ '^\h\w\+:') endfunction"}}} -function! s:is_directory_exist(path) abort "{{{ +function! s:is_directory_exist(path) "{{{ let ignore = !empty(g:neomru#directory_mru_ignore_pattern) \ && a:path =~ g:neomru#directory_mru_ignore_pattern return !ignore && (isdirectory(a:path) || a:path =~ '^\h\w\+:') endfunction"}}} -function! s:import(path) abort "{{{ +function! s:import(path) "{{{ if !filereadable(a:path) call s:print_error(printf('path "%s" is not found.', a:path)) return [] @@ -444,10 +441,10 @@ return map(candidates, "substitute(s:substitute_path_separator( \ v:val), '/$', '', '')") endfunction"}}} -function! s:print_error(msg) abort "{{{ +function! s:print_error(msg) "{{{ echohl Error | echomsg '[neomru] ' . a:msg | echohl None endfunction"}}} -function! s:is_sudo() abort "{{{ +function! s:is_sudo() "{{{ return $SUDO_USER != '' && $USER !=# $SUDO_USER \ && $HOME !=# expand('~'.$USER) \ && $HOME ==# expand('~'.$SUDO_USER) === modified file 'vim/bundle/neomru.vim/autoload/unite/sources/mru.vim' --- vim/bundle/neomru.vim/autoload/unite/sources/mru.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neomru.vim/autoload/unite/sources/mru.vim 2015-08-25 11:01:00 +0000 @@ -27,7 +27,7 @@ set cpo&vim " For compatibility -function! unite#sources#mru#define() abort "{{{ +function! unite#sources#mru#define() "{{{ let [file_mru_source, dir_mru_source] = \ deepcopy(unite#sources#neomru#define()) let file_mru_source.name = 'file_mru' === modified file 'vim/bundle/neomru.vim/autoload/unite/sources/neomru.vim' --- vim/bundle/neomru.vim/autoload/unite/sources/neomru.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neomru.vim/autoload/unite/sources/neomru.vim 2015-08-25 11:01:00 +0000 @@ -29,7 +29,7 @@ " Source "{{{ call neomru#init() -function! unite#sources#neomru#define() abort "{{{ +function! unite#sources#neomru#define() "{{{ return [s:file_mru_source, s:dir_mru_source] endfunction"}}} let s:file_mru_source = { @@ -56,22 +56,22 @@ \ 'max_candidates' : 200, \} -function! s:file_mru_source.hooks.on_syntax(args, context) abort "{{{ +function! s:file_mru_source.hooks.on_syntax(args, context) "{{{ syntax match uniteSource__FileMru_Time \ /([^)]*)\s\+/ \ contained containedin=uniteSource__FileMru highlight default link uniteSource__FileMru_Time Statement endfunction"}}} -function! s:dir_mru_source.hooks.on_syntax(args, context) abort "{{{ +function! s:dir_mru_source.hooks.on_syntax(args, context) "{{{ syntax match uniteSource__DirectoryMru_Time \ /([^)]*)\s\+/ \ contained containedin=uniteSource__DirectoryMru highlight default link uniteSource__DirectoryMru_Time Statement endfunction"}}} -function! s:file_mru_source.hooks.on_post_filter(args, context) abort "{{{ +function! s:file_mru_source.hooks.on_post_filter(args, context) "{{{ return s:on_post_filter(a:args, a:context) endfunction"}}} -function! s:dir_mru_source.hooks.on_post_filter(args, context) abort "{{{ +function! s:dir_mru_source.hooks.on_post_filter(args, context) "{{{ for candidate in a:context.candidates if !has_key(candidate, 'abbr') let candidate.abbr = candidate.word @@ -82,11 +82,11 @@ endfor return s:on_post_filter(a:args, a:context) endfunction"}}} -function! s:file_mru_source.gather_candidates(args, context) abort "{{{ +function! s:file_mru_source.gather_candidates(args, context) "{{{ let mru = neomru#_get_mrus().file return mru.gather_candidates(a:args, a:context) endfunction"}}} -function! s:dir_mru_source.gather_candidates(args, context) abort "{{{ +function! s:dir_mru_source.gather_candidates(args, context) "{{{ let mru = neomru#_get_mrus().directory return mru.gather_candidates(a:args, a:context) endfunction"}}} @@ -98,7 +98,7 @@ \ 'is_quit' : 0, \ 'is_selectable' : 1, \ } -function! s:file_mru_source.action_table.delete.func(candidates) abort "{{{ +function! s:file_mru_source.action_table.delete.func(candidates) "{{{ call neomru#_get_mrus().file.delete(a:candidates) endfunction"}}} @@ -108,13 +108,13 @@ \ 'is_quit' : 0, \ 'is_selectable' : 1, \ } -function! s:dir_mru_source.action_table.delete.func(candidates) abort "{{{ +function! s:dir_mru_source.action_table.delete.func(candidates) "{{{ call neomru#_get_mrus().directory.delete(a:candidates) endfunction"}}} "}}} " Filters "{{{ -function! s:converter(candidates, context) abort "{{{ +function! s:converter(candidates, context) "{{{ if g:neomru#filename_format == '' && g:neomru#time_format == '' return a:candidates endif @@ -137,18 +137,18 @@ return a:candidates endfunction"}}} -function! s:file_mru_source.source__converter(candidates, context) abort "{{{ +function! s:file_mru_source.source__converter(candidates, context) "{{{ return s:converter(a:candidates, a:context) endfunction"}}} let s:file_mru_source.converters = [ s:file_mru_source.source__converter ] -function! s:dir_mru_source.source__converter(candidates, context) abort "{{{ +function! s:dir_mru_source.source__converter(candidates, context) "{{{ return s:converter(a:candidates, a:context) endfunction"}}} let s:dir_mru_source.converters = [ s:dir_mru_source.source__converter ] "}}} " Misc "{{{ -function! s:on_post_filter(args, context) abort "{{{ +function! s:on_post_filter(args, context) "{{{ for candidate in a:context.candidates let candidate.action__directory = \ unite#util#path2directory(candidate.action__path) === modified file 'vim/bundle/neomru.vim/doc/neomru.txt' --- vim/bundle/neomru.vim/doc/neomru.txt 2016-08-04 08:15:51 +0000 +++ vim/bundle/neomru.vim/doc/neomru.txt 2015-08-25 11:01:00 +0000 @@ -30,7 +30,6 @@ Interface |neomru-interface| Variables |neomru-variables| Sources |neomru-sources| - Commands |neomru-commands| FAQ |neomru-faq| ============================================================================== @@ -187,7 +186,6 @@ :NeoMRUReload *:NeoMRUReload* Reload MRU files. - It validates the MRU files. :NeoMRUSave *:NeoMRUSave* Save MRU files manually. === modified file 'vim/bundle/neomru.vim/plugin/neomru.vim' --- vim/bundle/neomru.vim/plugin/neomru.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neomru.vim/plugin/neomru.vim 2015-08-25 11:01:00 +0000 @@ -43,7 +43,7 @@ augroup neomru autocmd! - autocmd BufEnter,VimEnter,BufWinEnter,BufWritePost * + autocmd BufEnter,VimEnter,BufNew,BufWinEnter,BufWritePost * \ call s:append(expand('')) autocmd VimLeavePre * \ call neomru#_save({'event' : 'VimLeavePre'}) @@ -51,7 +51,7 @@ let g:loaded_neomru = 1 -function! s:append(path) abort "{{{ +function! s:append(path) "{{{ if bufnr('%') != expand('') \ || a:path == '' return === modified file 'vim/bundle/neosnippet-snippets/.git/config' (properties changed: -x to +x) === modified file 'vim/bundle/neosnippet-snippets/.git/hooks/applypatch-msg.sample' --- vim/bundle/neosnippet-snippets/.git/hooks/applypatch-msg.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/.git/hooks/applypatch-msg.sample 2015-08-25 11:01:00 +0000 @@ -10,6 +10,6 @@ # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup -commitmsg="$(git rev-parse --git-path hooks/commit-msg)" -test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} +test -x "$GIT_DIR/hooks/commit-msg" && + exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} : === modified file 'vim/bundle/neosnippet-snippets/.git/hooks/pre-applypatch.sample' --- vim/bundle/neosnippet-snippets/.git/hooks/pre-applypatch.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/.git/hooks/pre-applypatch.sample 2015-08-25 11:01:00 +0000 @@ -9,6 +9,6 @@ # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup -precommit="$(git rev-parse --git-path hooks/pre-commit)" -test -x "$precommit" && exec "$precommit" ${1+"$@"} +test -x "$GIT_DIR/hooks/pre-commit" && + exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} : === modified file 'vim/bundle/neosnippet-snippets/.git/hooks/pre-push.sample' --- vim/bundle/neosnippet-snippets/.git/hooks/pre-push.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/.git/hooks/pre-push.sample 2015-08-25 11:01:00 +0000 @@ -24,6 +24,7 @@ z40=0000000000000000000000000000000000000000 +IFS=' ' while read local_ref local_sha remote_ref remote_sha do if [ "$local_sha" = $z40 ] === modified file 'vim/bundle/neosnippet-snippets/.git/hooks/update.sample' --- vim/bundle/neosnippet-snippets/.git/hooks/update.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/.git/hooks/update.sample 2015-08-25 11:01:00 +0000 @@ -1,6 +1,6 @@ #!/bin/sh # -# An example hook script to block unannotated tags from entering. +# An example hook script to blocks unannotated tags from entering. # Called by "git receive-pack" with arguments: refname sha1-old sha1-new # # To enable this hook, rename this file to "update". === modified file 'vim/bundle/neosnippet-snippets/.git/index' Binary files vim/bundle/neosnippet-snippets/.git/index 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet-snippets/.git/index 2015-08-25 11:01:00 +0000 differ === modified file 'vim/bundle/neosnippet-snippets/.git/logs/HEAD' --- vim/bundle/neosnippet-snippets/.git/logs/HEAD 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/.git/logs/HEAD 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 4d25b4352738ecf34e56701d0172d80daa3bd287 Jan Pobrislo 1470298377 +0200 clone: from https://github.com/Shougo/neosnippet-snippets +0000000000000000000000000000000000000000 f72814aee4f8530b0f22ca9fa814e1e6473ba543 Jan Pobrislo 1440500390 +0200 clone: from https://github.com/Shougo/neosnippet-snippets === modified file 'vim/bundle/neosnippet-snippets/.git/logs/refs/heads/master' --- vim/bundle/neosnippet-snippets/.git/logs/refs/heads/master 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/.git/logs/refs/heads/master 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 4d25b4352738ecf34e56701d0172d80daa3bd287 Jan Pobrislo 1470298377 +0200 clone: from https://github.com/Shougo/neosnippet-snippets +0000000000000000000000000000000000000000 f72814aee4f8530b0f22ca9fa814e1e6473ba543 Jan Pobrislo 1440500390 +0200 clone: from https://github.com/Shougo/neosnippet-snippets === modified file 'vim/bundle/neosnippet-snippets/.git/logs/refs/remotes/origin/HEAD' --- vim/bundle/neosnippet-snippets/.git/logs/refs/remotes/origin/HEAD 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/.git/logs/refs/remotes/origin/HEAD 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 4d25b4352738ecf34e56701d0172d80daa3bd287 Jan Pobrislo 1470298377 +0200 clone: from https://github.com/Shougo/neosnippet-snippets +0000000000000000000000000000000000000000 f72814aee4f8530b0f22ca9fa814e1e6473ba543 Jan Pobrislo 1440500390 +0200 clone: from https://github.com/Shougo/neosnippet-snippets === removed file 'vim/bundle/neosnippet-snippets/.git/objects/02/3af804fb0f6066cd746c23d1960a004f6b2dc0' Binary files vim/bundle/neosnippet-snippets/.git/objects/02/3af804fb0f6066cd746c23d1960a004f6b2dc0 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet-snippets/.git/objects/02/3af804fb0f6066cd746c23d1960a004f6b2dc0 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neosnippet-snippets/.git/objects/0c' === removed file 'vim/bundle/neosnippet-snippets/.git/objects/0c/d75b9252f77bfc44b11ee2eba61b5a72bb98eb' Binary files vim/bundle/neosnippet-snippets/.git/objects/0c/d75b9252f77bfc44b11ee2eba61b5a72bb98eb 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet-snippets/.git/objects/0c/d75b9252f77bfc44b11ee2eba61b5a72bb98eb 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neosnippet-snippets/.git/objects/0d' === added file 'vim/bundle/neosnippet-snippets/.git/objects/0d/aa163e78a7f02ba257c3e78b11b6606f843e21' Binary files vim/bundle/neosnippet-snippets/.git/objects/0d/aa163e78a7f02ba257c3e78b11b6606f843e21 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet-snippets/.git/objects/0d/aa163e78a7f02ba257c3e78b11b6606f843e21 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/neosnippet-snippets/.git/objects/0e/59cdf84a76cfefac96a113c1a5a4bf49104cf7' Binary files vim/bundle/neosnippet-snippets/.git/objects/0e/59cdf84a76cfefac96a113c1a5a4bf49104cf7 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet-snippets/.git/objects/0e/59cdf84a76cfefac96a113c1a5a4bf49104cf7 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/neosnippet-snippets/.git/objects/0f/fe3ab8df5a5bba2e7dc12dbe9ef4e9730c2d61' --- vim/bundle/neosnippet-snippets/.git/objects/0f/fe3ab8df5a5bba2e7dc12dbe9ef4e9730c2d61 1970-01-01 00:00:00 +0000 +++ vim/bundle/neosnippet-snippets/.git/objects/0f/fe3ab8df5a5bba2e7dc12dbe9ef4e9730c2d61 2015-08-25 11:01:00 +0000 @@ -0,0 +1,4 @@ +xO0ƽ3epNc̃nv7kƲJA. ~Xf1,+Dr%P\Y^2K cBO %` +-bJ4)H)p; +TI!2؎p6O/ϛSƮ1Ի.68 Tgl]T/9H[oVֿΫ\scy@ ,@V}ڇ8pRҔ&Xy|gt0r.L7+ܘCkּN] NB6,f(:fjLŴf˴Tw +ǽ]%tg!X rϤ >3;"?u$LK)h42u \ No newline at end of file === added file 'vim/bundle/neosnippet-snippets/.git/objects/15/6439bd33585615f0ebff440077f34779aef10e' Binary files vim/bundle/neosnippet-snippets/.git/objects/15/6439bd33585615f0ebff440077f34779aef10e 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet-snippets/.git/objects/15/6439bd33585615f0ebff440077f34779aef10e 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neosnippet-snippets/.git/objects/1a' === added file 'vim/bundle/neosnippet-snippets/.git/objects/1a/19be39da7f39501183781f1e72165cd3047837' Binary files vim/bundle/neosnippet-snippets/.git/objects/1a/19be39da7f39501183781f1e72165cd3047837 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet-snippets/.git/objects/1a/19be39da7f39501183781f1e72165cd3047837 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neosnippet-snippets/.git/objects/1d' === removed file 'vim/bundle/neosnippet-snippets/.git/objects/1d/2e57e39a1f52e1f0d04e0211e5223efebc1948' Binary files vim/bundle/neosnippet-snippets/.git/objects/1d/2e57e39a1f52e1f0d04e0211e5223efebc1948 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet-snippets/.git/objects/1d/2e57e39a1f52e1f0d04e0211e5223efebc1948 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neosnippet-snippets/.git/objects/1e' === removed file 'vim/bundle/neosnippet-snippets/.git/objects/1e/50049470edf46464b5494b91a15dddf4b54588' Binary files vim/bundle/neosnippet-snippets/.git/objects/1e/50049470edf46464b5494b91a15dddf4b54588 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet-snippets/.git/objects/1e/50049470edf46464b5494b91a15dddf4b54588 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/neosnippet-snippets/.git/objects/2a/ba88cd4b9f52d696b2d988f6a618066ecf6335' Binary files vim/bundle/neosnippet-snippets/.git/objects/2a/ba88cd4b9f52d696b2d988f6a618066ecf6335 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet-snippets/.git/objects/2a/ba88cd4b9f52d696b2d988f6a618066ecf6335 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neosnippet-snippets/.git/objects/32' === added file 'vim/bundle/neosnippet-snippets/.git/objects/32/e72507a6a5220ee6187bbf6b0744954ee72aba' Binary files vim/bundle/neosnippet-snippets/.git/objects/32/e72507a6a5220ee6187bbf6b0744954ee72aba 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet-snippets/.git/objects/32/e72507a6a5220ee6187bbf6b0744954ee72aba 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neosnippet-snippets/.git/objects/37' === removed file 'vim/bundle/neosnippet-snippets/.git/objects/37/4aa606a57cb9dc9eae64446715458f23b5b557' Binary files vim/bundle/neosnippet-snippets/.git/objects/37/4aa606a57cb9dc9eae64446715458f23b5b557 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet-snippets/.git/objects/37/4aa606a57cb9dc9eae64446715458f23b5b557 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/neosnippet-snippets/.git/objects/37/ca97090a21b56aeae5fc5492b69f004d7731ea' Binary files vim/bundle/neosnippet-snippets/.git/objects/37/ca97090a21b56aeae5fc5492b69f004d7731ea 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet-snippets/.git/objects/37/ca97090a21b56aeae5fc5492b69f004d7731ea 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neosnippet-snippets/.git/objects/3a' === added file 'vim/bundle/neosnippet-snippets/.git/objects/3a/c4557dbfae2d190b0ddc09ad6751f66c0d5077' --- vim/bundle/neosnippet-snippets/.git/objects/3a/c4557dbfae2d190b0ddc09ad6751f66c0d5077 1970-01-01 00:00:00 +0000 +++ vim/bundle/neosnippet-snippets/.git/objects/3a/c4557dbfae2d190b0ddc09ad6751f66c0d5077 2015-08-25 11:01:00 +0000 @@ -0,0 +1,5 @@ +xTMO@̯ X8``  K0iݙ Ӹ;}7}^&| n2*h\ډJ)(SGWM˚_6 +py&hU +ʎ mL \*8'v} Wj5\۩|87o%޽>Ʀ ;%e + +{D5 ˏKSjy=Յt"$Sawc +^ $ܯ%Yy%eiEzd>~7a@=?3;"GCX@?TXcyVCe(+%"'mlqwJvjc8FoX@g.s)2fVn2r٥s&Eu2]Ҕq* MȚ}S( CrjC'N㵎W);$T05|Ö2ƑU;8mt2%%+ە`/2wu(dV u^])^ݐgFֈm "g-&A֜kFmo3Cr 7UW՝̃9Qy)1f@ѥ|GŨAqqZPEn{j>u*ZjY-Řk̍=Uh\fRSՙ(*Rק>✠Q?1.@SLIpaN=UU7A~a^~j%c(Vq\eGẉ {%M'u. J~ᰃ^qt1jSť ;4b9 SVZ3cF]D#w}koIմ06t?'9f&B@ %˗k a"R6*%8ν+Խ#KmP?kix"q<'3p8y)s"p`w3m*^ӣ:㻠ж?ASWaHZk}훓?+Nh2c*W&qWo薄 -!;ħyuZ~ kiMDJ9RJt alu^<~hX3$b$B ;_:Og"Ŭ/oJ8~o!(ŧӕ4$Ns}eE"_hfjE \ No newline at end of file === added file 'vim/bundle/neosnippet-snippets/.git/objects/7d/bad5fbc21472c65b3acfb1a7e227b355de9874' Binary files vim/bundle/neosnippet-snippets/.git/objects/7d/bad5fbc21472c65b3acfb1a7e227b355de9874 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet-snippets/.git/objects/7d/bad5fbc21472c65b3acfb1a7e227b355de9874 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neosnippet-snippets/.git/objects/7f' === added file 'vim/bundle/neosnippet-snippets/.git/objects/7f/1c1a9e37e2db37aa151b0a2274222cb3954cf0' Binary files vim/bundle/neosnippet-snippets/.git/objects/7f/1c1a9e37e2db37aa151b0a2274222cb3954cf0 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet-snippets/.git/objects/7f/1c1a9e37e2db37aa151b0a2274222cb3954cf0 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neosnippet-snippets/.git/objects/83' === added file 'vim/bundle/neosnippet-snippets/.git/objects/83/5eef7a8484c365feb48215004c7e5816f09b15' Binary files vim/bundle/neosnippet-snippets/.git/objects/83/5eef7a8484c365feb48215004c7e5816f09b15 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet-snippets/.git/objects/83/5eef7a8484c365feb48215004c7e5816f09b15 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/neosnippet-snippets/.git/objects/83/b1037de5ec4e951c746168a5724c196d53d3c4' Binary files vim/bundle/neosnippet-snippets/.git/objects/83/b1037de5ec4e951c746168a5724c196d53d3c4 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet-snippets/.git/objects/83/b1037de5ec4e951c746168a5724c196d53d3c4 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neosnippet-snippets/.git/objects/84' === removed file 'vim/bundle/neosnippet-snippets/.git/objects/84/034198d88190f81a507e61f5325fbfc941d42d' Binary files vim/bundle/neosnippet-snippets/.git/objects/84/034198d88190f81a507e61f5325fbfc941d42d 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet-snippets/.git/objects/84/034198d88190f81a507e61f5325fbfc941d42d 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neosnippet-snippets/.git/objects/8a' === removed file 'vim/bundle/neosnippet-snippets/.git/objects/8a/b77573fd9349902dad716ae347edeacdd4a319' Binary files vim/bundle/neosnippet-snippets/.git/objects/8a/b77573fd9349902dad716ae347edeacdd4a319 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet-snippets/.git/objects/8a/b77573fd9349902dad716ae347edeacdd4a319 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neosnippet-snippets/.git/objects/8d' === added file 'vim/bundle/neosnippet-snippets/.git/objects/8d/fd8aa9a4571cdbf32e10281d7d4c26741c3eea' Binary files vim/bundle/neosnippet-snippets/.git/objects/8d/fd8aa9a4571cdbf32e10281d7d4c26741c3eea 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet-snippets/.git/objects/8d/fd8aa9a4571cdbf32e10281d7d4c26741c3eea 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neosnippet-snippets/.git/objects/95' === removed file 'vim/bundle/neosnippet-snippets/.git/objects/95/18c472dc08f492d97b74ff7ec634f93fc92d54' Binary files vim/bundle/neosnippet-snippets/.git/objects/95/18c472dc08f492d97b74ff7ec634f93fc92d54 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet-snippets/.git/objects/95/18c472dc08f492d97b74ff7ec634f93fc92d54 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neosnippet-snippets/.git/objects/a7' === added file 'vim/bundle/neosnippet-snippets/.git/objects/a7/759e60a36eb3eb3b810de14ae19a11feaf14b7' Binary files vim/bundle/neosnippet-snippets/.git/objects/a7/759e60a36eb3eb3b810de14ae19a11feaf14b7 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet-snippets/.git/objects/a7/759e60a36eb3eb3b810de14ae19a11feaf14b7 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neosnippet-snippets/.git/objects/ac' === added file 'vim/bundle/neosnippet-snippets/.git/objects/ac/2a5a95a310a54371603b20c673847f2eba53d4' Binary files vim/bundle/neosnippet-snippets/.git/objects/ac/2a5a95a310a54371603b20c673847f2eba53d4 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet-snippets/.git/objects/ac/2a5a95a310a54371603b20c673847f2eba53d4 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/neosnippet-snippets/.git/objects/b1/52fcd6272e2d9d9cbf08216c6b149c2e2fe95a' Binary files vim/bundle/neosnippet-snippets/.git/objects/b1/52fcd6272e2d9d9cbf08216c6b149c2e2fe95a 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet-snippets/.git/objects/b1/52fcd6272e2d9d9cbf08216c6b149c2e2fe95a 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/neosnippet-snippets/.git/objects/b2/61922a68b1dbb7d92eef7c0e156711550ba453' Binary files vim/bundle/neosnippet-snippets/.git/objects/b2/61922a68b1dbb7d92eef7c0e156711550ba453 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet-snippets/.git/objects/b2/61922a68b1dbb7d92eef7c0e156711550ba453 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neosnippet-snippets/.git/objects/b4' === added file 'vim/bundle/neosnippet-snippets/.git/objects/b4/8526484ec68917fb4104ce114672d0f7dbb6dd' Binary files vim/bundle/neosnippet-snippets/.git/objects/b4/8526484ec68917fb4104ce114672d0f7dbb6dd 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet-snippets/.git/objects/b4/8526484ec68917fb4104ce114672d0f7dbb6dd 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/neosnippet-snippets/.git/objects/b7/ff191f6bbee9ec6e3b25935d6bf60af92c5ce4' --- vim/bundle/neosnippet-snippets/.git/objects/b7/ff191f6bbee9ec6e3b25935d6bf60af92c5ce4 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/.git/objects/b7/ff191f6bbee9ec6e3b25935d6bf60af92c5ce4 1970-01-01 00:00:00 +0000 @@ -1,2 +0,0 @@ -xTMO@̯ =ԤIFƻ1Xbaɲ4 ݙ Ӹ;{}Vq˼Kű5oRPl˚RV?;Wu: hgRxR͵JNu-zՋU_>UDZIQnb)Ї`-2*NuB u(tۂ#]~\BWUTJ҉xNuA:Ѕ"[S IV -Uꎒ26P?=2u١%CÀ{ȿ9gC48tBm*L1D6^*\f/̞ n|H-"^K쯅oh?^*L0C === removed directory 'vim/bundle/neosnippet-snippets/.git/objects/b8' === removed file 'vim/bundle/neosnippet-snippets/.git/objects/b8/3aba6c38b456f9f88c5aa1853388a5871b5b8c' Binary files vim/bundle/neosnippet-snippets/.git/objects/b8/3aba6c38b456f9f88c5aa1853388a5871b5b8c 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet-snippets/.git/objects/b8/3aba6c38b456f9f88c5aa1853388a5871b5b8c 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neosnippet-snippets/.git/objects/c0' === added file 'vim/bundle/neosnippet-snippets/.git/objects/c0/2447e29196e57be96f904a2a58fd44d477cef6' Binary files vim/bundle/neosnippet-snippets/.git/objects/c0/2447e29196e57be96f904a2a58fd44d477cef6 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet-snippets/.git/objects/c0/2447e29196e57be96f904a2a58fd44d477cef6 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neosnippet-snippets/.git/objects/c2' === removed file 'vim/bundle/neosnippet-snippets/.git/objects/c2/73dfe6bd3e0bdc3381f8cfa3584aebb00e92cd' Binary files vim/bundle/neosnippet-snippets/.git/objects/c2/73dfe6bd3e0bdc3381f8cfa3584aebb00e92cd 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet-snippets/.git/objects/c2/73dfe6bd3e0bdc3381f8cfa3584aebb00e92cd 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neosnippet-snippets/.git/objects/cc' === removed file 'vim/bundle/neosnippet-snippets/.git/objects/cc/e5a2e0a50596ff41fc548ffdf42c9c086a0dc1' Binary files vim/bundle/neosnippet-snippets/.git/objects/cc/e5a2e0a50596ff41fc548ffdf42c9c086a0dc1 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet-snippets/.git/objects/cc/e5a2e0a50596ff41fc548ffdf42c9c086a0dc1 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neosnippet-snippets/.git/objects/ce' === removed file 'vim/bundle/neosnippet-snippets/.git/objects/ce/884897ad1531dfde89c400a960e6c8f2f5b92c' Binary files vim/bundle/neosnippet-snippets/.git/objects/ce/884897ad1531dfde89c400a960e6c8f2f5b92c 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet-snippets/.git/objects/ce/884897ad1531dfde89c400a960e6c8f2f5b92c 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neosnippet-snippets/.git/objects/d1' === removed file 'vim/bundle/neosnippet-snippets/.git/objects/d1/042dffc6a3cb12e830d1c79bb43c545abb8b4c' Binary files vim/bundle/neosnippet-snippets/.git/objects/d1/042dffc6a3cb12e830d1c79bb43c545abb8b4c 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet-snippets/.git/objects/d1/042dffc6a3cb12e830d1c79bb43c545abb8b4c 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neosnippet-snippets/.git/objects/d2' === removed file 'vim/bundle/neosnippet-snippets/.git/objects/d2/aafcca66f9b792edcfa22694dd17ad777d757c' Binary files vim/bundle/neosnippet-snippets/.git/objects/d2/aafcca66f9b792edcfa22694dd17ad777d757c 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet-snippets/.git/objects/d2/aafcca66f9b792edcfa22694dd17ad777d757c 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neosnippet-snippets/.git/objects/d6' === removed file 'vim/bundle/neosnippet-snippets/.git/objects/d6/6396aa92c963c8089f97fad374911963a7b3fe' --- vim/bundle/neosnippet-snippets/.git/objects/d6/6396aa92c963c8089f97fad374911963a7b3fe 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/.git/objects/d6/6396aa92c963c8089f97fad374911963a7b3fe 1970-01-01 00:00:00 +0000 @@ -1,7 +0,0 @@ -xVM0_a=,ZQVZ8 U%vd;ۢx։ēz&Jn~zofidcR,5cgZtwۯ7lvWT4(^D[!%9,B13wDl1L Rl42UJw$'Ҡ`8ep~ -b#e`@ n×˩P"V!ǧrB6F:Ħ3wo\Ƕfh(n=R'ɋ^zȌR 9rg?a9L:㷷W9E\.еb+|w4!'JZkBј!tob;ՇQMPX޴j AU= -"*N{47b)?'/Xd^g((Xr}l-r.xb b[G6,s"Gކ\9y1 --1b|ϳ㊺`ti --Ζ׍T/p,ڊDvsśXBv J& -vȈ[;Bd#?\&TӮ -6pm>nU,XqHPAFuuؔyN@ a! ϬsTY \ No newline at end of file === removed directory 'vim/bundle/neosnippet-snippets/.git/objects/df' === removed file 'vim/bundle/neosnippet-snippets/.git/objects/df/74c418cd039186e2955f256a0628013abf0ef2' Binary files vim/bundle/neosnippet-snippets/.git/objects/df/74c418cd039186e2955f256a0628013abf0ef2 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet-snippets/.git/objects/df/74c418cd039186e2955f256a0628013abf0ef2 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neosnippet-snippets/.git/objects/e6' === added file 'vim/bundle/neosnippet-snippets/.git/objects/e6/09b352d950cb38a59bf77ae7a1d5cd43126e46' Binary files vim/bundle/neosnippet-snippets/.git/objects/e6/09b352d950cb38a59bf77ae7a1d5cd43126e46 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet-snippets/.git/objects/e6/09b352d950cb38a59bf77ae7a1d5cd43126e46 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neosnippet-snippets/.git/objects/e7' === removed file 'vim/bundle/neosnippet-snippets/.git/objects/e7/dbbfbbf8f44e4874fd098161d64ada2dfdde01' Binary files vim/bundle/neosnippet-snippets/.git/objects/e7/dbbfbbf8f44e4874fd098161d64ada2dfdde01 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet-snippets/.git/objects/e7/dbbfbbf8f44e4874fd098161d64ada2dfdde01 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/neosnippet-snippets/.git/objects/e7/fba5aacf540fcc7e189474b06957e86d5731bb' Binary files vim/bundle/neosnippet-snippets/.git/objects/e7/fba5aacf540fcc7e189474b06957e86d5731bb 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet-snippets/.git/objects/e7/fba5aacf540fcc7e189474b06957e86d5731bb 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neosnippet-snippets/.git/objects/f1' === added file 'vim/bundle/neosnippet-snippets/.git/objects/f1/93ce968e578d708b11f5b84c4f5e079a6380d2' Binary files vim/bundle/neosnippet-snippets/.git/objects/f1/93ce968e578d708b11f5b84c4f5e079a6380d2 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet-snippets/.git/objects/f1/93ce968e578d708b11f5b84c4f5e079a6380d2 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neosnippet-snippets/.git/objects/f2' === added file 'vim/bundle/neosnippet-snippets/.git/objects/f2/f4d91b4d637c9e03d9564332f2fa14e71c5202' Binary files vim/bundle/neosnippet-snippets/.git/objects/f2/f4d91b4d637c9e03d9564332f2fa14e71c5202 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet-snippets/.git/objects/f2/f4d91b4d637c9e03d9564332f2fa14e71c5202 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neosnippet-snippets/.git/objects/f4' === removed file 'vim/bundle/neosnippet-snippets/.git/objects/f4/967efa73d950ccd53d4c3853315ee2269bee5d' Binary files vim/bundle/neosnippet-snippets/.git/objects/f4/967efa73d950ccd53d4c3853315ee2269bee5d 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet-snippets/.git/objects/f4/967efa73d950ccd53d4c3853315ee2269bee5d 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/neosnippet-snippets/.git/objects/f6/c6d39dbee705022f340b0df10df9a050799360' Binary files vim/bundle/neosnippet-snippets/.git/objects/f6/c6d39dbee705022f340b0df10df9a050799360 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet-snippets/.git/objects/f6/c6d39dbee705022f340b0df10df9a050799360 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/neosnippet-snippets/.git/objects/f6/d9d869afb7411a61f0a7b912f16bd379fe3b90' Binary files vim/bundle/neosnippet-snippets/.git/objects/f6/d9d869afb7411a61f0a7b912f16bd379fe3b90 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet-snippets/.git/objects/f6/d9d869afb7411a61f0a7b912f16bd379fe3b90 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/neosnippet-snippets/.git/objects/f7/2814aee4f8530b0f22ca9fa814e1e6473ba543' Binary files vim/bundle/neosnippet-snippets/.git/objects/f7/2814aee4f8530b0f22ca9fa814e1e6473ba543 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet-snippets/.git/objects/f7/2814aee4f8530b0f22ca9fa814e1e6473ba543 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neosnippet-snippets/.git/objects/f9' === removed file 'vim/bundle/neosnippet-snippets/.git/objects/f9/60ab5b4e72bceb70953eb1d9aca294db70ef5c' Binary files vim/bundle/neosnippet-snippets/.git/objects/f9/60ab5b4e72bceb70953eb1d9aca294db70ef5c 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet-snippets/.git/objects/f9/60ab5b4e72bceb70953eb1d9aca294db70ef5c 1970-01-01 00:00:00 +0000 differ === modified file 'vim/bundle/neosnippet-snippets/.git/packed-refs' --- vim/bundle/neosnippet-snippets/.git/packed-refs 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/.git/packed-refs 2015-08-25 11:01:00 +0000 @@ -1,2 +1,2 @@ # pack-refs with: peeled fully-peeled -4d25b4352738ecf34e56701d0172d80daa3bd287 refs/remotes/origin/master +f72814aee4f8530b0f22ca9fa814e1e6473ba543 refs/remotes/origin/master === modified file 'vim/bundle/neosnippet-snippets/.git/refs/heads/master' --- vim/bundle/neosnippet-snippets/.git/refs/heads/master 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/.git/refs/heads/master 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -4d25b4352738ecf34e56701d0172d80daa3bd287 +f72814aee4f8530b0f22ca9fa814e1e6473ba543 === modified file 'vim/bundle/neosnippet-snippets/.git/shallow' --- vim/bundle/neosnippet-snippets/.git/shallow 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/.git/shallow 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -4d25b4352738ecf34e56701d0172d80daa3bd287 +f72814aee4f8530b0f22ca9fa814e1e6473ba543 === modified file 'vim/bundle/neosnippet-snippets/neosnippets/_.snip' --- vim/bundle/neosnippet-snippets/neosnippets/_.snip 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/neosnippets/_.snip 2015-08-25 11:01:00 +0000 @@ -1,28 +1,28 @@ # Global snippets -snippet date_english +snippet date options word - `strftime("%d %b %Y")`${0} + `strftime("%d %b %Y")` -snippet datetime_iso8601 +snippet date_full alias df options word - `strftime("%Y-%m-%dT%H:%M:%S")`${0} + `strftime("%Y-%m-%dT%H:%M:%S")` -snippet date_iso8601 +snippet date_day alias dd options word - `strftime("%Y-%m-%d")`${0} + `strftime("%Y-%m-%d")` -snippet time_colon +snippet date_time alias dt options word - `strftime("%H:%M:%S")`${0} + `strftime("%H:%M:%S")` snippet lastmod abbr Last modified time alias lmod - Last Modified: `strftime("%Y-%m-%dT%H:%M:%S")`${0} + Last Modified: `strftime("%Y-%m-%dT%H:%M:%S")` snippet filename alias fname === modified file 'vim/bundle/neosnippet-snippets/neosnippets/ada.snip' --- vim/bundle/neosnippet-snippets/neosnippets/ada.snip 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/neosnippets/ada.snip 2015-08-25 11:01:00 +0000 @@ -18,7 +18,7 @@ ${0} end $1; -snippet ent +snippet ent abbr entry {...} when options head entry ${1}(${2}) when ${3} is @@ -26,14 +26,14 @@ ${0} end $1; -snippet task +snippet task abbr task options head task ${1} is entry ${0} end $1; -snippet task +snippet taskb abbr task body options head task body ${1} is @@ -42,21 +42,21 @@ ${0} end $1; -snippet ac +snippet acc abbr accept options head accept ${1}(${2}) do ${0} end $1; -snippet pro +snippet prot abbr protected type options head protected type ${1}(${2}) is ${0} end $1; -snippet pro +snippet prob abbr protected body options head protected body ${1} is @@ -65,29 +65,29 @@ ${0} end $1; -snippet ge +snippet gen abbr generic type options head generic type ${1} is ${2};${0} -snippet t +snippet ty abbr type options head type ${1} is ${2};${0} -snippet ty +snippet tyd abbr type with default value options head type ${1} is ${2} with Default_Value => ${3};${0} -snippet subt +snippet subty abbr subtype options head subtype ${1} is ${2};${0} -snippet de +snippet dec abbr declare block options head declare @@ -96,7 +96,7 @@ ${0} end; -snippet dec +snippet decn abbr declare named block options head ${1}: @@ -106,35 +106,35 @@ ${0} end $1; -snippet ife +snippet ifex abbr if expression options head if ${1} then ${2} else ${0} -snippet case +snippet casex abbr case expression options head case ${1} is when ${2} => ${3},${0} -snippet for +snippet fora abbr for all options head for all ${1} ${2:in} ${3} => ${0} -snippet for +snippet fors abbr for some options head for some ${1} ${2:in} ${3} => ${0} -snippet i +snippet if abbr if options head if ${1} then ${0} end if; -snippet if +snippet ife abbr if ... else options head if ${1} then @@ -143,26 +143,26 @@ ${0} end if; -snippet e +snippet el abbr else options head else ${0} -snippet ei +snippet eif abbr elsif options head elsif ${1} then ${0} -snippet w +snippet wh abbr while options head while ${1} loop ${0} end loop; -snippet nw +snippet nwh abbr named while options head ${1}: @@ -170,21 +170,21 @@ ${0} end loop $1; -snippet fo +snippet for abbr for options head for ${1:I} in ${2} loop ${0} end loop; -snippet for +snippet fore abbr for each options head for ${1} of ${2} loop ${0} end loop; -snippet nfo +snippet nfor abbr named for options head ${1}: @@ -192,7 +192,7 @@ ${0} end loop $1; -snippet nfor +snippet nfore abbr named for each options head ${1}: @@ -200,7 +200,7 @@ ${0} end loop $1; -snippet pro +snippet proc abbr procedure options head procedure ${1}(${2}) is @@ -209,12 +209,12 @@ ${0} end $1; -snippet proc +snippet procd abbr procedure declaration options head procedure ${1};${0} -snippet fu +snippet fun abbr function options head function ${1}(${2}) return ${3} is @@ -223,56 +223,56 @@ ${0} end $1; -snippet fun +snippet fune abbr expression function options head function ${1} return ${2} is (${3});${0} -snippet fun +snippet fund abbr function declaration options head function ${1} return ${2};${0} -snippet re +snippet ret abbr extended return options head return ${1} do ${0} end return; -snippet re +snippet rec abbr record options head record ${0} end record; -snippet cas +snippet case abbr case options head case ${1} is when ${2} => ${3};${0} end case; -snippet wh +snippet whe abbr when options head when ${1} => ${2};${0} -snippet whe +snippet wheo abbr when others options head when others => ${1};${0} -snippet l +snippet lo abbr loop options head loop ${0} end loop; -snippet nl +snippet nlo abbr named loop options head ${1}: @@ -280,37 +280,37 @@ ${0} end loop $1; -snippet e +snippet ex abbr exit when options head exit when ${1}; ${0} -snippet pu +snippet put abbr Ada.Text_IO.Put options head Ada.Text_IO.Put(${1}); ${0} -snippet put +snippet putl abbr Ada.Text_IO.Put_Line options head Ada.Text_IO.Put_Line(${1}); ${0} -snippet ge +snippet get abbr Ada.Text_IO.Get options head Ada.Text_IO.Get(${1}); ${0} -snippet get +snippet getl abbr Ada.Text_IO.Get_Line options head Ada.Text_IO.Get_Line(${1}); ${0} -snippet newlin +snippet newline abbr Ada.Text_IO.New_Line options head Ada.Text_IO.New_Line(${1:1}); === modified file 'vim/bundle/neosnippet-snippets/neosnippets/c.snip' --- vim/bundle/neosnippet-snippets/neosnippets/c.snip 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/neosnippets/c.snip 2015-08-25 11:01:00 +0000 @@ -1,24 +1,20 @@ snippet if -options head abbr if () {} if (${1:#:condition}) { ${0:TARGET} } snippet else -options head else { ${0:TARGET} } snippet elseif -options head else if (${1:#:condition}) { ${0:TARGET} } snippet ifelse -options head abbr if () {} else {} if (${1:#:condition}) { ${2:TARGET} @@ -27,28 +23,24 @@ } snippet for -options head abbr for () {} for (${1:int} ${2:i} = ${3:0}; $2 < ${4}; $2++) { ${0:#:TARGET} } snippet while -options head abbr while () {} while (${1:#:condition}) { ${0:TARGET} } snippet do_while -options head alias do do { ${0:TARGET:code} } while (${1:#:condition}); snippet switch -options head abbr switch () {} switch (${1:#:var}) { case ${2:#:val}: @@ -57,7 +49,6 @@ } snippet function -options head alias func abbr func() {} ${1:void} ${2:#:func_name}(${3:#:args}) { @@ -65,7 +56,6 @@ } snippet struct -options head abbr struct {} struct ${1:#:name} { ${0:TARGET:data} @@ -73,13 +63,11 @@ # Typedef struct snippet struct_typedef -options head typedef struct ${1:#:name} { ${0:TARGET:data} }; snippet enum -options head abbr enum {} enum ${1:#:name} { ${0:TARGET} @@ -87,7 +75,6 @@ # hard-tab is necessary; C indent doesn't support this. snippet main -options head int main(int argc, char const* argv[]) { ${0:TARGET} @@ -96,17 +83,14 @@ # #include <...> snippet inc -options head alias #inc, #include #include <${1:stdio}.h>${0} # #include "..." snippet inc2 -options head alias #inc2, #include2 #include "${1}.h"${0} snippet ifndef -options head alias #ifndef abbr #ifndef ... #define ... #endif #ifndef $1 @@ -114,13 +98,11 @@ #endif${0} snippet def -options head alias #def, #define #define # Include-Guard snippet once -options head abbr include-guard #ifndef ${1:SYMBOL} #define $1 @@ -153,7 +135,6 @@ sizeof(${0:TARGET}) snippet helloworld -options head #include int main(int argc, char const* argv[]) { === modified file 'vim/bundle/neosnippet-snippets/neosnippets/clojure.snip' --- vim/bundle/neosnippet-snippets/neosnippets/clojure.snip 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/neosnippets/clojure.snip 2015-08-25 11:01:00 +0000 @@ -49,7 +49,7 @@ snippet deftest options head - (deftest ${1:a}-test + (deftest ${1:a-test} (testing "${2:hello}" ${0:TARGET:(is (= 0 1))})) @@ -81,7 +81,8 @@ snippet ns options head (ns ${1:`substitute(substitute(substitute(expand('%:p:r'), '.*/\(src\|test\)/', '', ''), '/', '.', 'g'), '_', '-', 'g')`} - (:require `expand('%:r') =~ '_test$' ? '[clojure.test :refer :all]' : ''`${2:})) + (:require [${2:clojure.string} :as ${3:s}] + [clojure.pprint :refer [pprint]])) snippet bench (let [bench-before (System/currentTimeMillis)] === modified file 'vim/bundle/neosnippet-snippets/neosnippets/cpp.snip' --- vim/bundle/neosnippet-snippets/neosnippets/cpp.snip 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/neosnippets/cpp.snip 2015-08-25 11:01:00 +0000 @@ -2,21 +2,18 @@ # #include <...> snippet inc -options head alias #inc, #include #include <${1:iostream}>${0} # #include "..." snippet inc2 -options head alias #inc2, #include2 #include "${1}"${0} snippet template abbr template - template ${0} + template snippet class -options head abbr class {} class ${1:#:name} { ${2} @@ -28,14 +25,12 @@ } snippet class-without-constructor -options head abbr class {} class ${1:#:name} { ${2} }; snippet try -options head abbr try catch try { ${1:#:TARGET} @@ -45,7 +40,6 @@ # range based for ( C++11 feature ) snippet for_CPP11 -options head abbr for (:) {} for (${1:auto&& }${2:var} : ${3:container}) { ${0:TARGET} @@ -58,7 +52,6 @@ # scoped enumeration ( C++11 feature ) snippet enum_scoped -options head abbr enum struct {}; enum struct ${1:#:name} { ${2:#:TARGET} }; @@ -68,9 +61,9 @@ static_assert( ${1}, "${2}" );${0} delete namespace -options head snippet namespace abbr namespace {} +options head namespace ${1:#:name} { ${0:TARGET} } // namespace $1 === modified file 'vim/bundle/neosnippet-snippets/neosnippets/css.snip' --- vim/bundle/neosnippet-snippets/neosnippets/css.snip 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/neosnippets/css.snip 2015-08-25 11:01:00 +0000 @@ -249,24 +249,3 @@ alias w width:${1};${2} -# For media query -snippet media -abbr @media ... -options head - @media ${1:condition} { - ${0:TARGET} - } - -snippet media-min-width -abbr @media all and (min-width) {...} -options head - @media ${1:all} and (min-width: ${2:SIZE}) { - ${0:TARGET} - } - -snippet media-max-width -abbr @media all and (max-width) {...} -options head - @media ${1:all} and (max-width: ${2:SIZE}) { - ${0:TARGET} - } === modified file 'vim/bundle/neosnippet-snippets/neosnippets/elixir.snip' --- vim/bundle/neosnippet-snippets/neosnippets/elixir.snip 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/neosnippets/elixir.snip 2015-08-25 11:01:00 +0000 @@ -85,11 +85,3 @@ ${1} rescue ${2} -> ${3} - -snippet with -abbr with .. do .. end -options head - with ${1} - do - ${2} - end === removed file 'vim/bundle/neosnippet-snippets/neosnippets/elm.snip' --- vim/bundle/neosnippet-snippets/neosnippets/elm.snip 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/neosnippets/elm.snip 1970-01-01 00:00:00 +0000 @@ -1,58 +0,0 @@ -snippet module -options head - module `substitute(substitute(expand('%:r'), '[/\\]','.','g'),'^\%(\l*\.\)\?','','')` ${1} where${2} - - -snippet import -options head -abbr import -alias imp - import ${1:String} - - -snippet importAs -options head -abbr import ... as ... -alias impa - import ${1} as ${2} - - -snippet importExposing -options head -abbr import ... exposing (..) -alias impe - import ${1:Html} exposing (${2:..}) - - -snippet main -options head - main : Signal Html - main = - ${0} - - -snippet case -abbr case ... of - case ${1} of - ${2} -> ${0} - - -snippet if -abbr if ... then ... else ... - if ${1} then - ${2} - else - ${3} - - -snippet let -abbr let ... in ... -options head - let ${1} =${2} - in - ${3} - - -snippet lambda -abbr λ - \ ${1:x} -> ${0} === modified file 'vim/bundle/neosnippet-snippets/neosnippets/fortran.snip' --- vim/bundle/neosnippet-snippets/neosnippets/fortran.snip 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/neosnippets/fortran.snip 2015-08-25 11:01:00 +0000 @@ -83,7 +83,7 @@ real, intent(out) :: snippet ind -abbr integer dimension +abbr integer dimension options head integer, dimension(${1::})${2:#:, allocatable} :: ${3} @@ -157,7 +157,7 @@ close($1) snippet se -abbr select case +abbr select case options head select case (${1}) ${2} === modified file 'vim/bundle/neosnippet-snippets/neosnippets/go.snip' --- vim/bundle/neosnippet-snippets/neosnippets/go.snip 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/neosnippets/go.snip 2015-08-25 11:01:00 +0000 @@ -1,5 +1,3 @@ -source go.vim - snippet helloworld abbr package main\nimport fmt... options head @@ -33,11 +31,11 @@ ${0:TARGET} snippet printf -options head +options word fmt.Printf("${1}\n"${2:}) snippet println -options head +options word fmt.Println(${0:TARGET}) snippet struct @@ -67,17 +65,9 @@ snippet if options head - if ${1:#:condition} { - ${0:TARGET} - } - -snippet iferr -alias ife -options head - if err != nil { - return `g:NeosnippetSnippets_Goiferr()` - } - ${2} + if ${1:err != nil} { + ${0:TARGET} + } snippet switch abbr switch {} @@ -100,3 +90,85 @@ case ${1:#:condition}: ${2:TARGET} + +# ------------------ Build-in functions + +snippet close +abbr func(c chan<- Type) +options word + close(${0}) + +snippet len +abbr func(v Type) int +options word + len(${0}) + +snippet cap +abbr func(v Type) int +options word + cap(${0}) + +snippet new +abbr func(Type) *Type +options word + new(${0}) + +snippet make +abbr func(Type, size IntegerType) Type +options word + make(${1:[]int}, ${0}) + +snippet make-slice +abbr func(Type, size IntegerType) Type +options word + make([]${1:int}, ${0}) + +snippet make-map +abbr func(Type, size IntegerType) Type +options word + make(map[${1:string}]${2:string}, ${0}) + +snippet make-chan +abbr func(Type, size IntegerType) Type +options word + make(chan ${1:string}, ${0}) + +snippet append +abbr func(slice []Type, elems ...Type) []Type +options word + ${1:slice} = append($1, ${2:TARGET}) + +snippet copy +abbr func(dest, src []Type) int +options word + copy(${1:DEST}, ${2:SOURCE}) + +snippet delete +abbr func(m map[Type]Type1, key Type) +options word + delete(${1:TARGET}, ${2:Key}) + +snippet complex +abbr func(r, i FloatType) ComplexType +options word + complex(${1:REAL}, ${2:IMAG}) + +snippet real +abbr func(c ComplexType) FloatType +options word + real(${1:COMPLEX}) + +snippet imag +abbr func(c ComplexType) FloatType +options word + imag(${1:COMPLEX}) + +snippet panic +abbr func(v interface{}) +options word + panic(${1:err}) + +snippet recover +abbr func() interface{} +options word + recover() === removed file 'vim/bundle/neosnippet-snippets/neosnippets/go.vim' --- vim/bundle/neosnippet-snippets/neosnippets/go.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/neosnippets/go.vim 1970-01-01 00:00:00 +0000 @@ -1,49 +0,0 @@ -" From http://pocke.hatenablog.com/entry/2015/12/20/133445 -function! g:NeosnippetSnippets_Goiferr() abort - let re_func = '\vfunc' - let re_type = '%(%([.A-Za-z0-9*]|\[|\]|%(%(struct)|%(interface)\{\}))+)' - let re_rcvr = '%(\s*\(\w+\s+' . re_type . '\))?' - let re_name = '%(\s*\w+)?' - let re_arg = '\(%(\w+%(\s+%(\.\.\.)?' . re_type . ')?\s*,?\s*)*\)' - - let re_ret_v = '%(\w+)' - let re_ret = '%(\s*\(?(\s*\*?[a-zA-Z0-9_. ,]+)\)?\s*)?' - let re_ret_body = '%(' . re_ret_v . '|%(' . re_ret_v . '\s*' . re_type . ')|' . re_type . '\s*,?\s*)*' - let re_ret = '%(\s*\(?\s*(' . re_ret_body . ')\)?\s*)?' - let re = re_func . re_rcvr . re_name . re_arg . re_ret . '\{' - - let lnum = line('.') - let ret = "" - while lnum > 0 - let lnum -= 1 - - let ma = matchlist(getline(lnum), re) - if empty(ma) - continue - endif - let ret = ma[1] - break - endwhile - - if ret =~ '\v^\s*$' - return '${1}' - endif - - let rets = [] - for t in split(ret, ',') - if t =~# '\v^\s*error\s*$' - let v = 'err' - elseif t =~# '\v^\s*string\s*$' - let v = '""' - elseif t =~# '\v^\s*int\d*\s*$' - let v = '0' - elseif t =~# '\v^\s*bool\s*$' - let v = 'false' - else - let v = 'nil' - endif - call add(rets, v) - endfor - - return '${1:' . join(rets, ", ") . '}' -endfunction === modified file 'vim/bundle/neosnippet-snippets/neosnippets/java.snip' --- vim/bundle/neosnippet-snippets/neosnippets/java.snip 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/neosnippets/java.snip 2015-08-25 11:01:00 +0000 @@ -110,22 +110,18 @@ } snippet th -options word throw ${0} snippet sy -options word synchronized snippet testclass alias tc -options head public class ${1} extends ${2:TestCase} { ${0:TARGET} } snippet test -options head public void test${1:#:Name}() throws Exception { ${0:TARGET} } @@ -159,11 +155,9 @@ snippet println -options word System.out.println(${1});${0} snippet print -options word System.out.print(${1});${0} #javadoc === modified file 'vim/bundle/neosnippet-snippets/neosnippets/javascript.snip' --- vim/bundle/neosnippet-snippets/neosnippets/javascript.snip 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/neosnippets/javascript.snip 2015-08-25 11:01:00 +0000 @@ -39,14 +39,13 @@ abbr ife options head if (${1:#:condition}) { - ${2:TARGET} + ${0:TARGET} } else { - ${3} } snippet for options head - for (var ${1:i} = 0; $1 < ${2:#:Things}.length; ++$1) { + for (var ${1:i}=0; $1 < ${2:#:Things}.length; ++$1) { ${0:TARGET} } @@ -73,19 +72,19 @@ snippet try options head try { - ${1:TARGET} - } catch (${2:e}) { - ${3} + ${0:TARGET} + } catch (${1:e}) { + ${2:TARGET} } snippet try_finally options head try { - ${1:TARGET} - } catch (${2:e}) { - ${3} + ${0:TARGET} + } catch (${1:e}) { + ${2} } finally { - ${4} + ${3} } @@ -102,11 +101,6 @@ options head setTimeout(function() { ${0} }, ${1:10}); -snippet debugger -alias db -options head - debugger; - snippet console-log alias cl options head @@ -138,12 +132,3 @@ 'use strict'; ${0:TARGET} })(${2}); - -snippet js -options head - JSON.stringify(${1:TARGET}, ${2:null}, ${3:2}); - -snippet jsc -options head - console.log(JSON.stringify(${1:TARGET}, ${2:null}, ${3:2})); - === modified file 'vim/bundle/neosnippet-snippets/neosnippets/markdown.snip' --- vim/bundle/neosnippet-snippets/neosnippets/markdown.snip 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/neosnippets/markdown.snip 2015-08-25 11:01:00 +0000 @@ -2,22 +2,18 @@ abbr [link][] options word [${1:#:link_id}][]${2} - snippet linkid abbr [link][id] options word [${1:#:link}][${2:id}]${3} - snippet linkurl abbr [link](url) options word [${1:#:link}](http://${2:#:url})${3} - snippet linkemail abbr [link](email) options word [${1:#:link}](mailto:${2:#:email})${3} - snippet linkurltitle abbr [link](url "title") options word @@ -27,7 +23,6 @@ abbr [id]: url "title" options word [${1:#:id}]: http://${2:#:url} "${3:#:title}" - snippet idemail abbr [id]: email "title" options word @@ -37,12 +32,10 @@ abbr ![alt][id] options word ![${1:#:alt}][${2:#:id}]${3} - snippet alturl abbr ![alt](url) options word ![${1:#:alt}](${2:#:url})${3} - snippet alturltitle abbr ![alt](url "title") options word @@ -52,7 +45,6 @@ abbr *emphasis* options word *${1}*${2} - snippet emphasis2 abbr _emphasis_ options word === modified file 'vim/bundle/neosnippet-snippets/neosnippets/objc.snip' --- vim/bundle/neosnippet-snippets/neosnippets/objc.snip 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/neosnippets/objc.snip 2015-08-25 11:01:00 +0000 @@ -182,7 +182,7 @@ [${3}} addObject:anObject]; } - - (void)insertObject:($2)anObject in$1AtIndex:(unsigned int)i + - (void)insertObject:($2)anObject in$1AtIndex:(unsigned int)i { [${3} insertObject:anObject atIndex:i]; } @@ -199,7 +199,7 @@ - (void)removeObjectFrom${1}AtIndex:(unsigned int)i { - [${3} removeObjectAtIndex:i]; + [${3} removeObjectAtIndex:i]; } - (unsigned int)countOf${1} @@ -313,7 +313,7 @@ snippet format - [NSString stringWithFormat:@"${1}", ${2}]${0} + [NSString stringWithFormat:@"${1}", ${2}]${0} snippet save === modified file 'vim/bundle/neosnippet-snippets/neosnippets/ocaml.snip' --- vim/bundle/neosnippet-snippets/neosnippets/ocaml.snip 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/neosnippets/ocaml.snip 2015-08-25 11:01:00 +0000 @@ -21,17 +21,17 @@ snippet cc abbr comment - (* ${0:TARGET} *) + (* ${1:TARGET} *) snippet Cc abbr multi line comment (* - ${0:TARGET} + ${1:TARGET} *) snippet oo abbr ocamldoc comment (** .. *) - (** ${0:TARGET} *) + (** ${1:TARGET} *) snippet if abbr if..then..else @@ -95,7 +95,7 @@ snippet fail abbr failwith "..." - failwith "${0:TARGET}" + failwith "${0:TODO}" snippet beg abbr begin ... end @@ -110,8 +110,3 @@ abbr string literals {xxx| ... |xxx} options head {${0:}|${1:TARGET}|$0} - -snippet @@ -abbr [@@deriving ...] -options head - [@@deriving ${0:TARGET}] === modified file 'vim/bundle/neosnippet-snippets/neosnippets/perl.snip' --- vim/bundle/neosnippet-snippets/neosnippets/perl.snip 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/neosnippets/perl.snip 2015-08-25 11:01:00 +0000 @@ -1,4 +1,4 @@ -snippet perl +snippet perl #!/opt/local/bin/perl use strict; === modified file 'vim/bundle/neosnippet-snippets/neosnippets/php.snip' --- vim/bundle/neosnippet-snippets/neosnippets/php.snip 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/neosnippets/php.snip 2015-08-25 11:01:00 +0000 @@ -113,7 +113,7 @@ snippet doc /** - * ${0} + * $0 */ snippet class_with_constructor === modified file 'vim/bundle/neosnippet-snippets/neosnippets/rails.snip' --- vim/bundle/neosnippet-snippets/neosnippets/rails.snip 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/neosnippets/rails.snip 2015-08-25 11:01:00 +0000 @@ -143,22 +143,22 @@ logger.fatal snippet action -abbr action: +abbr action: action: snippet co_ -abbr co________: +abbr co________: co________: snippet id -abbr id: +abbr id: id: snippet object -abbr object: +abbr object: object: snippet partial -abbr partial: +abbr partial: partial: === modified file 'vim/bundle/neosnippet-snippets/neosnippets/ruby.snip' --- vim/bundle/neosnippet-snippets/neosnippets/ruby.snip 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/neosnippets/ruby.snip 2015-08-25 11:01:00 +0000 @@ -166,12 +166,12 @@ end snippet class - class ${1:`substitute(expand('%:t:r:r:r'), '\v%(^(.)|_(.))', '\u\1\u\2', 'g')`} + class ${1:#:Name} ${0} end snippet module - module ${1:`substitute(expand('%:t:r:r:r'), '\v%(^(.)|_(.))', '\u\1\u\2', 'g')`} + module ${1:#:Name} ${0} end === modified file 'vim/bundle/neosnippet-snippets/neosnippets/scala.snip' --- vim/bundle/neosnippet-snippets/neosnippets/scala.snip 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/neosnippets/scala.snip 2015-08-25 11:01:00 +0000 @@ -4,10 +4,6 @@ case ${1} => ${0} } -snippet case -abbr case .. => .. - case ${1} => ${0} - snippet try abbr try {} catch { case ... } options head @@ -37,12 +33,12 @@ snippet pf abbr p in for - _ = println(${1}) + val _ = println(${1}) snippet main abbr def main(args: Array[String]) { options head - object ${1:`expand('%:t:r') ==# '' ? 'HelloWorld' : expand('%:t:r')`} { + object ${1:HelloWorld} { def main(args: Array[String]) { ${0:TARGET} } @@ -51,7 +47,7 @@ snippet hello abbr object HelloWorld { def main(...) } options head - object ${1:`expand('%:t:r') ==# '' ? 'HelloWorld' : expand('%:t:r')`} { + object HelloWorld { def main(args: Array[String]) { println("Hello, world!") } @@ -71,8 +67,10 @@ snippet should-scalatest options word - should "${1}" in { - ${0:TARGET} + should { + "${1}" in { + ${0:TARGET} + } } snippet akka-actor @@ -94,10 +92,5 @@ options head package `substitute(substitute(expand('%:h'), '.*\ Type { ... } -options word - func ${1:name}(${2:#:arguments}) -> ${3:Int}${0} - -snippet void -abbr func name(...) { ... } -options word - func ${1:name}(${2:#:arguments})${0} - -snippet for -options head - for var ${1:i = 0}; ${2:i < j}; ${3:i++} { - ${0:TARGET} - } - -snippet iter -options head - for ${1:item} in ${2:collection} { - ${0:TARGET} - } - -snippet while -options head - while ${1:false} { - ${0:TARGET} - } - -snippet repeat -options head - repeat { - ${0:TARGET} - } while ${1:false} - -snippet if -options word - if ${1:false} { - ${0:TARGET} - }${9} - -snippet elif -options word - else if ${1:false} { - ${0:TARGET} - }${9} - -snippet else -options word - else { - ${0:TARGET} - }${9} - -snippet optional -abbr if let/case ... { ... } -options head - if ${1:let} ${2:name} = ${3:expression} else { - ${0:TARGET} - }${9} - -snippet guard -abbr guard let ... else { ... } -options head - guard let ${1} = ${2} else { - ${0:TARGET} - } - ${9} - -snippet switch -options head - switch ${1:expression} { - ${0:TARGET} - } - -snippet do -options head - do { - ${0:TARGET} - }${9} - -snippet catch -options word - catch${1:#:pattern} { - ${0:TARGET} - }${9} - -snippet defer -options head - defer { - ${0:TARGET} - } - -snippet import - import ${1:module} - ${0} - -snippet subscript -options word - subscript(${1:index: Int}) -> ${2:Int} { - ${0:TARGET} - } - ${9} - -snippet init -options word - init${1:#:?}(${2:#:arguments}) { - ${0:TARGET} - } - ${9} - -snippet deinit -options head - deinit { - ${0:TARGET} - } - -snippet closure -options word -abbr { (...) -> Type in ... } - { ${1:#capture}(${2:#:arguments}) -> ${3:Void} in - ${0:TARGET} - } - ${9} === modified file 'vim/bundle/neosnippet-snippets/neosnippets/tex.snip' --- vim/bundle/neosnippet-snippets/neosnippets/tex.snip 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/neosnippets/tex.snip 2015-08-25 11:01:00 +0000 @@ -142,12 +142,6 @@ ${2:TARGET} \end{array} -snippet cases -alias \begin{cases} \cases - \begin{cases}{${1}} - ${2:TARGET} - \end{cases} - snippet slide alias \begin{slide} \slide \begin{slide} @@ -472,20 +466,6 @@ ${2:TARGET} \end{alertblock} -snippet columns -alias \begin{columns} \columns - \begin{columns} - \begin{column}{${1:#:width}${2:\\textwidth}} - ${0:#:body} - \end{column} - \end{columns} - -snippet column -alias \begin{column} \column - \begin{column}{${1:#:width}${2:\\textwidth}} - ${0:#:body} - \end{column} - # ========== TikZ ========== snippet tikzpicture alias \begin{tikzpicture} === modified file 'vim/bundle/neosnippet-snippets/neosnippets/toml.snip' --- vim/bundle/neosnippet-snippets/neosnippets/toml.snip 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/neosnippets/toml.snip 2015-08-25 11:01:00 +0000 @@ -1,6 +1,14 @@ snippet plugins abbr [[plugins]] [[plugins]] - repo = '`getreg('+')=='' ? '<\`0\`>' : getreg('+')`' + repository = '`getreg('+')=='' ? '<\`0\`>' : getreg('+')`' + ${0} + +snippet mappings + mappings = '${1:}' + ${0} + +snippet filetypes + filetypes = '${1}' ${0} === removed file 'vim/bundle/neosnippet-snippets/neosnippets/twig.snip' --- vim/bundle/neosnippet-snippets/neosnippets/twig.snip 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/neosnippets/twig.snip 1970-01-01 00:00:00 +0000 @@ -1,148 +0,0 @@ -snippet autoescape -abbr {% autoescape ... %} ... {% endautoescape %} -options head - {% autoescape ${1:#:strategy} %} - ${0:TARGET} - {% autoescape %} - -snippet block -abbr {% block ... %} ... {% endblock %} -alias bl -options head - {% block ${1:#:name} %} - ${0:TARGET} - {% endblock %} - -snippet embed -abbr {% embed ... %} ... {% endembed %} -options head - {% embed '${1:template}' %} - {% block ${2} %} - ${0:TARGET} - {% endblock %} - {% endembed %} - -snippet extends -abbr {% extends ... %} -alias ext -options head - {% extends '${1:#:template}' %} - -snippet filter -abbr {% filter ... %} ... {% endfilter %} -options head - {% filter ${1} %} - ${0:TARGET} - {% endfilter %} - -snippet flush -abbr {% flush %} -options head - {% flush %} - -snippet for -abbr {% for ... in ... %} ... {% endfor %} -options head - {% for ${1:#:value} in ${2:#:list} %} - ${0:TARGET} - {% endfor %} - -snippet from -abbr {% from '...' import ... %} -options head - {% from '${1:#:module}' import ${2:#:macro}} - -snippet if -abbr {% if ... %} ... {% endif %} -options head - {% if ${1} %} - ${0:TARGET} - {% endif %} - -snippet elseif -abbr {% elseif ... %} ... -alias elif -options head - {% elseif ${1} %} - ${0:TARGET} - -snippet else -abbr {% else %} ... -options head - {$ else %} - ${0:TARGET} - -snippet import -abbr {% import '...' as ... %} -options head - {% import '${1:#:module}' as ${2:#:namespace}} - -snippet include -abbr {% include '...' %} -options head - {% include '${1:#:template}'} - -snippet macro -abbr {% macro ...(...) %} ... {% endmacro %} -options head - {% macro ${1:#:name}(${2:#:args}) %} - ${0:TARGET} - {% endif %} - -snippet sandbox -abbr {% sandbox %} ... {% endsandbox %} -options head - {% sandbox %} - ${0:TARGET} - {% endsandbox %} - -snippet set -abbr {% set ... = ... %} -options head - {% set ${1:#:var} = ${2:#:value} %} - -snippet setblock -abbr {% set ... %} ... {% endset %} -options head - {% set ${1:#:var} %} - ${0:TARGET} - {% endset %} - -snippet spaceless -abbr {% spaceless %} ... {% endspaceless %} -options head - {% spaceless %} - ${0:TARGET} - {% endspaceless %} - -snippet use -abbr {% use '...' %} -options head - {% use '${1:#:template}' %} - -snippet verbatim -abbr {% verbatim %} ... {% endverbatim %} -options head - {% verbatim %} - ${0:TARGET} - {% endverbatim %} - -snippet comment -abbr {# ... #} -alias # -options head - {# ${1:comment} #} - -snippet tag -abbr {% ... %} -alias % -options head - {% ${1:#:tag} %} - -snippet tagblock -abbr {% ... %} ... {% end... %} -options head - {% ${1:#:tag} ${2:#:name} %} - ${0:TARGET} - {% end$1 %} - === modified file 'vim/bundle/neosnippet-snippets/neosnippets/verilog.snip' --- vim/bundle/neosnippet-snippets/neosnippets/verilog.snip 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/neosnippets/verilog.snip 2015-08-25 11:01:00 +0000 @@ -2,21 +2,13 @@ abbr always @() always @(${1:*})${2:TARGET} -snippet alclk -abbr always @(posedge clk) - always @(posedge clk${1})${2:TARGET} - snippet beginend -alias be -abbr begin ... end begin ${1:TARGET} end snippet module -alias mod -abbr module () ... endmodule - module ${1:`expand("%:r")`}( + module ${1:name}( ${2:TARGET} ); endmodule @@ -37,11 +29,6 @@ abbr inout [] io_, inout${1:#: nbit} io_${2:name}, -snippet regmemory -alias regm -abbr reg [] name [] - reg [${1}:${2:0}] ${3:name} [${4:0}:${5}];${6:TARGET} - snippet regseq abbr _r <= _w; ${1:reg}_r <= $1_w;${2:TARGET} @@ -50,109 +37,10 @@ abbr _w = _r ${1:reg}_w = $1_r;${2:TARGET} -snippet assign -alias as -abbr assign ... = ... - assign ${1:#:name} = ${2:#:val};${3:TARGET} - -snippet parameter -alias pa -abbr parameter ... = ... - parameter ${1:#:name} = ${2:#:val};${3:TARGET} - -snippet localparam -alias lpa -abbr localparam ... = ... - localparam ${1:#:name} = ${2:#:val};${3:TARGET} - -snippet if -abbr if() - if (${1:#:condition})${0:TARGET} - -snippet else -alias el -abbr else - else${0:TARGET} - -snippet elseif -abbr else if () - else if (${1:#:condition})${0:TARGET} - -snippet initial -alias init -abbr initial begin ... end - initial begin - ${0:TARGET} - end - -snippet for -abbr for () begin ... end - for (${1:i} = ${2}; $1 < ${3}; ${4:$1 = $1 + 1})${0:TARGET} - -snippet while -abbr while () begin ... end - while (${1:#:condition})${0:TARGET} - snippet case -abbr case () ... endcase - case (${1}) + case (${1}) begin ${2:'b0}: begin ${3} end - default : begin - ${4} - end - endcase - -snippet function -alias func -abbr function ... endfunction - function${1:# nbit} ${1:func_name}; - ${2:portlist}; - begin - ${0:TARGET}; - end - endfunction - -snippet inc -alias `inc, `include -abbr `include "..." - \`include "${1}"${0} - -snippet def -alias `def, `define -abbr `define ... ... - \`define ${1} ${2} - -snippet default_nettype -alias dn, defn - \`default_nettype ${1:none}${0} - -snippet timescale -alias ts, `time, `timescale -abbr `timescale 1ns/100ps - \`timescale ${1:1ns}/${2:100ps}${0} - -snippet ternary -alias ter -abbr () ? a : b - (${1:#:condition}) ? ${2:#:a} : ${3:#:b} - -snippet dumpfile -alias df -abbr $dumpfile("....vcd"); - $dumpfile("${1:`expand("%:r")`}.vcd");${0} - -snippet dumpvars -alias dv -abbr $dumpvars(0, ...); - $dumpvars(${1:0}, ${2:`expand("%:r")`});${0} - -snippet display -abbr $display("...", ...); - $display("${1}", ${2}); - -snippet strobe -abbr $strobe("...", ...); - $strobe("${1}", ${2}); + end === modified file 'vim/bundle/neosnippet-snippets/neosnippets/zsh.snip' --- vim/bundle/neosnippet-snippets/neosnippets/zsh.snip 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet-snippets/neosnippets/zsh.snip 2015-08-25 11:01:00 +0000 @@ -1,6 +1,1 @@ include sh.snip - -snippet zplug -abbr zplug "plugin" - zplug "`getreg('+')=='' ? '<\`0\`>' : getreg('+')`"${0} - === modified file 'vim/bundle/neosnippet.vim/.git/config' (properties changed: -x to +x) === modified file 'vim/bundle/neosnippet.vim/.git/hooks/applypatch-msg.sample' --- vim/bundle/neosnippet.vim/.git/hooks/applypatch-msg.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/.git/hooks/applypatch-msg.sample 2015-08-25 11:01:00 +0000 @@ -10,6 +10,6 @@ # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup -commitmsg="$(git rev-parse --git-path hooks/commit-msg)" -test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} +test -x "$GIT_DIR/hooks/commit-msg" && + exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} : === modified file 'vim/bundle/neosnippet.vim/.git/hooks/pre-applypatch.sample' --- vim/bundle/neosnippet.vim/.git/hooks/pre-applypatch.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/.git/hooks/pre-applypatch.sample 2015-08-25 11:01:00 +0000 @@ -9,6 +9,6 @@ # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup -precommit="$(git rev-parse --git-path hooks/pre-commit)" -test -x "$precommit" && exec "$precommit" ${1+"$@"} +test -x "$GIT_DIR/hooks/pre-commit" && + exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} : === modified file 'vim/bundle/neosnippet.vim/.git/hooks/pre-push.sample' --- vim/bundle/neosnippet.vim/.git/hooks/pre-push.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/.git/hooks/pre-push.sample 2015-08-25 11:01:00 +0000 @@ -24,6 +24,7 @@ z40=0000000000000000000000000000000000000000 +IFS=' ' while read local_ref local_sha remote_ref remote_sha do if [ "$local_sha" = $z40 ] === modified file 'vim/bundle/neosnippet.vim/.git/hooks/update.sample' --- vim/bundle/neosnippet.vim/.git/hooks/update.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/.git/hooks/update.sample 2015-08-25 11:01:00 +0000 @@ -1,6 +1,6 @@ #!/bin/sh # -# An example hook script to block unannotated tags from entering. +# An example hook script to blocks unannotated tags from entering. # Called by "git receive-pack" with arguments: refname sha1-old sha1-new # # To enable this hook, rename this file to "update". === modified file 'vim/bundle/neosnippet.vim/.git/index' Binary files vim/bundle/neosnippet.vim/.git/index 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/index 2015-08-25 11:01:00 +0000 differ === modified file 'vim/bundle/neosnippet.vim/.git/logs/HEAD' --- vim/bundle/neosnippet.vim/.git/logs/HEAD 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/.git/logs/HEAD 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 9492fbb7e9016243af3c1987b91f0bffcf4cc8e7 Jan Pobrislo 1470298378 +0200 clone: from https://github.com/Shougo/neosnippet.vim/ +0000000000000000000000000000000000000000 c76a668f407ad849e2d00f2695aa583b2d65ce7d Jan Pobrislo 1440500385 +0200 clone: from https://github.com/Shougo/neosnippet.vim/ === modified file 'vim/bundle/neosnippet.vim/.git/logs/refs/heads/master' --- vim/bundle/neosnippet.vim/.git/logs/refs/heads/master 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/.git/logs/refs/heads/master 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 9492fbb7e9016243af3c1987b91f0bffcf4cc8e7 Jan Pobrislo 1470298378 +0200 clone: from https://github.com/Shougo/neosnippet.vim/ +0000000000000000000000000000000000000000 c76a668f407ad849e2d00f2695aa583b2d65ce7d Jan Pobrislo 1440500385 +0200 clone: from https://github.com/Shougo/neosnippet.vim/ === modified file 'vim/bundle/neosnippet.vim/.git/logs/refs/remotes/origin/HEAD' --- vim/bundle/neosnippet.vim/.git/logs/refs/remotes/origin/HEAD 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/.git/logs/refs/remotes/origin/HEAD 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 9492fbb7e9016243af3c1987b91f0bffcf4cc8e7 Jan Pobrislo 1470298378 +0200 clone: from https://github.com/Shougo/neosnippet.vim/ +0000000000000000000000000000000000000000 c76a668f407ad849e2d00f2695aa583b2d65ce7d Jan Pobrislo 1440500385 +0200 clone: from https://github.com/Shougo/neosnippet.vim/ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/00' === removed file 'vim/bundle/neosnippet.vim/.git/objects/00/5f51dcb4e83e2e3bff957dc0390057020a3db3' Binary files vim/bundle/neosnippet.vim/.git/objects/00/5f51dcb4e83e2e3bff957dc0390057020a3db3 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/00/5f51dcb4e83e2e3bff957dc0390057020a3db3 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neosnippet.vim/.git/objects/03' === added file 'vim/bundle/neosnippet.vim/.git/objects/03/ba90f3aebdae9b96887af3a37fabab0e00ad89' Binary files vim/bundle/neosnippet.vim/.git/objects/03/ba90f3aebdae9b96887af3a37fabab0e00ad89 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/03/ba90f3aebdae9b96887af3a37fabab0e00ad89 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neosnippet.vim/.git/objects/05' === added file 'vim/bundle/neosnippet.vim/.git/objects/05/11de7415a2e8d0818066cf398670358de47fdd' Binary files vim/bundle/neosnippet.vim/.git/objects/05/11de7415a2e8d0818066cf398670358de47fdd 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/05/11de7415a2e8d0818066cf398670358de47fdd 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/06' === removed file 'vim/bundle/neosnippet.vim/.git/objects/06/44f05ee35225c9c041c6cc45c7a7bbd6245428' Binary files vim/bundle/neosnippet.vim/.git/objects/06/44f05ee35225c9c041c6cc45c7a7bbd6245428 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/06/44f05ee35225c9c041c6cc45c7a7bbd6245428 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/08' === removed file 'vim/bundle/neosnippet.vim/.git/objects/08/b8490c5a8f13645cefc0741ef5a0956c41fccd' Binary files vim/bundle/neosnippet.vim/.git/objects/08/b8490c5a8f13645cefc0741ef5a0956c41fccd 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/08/b8490c5a8f13645cefc0741ef5a0956c41fccd 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/0e' === removed file 'vim/bundle/neosnippet.vim/.git/objects/0e/683ffcee2ef1695fdbd2ace946e85173f5e6ba' --- vim/bundle/neosnippet.vim/.git/objects/0e/683ffcee2ef1695fdbd2ace946e85173f5e6ba 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/.git/objects/0e/683ffcee2ef1695fdbd2ace946e85173f5e6ba 1970-01-01 00:00:00 +0000 @@ -1,2 +0,0 @@ -x+)JMU01b040031QK/,(H-+ex^z{Fk -;> \ No newline at end of file === added directory 'vim/bundle/neosnippet.vim/.git/objects/13' === added file 'vim/bundle/neosnippet.vim/.git/objects/13/9ef62ef4904086ab83ec7b387e355a5ad097b7' Binary files vim/bundle/neosnippet.vim/.git/objects/13/9ef62ef4904086ab83ec7b387e355a5ad097b7 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/13/9ef62ef4904086ab83ec7b387e355a5ad097b7 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/neosnippet.vim/.git/objects/13/df2bae5f06c50e12aec669694cc9b951bc1132' Binary files vim/bundle/neosnippet.vim/.git/objects/13/df2bae5f06c50e12aec669694cc9b951bc1132 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/13/df2bae5f06c50e12aec669694cc9b951bc1132 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/neosnippet.vim/.git/objects/14/2ab15cb0cfcb0f3d3c2b319b4b7efd92a457fe' Binary files vim/bundle/neosnippet.vim/.git/objects/14/2ab15cb0cfcb0f3d3c2b319b4b7efd92a457fe 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/14/2ab15cb0cfcb0f3d3c2b319b4b7efd92a457fe 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/neosnippet.vim/.git/objects/14/6e9e3359a84308ca7f91f7ee6837ca8048ade8' Binary files vim/bundle/neosnippet.vim/.git/objects/14/6e9e3359a84308ca7f91f7ee6837ca8048ade8 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/14/6e9e3359a84308ca7f91f7ee6837ca8048ade8 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neosnippet.vim/.git/objects/17' === added file 'vim/bundle/neosnippet.vim/.git/objects/17/906f37596606f9728524c7ad03f2a95ac5bb65' Binary files vim/bundle/neosnippet.vim/.git/objects/17/906f37596606f9728524c7ad03f2a95ac5bb65 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/17/906f37596606f9728524c7ad03f2a95ac5bb65 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/1b' === removed file 'vim/bundle/neosnippet.vim/.git/objects/1b/456413c0e960e82b0a274bd7796038ff3c4a54' Binary files vim/bundle/neosnippet.vim/.git/objects/1b/456413c0e960e82b0a274bd7796038ff3c4a54 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/1b/456413c0e960e82b0a274bd7796038ff3c4a54 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/1f' === removed file 'vim/bundle/neosnippet.vim/.git/objects/1f/f2748a73486664bb3fe526fefab0effd5148cc' Binary files vim/bundle/neosnippet.vim/.git/objects/1f/f2748a73486664bb3fe526fefab0effd5148cc 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/1f/f2748a73486664bb3fe526fefab0effd5148cc 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/24' === removed file 'vim/bundle/neosnippet.vim/.git/objects/24/dd77bb019965b42b698a535388ddb58ad4c42e' Binary files vim/bundle/neosnippet.vim/.git/objects/24/dd77bb019965b42b698a535388ddb58ad4c42e 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/24/dd77bb019965b42b698a535388ddb58ad4c42e 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neosnippet.vim/.git/objects/27' === added file 'vim/bundle/neosnippet.vim/.git/objects/27/231446a53743c9edfc64616977921fc4f916c9' Binary files vim/bundle/neosnippet.vim/.git/objects/27/231446a53743c9edfc64616977921fc4f916c9 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/27/231446a53743c9edfc64616977921fc4f916c9 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/28' === removed file 'vim/bundle/neosnippet.vim/.git/objects/28/2447240d5a9120b5a5e82505fe4c58f6669746' Binary files vim/bundle/neosnippet.vim/.git/objects/28/2447240d5a9120b5a5e82505fe4c58f6669746 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/28/2447240d5a9120b5a5e82505fe4c58f6669746 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neosnippet.vim/.git/objects/2a' === added file 'vim/bundle/neosnippet.vim/.git/objects/2a/6e242aa05cd429459878b7ada7161b1189b116' Binary files vim/bundle/neosnippet.vim/.git/objects/2a/6e242aa05cd429459878b7ada7161b1189b116 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/2a/6e242aa05cd429459878b7ada7161b1189b116 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neosnippet.vim/.git/objects/31' === added file 'vim/bundle/neosnippet.vim/.git/objects/31/56a5613d2f82888a3895b1d93661418f9d752e' --- vim/bundle/neosnippet.vim/.git/objects/31/56a5613d2f82888a3895b1d93661418f9d752e 1970-01-01 00:00:00 +0000 +++ vim/bundle/neosnippet.vim/.git/objects/31/56a5613d2f82888a3895b1d93661418f9d752e 2015-08-25 11:01:00 +0000 @@ -0,0 +1,2 @@ +xUOK0uS<)& q5 ȠMc8Eͼu[ >+dm{^^+ud4*FJ0xL֤!Ď5T ) 61IGf| + ^!OHS8;#Tkr<`Fuem4P!&>Ǒ*e\߲7YVV \ No newline at end of file === added directory 'vim/bundle/neosnippet.vim/.git/objects/32' === added file 'vim/bundle/neosnippet.vim/.git/objects/32/62e878c57bb73315949851dbff8d0314daa80b' Binary files vim/bundle/neosnippet.vim/.git/objects/32/62e878c57bb73315949851dbff8d0314daa80b 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/32/62e878c57bb73315949851dbff8d0314daa80b 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neosnippet.vim/.git/objects/35' === added file 'vim/bundle/neosnippet.vim/.git/objects/35/4dcb32788f35002c846dd0a358f9436c50e284' Binary files vim/bundle/neosnippet.vim/.git/objects/35/4dcb32788f35002c846dd0a358f9436c50e284 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/35/4dcb32788f35002c846dd0a358f9436c50e284 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/39' === removed file 'vim/bundle/neosnippet.vim/.git/objects/39/24979af88f9c52d432aa1a56d203549b721ac1' Binary files vim/bundle/neosnippet.vim/.git/objects/39/24979af88f9c52d432aa1a56d203549b721ac1 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/39/24979af88f9c52d432aa1a56d203549b721ac1 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/neosnippet.vim/.git/objects/39/aa9b1013fd3c5b107431361c6fb7bff5b5ba2e' Binary files vim/bundle/neosnippet.vim/.git/objects/39/aa9b1013fd3c5b107431361c6fb7bff5b5ba2e 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/39/aa9b1013fd3c5b107431361c6fb7bff5b5ba2e 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neosnippet.vim/.git/objects/3c' === added file 'vim/bundle/neosnippet.vim/.git/objects/3c/66243f23f83a66bbcf71fc3293577258034f8c' Binary files vim/bundle/neosnippet.vim/.git/objects/3c/66243f23f83a66bbcf71fc3293577258034f8c 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/3c/66243f23f83a66bbcf71fc3293577258034f8c 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/3d' === removed file 'vim/bundle/neosnippet.vim/.git/objects/3d/c82bbe6752308ab4faefcb3714b6c1183ab761' Binary files vim/bundle/neosnippet.vim/.git/objects/3d/c82bbe6752308ab4faefcb3714b6c1183ab761 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/3d/c82bbe6752308ab4faefcb3714b6c1183ab761 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neosnippet.vim/.git/objects/40' === added file 'vim/bundle/neosnippet.vim/.git/objects/40/4fe40873281dc9b2b5a550d2f5b8b272985a0c' Binary files vim/bundle/neosnippet.vim/.git/objects/40/4fe40873281dc9b2b5a550d2f5b8b272985a0c 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/40/4fe40873281dc9b2b5a550d2f5b8b272985a0c 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/41' === removed file 'vim/bundle/neosnippet.vim/.git/objects/41/88d8559ab5fbbf3a08226b926699dba6c5040b' Binary files vim/bundle/neosnippet.vim/.git/objects/41/88d8559ab5fbbf3a08226b926699dba6c5040b 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/41/88d8559ab5fbbf3a08226b926699dba6c5040b 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/44' === removed file 'vim/bundle/neosnippet.vim/.git/objects/44/a88ecd3e21883f18e69fedb1a2c03eba6be3bd' Binary files vim/bundle/neosnippet.vim/.git/objects/44/a88ecd3e21883f18e69fedb1a2c03eba6be3bd 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/44/a88ecd3e21883f18e69fedb1a2c03eba6be3bd 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/46' === removed file 'vim/bundle/neosnippet.vim/.git/objects/46/4f6b136be7d3cb90cef05d80aa7ffbc64dc211' Binary files vim/bundle/neosnippet.vim/.git/objects/46/4f6b136be7d3cb90cef05d80aa7ffbc64dc211 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/46/4f6b136be7d3cb90cef05d80aa7ffbc64dc211 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/47' === removed file 'vim/bundle/neosnippet.vim/.git/objects/47/19c7a6413d00a849903461ca92a348c9960cf0' Binary files vim/bundle/neosnippet.vim/.git/objects/47/19c7a6413d00a849903461ca92a348c9960cf0 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/47/19c7a6413d00a849903461ca92a348c9960cf0 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neosnippet.vim/.git/objects/48' === added file 'vim/bundle/neosnippet.vim/.git/objects/48/1ad1138b0fa1a4c227381f1d76ac9aa929d37d' Binary files vim/bundle/neosnippet.vim/.git/objects/48/1ad1138b0fa1a4c227381f1d76ac9aa929d37d 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/48/1ad1138b0fa1a4c227381f1d76ac9aa929d37d 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/4b' === removed file 'vim/bundle/neosnippet.vim/.git/objects/4b/0afc538a37d9dc965d9d0e5d40698124ed05e6' Binary files vim/bundle/neosnippet.vim/.git/objects/4b/0afc538a37d9dc965d9d0e5d40698124ed05e6 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/4b/0afc538a37d9dc965d9d0e5d40698124ed05e6 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/4d' === removed file 'vim/bundle/neosnippet.vim/.git/objects/4d/0c6ca0ed2d141e7b6a4d8ffb8a2e68d427990f' Binary files vim/bundle/neosnippet.vim/.git/objects/4d/0c6ca0ed2d141e7b6a4d8ffb8a2e68d427990f 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/4d/0c6ca0ed2d141e7b6a4d8ffb8a2e68d427990f 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neosnippet.vim/.git/objects/4e' === added file 'vim/bundle/neosnippet.vim/.git/objects/4e/6e6265e96573faa7ed5a982e40fe1762ef60c8' Binary files vim/bundle/neosnippet.vim/.git/objects/4e/6e6265e96573faa7ed5a982e40fe1762ef60c8 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/4e/6e6265e96573faa7ed5a982e40fe1762ef60c8 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neosnippet.vim/.git/objects/52' === added file 'vim/bundle/neosnippet.vim/.git/objects/52/3246e8dc9b2958ac1348b8fe3c1d6fc44307b6' Binary files vim/bundle/neosnippet.vim/.git/objects/52/3246e8dc9b2958ac1348b8fe3c1d6fc44307b6 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/52/3246e8dc9b2958ac1348b8fe3c1d6fc44307b6 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neosnippet.vim/.git/objects/56' === added file 'vim/bundle/neosnippet.vim/.git/objects/56/4d9329237eea72f9643c559bd853a8eacf8960' Binary files vim/bundle/neosnippet.vim/.git/objects/56/4d9329237eea72f9643c559bd853a8eacf8960 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/56/4d9329237eea72f9643c559bd853a8eacf8960 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/neosnippet.vim/.git/objects/56/f593a78f3cd1a80b1a3aaf2c863bf4df74c41d' Binary files vim/bundle/neosnippet.vim/.git/objects/56/f593a78f3cd1a80b1a3aaf2c863bf4df74c41d 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/56/f593a78f3cd1a80b1a3aaf2c863bf4df74c41d 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neosnippet.vim/.git/objects/57' === added file 'vim/bundle/neosnippet.vim/.git/objects/57/03ea658fe69054cf8de1b0796eeeee0dabec5e' Binary files vim/bundle/neosnippet.vim/.git/objects/57/03ea658fe69054cf8de1b0796eeeee0dabec5e 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/57/03ea658fe69054cf8de1b0796eeeee0dabec5e 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/59' === removed file 'vim/bundle/neosnippet.vim/.git/objects/59/afcff3cc260cc37053b1d194efa7bbcc0bbc98' Binary files vim/bundle/neosnippet.vim/.git/objects/59/afcff3cc260cc37053b1d194efa7bbcc0bbc98 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/59/afcff3cc260cc37053b1d194efa7bbcc0bbc98 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neosnippet.vim/.git/objects/5c' === added file 'vim/bundle/neosnippet.vim/.git/objects/5c/47c994cfbd47c049b761f4eedf679263df9f17' Binary files vim/bundle/neosnippet.vim/.git/objects/5c/47c994cfbd47c049b761f4eedf679263df9f17 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/5c/47c994cfbd47c049b761f4eedf679263df9f17 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/60' === removed file 'vim/bundle/neosnippet.vim/.git/objects/60/3db418726e8eacb2fe8bba52e98fb9711be35c' Binary files vim/bundle/neosnippet.vim/.git/objects/60/3db418726e8eacb2fe8bba52e98fb9711be35c 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/60/3db418726e8eacb2fe8bba52e98fb9711be35c 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/65' === removed file 'vim/bundle/neosnippet.vim/.git/objects/65/a5746473c1a556e2a971a1c12ee2b2fb93e7bd' Binary files vim/bundle/neosnippet.vim/.git/objects/65/a5746473c1a556e2a971a1c12ee2b2fb93e7bd 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/65/a5746473c1a556e2a971a1c12ee2b2fb93e7bd 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neosnippet.vim/.git/objects/66' === added file 'vim/bundle/neosnippet.vim/.git/objects/66/6e1afc8ae8a6b525c78ad6268f989fae02a2d5' Binary files vim/bundle/neosnippet.vim/.git/objects/66/6e1afc8ae8a6b525c78ad6268f989fae02a2d5 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/66/6e1afc8ae8a6b525c78ad6268f989fae02a2d5 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/69' === removed file 'vim/bundle/neosnippet.vim/.git/objects/69/357e4dd09cbef16c63faabd820fe010c0313df' Binary files vim/bundle/neosnippet.vim/.git/objects/69/357e4dd09cbef16c63faabd820fe010c0313df 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/69/357e4dd09cbef16c63faabd820fe010c0313df 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/6a' === removed file 'vim/bundle/neosnippet.vim/.git/objects/6a/0b89991a4e89028572669000949a6341173585' Binary files vim/bundle/neosnippet.vim/.git/objects/6a/0b89991a4e89028572669000949a6341173585 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/6a/0b89991a4e89028572669000949a6341173585 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/neosnippet.vim/.git/objects/6d/540dfc37b8bcd2827def5192ee5f973fdc08c0' Binary files vim/bundle/neosnippet.vim/.git/objects/6d/540dfc37b8bcd2827def5192ee5f973fdc08c0 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/6d/540dfc37b8bcd2827def5192ee5f973fdc08c0 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/neosnippet.vim/.git/objects/6d/9a59d35153b1d2943f12457c850239cd508a83' Binary files vim/bundle/neosnippet.vim/.git/objects/6d/9a59d35153b1d2943f12457c850239cd508a83 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/6d/9a59d35153b1d2943f12457c850239cd508a83 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/6e' === removed file 'vim/bundle/neosnippet.vim/.git/objects/6e/0eb08be193b0acb4d397460f7b99849c56fa39' Binary files vim/bundle/neosnippet.vim/.git/objects/6e/0eb08be193b0acb4d397460f7b99849c56fa39 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/6e/0eb08be193b0acb4d397460f7b99849c56fa39 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neosnippet.vim/.git/objects/70' === added file 'vim/bundle/neosnippet.vim/.git/objects/70/bd4cbcc44e06693837135c673420f0da95b6fb' Binary files vim/bundle/neosnippet.vim/.git/objects/70/bd4cbcc44e06693837135c673420f0da95b6fb 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/70/bd4cbcc44e06693837135c673420f0da95b6fb 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/73' === removed file 'vim/bundle/neosnippet.vim/.git/objects/73/1fe4383394d30006d31216ebf79eb06de6837b' Binary files vim/bundle/neosnippet.vim/.git/objects/73/1fe4383394d30006d31216ebf79eb06de6837b 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/73/1fe4383394d30006d31216ebf79eb06de6837b 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neosnippet.vim/.git/objects/74' === added file 'vim/bundle/neosnippet.vim/.git/objects/74/16d81ac46a0ffe2f027ea0840b189439c88538' Binary files vim/bundle/neosnippet.vim/.git/objects/74/16d81ac46a0ffe2f027ea0840b189439c88538 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/74/16d81ac46a0ffe2f027ea0840b189439c88538 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/75' === removed file 'vim/bundle/neosnippet.vim/.git/objects/75/d79248932789ae9c63363013a12d2366f09c38' Binary files vim/bundle/neosnippet.vim/.git/objects/75/d79248932789ae9c63363013a12d2366f09c38 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/75/d79248932789ae9c63363013a12d2366f09c38 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/76' === removed file 'vim/bundle/neosnippet.vim/.git/objects/76/29d2afd52a78b12217a557ed35807da9f5d56f' Binary files vim/bundle/neosnippet.vim/.git/objects/76/29d2afd52a78b12217a557ed35807da9f5d56f 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/76/29d2afd52a78b12217a557ed35807da9f5d56f 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/78' === removed file 'vim/bundle/neosnippet.vim/.git/objects/78/0bf63ff59bcf92d6d34764e6562d8ae3e9c7d6' Binary files vim/bundle/neosnippet.vim/.git/objects/78/0bf63ff59bcf92d6d34764e6562d8ae3e9c7d6 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/78/0bf63ff59bcf92d6d34764e6562d8ae3e9c7d6 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/83' === removed file 'vim/bundle/neosnippet.vim/.git/objects/83/895a4b01b58d7761bdc419f001f80626423ab4' Binary files vim/bundle/neosnippet.vim/.git/objects/83/895a4b01b58d7761bdc419f001f80626423ab4 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/83/895a4b01b58d7761bdc419f001f80626423ab4 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neosnippet.vim/.git/objects/85' === added file 'vim/bundle/neosnippet.vim/.git/objects/85/37703c082d51f7ae39cc5a5ba0997842a66753' Binary files vim/bundle/neosnippet.vim/.git/objects/85/37703c082d51f7ae39cc5a5ba0997842a66753 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/85/37703c082d51f7ae39cc5a5ba0997842a66753 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/88' === removed file 'vim/bundle/neosnippet.vim/.git/objects/88/54a5c1354eb38897233a41c6759ae73c8f40f8' --- vim/bundle/neosnippet.vim/.git/objects/88/54a5c1354eb38897233a41c6759ae73c8f40f8 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/.git/objects/88/54a5c1354eb38897233a41c6759ae73c8f40f8 1970-01-01 00:00:00 +0000 @@ -1,3 +0,0 @@ -xWmo6g6lUl%jK4 %"('M)A Ļ{%9N~}ۛZiN5O' WKo;p#2/xN~GAД MoDYyR9D4{f$i؆IF) ɦ 9Üf8'qSE `{!G$#E, BȂŌ:0BiJu$ $I\8(Qgq ($S -% $ ,F9,8$8ax"T::_Gm)"Gy.dP³,NDf*eЖ!@.bU0tEy  Ry%|$aw2OX;ZKYP-NJ!e99YPK<"ΘxPaB'+%Y&Rޕ`0rfAKwՆ+ pt˻t>V Ɵ#p]Ev+\LP۲=XYh.B*thE?3w,ćsa;ٽ.Hi;h.2-\#~lѰhӁ=v̋}{3 d  u ]pbz7'뙶%bյ-ײj=*+5ڠ;+uhDD,-mH@Q"W)b),B}!%4~ N>4_JLJ--N(1]7o4P3L (CbWָ, bPaGŦhZf*@!Lf?YC*'D{b>w0nI~p'h3zP{uŲB;sJ"\Uv:JH@, ijiGd28O4JpPs?+lmM?YvLITT\W,*6uRڨ>alW ZMSU?,<,6H/9[dx I_3zYːbIb%/׹t&U7镊~IDI1!Lζ荐(L^| ?):E64Qt2kRnW+.I(:hVsCB~wV׻y[+:G,>V!M_o>V?<)<6\vFJeO<+xyiuٓCSM< }xxO] bnd)!,ńn,gF>DPnoۃ-78oM&;Tskx3 Vm\%b YfҪbĊ<̤ZP\ЖU"c^raŔʯsIwqPQ,Hy TDlXYǵb]I9PzaW׻҄ %0B5\bxL$E -KMT|RH4_'Ӎn27;MW4IS#_6T}IV -IW砥3Pkb`ݪJ,Լ>a^V(-̸Q^!#NM꾩5=ѻ Ztraf%ZG)ƾy8DG'M'TFM$l)/=U-A'kHTvÌm@z:xHVּ_y8/*Dˡ /3 =Gh'FEX< "[,ds[ֿ2 he kCʑt+v!ЊDє8 jց 'G -Qe&`pe j+xɠb h|ڎVʶbO1L77ѱZLgA;r߽Ӗ8I^D-AȈ ^l8Y+F˫R~m_ujNQ/(o,Ӑ:ux'ƒzx7-^g<#M\Dagf؛9;?Cx!x|lPI?x{:FSnt \ No newline at end of file === removed file 'vim/bundle/neosnippet.vim/.git/objects/a5/78bdaded9021ff6a8cea5280fee68b91e46f44' Binary files vim/bundle/neosnippet.vim/.git/objects/a5/78bdaded9021ff6a8cea5280fee68b91e46f44 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/a5/78bdaded9021ff6a8cea5280fee68b91e46f44 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neosnippet.vim/.git/objects/a6' === added file 'vim/bundle/neosnippet.vim/.git/objects/a6/010e8fae431b45676306f8ae6e769645985878' Binary files vim/bundle/neosnippet.vim/.git/objects/a6/010e8fae431b45676306f8ae6e769645985878 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/a6/010e8fae431b45676306f8ae6e769645985878 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/a8' === removed file 'vim/bundle/neosnippet.vim/.git/objects/a8/379a8c132c43ba308b6429dbfa4b295b844e4c' Binary files vim/bundle/neosnippet.vim/.git/objects/a8/379a8c132c43ba308b6429dbfa4b295b844e4c 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/a8/379a8c132c43ba308b6429dbfa4b295b844e4c 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/ae' === removed file 'vim/bundle/neosnippet.vim/.git/objects/ae/19f5bad87c9b04427f12fc149c00ff57618745' Binary files vim/bundle/neosnippet.vim/.git/objects/ae/19f5bad87c9b04427f12fc149c00ff57618745 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/ae/19f5bad87c9b04427f12fc149c00ff57618745 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/b2' === removed file 'vim/bundle/neosnippet.vim/.git/objects/b2/1d6daa9e0d864a938ee98e4a956a5cf3d26c88' Binary files vim/bundle/neosnippet.vim/.git/objects/b2/1d6daa9e0d864a938ee98e4a956a5cf3d26c88 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/b2/1d6daa9e0d864a938ee98e4a956a5cf3d26c88 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/b4' === removed file 'vim/bundle/neosnippet.vim/.git/objects/b4/9cb2d544767a32af1623c7e534b21d206b919c' Binary files vim/bundle/neosnippet.vim/.git/objects/b4/9cb2d544767a32af1623c7e534b21d206b919c 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/b4/9cb2d544767a32af1623c7e534b21d206b919c 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neosnippet.vim/.git/objects/b7' === added file 'vim/bundle/neosnippet.vim/.git/objects/b7/c11adcb4909ca1df9a6b306501ffc0bc924870' Binary files vim/bundle/neosnippet.vim/.git/objects/b7/c11adcb4909ca1df9a6b306501ffc0bc924870 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/b7/c11adcb4909ca1df9a6b306501ffc0bc924870 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/be' === removed file 'vim/bundle/neosnippet.vim/.git/objects/be/5dc2c72dd6bc205ddad6fab3336ec0b68245f5' Binary files vim/bundle/neosnippet.vim/.git/objects/be/5dc2c72dd6bc205ddad6fab3336ec0b68245f5 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/be/5dc2c72dd6bc205ddad6fab3336ec0b68245f5 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/neosnippet.vim/.git/objects/be/c62990d9f6bdd1fcb26f7d2937f278654841ef' Binary files vim/bundle/neosnippet.vim/.git/objects/be/c62990d9f6bdd1fcb26f7d2937f278654841ef 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/be/c62990d9f6bdd1fcb26f7d2937f278654841ef 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/neosnippet.vim/.git/objects/bf/b591ad891bea41d027bfb9837757f7ff9a4322' Binary files vim/bundle/neosnippet.vim/.git/objects/bf/b591ad891bea41d027bfb9837757f7ff9a4322 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/bf/b591ad891bea41d027bfb9837757f7ff9a4322 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/neosnippet.vim/.git/objects/bf/e9e5399d1d790fc23715cd3f0d76f9aebb5039' Binary files vim/bundle/neosnippet.vim/.git/objects/bf/e9e5399d1d790fc23715cd3f0d76f9aebb5039 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/bf/e9e5399d1d790fc23715cd3f0d76f9aebb5039 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neosnippet.vim/.git/objects/c2' === added file 'vim/bundle/neosnippet.vim/.git/objects/c2/90d0489f270fbc7c0a3d71733077124d9cd656' Binary files vim/bundle/neosnippet.vim/.git/objects/c2/90d0489f270fbc7c0a3d71733077124d9cd656 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/c2/90d0489f270fbc7c0a3d71733077124d9cd656 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/c3' === removed file 'vim/bundle/neosnippet.vim/.git/objects/c3/243ed7c1a22f8322e40969df874e233d9a9317' Binary files vim/bundle/neosnippet.vim/.git/objects/c3/243ed7c1a22f8322e40969df874e233d9a9317 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/c3/243ed7c1a22f8322e40969df874e233d9a9317 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neosnippet.vim/.git/objects/c7' === added file 'vim/bundle/neosnippet.vim/.git/objects/c7/6a668f407ad849e2d00f2695aa583b2d65ce7d' Binary files vim/bundle/neosnippet.vim/.git/objects/c7/6a668f407ad849e2d00f2695aa583b2d65ce7d 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/c7/6a668f407ad849e2d00f2695aa583b2d65ce7d 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neosnippet.vim/.git/objects/c8' === added file 'vim/bundle/neosnippet.vim/.git/objects/c8/6be2437aaa6b837cd5875995f9515d2b88e404' Binary files vim/bundle/neosnippet.vim/.git/objects/c8/6be2437aaa6b837cd5875995f9515d2b88e404 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/c8/6be2437aaa6b837cd5875995f9515d2b88e404 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/neosnippet.vim/.git/objects/c8/aac65d2a761c0aafa826cd0bb00d55ec0c742b' Binary files vim/bundle/neosnippet.vim/.git/objects/c8/aac65d2a761c0aafa826cd0bb00d55ec0c742b 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/c8/aac65d2a761c0aafa826cd0bb00d55ec0c742b 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neosnippet.vim/.git/objects/cf' === added file 'vim/bundle/neosnippet.vim/.git/objects/cf/0bb76b59fcbc624aa1b3c039e6d036b58db356' Binary files vim/bundle/neosnippet.vim/.git/objects/cf/0bb76b59fcbc624aa1b3c039e6d036b58db356 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/cf/0bb76b59fcbc624aa1b3c039e6d036b58db356 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neosnippet.vim/.git/objects/d0' === added file 'vim/bundle/neosnippet.vim/.git/objects/d0/844cc48c6649130f84bb7088dafc03f1a6b5f6' Binary files vim/bundle/neosnippet.vim/.git/objects/d0/844cc48c6649130f84bb7088dafc03f1a6b5f6 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/d0/844cc48c6649130f84bb7088dafc03f1a6b5f6 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/d5' === removed file 'vim/bundle/neosnippet.vim/.git/objects/d5/d202d31253b4d29c0a732a597de783f288905c' Binary files vim/bundle/neosnippet.vim/.git/objects/d5/d202d31253b4d29c0a732a597de783f288905c 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/d5/d202d31253b4d29c0a732a597de783f288905c 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/d6' === removed file 'vim/bundle/neosnippet.vim/.git/objects/d6/3107d0dd907f952b1b76ebce969bfd80449dcd' Binary files vim/bundle/neosnippet.vim/.git/objects/d6/3107d0dd907f952b1b76ebce969bfd80449dcd 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/d6/3107d0dd907f952b1b76ebce969bfd80449dcd 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/neosnippet.vim/.git/objects/d7/14ee2f9dc89f523a63b19fab609b233c84ba2c' Binary files vim/bundle/neosnippet.vim/.git/objects/d7/14ee2f9dc89f523a63b19fab609b233c84ba2c 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/d7/14ee2f9dc89f523a63b19fab609b233c84ba2c 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/neosnippet.vim/.git/objects/d7/7927513bc9ea88804ab963e30fc84d90025d57' Binary files vim/bundle/neosnippet.vim/.git/objects/d7/7927513bc9ea88804ab963e30fc84d90025d57 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/d7/7927513bc9ea88804ab963e30fc84d90025d57 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neosnippet.vim/.git/objects/e1' === added file 'vim/bundle/neosnippet.vim/.git/objects/e1/de7986d56ace59e6da65c1ff96414092df14a3' Binary files vim/bundle/neosnippet.vim/.git/objects/e1/de7986d56ace59e6da65c1ff96414092df14a3 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/e1/de7986d56ace59e6da65c1ff96414092df14a3 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/neosnippet.vim/.git/objects/e2/677268615b6fa9e7af0cde3243ad5071880017' Binary files vim/bundle/neosnippet.vim/.git/objects/e2/677268615b6fa9e7af0cde3243ad5071880017 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/e2/677268615b6fa9e7af0cde3243ad5071880017 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/neosnippet.vim/.git/objects/e2/cb28e5e4c86f5f1e458c970db24c845f45e39e' Binary files vim/bundle/neosnippet.vim/.git/objects/e2/cb28e5e4c86f5f1e458c970db24c845f45e39e 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/e2/cb28e5e4c86f5f1e458c970db24c845f45e39e 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/ea' === removed file 'vim/bundle/neosnippet.vim/.git/objects/ea/0d78fcf8d77ea7716ca6fbf8c4392c99bab828' --- vim/bundle/neosnippet.vim/.git/objects/ea/0d78fcf8d77ea7716ca6fbf8c4392c99bab828 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/.git/objects/ea/0d78fcf8d77ea7716ca6fbf8c4392c99bab828 1970-01-01 00:00:00 +0000 @@ -1,1 +0,0 @@ -x =}s<{]`c^4im~ v0iK6dh :("iUfW;zAsȬ*Iғ1VéCw3Us<8O9wmBճXjg \ No newline at end of file === added directory 'vim/bundle/neosnippet.vim/.git/objects/eb' === added file 'vim/bundle/neosnippet.vim/.git/objects/eb/51c6134e463529a229b2f2a5f1cdbab76c2740' Binary files vim/bundle/neosnippet.vim/.git/objects/eb/51c6134e463529a229b2f2a5f1cdbab76c2740 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/eb/51c6134e463529a229b2f2a5f1cdbab76c2740 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neosnippet.vim/.git/objects/ec' === added file 'vim/bundle/neosnippet.vim/.git/objects/ec/4fff602110b85f1b134a817662c0f03c94ee02' Binary files vim/bundle/neosnippet.vim/.git/objects/ec/4fff602110b85f1b134a817662c0f03c94ee02 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/ec/4fff602110b85f1b134a817662c0f03c94ee02 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/neosnippet.vim/.git/objects/ec/e720c6d82df1d7a43ec8d6dff0ce90f261bcbb' Binary files vim/bundle/neosnippet.vim/.git/objects/ec/e720c6d82df1d7a43ec8d6dff0ce90f261bcbb 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/ec/e720c6d82df1d7a43ec8d6dff0ce90f261bcbb 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/ed' === removed file 'vim/bundle/neosnippet.vim/.git/objects/ed/80ed7e1e9f05e4e39126089dea8513de4976a7' Binary files vim/bundle/neosnippet.vim/.git/objects/ed/80ed7e1e9f05e4e39126089dea8513de4976a7 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/ed/80ed7e1e9f05e4e39126089dea8513de4976a7 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neosnippet.vim/.git/objects/ef' === added file 'vim/bundle/neosnippet.vim/.git/objects/ef/a0ff5bc42698d68d2a875f72eb76d727fabd31' Binary files vim/bundle/neosnippet.vim/.git/objects/ef/a0ff5bc42698d68d2a875f72eb76d727fabd31 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/ef/a0ff5bc42698d68d2a875f72eb76d727fabd31 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/neosnippet.vim/.git/objects/f0' === added file 'vim/bundle/neosnippet.vim/.git/objects/f0/3814ecd1804a33fc7658e84b709127c651ecc1' Binary files vim/bundle/neosnippet.vim/.git/objects/f0/3814ecd1804a33fc7658e84b709127c651ecc1 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/f0/3814ecd1804a33fc7658e84b709127c651ecc1 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/neosnippet.vim/.git/objects/f0/4699b48bab2c2a2ff317b7331c57237d82e131' Binary files vim/bundle/neosnippet.vim/.git/objects/f0/4699b48bab2c2a2ff317b7331c57237d82e131 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/f0/4699b48bab2c2a2ff317b7331c57237d82e131 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/f8' === removed file 'vim/bundle/neosnippet.vim/.git/objects/f8/db05898dc34c4143927d5aecb24582f236f2fd' Binary files vim/bundle/neosnippet.vim/.git/objects/f8/db05898dc34c4143927d5aecb24582f236f2fd 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/f8/db05898dc34c4143927d5aecb24582f236f2fd 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/neosnippet.vim/.git/objects/fc' === removed file 'vim/bundle/neosnippet.vim/.git/objects/fc/7c60a9e9b9c5f7dc304844d957a733daa8b5b3' Binary files vim/bundle/neosnippet.vim/.git/objects/fc/7c60a9e9b9c5f7dc304844d957a733daa8b5b3 2016-08-04 08:15:51 +0000 and vim/bundle/neosnippet.vim/.git/objects/fc/7c60a9e9b9c5f7dc304844d957a733daa8b5b3 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/neosnippet.vim/.git/objects/fe' === added file 'vim/bundle/neosnippet.vim/.git/objects/fe/551d3d6efd0bfa9535aa8e9308640ca96d9d10' Binary files vim/bundle/neosnippet.vim/.git/objects/fe/551d3d6efd0bfa9535aa8e9308640ca96d9d10 1970-01-01 00:00:00 +0000 and vim/bundle/neosnippet.vim/.git/objects/fe/551d3d6efd0bfa9535aa8e9308640ca96d9d10 2015-08-25 11:01:00 +0000 differ === modified file 'vim/bundle/neosnippet.vim/.git/packed-refs' --- vim/bundle/neosnippet.vim/.git/packed-refs 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/.git/packed-refs 2015-08-25 11:01:00 +0000 @@ -1,2 +1,2 @@ # pack-refs with: peeled fully-peeled -9492fbb7e9016243af3c1987b91f0bffcf4cc8e7 refs/remotes/origin/master +c76a668f407ad849e2d00f2695aa583b2d65ce7d refs/remotes/origin/master === modified file 'vim/bundle/neosnippet.vim/.git/refs/heads/master' --- vim/bundle/neosnippet.vim/.git/refs/heads/master 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/.git/refs/heads/master 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -9492fbb7e9016243af3c1987b91f0bffcf4cc8e7 +c76a668f407ad849e2d00f2695aa583b2d65ce7d === modified file 'vim/bundle/neosnippet.vim/.git/shallow' --- vim/bundle/neosnippet.vim/.git/shallow 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/.git/shallow 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -9492fbb7e9016243af3c1987b91f0bffcf4cc8e7 +c76a668f407ad849e2d00f2695aa583b2d65ce7d === modified file 'vim/bundle/neosnippet.vim/.travis.yml' --- vim/bundle/neosnippet.vim/.travis.yml 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/.travis.yml 2015-08-25 11:01:00 +0000 @@ -1,5 +1,3 @@ -sudo: false - before_script: - git clone https://github.com/syngan/vim-vimlint /tmp/vim-vimlint - git clone https://github.com/ynkdir/vim-vimlparser /tmp/vim-vimlparser === modified file 'vim/bundle/neosnippet.vim/README.md' --- vim/bundle/neosnippet.vim/README.md 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/README.md 2015-08-25 11:01:00 +0000 @@ -107,12 +107,12 @@ xmap (neosnippet_expand_target) " SuperTab like snippets behavior. -"imap -" \ pumvisible() ? "\" : -" \ neosnippet#expandable_or_jumpable() ? -" \ "\(neosnippet_expand_or_jump)" : "\" +imap neosnippet#expandable_or_jumpable() ? +\ "\(neosnippet_expand_or_jump)" +\: pumvisible() ? "\" : "\" smap neosnippet#expandable_or_jumpable() ? -\ "\(neosnippet_expand_or_jump)" : "\" +\ "\(neosnippet_expand_or_jump)" +\: "\" " For conceal markers. if has('conceal') === modified file 'vim/bundle/neosnippet.vim/autoload/neocomplcache/sources/snippets_complete.vim' --- vim/bundle/neosnippet.vim/autoload/neocomplcache/sources/snippets_complete.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/autoload/neocomplcache/sources/snippets_complete.vim 2015-08-25 11:01:00 +0000 @@ -33,7 +33,7 @@ \ g:neocomplcache_auto_completion_start_length, \} -function! s:source.initialize() abort "{{{ +function! s:source.initialize() "{{{ " Initialize. call neocomplcache#set_dictionary_helper( \ g:neocomplcache_source_rank, 'snippets_complete', 8) @@ -41,7 +41,7 @@ \ g:neocomplcache_auto_completion_start_length) endfunction"}}} -function! s:source.get_keyword_pos(cur_text) abort "{{{ +function! s:source.get_keyword_pos(cur_text) "{{{ let cur_word = matchstr(a:cur_text, '\w\+$') let word_candidates = neocomplcache#keyword_filter( \ filter(values(neosnippet#helpers#get_snippets()), @@ -53,7 +53,7 @@ return match(a:cur_text, '\S\+$') endfunction"}}} -function! s:source.get_complete_words(cur_keyword_pos, cur_keyword_str) abort "{{{ +function! s:source.get_complete_words(cur_keyword_pos, cur_keyword_str) "{{{ let list = s:keyword_filter(neosnippet#helpers#get_snippets(), a:cur_keyword_str) for snippet in list @@ -66,7 +66,7 @@ return list endfunction"}}} -function! s:keyword_filter(snippets, cur_keyword_str) abort "{{{ +function! s:keyword_filter(snippets, cur_keyword_str) "{{{ " Uniq by real_name. let dict = {} @@ -89,7 +89,7 @@ return values(dict) endfunction"}}} -function! neocomplcache#sources#snippets_complete#define() abort "{{{ +function! neocomplcache#sources#snippets_complete#define() "{{{ return s:source endfunction"}}} === modified file 'vim/bundle/neosnippet.vim/autoload/neocomplete/sources/neosnippet.vim' --- vim/bundle/neosnippet.vim/autoload/neocomplete/sources/neosnippet.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/autoload/neocomplete/sources/neosnippet.vim 2015-08-25 11:01:00 +0000 @@ -29,7 +29,6 @@ let s:source = { \ 'name' : 'neosnippet', \ 'kind' : 'keyword', - \ 'mark' : '[nsnip]', \ 'rank' : 8, \ 'hooks' : {}, \ 'matchers' : @@ -37,7 +36,7 @@ \ ['matcher_fuzzy'] : ['matcher_head']), \} -function! s:source.gather_candidates(context) abort "{{{ +function! s:source.gather_candidates(context) "{{{ let snippets = values(neosnippet#helpers#get_completion_snippets()) if matchstr(a:context.input, '\S\+$') !=# \ matchstr(a:context.input, '\w\+$') @@ -47,7 +46,7 @@ return snippets endfunction"}}} -function! s:source.hooks.on_post_filter(context) abort "{{{ +function! s:source.hooks.on_post_filter(context) "{{{ for snippet in a:context.candidates let snippet.dup = 1 let snippet.menu = neosnippet#util#strwidthpart( @@ -57,7 +56,7 @@ return a:context.candidates endfunction"}}} -function! neocomplete#sources#neosnippet#define() abort "{{{ +function! neocomplete#sources#neosnippet#define() "{{{ return s:source endfunction"}}} === modified file 'vim/bundle/neosnippet.vim/autoload/neosnippet.vim' --- vim/bundle/neosnippet.vim/autoload/neosnippet.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/autoload/neosnippet.vim 2015-08-25 11:01:00 +0000 @@ -41,73 +41,51 @@ \ 'g:neosnippet#expand_word_boundary', 0) call neosnippet#util#set_default( \ 'g:neosnippet#enable_conceal_markers', 1) -call neosnippet#util#set_default( - \ 'g:neosnippet#enable_completed_snippet', 0, - \ 'g:neosnippet#enable_complete_done') -call neosnippet#util#set_default( - \ 'g:neosnippet#enable_auto_clear_markers', 1) -call neosnippet#util#set_default( - \ 'g:neosnippet#completed_pairs', {}) -call neosnippet#util#set_default( - \ 'g:neosnippet#_completed_pairs', - \ {'_':{ '(' : ')', '{' : '}', '"' : '"', '[' : ']' }}) "}}} -function! neosnippet#expandable_or_jumpable() abort "{{{ +function! neosnippet#expandable_or_jumpable() "{{{ return neosnippet#mappings#expandable_or_jumpable() endfunction"}}} -function! neosnippet#expandable() abort "{{{ +function! neosnippet#expandable() "{{{ return neosnippet#mappings#expandable() endfunction"}}} -function! neosnippet#jumpable() abort "{{{ +function! neosnippet#jumpable() "{{{ return neosnippet#mappings#jumpable() endfunction"}}} -function! neosnippet#anonymous(snippet) abort "{{{ - return neosnippet#mappings#_anonymous(a:snippet) -endfunction"}}} -function! neosnippet#expand(trigger) abort "{{{ - return neosnippet#mappings#_expand(a:trigger) -endfunction"}}} -function! neosnippet#get_snippets_directory() abort "{{{ +function! neosnippet#get_snippets_directory() "{{{ return neosnippet#helpers#get_snippets_directory() endfunction"}}} -function! neosnippet#get_user_snippets_directory() abort "{{{ +function! neosnippet#get_user_snippets_directory() "{{{ return copy(neosnippet#variables#snippets_dir()) endfunction"}}} -function! neosnippet#get_runtime_snippets_directory() abort "{{{ +function! neosnippet#get_runtime_snippets_directory() "{{{ return copy(neosnippet#variables#runtime_dir()) endfunction"}}} " Get marker patterns. -function! neosnippet#get_placeholder_target_marker_pattern() abort "{{{ - return '\${\d\+:\(#:\)\?TARGET\%(:.\{-}\)\?\\\@' endfunction"}}} -function! neosnippet#get_placeholder_marker_substitute_pattern() abort "{{{ +function! neosnippet#get_placeholder_marker_substitute_pattern() "{{{ return '\${\(\d\+\%(:.\{-}\)\?\\\@' endfunction"}}} -function! neosnippet#get_sync_placeholder_marker_pattern() abort "{{{ +function! neosnippet#get_sync_placeholder_marker_pattern() "{{{ return '<{\d\+\%(:.\{-}\)\?\\\@' endfunction"}}} -function! neosnippet#get_sync_placeholder_marker_default_pattern() abort "{{{ +function! neosnippet#get_sync_placeholder_marker_default_pattern() "{{{ return '<{\d\+:\zs.\{-}\ze\\\@' endfunction"}}} -function! neosnippet#get_mirror_placeholder_marker_pattern() abort "{{{ +function! neosnippet#get_mirror_placeholder_marker_pattern() "{{{ return '<|\d\+|>' endfunction"}}} -function! neosnippet#get_mirror_placeholder_marker_substitute_pattern() abort "{{{ +function! neosnippet#get_mirror_placeholder_marker_substitute_pattern() "{{{ return '\$\(\d\+\)' endfunction"}}} === modified file 'vim/bundle/neosnippet.vim/autoload/neosnippet/commands.vim' --- vim/bundle/neosnippet.vim/autoload/neosnippet/commands.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/autoload/neosnippet/commands.vim 2015-08-25 11:01:00 +0000 @@ -31,17 +31,16 @@ \ '-runtime', \ '-vertical', '-horizontal', '-direction=', '-split', \] -let s:Cache = neosnippet#util#get_vital().import('System.Cache.Deprecated') "}}} -function! s:get_list() abort "{{{ +function! s:get_list() "{{{ if !exists('s:List') let s:List = vital#of('neosnippet').import('Data.List') endif return s:List endfunction"}}} -function! neosnippet#commands#_edit(args) abort "{{{ +function! neosnippet#commands#_edit(args) "{{{ if neosnippet#util#is_sudo() call neosnippet#util#print_error( \ '"sudo vim" is detected. This feature is disabled.') @@ -68,10 +67,6 @@ return endif - if !isdirectory(snippet_dir) && !neosnippet#util#is_sudo() - call mkdir(snippet_dir, 'p') - endif - " Edit snippet file. let filename = snippet_dir .'/'.filetype @@ -96,7 +91,7 @@ endtry endfunction"}}} -function! neosnippet#commands#_make_cache(filetype) abort "{{{ +function! neosnippet#commands#_make_cache(filetype) "{{{ call neosnippet#init#check() let filetype = a:filetype == '' ? @@ -109,57 +104,89 @@ if has_key(snippets, filetype) return endif - let snippets[filetype] = {} let path = join(neosnippet#helpers#get_snippets_directory(), ',') - let cache_dir = neosnippet#variables#data_dir() + let snippets_files = [] + for glob in s:get_list().flatten( + \ map(split(get(g:neosnippet#scope_aliases, + \ filetype, filetype), '\s*,\s*'), " + \ [v:val . '.snip*', v:val . '/**/*.snip*'] + \ + (filetype != '_' && + \ !has_key(g:neosnippet#scope_aliases, filetype) ? + \ [v:val . '_*.snip*'] : [])")) + let snippets_files += split(globpath(path, glob), '\n') + endfor - for filename in s:get_snippets_files(path, filetype) - " Clear cache file - call s:Cache.deletefile(cache_dir, filename) + let snippets = neosnippet#variables#snippets() + for snippet_file in reverse(s:get_list().uniq(snippets_files)) let snippets[filetype] = extend(snippets[filetype], - \ neosnippet#parser#_parse_snippets(filename)) + \ neosnippet#parser#_parse(snippet_file)) endfor - - if g:neosnippet#enable_snipmate_compatibility - " Load file snippets - for filename in s:get_snippet_files(path, filetype) - let trigger = fnamemodify(filename, ':t:r') - let snippets[filetype][trigger] = - \ neosnippet#parser#_parse_snippet(filename, trigger) - endfor - endif endfunction"}}} -function! neosnippet#commands#_source(filename) abort "{{{ +function! neosnippet#commands#_source(filename) "{{{ call neosnippet#init#check() let neosnippet = neosnippet#variables#current_neosnippet() let neosnippet.snippets = extend(neosnippet.snippets, - \ neosnippet#parser#_parse_snippets(a:filename)) + \ neosnippet#parser#_parse(a:filename)) endfunction"}}} -function! neosnippet#commands#_clear_markers() abort "{{{ +function! neosnippet#commands#_clear_markers() "{{{ let expand_stack = neosnippet#variables#expand_stack() " Get patterns and count. - if !&l:modifiable || !&l:modified + if !&l:modifiable \ || empty(expand_stack) \ || neosnippet#variables#current_neosnippet().trigger return endif - call neosnippet#view#_clear_markers(expand_stack[-1]) + let expand_info = expand_stack[-1] + + " Search patterns. + let [begin, end] = neosnippet#view#_get_snippet_range( + \ expand_info.begin_line, + \ expand_info.begin_patterns, + \ expand_info.end_line, + \ expand_info.end_patterns) + + let pos = getpos('.') + + " Found snippet. + let found = 0 + try + while neosnippet#view#_search_snippet_range( + \ begin, end, expand_info.holder_cnt, 0) + + " Next count. + let expand_info.holder_cnt += 1 + let found = 1 + endwhile + + " Search placeholder 0. + if neosnippet#view#_search_snippet_range(begin, end, 0) + let found = 1 + endif + finally + if found + stopinsert + endif + + call setpos('.', pos) + + call neosnippet#variables#clear_expand_stack() + endtry endfunction"}}} " Complete helpers. -function! neosnippet#commands#_edit_complete(arglead, cmdline, cursorpos) abort "{{{ +function! neosnippet#commands#_edit_complete(arglead, cmdline, cursorpos) "{{{ return filter(s:edit_options + \ neosnippet#commands#_filetype_complete(a:arglead, a:cmdline, a:cursorpos), \ 'stridx(v:val, a:arglead) == 0') endfunction"}}} -function! neosnippet#commands#_filetype_complete(arglead, cmdline, cursorpos) abort "{{{ +function! neosnippet#commands#_filetype_complete(arglead, cmdline, cursorpos) "{{{ " Dup check. let ret = {} for item in map( @@ -174,13 +201,13 @@ return sort(keys(ret)) endfunction"}}} -function! neosnippet#commands#_complete_target_snippets(arglead, cmdline, cursorpos) abort "{{{ +function! neosnippet#commands#_complete_target_snippets(arglead, cmdline, cursorpos) "{{{ return map(filter(values(neosnippet#helpers#get_snippets()), \ "stridx(v:val.word, a:arglead) == 0 \ && v:val.snip =~# neosnippet#get_placeholder_target_marker_pattern()"), 'v:val.word') endfunction"}}} -function! s:initialize_options(options) abort "{{{ +function! s:initialize_options(options) "{{{ let default_options = { \ 'runtime' : 0, \ 'vertical' : 0, @@ -199,31 +226,6 @@ return options endfunction"}}} -function! s:get_snippets_files(path, filetype) abort "{{{ - let snippets_files = [] - for glob in s:get_list().flatten( - \ map(split(get(g:neosnippet#scope_aliases, - \ a:filetype, a:filetype), '\s*,\s*'), " - \ [v:val.'.snip', v:val.'.snippets', - \ v:val.'/**/*.snip', v:val.'/**/*.snippets'] - \ + (a:filetype != '_' && - \ !has_key(g:neosnippet#scope_aliases, a:filetype) ? - \ [v:val . '_*.snip', v:val . '_*.snippets'] : [])")) - let snippets_files += split(globpath(a:path, glob), '\n') - endfor - return reverse(s:get_list().uniq(snippets_files)) -endfunction"}}} -function! s:get_snippet_files(path, filetype) abort "{{{ - let snippet_files = [] - for glob in s:get_list().flatten( - \ map(split(get(g:neosnippet#scope_aliases, - \ a:filetype, a:filetype), '\s*,\s*'), " - \ [v:val.'/*.snippet']")) - let snippet_files += split(globpath(a:path, glob), '\n') - endfor - return reverse(s:get_list().uniq(snippet_files)) -endfunction"}}} - let &cpo = s:save_cpo unlet s:save_cpo === modified file 'vim/bundle/neosnippet.vim/autoload/neosnippet/handlers.vim' --- vim/bundle/neosnippet.vim/autoload/neosnippet/handlers.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/autoload/neosnippet/handlers.vim 2015-08-25 11:01:00 +0000 @@ -26,69 +26,60 @@ let s:save_cpo = &cpo set cpo&vim -function! neosnippet#handlers#_complete_done() abort "{{{ +function! neosnippet#handlers#_complete_done() "{{{ if empty(v:completed_item) - \ || !g:neosnippet#enable_completed_snippet - \ || s:is_auto_pairs() - return - endif - - let snippet = neosnippet#parser#_get_completed_snippet( - \ v:completed_item, neosnippet#util#get_next_text()) - if snippet == '' - return - endif - - let [cur_text, col, _] = neosnippet#mappings#_pre_trigger() - call neosnippet#view#_insert(snippet, {}, cur_text, col) -endfunction"}}} - -function! neosnippet#handlers#_cursor_moved() abort "{{{ - let expand_stack = neosnippet#variables#expand_stack() - - " Get patterns and count. - if !&l:modifiable || !&l:modified - \ || empty(expand_stack) - return - endif - - let expand_info = expand_stack[-1] - if expand_info.begin_line == expand_info.end_line - \ && line('.') != expand_info.begin_line - call neosnippet#view#_clear_markers(expand_info) - endif -endfunction"}}} - -function! neosnippet#handlers#_all_clear_markers() abort "{{{ - if !&l:modifiable - return - endif - - let pos = getpos('.') - - try - while !empty(neosnippet#variables#expand_stack()) - call neosnippet#view#_clear_markers( - \ neosnippet#variables#expand_stack()[-1]) - stopinsert - endwhile - finally - call setpos('.', pos) - endtry -endfunction"}}} - -function! neosnippet#handlers#_restore_unnamed_register() abort "{{{ + return + endif + + if has_key(neosnippet#helpers#get_snippets(), v:completed_item.word) + " Don't overwrite exists snippets + return + endif + + let item = v:completed_item + + let abbr = (item.abbr != '') ? item.abbr : item.word + if len(item.menu) > 5 + " Combine menu. + let abbr .= ' ' . item.menu + endif + + if item.info != '' + let abbr = split(item.info, '\n')[0] + endif + + if abbr !~ '(.*)' + return + endif + + " Make snippet arguments + let cnt = 1 + let snippet = item.word + if snippet !~ '()\?$' + let snippet .= '(' + endif + for arg in split(matchstr(abbr, '(\zs.\{-}\ze)'), '[^[]\zs\s*,\s*') + if cnt != 1 + let snippet .= ', ' + endif + let snippet .= printf('${%d:#:%s}', cnt, escape(arg, '{}')) + let cnt += 1 + endfor + if snippet !~ ')$' + let snippet .= ')' + endif + let snippet .= '${0}' + + let options = neosnippet#parser#_initialize_snippet_options() + let options.word = 1 + let options.oneshot = 1 + let neosnippet = neosnippet#variables#current_neosnippet() - - if neosnippet.unnamed_register != '' - \ && @" !=# neosnippet.unnamed_register - let @" = neosnippet.unnamed_register - let neosnippet.unnamed_register = '' - endif -endfunction"}}} - -function! s:is_auto_pairs() abort "{{{ - return get(g:, 'neopairs#enable', 0) + let trigger = item.word + let neosnippet.snippets[trigger] = + \ neosnippet#parser#_initialize_snippet( + \ { 'name' : trigger, 'word' : snippet, 'options' : options }, + \ '', 0, '', trigger) endfunction"}}} let &cpo = s:save_cpo === modified file 'vim/bundle/neosnippet.vim/autoload/neosnippet/helpers.vim' --- vim/bundle/neosnippet.vim/autoload/neosnippet/helpers.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/autoload/neosnippet/helpers.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! neosnippet#helpers#get_cursor_snippet(snippets, cur_text) abort "{{{ +function! neosnippet#helpers#get_cursor_snippet(snippets, cur_text) "{{{ let cur_word = matchstr(a:cur_text, '\S\+$') if cur_word != '' && has_key(a:snippets, cur_word) return cur_word @@ -44,21 +44,20 @@ return cur_word endfunction"}}} -function! neosnippet#helpers#get_snippets(...) abort "{{{ - let mode = get(a:000, 0, mode()) - +function! neosnippet#helpers#get_snippets() "{{{ call neosnippet#init#check() let neosnippet = neosnippet#variables#current_neosnippet() let snippets = copy(neosnippet.snippets) for filetype in s:get_sources_filetypes(neosnippet#helpers#get_filetype()) call neosnippet#commands#_make_cache(filetype) - call extend(snippets, neosnippet#variables#snippets()[filetype]) + call extend(snippets, + \ neosnippet#variables#snippets()[filetype], 'keep') endfor let cur_text = neosnippet#util#get_cur_text() - if mode ==# 'i' || mode ==# 's' + if mode() ==# 'i' " Special filters. if !s:is_beginning_of_line(cur_text) call filter(snippets, '!v:val.options.head') @@ -67,19 +66,14 @@ call filter(snippets, "cur_text =~# get(v:val, 'regexp', '')") - if exists('b:neosnippet_disable_snippet_triggers') - call filter(snippets, - \ "index(b:neosnippet_disable_snippet_triggers, v:val.word) < 0") - endif - return snippets endfunction"}}} -function! neosnippet#helpers#get_completion_snippets() abort "{{{ +function! neosnippet#helpers#get_completion_snippets() "{{{ return filter(neosnippet#helpers#get_snippets(), \ "!get(v:val.options, 'oneshot', 0)") endfunction"}}} -function! neosnippet#helpers#get_snippets_directory() abort "{{{ +function! neosnippet#helpers#get_snippets_directory() "{{{ let snippets_dir = copy(neosnippet#variables#snippets_dir()) if !get(g:neosnippet#disable_runtime_snippets, \ neosnippet#helpers#get_filetype(), @@ -90,7 +84,7 @@ return snippets_dir endfunction"}}} -function! neosnippet#helpers#get_filetype() abort "{{{ +function! neosnippet#helpers#get_filetype() "{{{ if !exists('s:exists_context_filetype') " context_filetype.vim installation check. try @@ -111,7 +105,7 @@ return context_filetype endfunction"}}} -function! neosnippet#helpers#get_selected_text(type, ...) abort "{{{ +function! neosnippet#helpers#get_selected_text(type, ...) "{{{ let sel_save = &selection let &selection = 'inclusive' let reg_save = @@ @@ -136,7 +130,7 @@ call setpos('.', pos) endtry endfunction"}}} -function! neosnippet#helpers#delete_selected_text(type, ...) abort "{{{ +function! neosnippet#helpers#delete_selected_text(type, ...) "{{{ let sel_save = &selection let &selection = 'inclusive' let reg_save = @@ @@ -159,7 +153,7 @@ call setpos('.', pos) endtry endfunction"}}} -function! neosnippet#helpers#substitute_selected_text(type, text) abort "{{{ +function! neosnippet#helpers#substitute_selected_text(type, text) "{{{ let sel_save = &selection let &selection = 'inclusive' let reg_save = @@ @@ -183,14 +177,7 @@ endtry endfunction"}}} -function! neosnippet#helpers#vim2json(expr) abort "{{{ - return has('patch-7.4.1498') ? js_encode(a:expr) : string(a:expr) -endfunction "}}} -function! neosnippet#helpers#json2vim(expr) abort "{{{ - sandbox return has('patch-7.4.1498') ? js_decode(a:expr) : eval(a:expr) -endfunction "}}} - -function! s:is_beginning_of_line(cur_text) abort "{{{ +function! s:is_beginning_of_line(cur_text) "{{{ let keyword_pattern = '\S\+' let cur_keyword_str = matchstr(a:cur_text, keyword_pattern.'$') let line_part = a:cur_text[: -1-len(cur_keyword_str)] @@ -199,12 +186,14 @@ return prev_word_end <= 0 endfunction"}}} -function! s:get_sources_filetypes(filetype) abort "{{{ +function! s:get_sources_filetypes(filetype) "{{{ let filetypes = - \ exists('*context_filetype#get_filetypes') ? - \ context_filetype#get_filetypes(a:filetype) : + \ exists('*neocomplete#get_source_filetypes') ? + \ neocomplete#get_source_filetypes(a:filetype) : + \ exists('*neocomplcache#get_source_filetypes') ? + \ neocomplcache#get_source_filetypes(a:filetype) : \ split(((a:filetype == '') ? 'nothing' : a:filetype), '\.') - return ['_'] + filetypes + return filetypes + ['_'] endfunction"}}} let &cpo = s:save_cpo === modified file 'vim/bundle/neosnippet.vim/autoload/neosnippet/init.vim' --- vim/bundle/neosnippet.vim/autoload/neosnippet/init.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/autoload/neosnippet/init.vim 2015-08-25 11:01:00 +0000 @@ -26,56 +26,76 @@ let s:save_cpo = &cpo set cpo&vim -function! neosnippet#init#_initialize() abort "{{{ +function! neosnippet#init#_initialize() "{{{ let s:is_initialized = 1 + call s:initialize_script_variables() call s:initialize_others() call s:initialize_cache() endfunction"}}} -function! neosnippet#init#check() abort "{{{ +function! neosnippet#init#check() "{{{ if !exists('s:is_initialized') call neosnippet#init#_initialize() endif endfunction"}}} -function! s:initialize_cache() abort "{{{ +function! s:initialize_script_variables() "{{{ + " Set runtime dir. + let runtime_dir = neosnippet#variables#runtime_dir() + let runtime_dir += split(globpath(&runtimepath, 'neosnippets'), '\n') + if empty(runtime_dir) && empty(g:neosnippet#disable_runtime_snippets) + call neosnippet#util#print_error( + \ 'neosnippet default snippets cannot be loaded.') + call neosnippet#util#print_error( + \ 'You must install neosnippet-snippets or disable runtime snippets.') + endif + if g:neosnippet#enable_snipmate_compatibility + " Load snipMate snippet directories. + let runtime_dir += split(globpath(&runtimepath, + \ 'snippets'), '\n') + if exists('g:snippets_dir') + let runtime_dir += neosnippet#util#option2list(g:snippets_dir) + endif + endif + call map(runtime_dir, 'substitute(v:val, "[\\\\/]$", "", "")') + + " Set snippets_dir. + let snippets_dir = neosnippet#variables#snippets_dir() + for dir in neosnippet#util#option2list(g:neosnippet#snippets_directory) + let dir = neosnippet#util#expand(dir) + if !isdirectory(dir) && !neosnippet#util#is_sudo() + call mkdir(dir, 'p') + endif + call add(snippets_dir, dir) + endfor + call map(snippets_dir, 'substitute(v:val, "[\\\\/]$", "", "")') +endfunction"}}} +function! s:initialize_cache() "{{{ " Make cache for _ snippets. call neosnippet#commands#_make_cache('_') " Initialize check. call neosnippet#commands#_make_cache(&filetype) endfunction"}}} -function! s:initialize_others() abort "{{{ +function! s:initialize_others() "{{{ augroup neosnippet "{{{ autocmd! " Set make cache event. - autocmd FileType * - \ call neosnippet#commands#_make_cache(&filetype) + autocmd FileType * call neosnippet#commands#_make_cache(&filetype) " Re make cache events autocmd BufWritePost *.snip,*.snippets \ call neosnippet#variables#set_snippets({}) autocmd BufEnter * \ call neosnippet#mappings#_clear_select_mode_mappings() + autocmd BufWritePre * NeoSnippetClearMarkers augroup END"}}} - if g:neosnippet#enable_auto_clear_markers - autocmd neosnippet CursorMoved,CursorMovedI * - \ call neosnippet#handlers#_cursor_moved() - autocmd neosnippet BufWritePre * - \ call neosnippet#handlers#_all_clear_markers() - endif - if exists('v:completed_item') autocmd neosnippet CompleteDone * \ call neosnippet#handlers#_complete_done() endif - if exists('##TextChanged') && exists('##TextChangedI') - autocmd neosnippet TextChanged,TextChangedI * - \ call neosnippet#handlers#_restore_unnamed_register() - endif - augroup neosnippet autocmd BufNewFile,BufRead,Syntax * \ execute 'syntax match neosnippetExpandSnippets' @@ -101,7 +121,7 @@ if g:neosnippet#enable_snipmate_compatibility "{{{ " For snipMate function. - function! Filename(...) abort + function! Filename(...) let filename = expand('%:t:r') if filename == '' return a:0 == 2 ? a:2 : '' === modified file 'vim/bundle/neosnippet.vim/autoload/neosnippet/mappings.vim' --- vim/bundle/neosnippet.vim/autoload/neosnippet/mappings.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/autoload/neosnippet/mappings.vim 2015-08-25 11:01:00 +0000 @@ -26,22 +26,21 @@ let s:save_cpo = &cpo set cpo&vim -function! neosnippet#mappings#expandable_or_jumpable() abort "{{{ +function! neosnippet#mappings#expandable_or_jumpable() "{{{ return neosnippet#mappings#expandable() || neosnippet#mappings#jumpable() endfunction"}}} -function! neosnippet#mappings#expandable() abort "{{{ +function! neosnippet#mappings#expandable() "{{{ " Check snippet trigger. return neosnippet#helpers#get_cursor_snippet( - \ neosnippet#helpers#get_snippets('i'), - \ neosnippet#util#get_cur_text()) != '' + \ neosnippet#helpers#get_snippets(), neosnippet#util#get_cur_text()) != '' endfunction"}}} -function! neosnippet#mappings#jumpable() abort "{{{ +function! neosnippet#mappings#jumpable() "{{{ " Found snippet placeholder. return search(neosnippet#get_placeholder_marker_pattern(). '\|' \ .neosnippet#get_sync_placeholder_marker_pattern(), 'nw') > 0 endfunction"}}} -function! neosnippet#mappings#_clear_select_mode_mappings() abort "{{{ +function! neosnippet#mappings#_clear_select_mode_mappings() "{{{ if !g:neosnippet#disable_select_mode_mappings return endif @@ -64,7 +63,7 @@ snoremap a endfunction"}}} -function! neosnippet#mappings#_register_oneshot_snippet() abort "{{{ +function! neosnippet#mappings#_register_oneshot_snippet() "{{{ let trigger = input('Please input snippet trigger: ', 'oneshot') if trigger == '' return @@ -92,12 +91,12 @@ echo 'Registered trigger : ' . trigger endfunction"}}} -function! neosnippet#mappings#_expand_target() abort "{{{ +function! neosnippet#mappings#_expand_target() "{{{ let trigger = input('Please input snippet trigger: ', \ '', 'customlist,neosnippet#commands#_complete_target_snippets') let neosnippet = neosnippet#variables#current_neosnippet() - if !has_key(neosnippet#helpers#get_snippets('i'), trigger) || - \ neosnippet#helpers#get_snippets('i')[trigger].snip !~# + if !has_key(neosnippet#helpers#get_snippets(), trigger) || + \ neosnippet#helpers#get_snippets()[trigger].snip !~# \ neosnippet#get_placeholder_target_marker_pattern() if trigger != '' echo 'The trigger is invalid.' @@ -109,7 +108,7 @@ call neosnippet#mappings#_expand_target_trigger(trigger) endfunction"}}} -function! neosnippet#mappings#_expand_target_trigger(trigger) abort "{{{ +function! neosnippet#mappings#_expand_target_trigger(trigger) "{{{ let neosnippet = neosnippet#variables#current_neosnippet() let neosnippet.target = substitute( \ neosnippet#helpers#get_selected_text(visualmode(), 1), '\n$', '', '') @@ -136,75 +135,46 @@ endif endfunction"}}} -function! neosnippet#mappings#_anonymous(snippet) abort "{{{ - let [cur_text, col, expr] = neosnippet#mappings#_pre_trigger() - let expr .= printf("\:call neosnippet#view#_insert(%s, {}, %s, %d)\", - \ string(a:snippet), string(cur_text), col) - - return expr -endfunction"}}} -function! neosnippet#mappings#_expand(trigger) abort "{{{ - let [cur_text, col, expr] = neosnippet#mappings#_pre_trigger() - - let expr .= printf("\:call neosnippet#view#_expand(%s, %d, %s)\", - \ string(cur_text), col, string(a:trigger)) - - return expr -endfunction"}}} - -function! s:snippets_expand(cur_text, col) abort "{{{ +function! s:snippets_expand(cur_text, col) "{{{ let cur_word = neosnippet#helpers#get_cursor_snippet( - \ neosnippet#helpers#get_snippets('i'), + \ neosnippet#helpers#get_snippets(), \ a:cur_text) call neosnippet#view#_expand( - \ neosnippet#util#get_cur_text(), a:col, cur_word) + \ a:cur_text, a:col, cur_word) endfunction"}}} -function! s:snippets_expand_or_jump(cur_text, col) abort "{{{ +function! s:snippets_expand_or_jump(cur_text, col) "{{{ let cur_word = neosnippet#helpers#get_cursor_snippet( - \ neosnippet#helpers#get_snippets('i'), a:cur_text) + \ neosnippet#helpers#get_snippets(), a:cur_text) if cur_word != '' " Found snippet trigger. call neosnippet#view#_expand( - \ neosnippet#util#get_cur_text(), a:col, cur_word) + \ a:cur_text, a:col, cur_word) else - call neosnippet#view#_jump('', a:col) + call neosnippet#view#_jump(a:cur_text, a:col) endif endfunction"}}} -function! s:snippets_jump_or_expand(cur_text, col) abort "{{{ +function! s:snippets_jump_or_expand(cur_text, col) "{{{ let cur_word = neosnippet#helpers#get_cursor_snippet( - \ neosnippet#helpers#get_snippets('i'), a:cur_text) + \ neosnippet#helpers#get_snippets(), a:cur_text) if search(neosnippet#get_placeholder_marker_pattern(). '\|' \ .neosnippet#get_sync_placeholder_marker_pattern(), 'nw') > 0 " Found snippet placeholder. - call neosnippet#view#_jump('', a:col) + call neosnippet#view#_jump(a:cur_text, a:col) else call neosnippet#view#_expand( - \ neosnippet#util#get_cur_text(), a:col, cur_word) + \ a:cur_text, a:col, cur_word) endif endfunction"}}} -function! s:SID_PREFIX() abort "{{{ +function! s:SID_PREFIX() "{{{ return matchstr(expand(''), '\d\+_\ze\w\+$') endfunction"}}} -function! neosnippet#mappings#_trigger(function) abort "{{{ - let [cur_text, col, expr] = neosnippet#mappings#_pre_trigger() - - if !neosnippet#mappings#expandable_or_jumpable() - return '' - endif - - let expr .= printf("\:call %s(%s,%d)\", - \ a:function, string(cur_text), col) - - return expr -endfunction"}}} - -function! neosnippet#mappings#_pre_trigger() abort "{{{ +function! s:trigger(function) "{{{ call neosnippet#init#check() let cur_text = neosnippet#util#get_cur_text() @@ -223,27 +193,24 @@ let expr .= "\\"_d" endif - return [cur_text, col, expr] + let expr .= printf("\:call %s(%s,%d)\", + \ a:function, string(cur_text), col) + + return expr endfunction"}}} " Plugin key-mappings. -function! neosnippet#mappings#expand_or_jump_impl() abort - return mode() ==# 's' ? - \ neosnippet#mappings#_trigger('neosnippet#view#_jump') : - \ neosnippet#mappings#_trigger( - \ s:SID_PREFIX().'snippets_expand_or_jump') -endfunction -function! neosnippet#mappings#jump_or_expand_impl() abort - return mode() ==# 's' ? - \ neosnippet#mappings#_trigger('neosnippet#view#_jump') : - \ neosnippet#mappings#_trigger( - \ s:SID_PREFIX().'snippets_jump_or_expand') -endfunction -function! neosnippet#mappings#expand_impl() abort - return neosnippet#mappings#_trigger(s:SID_PREFIX().'snippets_expand') -endfunction -function! neosnippet#mappings#jump_impl() abort - return neosnippet#mappings#_trigger('neosnippet#view#_jump') +function! neosnippet#mappings#expand_or_jump_impl() + return s:trigger(s:SID_PREFIX().'snippets_expand_or_jump') +endfunction +function! neosnippet#mappings#jump_or_expand_impl() + return s:trigger(s:SID_PREFIX().'snippets_jump_or_expand') +endfunction +function! neosnippet#mappings#expand_impl() + return s:trigger(s:SID_PREFIX().'snippets_expand') +endfunction +function! neosnippet#mappings#jump_impl() + return s:trigger('neosnippet#view#_jump') endfunction let &cpo = s:save_cpo === modified file 'vim/bundle/neosnippet.vim/autoload/neosnippet/parser.vim' --- vim/bundle/neosnippet.vim/autoload/neosnippet/parser.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/autoload/neosnippet/parser.vim 2015-08-25 11:01:00 +0000 @@ -26,60 +26,35 @@ let s:save_cpo = &cpo set cpo&vim -let s:Cache = neosnippet#util#get_vital().import('System.Cache.Deprecated') +let s:Cache = neosnippet#util#get_vital().import('System.Cache') -function! neosnippet#parser#_parse_snippets(filename) abort "{{{ - if !filereadable(a:filename) +function! neosnippet#parser#_parse(snippet_file) "{{{ + if !filereadable(a:snippet_file) call neosnippet#util#print_error( - \ printf('snippet file "%s" is not found.', a:filename)) + \ printf('snippet file "%s" is not found.', a:snippet_file)) return {} endif let cache_dir = neosnippet#variables#data_dir() - let snippets = {} - if !s:Cache.check_old_cache(cache_dir, a:filename) - try - let snippets = neosnippet#helpers#json2vim( - \ s:Cache.readfile(cache_dir, a:filename)[0]) - catch - endtry - endif - if empty(snippets) || s:Cache.check_old_cache(cache_dir, a:filename) - let [snippets, sourced] = s:parse(a:filename) - if len(snippets) > 5 && !neosnippet#util#is_sudo() && !sourced - call s:Cache.writefile( - \ cache_dir, a:filename, - \ [neosnippet#helpers#vim2json(snippets)]) + if s:Cache.check_old_cache(cache_dir, a:snippet_file) + let snippets = s:parse(a:snippet_file) + if len(snippets) > 5 && !neosnippet#util#is_sudo() + call s:Cache.writefile(cache_dir, a:snippet_file, [string(snippets)]) endif + else + sandbox let snippets = eval(s:Cache.readfile(cache_dir, a:snippet_file)[0]) endif return snippets endfunction"}}} -function! neosnippet#parser#_parse_snippet(filename, trigger) abort "{{{ - if !filereadable(a:filename) - call neosnippet#util#print_error( - \ printf('snippet file "%s" is not found.', a:filename)) - return {} - endif - - let snippet_dict = { - \ 'word' : join(readfile(a:filename), "\n\t"), - \ 'name' : a:trigger, - \ 'options' : neosnippet#parser#_initialize_snippet_options() - \ } - - return neosnippet#parser#_initialize_snippet( - \ snippet_dict, a:filename, 1, '', a:trigger) -endfunction"}}} - -function! s:parse(snippets_file) abort "{{{ + +function! s:parse(snippet_file) "{{{ let dup_check = {} let snippet_dict = {} let linenr = 1 let snippets = {} - let sourced = 0 - for line in readfile(a:snippets_file) + for line in readfile(a:snippet_file) if line =~ '^\h\w*.*\s$' " Delete spaces. let line = substitute(line, '\s\+$', '', '') @@ -88,20 +63,14 @@ if line =~ '^#' " Ignore. elseif line =~ '^include' - " Include snippets file. - for file in split(globpath(join( + " Include snippets. + let filename = matchstr(line, '^include\s\+\zs.*$') + + for snippet_file in split(globpath(join( \ neosnippet#helpers#get_snippets_directory(), ','), - \ matchstr(line, '^include\s\+\zs.*$')), '\n') + \ filename), '\n') let snippets = extend(snippets, - \ neosnippet#parser#_parse_snippets(file)) - endfor - elseif line =~ '^source' - " Source Vim script file. - for file in split(globpath(join( - \ neosnippet#helpers#get_snippets_directory(), ','), - \ matchstr(line, '^source\s\+\zs.*$')), '\n') - execute 'source' fnameescape(file) - let sourced = 1 + \ neosnippet#parser#_parse(snippet_file)) endfor elseif line =~ '^delete\s' let name = matchstr(line, '^delete\s\+\zs.*$') @@ -112,11 +81,11 @@ if !empty(snippet_dict) " Set previous snippet. call s:set_snippet_dict(snippet_dict, - \ snippets, dup_check, a:snippets_file) + \ snippets, dup_check, a:snippet_file) endif let snippet_dict = s:parse_snippet_name( - \ a:snippets_file, line, linenr, dup_check) + \ a:snippet_file, line, linenr, dup_check) elseif !empty(snippet_dict) if line =~ '^\s' || line == '' if snippet_dict.word == '' @@ -128,7 +97,7 @@ \ substitute(line, '^ *', '', '') . "\n" else call s:add_snippet_attribute( - \ a:snippets_file, line, linenr, snippet_dict) + \ a:snippet_file, line, linenr, snippet_dict) endif endif @@ -138,19 +107,16 @@ if !empty(snippet_dict) " Set previous snippet. call s:set_snippet_dict(snippet_dict, - \ snippets, dup_check, a:snippets_file) + \ snippets, dup_check, a:snippet_file) endif - return [snippets, sourced] + return snippets endfunction"}}} -function! s:parse_snippet_name(snippets_file, line, linenr, dup_check) abort "{{{ +function! s:parse_snippet_name(snippet_file, line, linenr, dup_check) "{{{ " Initialize snippet dict. - let snippet_dict = { - \ 'word' : '', - \ 'linenr' : a:linenr, - \ 'options' : neosnippet#parser#_initialize_snippet_options() - \ } + let snippet_dict = { 'word' : '', 'linenr' : a:linenr, + \ 'options' : neosnippet#parser#_initialize_snippet_options() } " Try using the name without the description (abbr). let snippet_dict.name = matchstr(a:line, '^snippet\s\+\zs\S\+') @@ -176,7 +142,7 @@ let dup = a:dup_check[snippet_dict.name] call neosnippet#util#print_error(printf( \ '%s:%d is overriding `%s` from %s:%d', - \ a:snippets_file, a:linenr, snippet_dict.name, + \ a:snippet_file, a:linenr, snippet_dict.name, \ dup.action__path, dup.action__line)) call neosnippet#util#print_error(printf( \ 'Please rename the snippet name or use `delete %s`.', @@ -186,7 +152,7 @@ return snippet_dict endfunction"}}} -function! s:add_snippet_attribute(snippets_file, line, linenr, snippet_dict) abort "{{{ +function! s:add_snippet_attribute(snippet_file, line, linenr, snippet_dict) "{{{ " Allow overriding/setting of the description (abbr) of the snippet. " This will override what was set via the snippet line. if a:line =~ '^abbr\s' @@ -212,7 +178,7 @@ \ '^options\s\+\zs.*$'), '[,[:space:]]\+') if !has_key(a:snippet_dict.options, option) call neosnippet#util#print_error( - \ printf('%s:%d', a:snippets_file, a:linenr)) + \ printf('%s:%d', a:snippet_file, a:linenr)) call neosnippet#util#print_error( \ printf('Invalid option name : "%s"', option)) else @@ -221,20 +187,20 @@ endfor else call neosnippet#util#print_error( - \ printf('%s:%d', a:snippets_file, a:linenr)) + \ printf('%s:%d', a:snippet_file, a:linenr)) call neosnippet#util#print_error( \ printf('Invalid syntax : "%s"', a:line)) endif endfunction"}}} -function! s:set_snippet_dict(snippet_dict, snippets, dup_check, snippets_file) abort "{{{ +function! s:set_snippet_dict(snippet_dict, snippets, dup_check, snippet_file) "{{{ if empty(a:snippet_dict) return endif let action_pattern = '^snippet\s\+' . a:snippet_dict.name . '$' let snippet = neosnippet#parser#_initialize_snippet( - \ a:snippet_dict, a:snippets_file, + \ a:snippet_dict, a:snippet_file, \ a:snippet_dict.linenr, action_pattern, \ a:snippet_dict.name) let a:snippets[a:snippet_dict.name] = snippet @@ -249,17 +215,16 @@ endfor endfunction"}}} -function! neosnippet#parser#_initialize_snippet(dict, path, line, pattern, name) abort "{{{ +function! neosnippet#parser#_initialize_snippet(dict, path, line, pattern, name) "{{{ let a:dict.word = substitute(a:dict.word, '\n\+$', '', '') - if a:dict.word !~ '\n' - \ && a:dict.word !~ - \ neosnippet#get_placeholder_marker_substitute_pattern().'$' - \ && a:dict.word !~ - \ neosnippet#get_placeholder_marker_substitute_zero_pattern() + if a:dict.word !~ + \ neosnippet#get_placeholder_marker_substitute_pattern() " Add placeholder. let a:dict.word .= '${0}' endif + let menu_prefix = '[nsnip] ' + if !has_key(a:dict, 'abbr') || a:dict.abbr == '' " Set default abbr. let abbr = substitute(a:dict.word, @@ -274,7 +239,7 @@ let snippet = { \ 'word' : a:dict.name, 'snip' : a:dict.word, \ 'description' : a:dict.word, - \ 'menu_template' : abbr, + \ 'menu_template' : menu_prefix . abbr, \ 'menu_abbr' : abbr, \ 'options' : a:dict.options, \ 'action__path' : a:path, 'action__line' : a:line, @@ -288,7 +253,7 @@ return snippet endfunction"}}} -function! neosnippet#parser#_initialize_snippet_options() abort "{{{ +function! neosnippet#parser#_initialize_snippet_options() "{{{ return { \ 'head' : 0, \ 'word' : @@ -298,137 +263,6 @@ \ } endfunction"}}} -function! neosnippet#parser#_get_completed_snippet(completed_item, next_text) abort "{{{ - let item = a:completed_item - - if has_key(item, "snippet") - return item.snippet - endif - - " Set abbr - let abbr = (item.abbr != '') ? item.abbr : item.word - if len(item.menu) > 5 - " Combine menu. - let abbr .= ' ' . item.menu - endif - if item.info != '' - let abbr = split(item.info, '\n')[0] - endif - let pairs = neosnippet#util#get_buffer_config( - \ &filetype, '', - \ 'g:neosnippet#completed_pairs', 'g:neosnippet#_completed_pairs', {}) - let word_pattern = neosnippet#util#escape_pattern(item.word) - let angle_pattern = word_pattern . '<.\+>(.*)' - let no_key = index(keys(pairs), item.word[-1:]) < 0 - if no_key && abbr !~# word_pattern . '\%(<.\+>\)\?(.*)' - return '' - endif - - let key = no_key ? '(' : item.word[-1:] - if a:next_text[:0] ==# key - " Disable auto pair - return '' - endif - - let pair = pairs[key] - - " Make snippet arguments - let cnt = 1 - let snippet = '' - - if no_key && abbr !~# angle_pattern - " Auto key - let snippet .= key - endif - - if empty(filter(values(pairs), 'stridx(abbr, v:val) > 0')) - " Pairs not found pattern - let snippet .= '${' . cnt . '}' - let cnt += 1 - endif - - if abbr =~# angle_pattern - " Add angle analysis - let snippet .= '<' - - let args = '' - for arg in split(substitute( - \ neosnippet#parser#_get_in_paren('<', '>', abbr), - \ '<\zs.\{-}\ze>', '', 'g'), '[^[]\zs\s*,\s*') - if args != '' && arg !=# '...' - let args .= ', ' - endif - let args .= printf('${%d:#:%s%s}', - \ cnt, ((args != '' && arg ==# '...') ? ', ' : ''), - \ escape(arg, '{}')) - let cnt += 1 - endfor - let snippet .= args - let snippet .= '>' - - if no_key - let snippet .= key - endif - endif - - let args = '' - for arg in split(substitute( - \ neosnippet#parser#_get_in_paren(key, pair, abbr), - \ key.'\zs.\{-}\ze'.pair . '\|<\zs.\{-}\ze>', '', 'g'), - \ '[^[]\zs\s*,\s*') - if key ==# '(' && arg ==# 'self' && &filetype ==# 'python' - " Ignore self argument - continue - endif - - if args != '' && arg !=# '...' - let args .= ', ' - endif - let args .= printf('${%d:#:%s%s}', - \ cnt, ((args != '' && arg ==# '...') ? ', ' : ''), - \ escape(arg, '{}')) - let cnt += 1 - endfor - let snippet .= args - - if key != '(' && snippet == '' - let snippet .= '${' . cnt . '}' - let cnt += 1 - endif - - let snippet .= pair - let snippet .= '${' . cnt . '}' - - return snippet -endfunction"}}} - -function! neosnippet#parser#_get_in_paren(key, pair, str) abort "{{{ - let s = '' - let level = 0 - for c in split(a:str, '\zs') - if c ==# a:key - let level += 1 - - if level == 1 - continue - endif - elseif c ==# a:pair - if level == 1 && s != '' - return s - else - let level -= 1 - endif - endif - - if level > 0 - let s .= c - endif - endfor - - return '' -endfunction"}}} - - let &cpo = s:save_cpo unlet s:save_cpo === modified file 'vim/bundle/neosnippet.vim/autoload/neosnippet/util.vim' --- vim/bundle/neosnippet.vim/autoload/neosnippet/util.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/autoload/neosnippet/util.vim 2015-08-25 11:01:00 +0000 @@ -26,97 +26,91 @@ let s:save_cpo = &cpo set cpo&vim -let s:V = vital#neosnippet#of() -function! neosnippet#util#get_vital() abort "{{{ +let s:V = vital#of('neosnippet') +function! neosnippet#util#get_vital() "{{{ return s:V endfunction"}}} -function! s:get_prelude() abort "{{{ +function! s:get_prelude() "{{{ if !exists('s:Prelude') let s:Prelude = neosnippet#util#get_vital().import('Prelude') endif return s:Prelude endfunction"}}} -function! s:get_list() abort "{{{ +function! s:get_list() "{{{ if !exists('s:List') let s:List = neosnippet#util#get_vital().import('Data.List') endif return s:List endfunction"}}} -function! s:get_string() abort "{{{ +function! s:get_string() "{{{ if !exists('s:String') let s:String = neosnippet#util#get_vital().import('Data.String') endif return s:String endfunction"}}} -function! s:get_process() abort "{{{ +function! s:get_process() "{{{ if !exists('s:Process') let s:Process = neosnippet#util#get_vital().import('Process') endif return s:Process endfunction"}}} -function! neosnippet#util#substitute_path_separator(...) abort "{{{ +function! neosnippet#util#substitute_path_separator(...) "{{{ return call(s:get_prelude().substitute_path_separator, a:000) endfunction"}}} -function! neosnippet#util#system(...) abort "{{{ +function! neosnippet#util#system(...) "{{{ return call(s:get_process().system, a:000) endfunction"}}} -function! neosnippet#util#has_vimproc(...) abort "{{{ +function! neosnippet#util#has_vimproc(...) "{{{ return call(s:get_process().has_vimproc, a:000) endfunction"}}} -function! neosnippet#util#is_windows(...) abort "{{{ +function! neosnippet#util#is_windows(...) "{{{ return call(s:get_prelude().is_windows, a:000) endfunction"}}} -function! neosnippet#util#is_mac(...) abort "{{{ +function! neosnippet#util#is_mac(...) "{{{ return call(s:get_prelude().is_mac, a:000) endfunction"}}} -function! neosnippet#util#get_last_status(...) abort "{{{ +function! neosnippet#util#get_last_status(...) "{{{ return call(s:get_process().get_last_status, a:000) endfunction"}}} -function! neosnippet#util#escape_pattern(...) abort "{{{ +function! neosnippet#util#escape_pattern(...) "{{{ return call(s:get_prelude().escape_pattern, a:000) endfunction"}}} -function! neosnippet#util#iconv(...) abort "{{{ +function! neosnippet#util#iconv(...) "{{{ return call(s:get_process().iconv, a:000) endfunction"}}} -function! neosnippet#util#truncate(...) abort "{{{ +function! neosnippet#util#truncate(...) "{{{ return call(s:get_string().truncate, a:000) endfunction"}}} -function! neosnippet#util#strwidthpart(...) abort "{{{ +function! neosnippet#util#strwidthpart(...) "{{{ return call(s:get_string().strwidthpart, a:000) endfunction"}}} -function! neosnippet#util#expand(path) abort "{{{ +function! neosnippet#util#expand(path) "{{{ return neosnippet#util#substitute_path_separator( \ expand(escape(a:path, '*?[]"={}'), 1)) endfunction"}}} -function! neosnippet#util#set_default(var, val, ...) abort "{{{ - let old_var = get(a:000, 0, '') - if exists(old_var) - let {a:var} = {old_var} - elseif !exists(a:var) +function! neosnippet#util#set_default(var, val, ...) "{{{ + if !exists(a:var) let {a:var} = a:val endif endfunction"}}} -function! neosnippet#util#set_dictionary_helper(...) abort "{{{ +function! neosnippet#util#set_dictionary_helper(...) "{{{ return call(s:get_prelude().set_dictionary_helper, a:000) endfunction"}}} -function! neosnippet#util#get_cur_text() abort "{{{ +function! neosnippet#util#get_cur_text() "{{{ return \ (mode() ==# 'i' ? (col('.')-1) : col('.')) >= len(getline('.')) ? \ getline('.') : \ matchstr(getline('.'), \ '^.*\%' . col('.') . 'c' . (mode() ==# 'i' ? '' : '.')) endfunction"}}} -function! neosnippet#util#get_next_text() abort "{{{ - return getline('.')[len(neosnippet#util#get_cur_text()) :] -endfunction"}}} -function! neosnippet#util#print_error(string) abort "{{{ +function! neosnippet#util#print_error(string) "{{{ echohl Error | echomsg '[neosnippet] ' . a:string | echohl None endfunction"}}} -function! neosnippet#util#parse_options(args, options_list) abort "{{{ +function! neosnippet#util#parse_options(args, options_list) "{{{ let args = [] let options = {} for arg in split(a:args, '\%(\\\@ a:end return endif @@ -187,10 +173,8 @@ try setlocal equalprg= - let neosnippet = neosnippet#variables#current_neosnippet() let base_indent = matchstr(getline(a:begin), '^\s\+') - for line_nr in range((neosnippet.target != '' ? - \ a:begin : a:begin + 1), a:end) + for line_nr in range(a:begin + 1, a:end) call cursor(line_nr, 0) if getline('.') =~ '^\t\+' @@ -215,7 +199,7 @@ endtry endfunction"}}} -function! neosnippet#view#_get_snippet_range(begin_line, begin_patterns, end_line, end_patterns) abort "{{{ +function! neosnippet#view#_get_snippet_range(begin_line, begin_patterns, end_line, end_patterns) "{{{ let pos = getpos('.') call cursor(a:begin_line, 0) @@ -224,11 +208,6 @@ else let begin = searchpos('^' . neosnippet#util#escape_pattern( \ a:begin_patterns[0]) . '$', 'bnW')[0] - if begin > 0 && a:begin_line == a:end_line - call setpos('.', pos) - return [begin + 1, begin + 1] - endif - if begin <= 0 let begin = line('.') - 50 endif @@ -254,7 +233,7 @@ call setpos('.', pos) return [begin, end] endfunction"}}} -function! neosnippet#view#_search_snippet_range(start, end, cnt, ...) abort "{{{ +function! neosnippet#view#_search_snippet_range(start, end, cnt, ...) "{{{ let is_select = get(a:000, 0, 1) call s:substitute_placeholder_marker(a:start, a:end, a:cnt) @@ -277,7 +256,7 @@ return 0 endfunction"}}} -function! neosnippet#view#_search_outof_range(col) abort "{{{ +function! s:search_outof_range(col) "{{{ call s:substitute_placeholder_marker(1, 0, 0) let pattern = neosnippet#get_placeholder_marker_pattern() @@ -302,43 +281,7 @@ " Not found. return 0 endfunction"}}} -function! neosnippet#view#_clear_markers(expand_info) abort "{{{ - " Search patterns. - let [begin, end] = neosnippet#view#_get_snippet_range( - \ a:expand_info.begin_line, - \ a:expand_info.begin_patterns, - \ a:expand_info.end_line, - \ a:expand_info.end_patterns) - - let mode = mode() - let pos = getpos('.') - - " Found snippet. - let found = 0 - try - while neosnippet#view#_search_snippet_range( - \ begin, end, a:expand_info.holder_cnt, 0) - - " Next count. - let a:expand_info.holder_cnt += 1 - let found = 1 - endwhile - - " Search placeholder 0. - if neosnippet#view#_search_snippet_range(begin, end, 0) - let found = 1 - endif - finally - if found && mode !=# 'i' - stopinsert - endif - - call setpos('.', pos) - - call neosnippet#variables#pop_expand_stack() - endtry -endfunction"}}} -function! s:expand_placeholder(start, end, holder_cnt, line, ...) abort "{{{ +function! s:expand_placeholder(start, end, holder_cnt, line, ...) "{{{ let is_select = get(a:000, 0, 1) let pattern = substitute(neosnippet#get_placeholder_marker_pattern(), @@ -408,36 +351,27 @@ if default_len > 0 && is_select " Select default value. - let neosnippet.unnamed_register = @" - let len = default_len-1 if &l:selection == 'exclusive' let len += 1 endif - let mode = mode() - stopinsert - - normal! v - call cursor(0, col('.') + (mode ==# 'i' ? len+1 : len)) - execute 'normal! ' "\" + execute 'normal! v'. repeat('l', len) . "\" elseif pos[2] < col('$') startinsert else startinsert! endif endfunction"}}} -function! s:expand_target_placeholder(line, col) abort "{{{ +function! s:expand_target_placeholder(line, col) "{{{ " Expand target let neosnippet = neosnippet#variables#current_neosnippet() let next_line = getline(a:line)[a:col-1 :] let target_lines = split(neosnippet.target, '\n', 1) let cur_text = getline(a:line)[: a:col-2] - if match(cur_text, '^\s\+$') < 0 - let target_lines[0] = cur_text . target_lines[0] - endif + let target_lines[0] = cur_text . target_lines[0] let target_lines[-1] = target_lines[-1] . next_line let begin_line = a:line @@ -446,27 +380,10 @@ let col = col('.') try let base_indent = matchstr(cur_text, '^\s\+') - let target_base_indent = -1 - for target_line in target_lines - if match(target_line, '^\s\+$') < 0 - let target_current_indent = max([matchend(target_line, '^ *'), matchend(target_line, '^\t*') * &tabstop]) - if target_base_indent < 0 || target_current_indent < target_base_indent - let target_base_indent = target_current_indent - endif - endif - endfor - if target_base_indent < 0 - let target_base_indent = 0 - end - let target_strip_indent_regex = '^\s\+$\|^' . - \ repeat(' ', target_base_indent) . '\|^' . - \ repeat('\t', target_base_indent / &tabstop) - call map(target_lines, 'substitute(v:val, target_strip_indent_regex, "", "")') - call map(target_lines, 'v:val == "" ? "" : base_indent . v:val') - call setline(a:line, target_lines[0]) if len(target_lines) > 1 - call append(a:line, target_lines[1:]) + call append(a:line, map(target_lines[1:], + \ 'base_indent . v:val')) endif call cursor(end_line, 0) @@ -486,9 +403,9 @@ let neosnippet.target = '' - call neosnippet#view#_jump('', col) + call neosnippet#view#_jump(neosnippet#util#get_cur_text(), col) endfunction"}}} -function! s:search_sync_placeholder(start, end, number) abort "{{{ +function! s:search_sync_placeholder(start, end, number) "{{{ if a:end == 0 " Search in current buffer. let cnt = matchstr(getline('.'), @@ -509,7 +426,7 @@ return -1 endfunction"}}} -function! s:substitute_placeholder_marker(start, end, snippet_holder_cnt) abort "{{{ +function! s:substitute_placeholder_marker(start, end, snippet_holder_cnt) "{{{ if a:snippet_holder_cnt > 0 let cnt = a:snippet_holder_cnt-1 let sync_marker = substitute(neosnippet#get_sync_placeholder_marker_pattern(), @@ -545,7 +462,7 @@ call setline('.', substitute(getline('.'), sync_marker, sub, '')) endif endfunction"}}} -function! s:eval_snippet(snippet_text) abort "{{{ +function! s:eval_snippet(snippet_text) "{{{ let snip_word = '' let prev_match = 0 let match = match(a:snippet_text, '\\\@:t:r') - -function! vital#{s:_plugin_name}#new() abort - return vital#{s:_plugin_name[1:]}#of() +let s:self_version = expand(':t:r') +let s:self_file = expand('') + +" Note: The extra argument to globpath() was added in Patch 7.2.051. +let s:globpath_third_arg = v:version > 702 || v:version == 702 && has('patch51') + +let s:loaded = {} + +function! s:import(name, ...) abort + let target = {} + let functions = [] + for a in a:000 + if type(a) == type({}) + let target = a + elseif type(a) == type([]) + let functions = a + endif + unlet a + endfor + let module = s:_import(a:name) + if empty(functions) + call extend(target, module, 'keep') + else + for f in functions + if has_key(module, f) && !has_key(target, f) + let target[f] = module[f] + endif + endfor + endif + return target +endfunction + +function! s:load(...) dict abort + for arg in a:000 + let [name; as] = type(arg) == type([]) ? arg[: 1] : [arg, arg] + let target = split(join(as, ''), '\W\+') + let dict = self + while 1 <= len(target) + let ns = remove(target, 0) + if !has_key(dict, ns) + let dict[ns] = {} + endif + if type(dict[ns]) == type({}) + let dict = dict[ns] + else + unlet dict + break + endif + endwhile + + if exists('dict') + call extend(dict, s:_import(name)) + endif + unlet arg + endfor + return self +endfunction + +function! s:unload() abort + let s:loaded = {} +endfunction + +function! s:exists(name) abort + return s:_get_module_path(a:name) !=# '' +endfunction + +function! s:search(pattern) abort + let paths = s:_vital_files(a:pattern) + let modules = sort(map(paths, 's:_file2module(v:val)')) + return s:_uniq(modules) +endfunction + +function! s:expand_modules(entry, all) abort + if type(a:entry) == type([]) + let candidates = s:_concat(map(copy(a:entry), 's:search(v:val)')) + if empty(candidates) + throw printf('vital: Any of module %s is not found', string(a:entry)) + endif + if eval(join(map(copy(candidates), 'has_key(a:all, v:val)'), '+')) + let modules = [] + else + let modules = [candidates[0]] + endif + else + let modules = s:search(a:entry) + if empty(modules) + throw printf('vital: Module %s is not found', a:entry) + endif + endif + call filter(modules, '!has_key(a:all, v:val)') + for module in modules + let a:all[module] = 1 + endfor + return modules +endfunction + +function! s:_import(name) abort + if type(a:name) == type(0) + return s:_build_module(a:name) + endif + let path = s:_get_module_path(a:name) + if path ==# '' + throw 'vital: module not found: ' . a:name + endif + let sid = s:_get_sid_by_script(path) + if !sid + try + execute 'source' fnameescape(path) + catch /^Vim\%((\a\+)\)\?:E484/ + throw 'vital: module not found: ' . a:name + catch /^Vim\%((\a\+)\)\?:E127/ + " Ignore. + endtry + + let sid = s:_get_sid_by_script(path) + endif + return s:_build_module(sid) +endfunction + +function! s:_get_module_path(name) abort + if s:_is_absolute_path(a:name) && filereadable(a:name) + return a:name + endif + if a:name ==# '' + let paths = [s:self_file] + elseif a:name =~# '\v^\u\w*%(\.\u\w*)*$' + let paths = s:_vital_files(a:name) + else + throw 'vital: Invalid module name: ' . a:name + endif + + call filter(paths, 'filereadable(expand(v:val, 1))') + let path = get(paths, 0, '') + return path !=# '' ? path : '' +endfunction + +function! s:_get_sid_by_script(path) abort + let path = s:_unify_path(a:path) + for line in filter(split(s:_redir('scriptnames'), "\n"), + \ 'stridx(v:val, s:self_version) > 0') + let list = matchlist(line, '^\s*\(\d\+\):\s\+\(.\+\)\s*$') + if !empty(list) && s:_unify_path(list[2]) ==# path + return list[1] - 0 + endif + endfor + return 0 +endfunction + +function! s:_file2module(file) abort + let filename = fnamemodify(a:file, ':p:gs?[\\/]?/?') + let tail = matchstr(filename, 'autoload/vital/_\w\+/\zs.*\ze\.vim$') + return join(split(tail, '[\\/]\+'), '.') +endfunction + +if filereadable(expand(':r') . '.VIM') + " resolve() is slow, so we cache results. + let s:_unify_path_cache = {} + " Note: On windows, vim can't expand path names from 8.3 formats. + " So if getting full path via and $HOME was set as 8.3 format, + " vital load duplicated scripts. Below's :~ avoid this issue. + function! s:_unify_path(path) abort + if has_key(s:_unify_path_cache, a:path) + return s:_unify_path_cache[a:path] + endif + let value = tolower(fnamemodify(resolve(fnamemodify( + \ a:path, ':p')), ':~:gs?[\\/]?/?')) + let s:_unify_path_cache[a:path] = value + return value + endfunction +else + function! s:_unify_path(path) abort + return resolve(fnamemodify(a:path, ':p:gs?[\\/]?/?')) + endfunction +endif + +if s:globpath_third_arg + function! s:_runtime_files(path) abort + return split(globpath(&runtimepath, a:path, 1), "\n") + endfunction +else + function! s:_runtime_files(path) abort + return split(globpath(&runtimepath, a:path), "\n") + endfunction +endif + +let s:_vital_files_cache_runtimepath = '' +let s:_vital_files_cache = [] +function! s:_vital_files(pattern) abort + if s:_vital_files_cache_runtimepath !=# &runtimepath + let path = printf('autoload/vital/%s/**/*.vim', s:self_version) + let s:_vital_files_cache = s:_runtime_files(path) + let mod = ':p:gs?[\\/]\+?/?' + call map(s:_vital_files_cache, 'fnamemodify(v:val, mod)') + let s:_vital_files_cache_runtimepath = &runtimepath + endif + let target = substitute(a:pattern, '\.', '/', 'g') + let target = substitute(target, '\*', '[^/]*', 'g') + let regexp = printf('autoload/vital/%s/%s.vim', s:self_version, target) + return filter(copy(s:_vital_files_cache), 'v:val =~# regexp') +endfunction + +" Copy from System.Filepath +if has('win16') || has('win32') || has('win64') + function! s:_is_absolute_path(path) abort + return a:path =~? '^[a-z]:[/\\]' + endfunction +else + function! s:_is_absolute_path(path) abort + return a:path[0] ==# '/' + endfunction +endif + +function! s:_build_module(sid) abort + if has_key(s:loaded, a:sid) + return copy(s:loaded[a:sid]) + endif + let functions = s:_get_functions(a:sid) + + let prefix = '' . a:sid . '_' + let module = {} + for func in functions + let module[func] = function(prefix . func) + endfor + if has_key(module, '_vital_loaded') + let V = vital#{s:self_version}#new() + if has_key(module, '_vital_depends') + let all = {} + let modules = + \ s:_concat(map(module._vital_depends(), + \ 's:expand_modules(v:val, all)')) + call call(V.load, modules, V) + endif + try + call module._vital_loaded(V) + catch + " FIXME: Show an error message for debug. + endtry + endif + if !get(g:, 'vital_debug', 0) + call filter(module, 'v:key =~# "^\\a"') + endif + let s:loaded[a:sid] = module + return copy(module) +endfunction + +if exists('+regexpengine') + function! s:_get_functions(sid) abort + let funcs = s:_redir(printf("function /\\%%#=2^\%d_", a:sid)) + let map_pat = '' . a:sid . '_\zs\w\+' + return map(split(funcs, "\n"), 'matchstr(v:val, map_pat)') + endfunction +else + function! s:_get_functions(sid) abort + let prefix = '' . a:sid . '_' + let funcs = s:_redir('function') + let filter_pat = '^\s*function ' . prefix + let map_pat = prefix . '\zs\w\+' + return map(filter(split(funcs, "\n"), + \ 'stridx(v:val, prefix) > 0 && v:val =~# filter_pat'), + \ 'matchstr(v:val, map_pat)') + endfunction +endif + +if exists('*uniq') + function! s:_uniq(list) abort + return uniq(a:list) + endfunction +else + function! s:_uniq(list) abort + let i = len(a:list) - 1 + while 0 < i + if a:list[i] ==# a:list[i - 1] + call remove(a:list, i) + let i -= 2 + else + let i -= 1 + endif + endwhile + return a:list + endfunction +endif + +function! s:_concat(lists) abort + let result_list = [] + for list in a:lists + let result_list += list + endfor + return result_list +endfunction + +function! s:_redir(cmd) abort + let [save_verbose, save_verbosefile] = [&verbose, &verbosefile] + set verbose=0 verbosefile= + redir => res + silent! execute a:cmd + redir END + let [&verbose, &verbosefile] = [save_verbose, save_verbosefile] + return res +endfunction + +function! vital#{s:self_version}#new() abort + return s:_import('') endfunction === modified file 'vim/bundle/neosnippet.vim/autoload/vital/_neosnippet/Data/List.vim' --- vim/bundle/neosnippet.vim/autoload/vital/_neosnippet/Data/List.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/autoload/vital/_neosnippet/Data/List.vim 2015-08-25 11:01:00 +0000 @@ -1,18 +1,3 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_neosnippet#Data#List#import() abort - return map({'combinations': '', 'and': '', 'sort_by': '', 'foldr1': '', 'sort': '', 'flatten': '', 'has_index': '', 'find_indices': '', 'any': '', 'unshift': '', 'span': '', 'pop': '', 'binary_search': '', 'uniq_by': '', 'or': '', 'all': '', 'zip': '', 'find_last_index': '', 'find': '', 'partition': '', 'map_accum': '', 'permutations': '', 'break': '', 'max_by': '', 'foldl': '', 'foldr': '', 'find_index': '', 'group_by': '', 'take_while': '', 'conj': '', 'push': '', 'char_range': '', 'cons': '', 'foldl1': '', 'intersect': '', 'concat': '', 'shift': '', 'clear': '', 'has_common_items': '', 'product': '', 'zip_fill': '', 'uniq': '', 'has': '', 'min_by': '', 'with_index': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_neosnippet#Data#List#import() abort', printf("return map({'combinations': '', 'and': '', 'sort_by': '', 'foldr1': '', 'sort': '', 'flatten': '', 'has_index': '', 'find_indices': '', 'any': '', 'unshift': '', 'span': '', 'pop': '', 'binary_search': '', 'uniq_by': '', 'or': '', 'all': '', 'zip': '', 'find_last_index': '', 'find': '', 'partition': '', 'map_accum': '', 'permutations': '', 'break': '', 'max_by': '', 'foldl': '', 'foldr': '', 'find_index': '', 'group_by': '', 'take_while': '', 'conj': '', 'push': '', 'char_range': '', 'cons': '', 'foldl1': '', 'intersect': '', 'concat': '', 'shift': '', 'clear': '', 'has_common_items': '', 'product': '', 'zip_fill': '', 'uniq': '', 'has': '', 'min_by': '', 'with_index': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ " Utilities for list. let s:save_cpo = &cpo @@ -240,7 +225,7 @@ " similar to Haskell's Prelude.foldl1 function! s:foldl1(f, xs) abort if len(a:xs) == 0 - throw 'vital: Data.List: foldl1' + throw 'foldl1' endif return s:foldl(a:f, a:xs[0], a:xs[1:]) endfunction @@ -253,7 +238,7 @@ " similar to Haskell's Prelude.fold11 function! s:foldr1(f, xs) abort if len(a:xs) == 0 - throw 'vital: Data.List: foldr1' + throw 'foldr1' endif return s:foldr(a:f, a:xs[-1], a:xs[0:-2]) endfunction @@ -279,7 +264,7 @@ " Inspired by Ruby's with_index method. function! s:with_index(list, ...) abort let base = a:0 > 0 ? a:1 : 0 - return map(copy(a:list), '[v:val, v:key + base]') + return s:zip(a:list, range(base, len(a:list)+base-1)) endfunction " similar to Ruby's detect or Haskell's find. === modified file 'vim/bundle/neosnippet.vim/autoload/vital/_neosnippet/Data/String.vim' --- vim/bundle/neosnippet.vim/autoload/vital/_neosnippet/Data/String.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/autoload/vital/_neosnippet/Data/String.vim 2015-08-25 11:01:00 +0000 @@ -1,18 +1,3 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_neosnippet#Data#String#import() abort - return map({'trim': '', 'chomp': '', 'starts_with': '', 'truncate_skipping': '', 'pad_left': '', 'hash': '', 'trim_end': '', 'nr2enc_char': '', '_vital_depends': '', 'wrap': '', 'split3': '', 'strwidthpart_reverse': '', 'pad_both_sides': '', 'chop': '', 'lines': '', 'contains_multibyte': '', 'nr2byte': '', 'dstring': '', 'replace': '', 'scan': '', 'diffidx': '', 'strchars': '', 'pad_between_letters': '', 'ends_with': '', 'nsplit': '', 'justify_equal_spacing': '', 'strwidthpart': '', 'split_leftright': '', 'truncate': '', 'substitute_last': '', 'pad_right': '', 'replace_first': '', 'split_by_displaywidth': '', 'wcswidth': '', 'common_head': '', 'levenshtein_distance': '', 'reverse': '', 'trim_start': '', 'nr2hex': '', 'padding_by_displaywidth': '', '_vital_loaded': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_neosnippet#Data#String#import() abort', printf("return map({'trim': '', 'chomp': '', 'starts_with': '', 'truncate_skipping': '', 'pad_left': '', 'hash': '', 'trim_end': '', 'nr2enc_char': '', '_vital_depends': '', 'wrap': '', 'split3': '', 'strwidthpart_reverse': '', 'pad_both_sides': '', 'chop': '', 'lines': '', 'contains_multibyte': '', 'nr2byte': '', 'dstring': '', 'replace': '', 'scan': '', 'diffidx': '', 'strchars': '', 'pad_between_letters': '', 'ends_with': '', 'nsplit': '', 'justify_equal_spacing': '', 'strwidthpart': '', 'split_leftright': '', 'truncate': '', 'substitute_last': '', 'pad_right': '', 'replace_first': '', 'split_by_displaywidth': '', 'wcswidth': '', 'common_head': '', 'levenshtein_distance': '', 'reverse': '', 'trim_start': '', 'nr2hex': '', 'padding_by_displaywidth': '', '_vital_loaded': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ " Utilities for string. let s:save_cpo = &cpo @@ -55,15 +40,6 @@ return join(reverse(split(a:str, '.\zs')), '') endfunction -function! s:starts_with(str, prefix) abort - return stridx(a:str, a:prefix) == 0 -endfunction - -function! s:ends_with(str, suffix) abort - let idx = strridx(a:str, a:suffix) - return 0 <= idx && idx + len(a:suffix) == len(a:str) -endfunction - function! s:common_head(strs) abort if empty(a:strs) return '' @@ -74,7 +50,7 @@ endif let strs = len == 2 ? a:strs : sort(copy(a:strs)) let pat = substitute(strs[0], '.', '\="[" . escape(submatch(0), "^\\") . "]"', 'g') - return pat ==# '' ? '' : matchstr(strs[-1], '\C^\%[' . pat . ']') + return pat == '' ? '' : matchstr(strs[-1], '\C^\%[' . pat . ']') endfunction " Split to two elements of List. ([left, right]) @@ -178,15 +154,15 @@ " NOTE _concat() is just a copy of Data.List.concat(). " FIXME don't repeat yourself function! s:_split_by_wcswidth_once(body, x) abort - let fst = s:strwidthpart(a:body, a:x) - let snd = s:strwidthpart_reverse(a:body, s:wcswidth(a:body) - s:wcswidth(fst)) + let fst = s:P.strwidthpart(a:body, a:x) + let snd = s:P.strwidthpart_reverse(a:body, s:P.wcswidth(a:body) - s:P.wcswidth(fst)) return [fst, snd] endfunction function! s:_split_by_wcswidth(body, x) abort let memo = [] let body = a:body - while s:wcswidth(body) > a:x + while s:P.wcswidth(body) > a:x let [tmp, body] = s:_split_by_wcswidth_once(body, a:x) call add(memo, tmp) endwhile @@ -198,14 +174,6 @@ return matchstr(a:str,'^\s*\zs.\{-}\ze\s*$') endfunction -function! s:trim_start(str) abort - return matchstr(a:str,'^\s*\zs.\{-}$') -endfunction - -function! s:trim_end(str) abort - return matchstr(a:str,'^.\{-}\ze\s*$') -endfunction - function! s:wrap(str,...) abort let _columns = a:0 > 0 ? a:1 : &columns return s:L.concat( @@ -223,7 +191,7 @@ endfunction function! s:nr2enc_char(charcode) abort - if &encoding ==# 'utf-8' + if &encoding == 'utf-8' return nr2char(a:charcode) endif let char = s:nr2byte(a:charcode) @@ -235,7 +203,7 @@ function! s:nr2hex(nr) abort let n = a:nr - let r = '' + let r = "" while n let r = '0123456789ABCDEF'[n % 16] . r let n = n / 16 @@ -386,7 +354,7 @@ let text = '' while cs_index < len(cs) - if cs[cs_index] is# "\n" + if cs[cs_index] is "\n" let text = s:padding_by_displaywidth(text, a:width, a:float) let lines += [text] let text = '' @@ -407,7 +375,7 @@ if a:is_wrap if a:width < w if a:width < strdisplaywidth(cs[cs_index]) - while get(cs, cs_index, "\n") isnot# "\n" + while get(cs, cs_index, "\n") isnot "\n" let cs_index += 1 endwhile continue @@ -416,7 +384,7 @@ endif endif else - while get(cs, cs_index, "\n") isnot# "\n" + while get(cs, cs_index, "\n") isnot "\n" let cs_index += 1 endwhile continue === modified file 'vim/bundle/neosnippet.vim/autoload/vital/_neosnippet/Prelude.vim' --- vim/bundle/neosnippet.vim/autoload/vital/_neosnippet/Prelude.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/autoload/vital/_neosnippet/Prelude.vim 2015-08-25 11:01:00 +0000 @@ -1,18 +1,3 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_neosnippet#Prelude#import() abort - return map({'escape_pattern': '', 'is_funcref': '', 'path2directory': '', 'wcswidth': '', 'is_string': '', 'input_helper': '', 'is_number': '', 'is_cygwin': '', 'path2project_directory': '', 'strwidthpart_reverse': '', 'input_safe': '', 'is_list': '', 'truncate_skipping': '', 'glob': '', 'truncate': '', 'is_dict': '', 'set_default': '', 'is_numeric': '', 'getchar_safe': '', 'substitute_path_separator': '', 'is_mac': '', 'strwidthpart': '', 'getchar': '', 'is_unix': '', 'is_windows': '', 'globpath': '', 'escape_file_searching': '', 'is_float': '', 'smart_execute_command': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_neosnippet#Prelude#import() abort', printf("return map({'escape_pattern': '', 'is_funcref': '', 'path2directory': '', 'wcswidth': '', 'is_string': '', 'input_helper': '', 'is_number': '', 'is_cygwin': '', 'path2project_directory': '', 'strwidthpart_reverse': '', 'input_safe': '', 'is_list': '', 'truncate_skipping': '', 'glob': '', 'truncate': '', 'is_dict': '', 'set_default': '', 'is_numeric': '', 'getchar_safe': '', 'substitute_path_separator': '', 'is_mac': '', 'strwidthpart': '', 'getchar': '', 'is_unix': '', 'is_windows': '', 'globpath': '', 'escape_file_searching': '', 'is_float': '', 'smart_execute_command': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ let s:save_cpo = &cpo set cpo&vim @@ -42,7 +27,7 @@ \ s:__TYPE_DICT, \ s:__TYPE_FLOAT] = [ \ type(3), - \ type(''), + \ type(""), \ type(function('tr')), \ type([]), \ type({}), @@ -84,7 +69,7 @@ endfunction function! s:truncate_skipping(str, max, footer_width, separator) abort - call s:_warn_deprecated('truncate_skipping', 'Data.String.truncate_skipping') + call s:_warn_deprecated("truncate_skipping", "Data.String.truncate_skipping") let width = s:wcswidth(a:str) if width <= a:max @@ -102,7 +87,7 @@ " Original function is from mattn. " http://github.com/mattn/googlereader-vim/tree/master - call s:_warn_deprecated('truncate', 'Data.String.truncate') + call s:_warn_deprecated("truncate", "Data.String.truncate") if a:str =~# '^[\x00-\x7f]*$' return len(a:str) < a:width ? @@ -124,7 +109,7 @@ endfunction function! s:strwidthpart(str, width) abort - call s:_warn_deprecated('strwidthpart', 'Data.String.strwidthpart') + call s:_warn_deprecated("strwidthpart", "Data.String.strwidthpart") if a:width <= 0 return '' @@ -140,7 +125,7 @@ return ret endfunction function! s:strwidthpart_reverse(str, width) abort - call s:_warn_deprecated('strwidthpart_reverse', 'Data.String.strwidthpart_reverse') + call s:_warn_deprecated("strwidthpart_reverse", "Data.String.strwidthpart_reverse") if a:width <= 0 return '' @@ -159,12 +144,12 @@ if v:version >= 703 " Use builtin function. function! s:wcswidth(str) abort - call s:_warn_deprecated('wcswidth', 'Data.String.wcswidth') + call s:_warn_deprecated("wcswidth", "Data.String.wcswidth") return strwidth(a:str) endfunction else function! s:wcswidth(str) abort - call s:_warn_deprecated('wcswidth', 'Data.String.wcswidth') + call s:_warn_deprecated("wcswidth", "Data.String.wcswidth") if a:str =~# '^[\x00-\x7f]*$' return strlen(a:str) @@ -233,14 +218,14 @@ function! s:_warn_deprecated(name, alternative) abort try echohl Error - echomsg 'Prelude.' . a:name . ' is deprecated! Please use ' . a:alternative . ' instead.' + echomsg "Prelude." . a:name . " is deprecated! Please use " . a:alternative . " instead." finally echohl None endtry endfunction function! s:smart_execute_command(action, word) abort - execute a:action . ' ' . (a:word ==# '' ? '' : '`=a:word`') + execute a:action . ' ' . (a:word == '' ? '' : '`=a:word`') endfunction function! s:escape_file_searching(buffer_name) abort @@ -258,7 +243,7 @@ function! s:getchar_safe(...) abort let c = s:input_helper('getchar', a:000) - return type(c) == type('') ? c : nr2char(c) + return type(c) == type("") ? c : nr2char(c) endfunction function! s:input_safe(...) abort @@ -268,13 +253,13 @@ function! s:input_helper(funcname, args) abort let success = 0 if inputsave() !=# success - throw 'vital: Prelude: inputsave() failed' + throw 'inputsave() failed' endif try return call(a:funcname, a:args) finally if inputrestore() !=# success - throw 'vital: Prelude: inputrestore() failed' + throw 'inputrestore() failed' endif endtry endfunction @@ -315,7 +300,7 @@ let find_directory = s:escape_file_searching(search_directory) let d = finddir('.svn', find_directory . ';') - if d ==# '' + if d == '' return '' endif @@ -325,9 +310,9 @@ let parent_directory = s:path2directory( \ fnamemodify(directory, ':h')) - if parent_directory !=# '' + if parent_directory != '' let d = finddir('.svn', parent_directory . ';') - if d !=# '' + if d != '' let directory = s:_path2project_directory_svn(parent_directory) endif endif @@ -340,7 +325,7 @@ let find_directory = s:escape_file_searching(search_directory) let d = finddir(vcs, find_directory . ';') - if d ==# '' + if d == '' return '' endif return fnamemodify(d, ':p:h:h') @@ -360,25 +345,25 @@ else let directory = s:_path2project_directory_others(vcs, search_directory) endif - if directory !=# '' + if directory != '' break endif endfor " Search project file. - if directory ==# '' + if directory == '' for d in ['build.xml', 'prj.el', '.project', 'pom.xml', 'package.json', \ 'Makefile', 'configure', 'Rakefile', 'NAnt.build', \ 'P4CONFIG', 'tags', 'gtags'] let d = findfile(d, s:escape_file_searching(search_directory) . ';') - if d !=# '' + if d != '' let directory = fnamemodify(d, ':p:h') break endif endfor endif - if directory ==# '' + if directory == '' " Search /src/ directory. let base = s:substitute_path_separator(search_directory) if base =~# '/src/' @@ -386,7 +371,7 @@ endif endif - if directory ==# '' && !is_allow_empty + if directory == '' && !is_allow_empty " Use original path. let directory = search_directory endif === modified file 'vim/bundle/neosnippet.vim/autoload/vital/_neosnippet/Process.vim' --- vim/bundle/neosnippet.vim/autoload/vital/_neosnippet/Process.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/autoload/vital/_neosnippet/Process.vim 2015-08-25 11:01:00 +0000 @@ -1,18 +1,3 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_neosnippet#Process#import() abort - return map({'shellescape': '', 'has_vimproc': '', 'system': '', 'iconv': '', 'spawn': '', 'get_last_status': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_neosnippet#Process#import() abort', printf("return map({'shellescape': '', 'has_vimproc': '', 'system': '', 'iconv': '', 'spawn': '', 'get_last_status': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ " TODO: move all comments to doc file. " " @@ -34,8 +19,23 @@ let s:TYPE_DICT = type({}) let s:TYPE_LIST = type([]) -let s:TYPE_STRING = type('') - +let s:TYPE_STRING = type("") + + +" Execute program in the background from Vim. +" Return an empty string always. +" +" If a:expr is a List, shellescape() each argument. +" If a:expr is a String, the arguments are passed as-is. +" +" Windows: +" Using :!start , execute program without via cmd.exe. +" Spawning 'expr' with 'noshellslash' +" keep special characters from unwanted expansion. +" (see :help shellescape()) +" +" Unix: +" using :! , execute program in the background by shell. function! s:spawn(expr, ...) abort let shellslash = 0 if s:is_windows @@ -70,11 +70,11 @@ " iconv() wrapper for safety. function! s:iconv(expr, from, to) abort - if a:from ==# '' || a:to ==# '' || a:from ==? a:to + if a:from == '' || a:to == '' || a:from ==? a:to return a:expr endif let result = iconv(a:expr, a:from, a:to) - return result !=# '' ? result : a:expr + return result != '' ? result : a:expr endfunction " Check vimproc. === removed directory 'vim/bundle/neosnippet.vim/autoload/vital/_neosnippet/System/Cache' === added file 'vim/bundle/neosnippet.vim/autoload/vital/_neosnippet/System/Cache.vim' --- vim/bundle/neosnippet.vim/autoload/vital/_neosnippet/System/Cache.vim 1970-01-01 00:00:00 +0000 +++ vim/bundle/neosnippet.vim/autoload/vital/_neosnippet/System/Cache.vim 2015-08-25 11:01:00 +0000 @@ -0,0 +1,85 @@ +" Utilities for output cache. + +let s:save_cpo = &cpo +set cpo&vim + +function! s:_vital_loaded(V) abort + let s:V = a:V + let s:S = s:V.import('Data.String') +endfunction + +function! s:_vital_depends() abort + return ['Data.String'] +endfunction + +function! s:getfilename(cache_dir, filename) abort + return s:_encode_name(a:cache_dir, a:filename) +endfunction + +function! s:filereadable(cache_dir, filename) abort + let cache_name = s:_encode_name(a:cache_dir, a:filename) + return filereadable(cache_name) +endfunction + +function! s:readfile(cache_dir, filename) abort + let cache_name = s:_encode_name(a:cache_dir, a:filename) + return filereadable(cache_name) ? readfile(cache_name) : [] +endfunction + +function! s:writefile(cache_dir, filename, list) abort + let cache_name = s:_encode_name(a:cache_dir, a:filename) + + call writefile(a:list, cache_name) +endfunction + +function! s:delete(cache_dir, filename) abort + echoerr 'System.Cache.delete() is obsolete. Use its deletefile() instead.' + return call('s:deletefile', a:cache_dir, a:filename) +endfunction + +function! s:deletefile(cache_dir, filename) abort + let cache_name = s:_encode_name(a:cache_dir, a:filename) + return delete(cache_name) +endfunction + +function! s:_encode_name(cache_dir, filename) abort + " Check cache directory. + if !isdirectory(a:cache_dir) + call mkdir(a:cache_dir, 'p') + endif + let cache_dir = a:cache_dir + if cache_dir !~ '/$' + let cache_dir .= '/' + endif + + return cache_dir . s:_create_hash(cache_dir, a:filename) +endfunction + +function! s:check_old_cache(cache_dir, filename) abort + " Check old cache file. + let cache_name = s:_encode_name(a:cache_dir, a:filename) + let ret = getftime(cache_name) == -1 + \ || getftime(cache_name) <= getftime(a:filename) + if ret && filereadable(cache_name) + " Delete old cache. + call delete(cache_name) + endif + + return ret +endfunction + +function! s:_create_hash(dir, str) abort + if len(a:dir) + len(a:str) < 150 + let hash = substitute(substitute( + \ a:str, ':', '=-', 'g'), '[/\\]', '=+', 'g') + else + let hash = s:S.hash(a:str) + endif + + return hash +endfunction + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim:set et ts=2 sts=2 sw=2 tw=0: === removed file 'vim/bundle/neosnippet.vim/autoload/vital/_neosnippet/System/Cache/Deprecated.vim' --- vim/bundle/neosnippet.vim/autoload/vital/_neosnippet/System/Cache/Deprecated.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/autoload/vital/_neosnippet/System/Cache/Deprecated.vim 1970-01-01 00:00:00 +0000 @@ -1,101 +0,0 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_neosnippet#System#Cache#Deprecated#import() abort - return map({'filereadable': '', '_vital_depends': '', 'delete': '', 'readfile': '', 'getfilename': '', 'deletefile': '', 'check_old_cache': '', 'writefile': '', '_vital_loaded': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_neosnippet#System#Cache#Deprecated#import() abort', printf("return map({'filereadable': '', '_vital_depends': '', 'delete': '', 'readfile': '', 'getfilename': '', 'deletefile': '', 'check_old_cache': '', 'writefile': '', '_vital_loaded': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ -" Note: -" This module is deprecated. Use a new `Syste.Cache` instead. - -let s:save_cpo = &cpo -set cpo&vim - -function! s:_vital_loaded(V) abort - let s:V = a:V - let s:S = s:V.import('Data.String') -endfunction - -function! s:_vital_depends() abort - return ['Data.String'] -endfunction - -function! s:getfilename(cache_dir, filename) abort - return s:_encode_name(a:cache_dir, a:filename) -endfunction - -function! s:filereadable(cache_dir, filename) abort - let cache_name = s:_encode_name(a:cache_dir, a:filename) - return filereadable(cache_name) -endfunction - -function! s:readfile(cache_dir, filename) abort - let cache_name = s:_encode_name(a:cache_dir, a:filename) - return filereadable(cache_name) ? readfile(cache_name) : [] -endfunction - -function! s:writefile(cache_dir, filename, list) abort - let cache_name = s:_encode_name(a:cache_dir, a:filename) - - call writefile(a:list, cache_name) -endfunction - -function! s:delete(cache_dir, filename) abort - echoerr 'System.Cache.delete() is obsolete. Use its deletefile() instead.' - return call('s:deletefile', a:cache_dir, a:filename) -endfunction - -function! s:deletefile(cache_dir, filename) abort - let cache_name = s:_encode_name(a:cache_dir, a:filename) - return delete(cache_name) -endfunction - -function! s:_encode_name(cache_dir, filename) abort - " Check cache directory. - if !isdirectory(a:cache_dir) - call mkdir(a:cache_dir, 'p') - endif - let cache_dir = a:cache_dir - if cache_dir !~# '/$' - let cache_dir .= '/' - endif - - return cache_dir . s:_create_hash(cache_dir, a:filename) -endfunction - -function! s:check_old_cache(cache_dir, filename) abort - " Check old cache file. - let cache_name = s:_encode_name(a:cache_dir, a:filename) - let ret = getftime(cache_name) == -1 - \ || getftime(cache_name) <= getftime(a:filename) - if ret && filereadable(cache_name) - " Delete old cache. - call delete(cache_name) - endif - - return ret -endfunction - -function! s:_create_hash(dir, str) abort - if len(a:dir) + len(a:str) < 150 - let hash = substitute(substitute( - \ a:str, ':', '=-', 'g'), '[/\\]', '=+', 'g') - else - let hash = s:S.hash(a:str) - endif - - return hash -endfunction - -let &cpo = s:save_cpo -unlet s:save_cpo - -" vim:set et ts=2 sts=2 sw=2 tw=0: === removed file 'vim/bundle/neosnippet.vim/autoload/vital/neosnippet.vim' --- vim/bundle/neosnippet.vim/autoload/vital/neosnippet.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/autoload/vital/neosnippet.vim 1970-01-01 00:00:00 +0000 @@ -1,302 +0,0 @@ -let s:plugin_name = expand(':t:r') -let s:vital_base_dir = expand(':h') -let s:project_root = expand(':h:h:h') -let s:has_latest_module = isdirectory(expand(':h') . '/__latest__') -let s:is_vital_vim = s:plugin_name is# '_latest__' - -let s:loaded = {} -let s:cache_sid = {} - -" function() wrapper -if v:version > 703 || v:version == 703 && has('patch1170') - function! s:_function(fstr) abort - return function(a:fstr) - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - let s:_s = '' . s:_SID() . '_' - function! s:_function(fstr) abort - return function(substitute(a:fstr, 's:', s:_s, 'g')) - endfunction -endif - -function! vital#{s:plugin_name}#of() abort - return s:new(s:plugin_name) -endfunction - -let s:Vital = {} - -function! s:new(plugin_name) abort - let base = deepcopy(s:Vital) - let base.plugin_name = a:plugin_name - return base -endfunction - -function! s:vital_files() abort - if !exists('s:vital_files') - let s:vital_files = map( - \ s:is_vital_vim ? s:_global_vital_files() : s:_self_vital_files(), - \ 'fnamemodify(v:val, ":p:gs?[\\\\/]?/?")') - endif - return copy(s:vital_files) -endfunction -let s:Vital.vital_files = s:_function('s:vital_files') - -function! s:import(name, ...) abort dict - let target = {} - let functions = [] - for a in a:000 - if type(a) == type({}) - let target = a - elseif type(a) == type([]) - let functions = a - endif - unlet a - endfor - let module = self._import(a:name) - if empty(functions) - call extend(target, module, 'keep') - else - for f in functions - if has_key(module, f) && !has_key(target, f) - let target[f] = module[f] - endif - endfor - endif - return target -endfunction -let s:Vital.import = s:_function('s:import') - -function! s:load(...) abort dict - for arg in a:000 - let [name; as] = type(arg) == type([]) ? arg[: 1] : [arg, arg] - let target = split(join(as, ''), '\W\+') - let dict = self - let dict_type = type({}) - while !empty(target) - let ns = remove(target, 0) - if !has_key(dict, ns) - let dict[ns] = {} - endif - if type(dict[ns]) == dict_type - let dict = dict[ns] - else - unlet dict - break - endif - endwhile - if exists('dict') - call extend(dict, self._import(name)) - endif - unlet arg - endfor - return self -endfunction -let s:Vital.load = s:_function('s:load') - -function! s:unload() abort dict - let s:loaded = {} - let s:cache_sid = {} - unlet! s:vital_files -endfunction -let s:Vital.unload = s:_function('s:unload') - -function! s:exists(name) abort dict - let b = exists(printf('*vital#_%s#%s#import', self.plugin_name, substitute(a:name, '\.', '#', 'g'))) - if b - return b - endif - let name_path = substitute(a:name, '\.', '/', 'g') - let path = printf('%s/_%s/%s.vim', s:vital_base_dir, self.plugin_name, name_path) - let b = filereadable(path) - if b - return b - endif - let path = printf('%s/_%s/%s.vim', s:vital_base_dir, '_latest__', name_path) - let b = filereadable(path) -endfunction -let s:Vital.exists = s:_function('s:exists') - -function! s:search(pattern) abort dict - let paths = s:_extract_files(a:pattern, self.vital_files()) - let modules = sort(map(paths, 's:_file2module(v:val)')) - return s:_uniq(modules) -endfunction -let s:Vital.search = s:_function('s:search') - -function! s:_self_vital_files() abort - let base = s:vital_base_dir . '/*/**/*.vim' - return split(glob(base, 1), "\n") -endfunction - -function! s:_global_vital_files() abort - let pattern = 'autoload/vital/__latest__/**/*.vim' - return split(globpath(&runtimepath, pattern, 1), "\n") -endfunction - -function! s:_extract_files(pattern, files) abort - let tr = {'.': '/', '*': '[^/]*', '**': '.*'} - let target = substitute(a:pattern, '\.\|\*\*\?', '\=tr[submatch(0)]', 'g') - let regexp = printf('autoload/vital/[^/]\+/%s.vim$', target) - return filter(a:files, 'v:val =~# regexp') -endfunction - -function! s:_file2module(file) abort - let filename = fnamemodify(a:file, ':p:gs?[\\/]?/?') - let tail = matchstr(filename, 'autoload/vital/_\w\+/\zs.*\ze\.vim$') - return join(split(tail, '[\\/]\+'), '.') -endfunction - -" @param {string} name e.g. Data.List -function! s:_import(name) abort dict - if has_key(s:loaded, a:name) - return copy(s:loaded[a:name]) - endif - let module = self._get_module(a:name) - if has_key(module, '_vital_created') - call module._vital_created(module) - endif - let export_module = filter(copy(module), 'v:key =~# "^\\a"') - " Cache module before calling module.vital_loaded() to avoid cyclic - " dependences but remove the cache if module._vital_loaded() fails. - " let s:loaded[a:name] = export_module - let s:loaded[a:name] = export_module - if has_key(module, '_vital_loaded') - try - call module._vital_loaded(vital#{s:plugin_name}#of()) - catch - unlet s:loaded[a:name] - throw 'vital: fail to call ._vital_loaded(): ' . v:exception - endtry - endif - return copy(s:loaded[a:name]) -endfunction -let s:Vital._import = s:_function('s:_import') - -" s:_get_module() returns module object wihch has all script local functions. -function! s:_get_module(name) abort dict - try - let module = vital#_{self.plugin_name}#{substitute(a:name, '\.', '#', 'g')}#import() - catch /E117: Unknown function:/ - if !s:has_latest_module - throw 'vital: module not found: ' . a:name - endif - " Retry to support loading self modules. - let module = s:_get_latest_module(a:name) - endtry - return module -endfunction -let s:Vital._get_module = s:_function('s:_get_module') - -function! s:_get_latest_module(name) abort - return s:sid2sfuncs(s:_module_sid(a:name)) -endfunction - -function! s:_module_sid(name) abort - let module_rel_path = 'autoload/vital/__latest__/' . substitute(a:name, '\.', '/', 'g') . '.vim' - let module_full_path = s:_unify_path(get(split(globpath(s:_module_sid_base_dir(), module_rel_path, 0), "\n"), 0, '')) - if !filereadable(module_full_path) - throw 'vital: module not found: ' . a:name - endif - let p = substitute(module_rel_path, '/', '[/\\\\]\\+', 'g') - let sid = s:_sid(module_full_path, p) - if !sid - call s:_source(module_full_path) - let sid = s:_sid(module_full_path, p) - if !sid - throw 'vital: cannot get from path' - endif - endif - return sid -endfunction - -function! s:_module_sid_base_dir() abort - return s:is_vital_vim ? &rtp : s:project_root -endfunction - -function! s:_source(path) abort - execute 'source' fnameescape(a:path) -endfunction - -" @vimlint(EVL102, 1, l:_) -" @vimlint(EVL102, 1, l:__) -function! s:_sid(fullpath, filter_pattern) abort - if has_key(s:cache_sid, a:fullpath) - return s:cache_sid[a:fullpath] - endif - for line in filter(split(s:_redir(':scriptnames'), "\n"), 'v:val =~# a:filter_pattern') - let [_, sid, path; __] = matchlist(line, '^\s*\(\d\+\):\s\+\(.\+\)\s*$') - if s:_unify_path(path) is# a:fullpath - let s:cache_sid[a:fullpath] = sid - return s:cache_sid[a:fullpath] - endif - endfor - return 0 -endfunction - -function! s:_redir(cmd) abort - let [save_verbose, save_verbosefile] = [&verbose, &verbosefile] - set verbose=0 verbosefile= - redir => res - silent! execute a:cmd - redir END - let [&verbose, &verbosefile] = [save_verbose, save_verbosefile] - return res -endfunction - -if filereadable(expand(':r') . '.VIM') - let s:_unify_path_cache = {} - " resolve() is slow, so we cache results. - " Note: On windows, vim can't expand path names from 8.3 formats. - " So if getting full path via and $HOME was set as 8.3 format, - " vital load duplicated scripts. Below's :~ avoid this issue. - function! s:_unify_path(path) abort - if has_key(s:_unify_path_cache, a:path) - return s:_unify_path_cache[a:path] - endif - let value = tolower(fnamemodify(resolve(fnamemodify( - \ a:path, ':p')), ':~:gs?[\\/]?/?')) - let s:_unify_path_cache[a:path] = value - return value - endfunction -else - function! s:_unify_path(path) abort - return resolve(fnamemodify(a:path, ':p:gs?[\\/]?/?')) - endfunction -endif - -" copied and modified from Vim.ScriptLocal -let s:SNR = join(map(range(len("\")), '"[\\x" . printf("%0x", char2nr("\"[v:val])) . "]"'), '') -function! s:sid2sfuncs(sid) abort - let fs = split(s:_redir(printf(':function /^%s%s_', s:SNR, a:sid)), "\n") - let r = {} - let pattern = printf('\m^function\s%d_\zs\w\{-}\ze(', a:sid) - for fname in map(fs, 'matchstr(v:val, pattern)') - let r[fname] = function(s:_sfuncname(a:sid, fname)) - endfor - return r -endfunction - -"" Return funcname of script local functions with SID -function! s:_sfuncname(sid, funcname) abort - return printf('%s_%s', a:sid, a:funcname) -endfunction - -if exists('*uniq') - function! s:_uniq(list) abort - return uniq(a:list) - endfunction -else - function! s:_uniq(list) abort - let i = len(a:list) - 1 - while 0 < i - if a:list[i] ==# a:list[i - 1] - call remove(a:list, i) - endif - let i -= 1 - endwhile - return a:list - endfunction -endif === modified file 'vim/bundle/neosnippet.vim/autoload/vital/neosnippet.vital' --- vim/bundle/neosnippet.vim/autoload/vital/neosnippet.vital 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/autoload/vital/neosnippet.vital 2015-08-25 11:01:00 +0000 @@ -1,8 +1,8 @@ neosnippet -024411ba1a5f3d545899c1be6eaa40bba036ae0d +1c73bcc Prelude Data.List Process +System.Cache Data.String -System.Cache.Deprecated === modified file 'vim/bundle/neosnippet.vim/doc/neosnippet.txt' --- vim/bundle/neosnippet.vim/doc/neosnippet.txt 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/doc/neosnippet.txt 2015-08-25 11:01:00 +0000 @@ -1,7 +1,7 @@ *neosnippet.txt* The neo-snippet plugin contains snippet source -Version: 5.0 +Version: 4.2 Author: Shougo License: MIT license {{{ Permission is hereby granted, free of charge, to any person obtaining @@ -88,9 +88,9 @@ *:NeoSnippetEdit* :NeoSnippetEdit [{options}] [filetype] - Opens the snippets for a given [filetype] to edit. It - automatically selects the current buffer's filetype unless you - specify another one by [filetype]. + Opens the snippets for a given [filetype] to edit. It automatically + selects the current buffer's filetype unless you specify + another one by [filetype]. If the path to [filetype] snippets is a directory, it automatically selects "[filetype].snip" in the [filetype] @@ -104,9 +104,6 @@ the behavior of the command. Note: You must escape spaces with a backslash "\". - Note: You must set |g:neosnippet#snippets_directory| before - using it. - *neosnippet-edit-options-vertical* -vertical Split the window vertically. @@ -158,12 +155,9 @@ several files if available. For example if you edit a "Vim" file it loads the snippets from: - - "vim.snip" - - "vim.snippets" - - "vim_*.snip" - - "vim_*.snippets" + - "vim.snip*" + - "vim_*.snip*" - "vim/**/*.snip" - - "vim/**/*.snippets" The default value is ''. @@ -204,12 +198,9 @@ *g:neosnippet#enable_snipmate_compatibility* g:neosnippet#enable_snipmate_compatibility If this variable is not 0, neosnippet will enable the snipMate - compatibility features: - - 1. Define Filename() function. - 2. Load |g:snippets_dir| and snipMate snippets files from + compatibility feature (For example: Filename() function) and + load |g:snippets_dir| and snipMate snippets automatically from 'runtimepath'. - 3. Enable file snippets feature in snipMate. The default value is 0. @@ -228,23 +219,6 @@ The default value is 1. - *g:neosnippet#enable_completed_snippet* -g:neosnippet#enable_completed_snippet - If this variable is not 0, neosnippet will expand the function - prototype when |CompleteDone| autocmd. - Note: It is disabled if you have installed - |neopairs.vim| plugin. - - The default value is 0. - - *g:neosnippet#enable_auto_clear_markers* -g:neosnippet#enable_auto_clear_markers - If this variable is not 0, neosnippet will clear the markers - in the buffer when |BufWritePost|, |CursorMoved| and - |CursorMovedI| autocmd. - - The default value is 1. - *g:neosnippet#scope_aliases* g:neosnippet#scope_aliases It is a dictionary that associating certain filetypes with @@ -264,11 +238,6 @@ Default value is "$XDG_CACHE_HOME/neosnippet" or expand("~/.cache/neosnippet"); the absolute path of it. - *b:neosnippet_disable_snippet_triggers* -b:neosnippet_disable_snippet_triggers - Specifies the triggers which disables in the buffer. - It is useful to disable some snippet triggers. - ------------------------------------------------------------------------------ KEY MAPPINGS *neosnippet-key-mappings* @@ -342,32 +311,6 @@ \ neosnippet#expandable_or_jumpable() ? \ "\(neosnippet_expand_or_jump)" : "\" < - *neosnippet#anonymous()* -neosnippet#anonymous({snippet}) - It defines anonymous snippet. - {snippet} is snippet definition. - {options} is snippet option. - You can expand snippet definition without defining snippet - trigger. - Note: You can use this function with |map-|. -> - inoremap (( - \ =neosnippet#anonymous('\left(${1}\right)${0}') - " OR - inoremap (( - \ neosnippet#anonymous('\left(${1}\right)${0}') -< - *neosnippet#expand()* -neosnippet#expand({trigger}) - It expands the snippet trigger. - {trigger} is snippet trigger. - Note: You can use this function with |map-|. -> - inoremap test - \ i=neosnippet#expand('date_english') - nnoremap test - \ neosnippet#expand('date_english') - ------------------------------------------------------------------------------ FUNCTIONS *neosnippet-functions* @@ -387,12 +330,12 @@ xmap (neosnippet_expand_target) " SuperTab like snippets' behavior. - "imap - " \ pumvisible() ? "\" : - " \ neosnippet#expandable_or_jumpable() ? - " \ "\(neosnippet_expand_or_jump)" : "\" + "imap neosnippet#expandable_or_jumpable() ? + " \ "\(neosnippet_expand_or_jump)" + " \: pumvisible() ? "\" : "\" "smap neosnippet#expandable_or_jumpable() ? - " \ "\(neosnippet_expand_or_jump)" : "\" + " \ "\(neosnippet_expand_or_jump)" + " \: "\" " For conceal markers. if has('conceal') @@ -408,8 +351,6 @@ It is quite easy to create your own snippets. You can use the example below to get started. -Note: The snippets file extension must be ".snip" or ".snippets". - Example: > @@ -728,12 +669,7 @@ #!/usr/bin/env ruby -You can load a Vim script file for snippets. - -> - source go.vim < - ============================================================================== UNITE SOURCES *neosnippet-unite-sources* @@ -772,7 +708,7 @@ A: You should use "options word" in the snippet definition. This changes the expansion behavior to a word boundary or set -|g:neosnippet#expand_word_boundary|. +|g:neosnippet#enable_word_expand|. > snippet date options word === modified file 'vim/bundle/neosnippet.vim/indent/neosnippet.vim' --- vim/bundle/neosnippet.vim/indent/neosnippet.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/indent/neosnippet.vim 2015-08-25 11:01:00 +0000 @@ -40,7 +40,7 @@ setlocal indentexpr=SnippetsIndent() -function! SnippetsIndent() abort "{{{ +function! SnippetsIndent() "{{{ let line = getline('.') let prev_line = (line('.') == 1)? '' : getline(line('.')-1) let syntax = '\%(include\|snippet\|abbr\|prev_word\|delete\|alias\|options\|regexp\)' === modified file 'vim/bundle/neosnippet.vim/plugin/neosnippet.vim' --- vim/bundle/neosnippet.vim/plugin/neosnippet.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/plugin/neosnippet.vim 2015-08-25 11:01:00 +0000 @@ -33,6 +33,9 @@ let s:save_cpo = &cpo set cpo&vim +" Obsolute options check. "{{{ +"}}} + " Plugin key-mappings. "{{{ inoremap (neosnippet_expand_or_jump) \ neosnippet#mappings#expand_or_jump_impl() @@ -68,21 +71,19 @@ augroup END"}}} " Commands. "{{{ -command! -nargs=? -bar - \ -complete=customlist,neosnippet#commands#_edit_complete +command! -nargs=? -complete=customlist,neosnippet#commands#_edit_complete \ NeoSnippetEdit \ call neosnippet#commands#_edit() -command! -nargs=? -bar - \ -complete=customlist,neosnippet#commands#_filetype_complete +command! -nargs=? -complete=customlist,neosnippet#commands#_filetype_complete \ NeoSnippetMakeCache \ call neosnippet#commands#_make_cache() -command! -nargs=1 -bar -complete=file +command! -nargs=1 -complete=file \ NeoSnippetSource \ call neosnippet#commands#_source() -command! -bar NeoSnippetClearMarkers +command! NeoSnippetClearMarkers \ call neosnippet#commands#_clear_markers() "}}} === modified file 'vim/bundle/neosnippet.vim/rplugin/python3/deoplete/sources/neosnippet.py' --- vim/bundle/neosnippet.vim/rplugin/python3/deoplete/sources/neosnippet.py 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/rplugin/python3/deoplete/sources/neosnippet.py 2015-08-25 11:01:00 +0000 @@ -31,18 +31,14 @@ Base.__init__(self, vim) self.name = 'neosnippet' - self.mark = '[ns]' + self.mark = '[nsnip]' self.rank = 200 - self.__cache = {} - - def on_event(self, context): - self.__cache[context['filetype']] = self.vim.eval( - 'values(neosnippet#helpers#get_completion_snippets())') - for candidate in self.__cache[context['filetype']]: + + def gather_candidates(self, context): + return self.vim.eval('values(neosnippet#helpers#get_completion_snippets())') + + def on_post_filter(self, context): + for candidate in context['candidates']: candidate['dup'] = 1 - candidate['menu'] = candidate['menu_abbr'] + return context['candidates'] - def gather_candidates(self, context): - if not self.__cache: - self.on_event(context) - return self.__cache.get(context['filetype'], []) === modified file 'vim/bundle/neosnippet.vim/syntax/neosnippet.vim' --- vim/bundle/neosnippet.vim/syntax/neosnippet.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/syntax/neosnippet.vim 2015-08-25 11:01:00 +0000 @@ -52,7 +52,7 @@ \ '\\[`]' contained syntax match neosnippetKeyword - \ '^\%(include\|source\|snippet\|abbr\|prev_word\|delete\|alias\|options\|regexp\|TARGET\)' contained + \ '^\%(include\|snippet\|abbr\|prev_word\|delete\|alias\|options\|regexp\|TARGET\)' contained syntax keyword neosnippetOption \ head word indent contained syntax match neosnippetPrevWords @@ -75,10 +75,6 @@ \ '^include\s.*$' contains=neosnippetInclude,neosnippetKeyword syntax match neosnippetInclude \ '\s\+.*$' contained -syntax match neosnippetStatementSource - \ '^source\s.*$' contains=neosnippetSource,neosnippetKeyword -syntax match neosnippetSource - \ '\s\+.*$' contained syntax match neosnippetStatementDelete \ '^delete\s.*$' contains=neosnippetDelete,neosnippetKeyword syntax match neosnippetDelete @@ -103,7 +99,6 @@ highlight def link neosnippetVariable Special highlight def link neosnippetComment Comment highlight def link neosnippetInclude PreProc -highlight def link neosnippetSource PreProc highlight def link neosnippetDelete PreProc highlight def link neosnippetOption PreProc highlight def link neosnippetAlias Identifier === removed directory 'vim/bundle/neosnippet.vim/test' === removed file 'vim/bundle/neosnippet.vim/test/functions.vim' --- vim/bundle/neosnippet.vim/test/functions.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/neosnippet.vim/test/functions.vim 1970-01-01 00:00:00 +0000 @@ -1,137 +0,0 @@ -let s:suite = themis#suite('toml') -let s:assert = themis#helper('assert') - -function! s:suite.get_in_paren() abort - call s:assert.equals(neosnippet#parser#_get_in_paren( - \ '(', ')', - \ '(foobar)'), - \ 'foobar') - call s:assert.equals(neosnippet#parser#_get_in_paren( - \ '(', ')', - \ '(foobar, baz)'), - \ 'foobar, baz') - call s:assert.equals(neosnippet#parser#_get_in_paren( - \ '(', ')', - \ '(foobar, (baz))'), - \ 'foobar, (baz)') - call s:assert.equals(neosnippet#parser#_get_in_paren( - \ '(', ')', - \ 'foobar('), - \ '') - call s:assert.equals(neosnippet#parser#_get_in_paren( - \ '(', ')', - \ 'foobar()'), - \ '') - call s:assert.equals(neosnippet#parser#_get_in_paren( - \ '(', ')', - \ 'foobar(fname)'), - \ 'fname') - call s:assert.equals(neosnippet#parser#_get_in_paren( - \ '(', ')', - \ 'wait() wait(long, int)'), - \ 'long, int') -endfunction - -function! s:suite.get_completed_snippet() abort - call s:assert.equals(neosnippet#parser#_get_completed_snippet({ - \ 'word' : 'foo(', 'abbr' : 'foo()', - \ 'menu' : '', 'info' : '' - \ }, ''), ')${1}') - - call s:assert.equals(neosnippet#parser#_get_completed_snippet({ - \ 'word' : 'foo(', 'abbr' : '', - \ 'menu' : '', 'info' : '' - \ }, ''), '${1})${2}') - - call s:assert.equals(neosnippet#parser#_get_completed_snippet({ - \ 'word' : 'foo(', 'abbr' : 'foo(hoge)', - \ 'menu' : '', 'info' : '' - \ }, ''), '${1:#:hoge})${2}') - - call s:assert.equals(neosnippet#parser#_get_completed_snippet({ - \ 'word' : 'foo', 'abbr' : 'foo(hoge)', - \ 'menu' : '', 'info' : '' - \ }, ''), '(${1:#:hoge})${2}') - - call s:assert.equals(neosnippet#parser#_get_completed_snippet({ - \ 'word' : 'foo(', 'abbr' : 'foo(hoge, piyo)', - \ 'menu' : '', 'info' : '' - \ }, ''), '${1:#:hoge}, ${2:#:piyo})${3}') - - call s:assert.equals(neosnippet#parser#_get_completed_snippet({ - \ 'word' : 'foo(', 'abbr' : 'foo(hoge, piyo(foobar))', - \ 'menu' : '', 'info' : '' - \ }, ''), '${1:#:hoge}, ${2:#:piyo()})${3}') - - call s:assert.equals(neosnippet#parser#_get_completed_snippet({ - \ 'word' : 'foo(', 'abbr' : 'foo(hoge[, abc])', - \ 'menu' : '', 'info' : '' - \ }, ''), '${1:#:hoge[, abc]})${2}') - - call s:assert.equals(neosnippet#parser#_get_completed_snippet({ - \ 'word' : 'foo(', 'abbr' : 'foo(...)', - \ 'menu' : '', 'info' : '' - \ }, ''), '${1:#:...})${2}') - - call s:assert.equals(neosnippet#parser#_get_completed_snippet({ - \ 'word' : 'foo(', 'abbr' : 'foo(hoge, ...)', - \ 'menu' : '', 'info' : '' - \ }, ''), '${1:#:hoge}${2:#:, ...})${3}') - - call s:assert.equals(neosnippet#parser#_get_completed_snippet({ - \ 'word' : 'foo{', 'abbr' : 'foo{', - \ 'menu' : '', 'info' : '' - \ }, ''), '${1}}${2}') - - call s:assert.equals(neosnippet#parser#_get_completed_snippet({ - \ 'word' : 'foo{', 'abbr' : 'foo{piyo}', - \ 'menu' : '', 'info' : '' - \ }, ''), '${1:#:piyo}}${2}') - - call s:assert.equals(neosnippet#parser#_get_completed_snippet({ - \ 'word' : 'Dictionary', 'abbr' : 'Dictionary(foo)', - \ 'menu' : '', 'info' : '' - \ }, ''), '<${1:#:Key}, ${2:#:Value}>(${3:#:foo})${4}') - - call s:assert.equals(neosnippet#parser#_get_completed_snippet({ - \ 'word' : 'Dictionary(', - \ 'abbr' : 'Dictionary Dictionary(foo)', - \ 'menu' : '', 'info' : '' - \ }, ''), '${1:#:foo})${2}') - - call s:assert.equals(neosnippet#parser#_get_completed_snippet({ - \ 'word' : 'Dictionary(', 'abbr' : '', - \ 'menu' : '', 'info' : '' - \ }, '('), '') - - call s:assert.equals(neosnippet#parser#_get_completed_snippet({ - \ 'word' : 'Dictionary(', 'abbr' : 'Dictionary(foo)', - \ 'menu' : '', 'info' : '' - \ }, '('), '') - - call s:assert.equals(neosnippet#parser#_get_completed_snippet({ - \ 'word' : 'Dictionary(', 'abbr' : 'Dictionary(foo)', - \ 'menu' : '', 'info' : '' - \ }, ')'), '${1:#:foo})${2}') - - call s:assert.equals(neosnippet#parser#_get_completed_snippet({ - \ 'word' : 'Dictionary', 'abbr' : 'Dictionary(foo)', - \ 'menu' : '', 'info' : '' - \ }, ''), '(${1:#:foo})${2}') - - call s:assert.equals(neosnippet#parser#_get_completed_snippet({ - \ 'word' : 'forEach', 'abbr' : 'forEach(BiConsumer)', - \ 'menu' : '', 'info' : '' - \ }, ''), '(${1:#:BiConsumer<>})${2}') - - call s:assert.equals(neosnippet#parser#_get_completed_snippet({ - \ 'word' : 'for[', 'abbr' : '', - \ 'menu' : '', 'info' : '' - \ }, ''), '${1}]${2}') - - call s:assert.equals(neosnippet#parser#_get_completed_snippet({ - \ 'word' : 'something', 'abbr' : 'something(else)', - \ 'menu' : '', 'info' : '', 'snippet' : '(${1:custom})${2}' - \ }, ''), '(${1:custom})${2}') -endfunction - === modified file 'vim/bundle/unite-outline/.git/config' (properties changed: -x to +x) === modified file 'vim/bundle/unite-outline/.git/hooks/applypatch-msg.sample' --- vim/bundle/unite-outline/.git/hooks/applypatch-msg.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/.git/hooks/applypatch-msg.sample 2015-08-25 11:01:00 +0000 @@ -10,6 +10,6 @@ # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup -commitmsg="$(git rev-parse --git-path hooks/commit-msg)" -test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} +test -x "$GIT_DIR/hooks/commit-msg" && + exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} : === modified file 'vim/bundle/unite-outline/.git/hooks/pre-applypatch.sample' --- vim/bundle/unite-outline/.git/hooks/pre-applypatch.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/.git/hooks/pre-applypatch.sample 2015-08-25 11:01:00 +0000 @@ -9,6 +9,6 @@ # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup -precommit="$(git rev-parse --git-path hooks/pre-commit)" -test -x "$precommit" && exec "$precommit" ${1+"$@"} +test -x "$GIT_DIR/hooks/pre-commit" && + exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} : === modified file 'vim/bundle/unite-outline/.git/hooks/pre-push.sample' --- vim/bundle/unite-outline/.git/hooks/pre-push.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/.git/hooks/pre-push.sample 2015-08-25 11:01:00 +0000 @@ -24,6 +24,7 @@ z40=0000000000000000000000000000000000000000 +IFS=' ' while read local_ref local_sha remote_ref remote_sha do if [ "$local_sha" = $z40 ] === modified file 'vim/bundle/unite-outline/.git/hooks/update.sample' --- vim/bundle/unite-outline/.git/hooks/update.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/.git/hooks/update.sample 2015-08-25 11:01:00 +0000 @@ -1,6 +1,6 @@ #!/bin/sh # -# An example hook script to block unannotated tags from entering. +# An example hook script to blocks unannotated tags from entering. # Called by "git receive-pack" with arguments: refname sha1-old sha1-new # # To enable this hook, rename this file to "update". === modified file 'vim/bundle/unite-outline/.git/index' Binary files vim/bundle/unite-outline/.git/index 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/index 2015-08-27 20:25:35 +0000 differ === modified file 'vim/bundle/unite-outline/.git/logs/HEAD' --- vim/bundle/unite-outline/.git/logs/HEAD 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/.git/logs/HEAD 2015-08-27 20:25:35 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 1950ac514ba20409fd517c52a7102526ad8e16af Jan Pobrislo 1470298380 +0200 clone: from https://github.com/Shougo/unite-outline +0000000000000000000000000000000000000000 0686316a5bd40f10cfd153d3c2d4c4dcfc1ab10a Jan Pobrislo 1440707066 +0200 clone: from https://github.com/Shougo/unite-outline === modified file 'vim/bundle/unite-outline/.git/logs/refs/heads/master' --- vim/bundle/unite-outline/.git/logs/refs/heads/master 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/.git/logs/refs/heads/master 2015-08-27 20:25:35 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 1950ac514ba20409fd517c52a7102526ad8e16af Jan Pobrislo 1470298380 +0200 clone: from https://github.com/Shougo/unite-outline +0000000000000000000000000000000000000000 0686316a5bd40f10cfd153d3c2d4c4dcfc1ab10a Jan Pobrislo 1440707066 +0200 clone: from https://github.com/Shougo/unite-outline === modified file 'vim/bundle/unite-outline/.git/logs/refs/remotes/origin/HEAD' --- vim/bundle/unite-outline/.git/logs/refs/remotes/origin/HEAD 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/.git/logs/refs/remotes/origin/HEAD 2015-08-27 20:25:35 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 1950ac514ba20409fd517c52a7102526ad8e16af Jan Pobrislo 1470298380 +0200 clone: from https://github.com/Shougo/unite-outline +0000000000000000000000000000000000000000 0686316a5bd40f10cfd153d3c2d4c4dcfc1ab10a Jan Pobrislo 1440707066 +0200 clone: from https://github.com/Shougo/unite-outline === added directory 'vim/bundle/unite-outline/.git/objects/01' === added file 'vim/bundle/unite-outline/.git/objects/01/0a52981762af6210d9f703cb375f1f336042d1' Binary files vim/bundle/unite-outline/.git/objects/01/0a52981762af6210d9f703cb375f1f336042d1 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/01/0a52981762af6210d9f703cb375f1f336042d1 2015-08-27 20:25:35 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/06' === added file 'vim/bundle/unite-outline/.git/objects/06/86316a5bd40f10cfd153d3c2d4c4dcfc1ab10a' --- vim/bundle/unite-outline/.git/objects/06/86316a5bd40f10cfd153d3c2d4c4dcfc1ab10a 1970-01-01 00:00:00 +0000 +++ vim/bundle/unite-outline/.git/objects/06/86316a5bd40f10cfd153d3c2d4c4dcfc1ab10a 2015-08-27 20:25:35 +0000 @@ -0,0 +1,2 @@ +x]J0}*(\4 +NNNbcj i`o@I*3c҇MKJn:gZRqB_Xy+u0_^E,I8i<줣,.Yn޶R}+}-;F%¬u{Ix!CNw+ُ*u< mר&~6Hc&^8h \ No newline at end of file === added directory 'vim/bundle/unite-outline/.git/objects/09' === added file 'vim/bundle/unite-outline/.git/objects/09/26e4376849fc20eacc6c93da152d3ca61ac919' Binary files vim/bundle/unite-outline/.git/objects/09/26e4376849fc20eacc6c93da152d3ca61ac919 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/09/26e4376849fc20eacc6c93da152d3ca61ac919 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/unite-outline/.git/objects/0a/7111758debce2a9d000784b9d31bdb9b1b980c' Binary files vim/bundle/unite-outline/.git/objects/0a/7111758debce2a9d000784b9d31bdb9b1b980c 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/0a/7111758debce2a9d000784b9d31bdb9b1b980c 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/unite-outline/.git/objects/0a/8af8834ebf1134ebcc5f0ce61481892d86a0f0' Binary files vim/bundle/unite-outline/.git/objects/0a/8af8834ebf1134ebcc5f0ce61481892d86a0f0 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/0a/8af8834ebf1134ebcc5f0ce61481892d86a0f0 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/unite-outline/.git/objects/0a/e4c368d6702ddb954de0fdbea4a708dcaee2ec' Binary files vim/bundle/unite-outline/.git/objects/0a/e4c368d6702ddb954de0fdbea4a708dcaee2ec 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/0a/e4c368d6702ddb954de0fdbea4a708dcaee2ec 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/unite-outline/.git/objects/0a/fc33c1e443c3abb7a4664ebc9210885b002903' Binary files vim/bundle/unite-outline/.git/objects/0a/fc33c1e443c3abb7a4664ebc9210885b002903 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/0a/fc33c1e443c3abb7a4664ebc9210885b002903 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/0c' === added file 'vim/bundle/unite-outline/.git/objects/0c/64ede348d01d9ed86c5774e5a00bb843f34b1a' Binary files vim/bundle/unite-outline/.git/objects/0c/64ede348d01d9ed86c5774e5a00bb843f34b1a 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/0c/64ede348d01d9ed86c5774e5a00bb843f34b1a 2015-08-27 20:25:35 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/0d' === added file 'vim/bundle/unite-outline/.git/objects/0d/a037d54b4e2039fca7cb22606a07206182c841' Binary files vim/bundle/unite-outline/.git/objects/0d/a037d54b4e2039fca7cb22606a07206182c841 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/0d/a037d54b4e2039fca7cb22606a07206182c841 2015-08-27 20:25:35 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/0f' === added file 'vim/bundle/unite-outline/.git/objects/0f/b85ff222eb489586267666df3d3d9c33a06c3c' Binary files vim/bundle/unite-outline/.git/objects/0f/b85ff222eb489586267666df3d3d9c33a06c3c 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/0f/b85ff222eb489586267666df3d3d9c33a06c3c 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/unite-outline/.git/objects/11' === removed file 'vim/bundle/unite-outline/.git/objects/11/6dc1b536442b0a156acabf4c324dc576202ad4' Binary files vim/bundle/unite-outline/.git/objects/11/6dc1b536442b0a156acabf4c324dc576202ad4 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/11/6dc1b536442b0a156acabf4c324dc576202ad4 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/unite-outline/.git/objects/13/3e1ebeeeb5cb1a1f1e592117282794ab2bedab' Binary files vim/bundle/unite-outline/.git/objects/13/3e1ebeeeb5cb1a1f1e592117282794ab2bedab 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/13/3e1ebeeeb5cb1a1f1e592117282794ab2bedab 2015-08-27 20:25:35 +0000 differ === added file 'vim/bundle/unite-outline/.git/objects/13/5686bbc91a252e3a353f32cdf00258ea72bac3' Binary files vim/bundle/unite-outline/.git/objects/13/5686bbc91a252e3a353f32cdf00258ea72bac3 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/13/5686bbc91a252e3a353f32cdf00258ea72bac3 2015-08-27 20:25:35 +0000 differ === added file 'vim/bundle/unite-outline/.git/objects/15/1ffd3affc243e877b1af8235a11fd690762762' Binary files vim/bundle/unite-outline/.git/objects/15/1ffd3affc243e877b1af8235a11fd690762762 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/15/1ffd3affc243e877b1af8235a11fd690762762 2015-08-27 20:25:35 +0000 differ === removed file 'vim/bundle/unite-outline/.git/objects/15/20b480415b50cdb7ca7cd2655a7101e656be99' Binary files vim/bundle/unite-outline/.git/objects/15/20b480415b50cdb7ca7cd2655a7101e656be99 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/15/20b480415b50cdb7ca7cd2655a7101e656be99 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/unite-outline/.git/objects/16' === removed file 'vim/bundle/unite-outline/.git/objects/16/ef7ed04c4cc41f1c7c6afd99bb7d96b5a1c67b' Binary files vim/bundle/unite-outline/.git/objects/16/ef7ed04c4cc41f1c7c6afd99bb7d96b5a1c67b 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/16/ef7ed04c4cc41f1c7c6afd99bb7d96b5a1c67b 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/unite-outline/.git/objects/18/b526f892c3a450674b8f495d8d4515db1d7b14' Binary files vim/bundle/unite-outline/.git/objects/18/b526f892c3a450674b8f495d8d4515db1d7b14 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/18/b526f892c3a450674b8f495d8d4515db1d7b14 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/unite-outline/.git/objects/18/da8f56e7da867355575a578d53f757f6452ca2' Binary files vim/bundle/unite-outline/.git/objects/18/da8f56e7da867355575a578d53f757f6452ca2 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/18/da8f56e7da867355575a578d53f757f6452ca2 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/unite-outline/.git/objects/19/50ac514ba20409fd517c52a7102526ad8e16af' --- vim/bundle/unite-outline/.git/objects/19/50ac514ba20409fd517c52a7102526ad8e16af 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/.git/objects/19/50ac514ba20409fd517c52a7102526ad8e16af 1970-01-01 00:00:00 +0000 @@ -1,3 +0,0 @@ -xuj0 EW,L?1 evf/c9 ĩc/k(]v%{4u] -~x*ɢ Bxzy,;%2y)VU`J8k!4AJ$`k*dzC۫`yD!K kIx;+訖9eS\~Fi%ƴAkEZ*})eKNK8O {2W> -< !bGhy]hL#6Q=he2 \ No newline at end of file === added file 'vim/bundle/unite-outline/.git/objects/19/5140f15db14b8b2d405439c2366b497fede0b9' Binary files vim/bundle/unite-outline/.git/objects/19/5140f15db14b8b2d405439c2366b497fede0b9 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/19/5140f15db14b8b2d405439c2366b497fede0b9 2015-08-27 20:25:35 +0000 differ === removed directory 'vim/bundle/unite-outline/.git/objects/1c' === removed file 'vim/bundle/unite-outline/.git/objects/1c/a19a36df2cbb25ca6f347cd7f0f408455b2512' Binary files vim/bundle/unite-outline/.git/objects/1c/a19a36df2cbb25ca6f347cd7f0f408455b2512 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/1c/a19a36df2cbb25ca6f347cd7f0f408455b2512 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/unite-outline/.git/objects/1e/254b472c8f190652bacc2deb8bc7d2b7c95cc8' --- vim/bundle/unite-outline/.git/objects/1e/254b472c8f190652bacc2deb8bc7d2b7c95cc8 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/.git/objects/1e/254b472c8f190652bacc2deb8bc7d2b7c95cc8 1970-01-01 00:00:00 +0000 @@ -1,9 +0,0 @@ -xTn@9_1$BnQN $pST -/M6Ivzw'N!V?빜93s칶s~֟>'Ֆ"6 -CaS`!p -(_"Wf?#FT׍"T$$#C_/@mGYGۅnuAU̻kR[^OcP -4<Җa -ImE8ېl׎݁Cm -gY7"7rQQ p%:A- cGNn˲l tAPfن ?@m!pnM 텄VF̣[~Ċ'nF;#|)C6פ>φ <)w_Oe4k2Cٝonjf]$SzNڢOy -]W0脺wl #MPc=4b_hr= \ No newline at end of file === added directory 'vim/bundle/unite-outline/.git/objects/23' === added file 'vim/bundle/unite-outline/.git/objects/23/e4c474b14bea6f16a4fa6fe6959b7e2e865bbf' Binary files vim/bundle/unite-outline/.git/objects/23/e4c474b14bea6f16a4fa6fe6959b7e2e865bbf 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/23/e4c474b14bea6f16a4fa6fe6959b7e2e865bbf 2015-08-27 20:25:35 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/29' === added file 'vim/bundle/unite-outline/.git/objects/29/6d48be74f788954155c280f41c557cf0603496' Binary files vim/bundle/unite-outline/.git/objects/29/6d48be74f788954155c280f41c557cf0603496 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/29/6d48be74f788954155c280f41c557cf0603496 2015-08-27 20:25:35 +0000 differ === added file 'vim/bundle/unite-outline/.git/objects/2b/328a96a56d3cf536054f86017dc13e8ef49a7d' Binary files vim/bundle/unite-outline/.git/objects/2b/328a96a56d3cf536054f86017dc13e8ef49a7d 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/2b/328a96a56d3cf536054f86017dc13e8ef49a7d 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/unite-outline/.git/objects/2b/5ada907f22d3f13830d67ee25b841030ead4d0' Binary files vim/bundle/unite-outline/.git/objects/2b/5ada907f22d3f13830d67ee25b841030ead4d0 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/2b/5ada907f22d3f13830d67ee25b841030ead4d0 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/unite-outline/.git/objects/2c' === removed file 'vim/bundle/unite-outline/.git/objects/2c/5ee2f19174c0897ba1dcdbb54199b37924a550' Binary files vim/bundle/unite-outline/.git/objects/2c/5ee2f19174c0897ba1dcdbb54199b37924a550 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/2c/5ee2f19174c0897ba1dcdbb54199b37924a550 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/35' === added file 'vim/bundle/unite-outline/.git/objects/35/c0c72b6bc084a120ad4e20129bf378321757fb' Binary files vim/bundle/unite-outline/.git/objects/35/c0c72b6bc084a120ad4e20129bf378321757fb 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/35/c0c72b6bc084a120ad4e20129bf378321757fb 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/38' === added file 'vim/bundle/unite-outline/.git/objects/38/f2ebcecc499cef3bf7f79595689829d7bd27fa' --- vim/bundle/unite-outline/.git/objects/38/f2ebcecc499cef3bf7f79595689829d7bd27fa 1970-01-01 00:00:00 +0000 +++ vim/bundle/unite-outline/.git/objects/38/f2ebcecc499cef3bf7f79595689829d7bd27fa 2015-08-25 11:01:00 +0000 @@ -0,0 +1,3 @@ +xRKo0 ٿMĎKg, qPkёPY27 lhvO"wR7W/fsZ2OB"P{Yp[M6I0g^:3mكw\P΋Gxzj!Fwׄѳ!#zUbYɌER+Gr +eÐ鞰#LCA6[F'ySMB4>N +@Tj54/,ln%=-BV*['IU(pAc(<6OF-cŘIPcg<ߦÖH$DD-X)ǚ uHKHo+vuKOR5DE}tk85Z9>]>5aiW4B$>$őuz <T۞l| \ No newline at end of file === added file 'vim/bundle/unite-outline/.git/objects/3b/8f02698439ae5ca2b228a798da9168f12cbdab' Binary files vim/bundle/unite-outline/.git/objects/3b/8f02698439ae5ca2b228a798da9168f12cbdab 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/3b/8f02698439ae5ca2b228a798da9168f12cbdab 2015-08-27 20:25:35 +0000 differ === removed file 'vim/bundle/unite-outline/.git/objects/3b/9d63141c678ebb8420eb74ef1983df98d37e97' Binary files vim/bundle/unite-outline/.git/objects/3b/9d63141c678ebb8420eb74ef1983df98d37e97 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/3b/9d63141c678ebb8420eb74ef1983df98d37e97 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/40' === added file 'vim/bundle/unite-outline/.git/objects/40/045c60aca6518457d25195a813332f2051746c' Binary files vim/bundle/unite-outline/.git/objects/40/045c60aca6518457d25195a813332f2051746c 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/40/045c60aca6518457d25195a813332f2051746c 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/46' === added file 'vim/bundle/unite-outline/.git/objects/46/edfd29bbf480ab57fa65f3ec472892c2272cd8' Binary files vim/bundle/unite-outline/.git/objects/46/edfd29bbf480ab57fa65f3ec472892c2272cd8 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/46/edfd29bbf480ab57fa65f3ec472892c2272cd8 2015-08-27 20:25:35 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/48' === added file 'vim/bundle/unite-outline/.git/objects/48/1c180f5d2e60dd6296f25b2c693a5748f044c3' Binary files vim/bundle/unite-outline/.git/objects/48/1c180f5d2e60dd6296f25b2c693a5748f044c3 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/48/1c180f5d2e60dd6296f25b2c693a5748f044c3 2015-08-27 20:25:35 +0000 differ === removed directory 'vim/bundle/unite-outline/.git/objects/49' === removed file 'vim/bundle/unite-outline/.git/objects/49/5348e643c9a181e2288dc933ed0a669aa7cba5' Binary files vim/bundle/unite-outline/.git/objects/49/5348e643c9a181e2288dc933ed0a669aa7cba5 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/49/5348e643c9a181e2288dc933ed0a669aa7cba5 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/unite-outline/.git/objects/4c' === removed file 'vim/bundle/unite-outline/.git/objects/4c/30c97893ffc95c3d996dc27dee78e38153790e' Binary files vim/bundle/unite-outline/.git/objects/4c/30c97893ffc95c3d996dc27dee78e38153790e 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/4c/30c97893ffc95c3d996dc27dee78e38153790e 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/4d' === added file 'vim/bundle/unite-outline/.git/objects/4d/4ec0f90314db11a1da9a29b68104e89f2b7607' Binary files vim/bundle/unite-outline/.git/objects/4d/4ec0f90314db11a1da9a29b68104e89f2b7607 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/4d/4ec0f90314db11a1da9a29b68104e89f2b7607 2015-08-27 20:25:35 +0000 differ === removed directory 'vim/bundle/unite-outline/.git/objects/4e' === removed file 'vim/bundle/unite-outline/.git/objects/4e/8795f0be48a8c343e13ca7495d4c455ae87070' Binary files vim/bundle/unite-outline/.git/objects/4e/8795f0be48a8c343e13ca7495d4c455ae87070 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/4e/8795f0be48a8c343e13ca7495d4c455ae87070 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/50' === added file 'vim/bundle/unite-outline/.git/objects/50/c4bd5994a94b5c8920cfe7053172c2d7e8eda9' Binary files vim/bundle/unite-outline/.git/objects/50/c4bd5994a94b5c8920cfe7053172c2d7e8eda9 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/50/c4bd5994a94b5c8920cfe7053172c2d7e8eda9 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/unite-outline/.git/objects/50/f73d6f83212d4b3a0d2b61c9e1935bb8a3f188' Binary files vim/bundle/unite-outline/.git/objects/50/f73d6f83212d4b3a0d2b61c9e1935bb8a3f188 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/50/f73d6f83212d4b3a0d2b61c9e1935bb8a3f188 2015-08-27 20:25:35 +0000 differ === removed directory 'vim/bundle/unite-outline/.git/objects/52' === removed file 'vim/bundle/unite-outline/.git/objects/52/53d7842b54c450695b1a1934fdc2a58301deb5' Binary files vim/bundle/unite-outline/.git/objects/52/53d7842b54c450695b1a1934fdc2a58301deb5 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/52/53d7842b54c450695b1a1934fdc2a58301deb5 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/unite-outline/.git/objects/52/59a2d2d42f97b341c460d4f3bd3be81154e1c8' Binary files vim/bundle/unite-outline/.git/objects/52/59a2d2d42f97b341c460d4f3bd3be81154e1c8 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/52/59a2d2d42f97b341c460d4f3bd3be81154e1c8 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/unite-outline/.git/objects/52/76e28cb09d131ce7fc59e3d4e02204494ae2c3' Binary files vim/bundle/unite-outline/.git/objects/52/76e28cb09d131ce7fc59e3d4e02204494ae2c3 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/52/76e28cb09d131ce7fc59e3d4e02204494ae2c3 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/unite-outline/.git/objects/54' === removed file 'vim/bundle/unite-outline/.git/objects/54/9fd6b7305ee7eee7de6aeadde6e6a1e83dc8f7' Binary files vim/bundle/unite-outline/.git/objects/54/9fd6b7305ee7eee7de6aeadde6e6a1e83dc8f7 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/54/9fd6b7305ee7eee7de6aeadde6e6a1e83dc8f7 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/55' === added file 'vim/bundle/unite-outline/.git/objects/55/1eb72043d047f600add286d4abc488514487fd' Binary files vim/bundle/unite-outline/.git/objects/55/1eb72043d047f600add286d4abc488514487fd 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/55/1eb72043d047f600add286d4abc488514487fd 2015-08-27 20:25:35 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/5d' === added file 'vim/bundle/unite-outline/.git/objects/5d/bd98d89954186ad7a478e661aba592641f3369' Binary files vim/bundle/unite-outline/.git/objects/5d/bd98d89954186ad7a478e661aba592641f3369 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/5d/bd98d89954186ad7a478e661aba592641f3369 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/unite-outline/.git/objects/5e' === removed file 'vim/bundle/unite-outline/.git/objects/5e/316a46ddea329c9e544163a826e3604fc97f19' Binary files vim/bundle/unite-outline/.git/objects/5e/316a46ddea329c9e544163a826e3604fc97f19 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/5e/316a46ddea329c9e544163a826e3604fc97f19 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/unite-outline/.git/objects/5f' === removed file 'vim/bundle/unite-outline/.git/objects/5f/4d8b171c8008f1e45cd7bc71738ac65884943f' Binary files vim/bundle/unite-outline/.git/objects/5f/4d8b171c8008f1e45cd7bc71738ac65884943f 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/5f/4d8b171c8008f1e45cd7bc71738ac65884943f 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/60' === added file 'vim/bundle/unite-outline/.git/objects/60/198ace5453201dbfe8a6ae5039029e29647252' --- vim/bundle/unite-outline/.git/objects/60/198ace5453201dbfe8a6ae5039029e29647252 1970-01-01 00:00:00 +0000 +++ vim/bundle/unite-outline/.git/objects/60/198ace5453201dbfe8a6ae5039029e29647252 2015-08-25 11:01:00 +0000 @@ -0,0 +1,5 @@ +xTo09ű>ѤH@ I@KcG9N!!0Kw}gF^|`#:\ F%R+T+ۗSe + +ӲaF䖷֚F%]۞lKCCw }[ERt3X9l1g,wKVVf v"c*J% 04Бt^꫘V(ۇ:I@[ώk/28/U7">ш_ˌ<(4ŵ( "+B!)pۂ3${w{+ \ No newline at end of file === removed directory 'vim/bundle/unite-outline/.git/objects/61' === removed file 'vim/bundle/unite-outline/.git/objects/61/5e46c8975cf453d59031cfa94744f8f0d02053' Binary files vim/bundle/unite-outline/.git/objects/61/5e46c8975cf453d59031cfa94744f8f0d02053 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/61/5e46c8975cf453d59031cfa94744f8f0d02053 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/65' === added file 'vim/bundle/unite-outline/.git/objects/65/c1fd6cda3c0496d69cdb0bdb9981b045ab554a' Binary files vim/bundle/unite-outline/.git/objects/65/c1fd6cda3c0496d69cdb0bdb9981b045ab554a 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/65/c1fd6cda3c0496d69cdb0bdb9981b045ab554a 2015-08-27 20:25:35 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/6a' === added file 'vim/bundle/unite-outline/.git/objects/6a/7b1ad45eb852917bf7bc32d757d3016729a574' Binary files vim/bundle/unite-outline/.git/objects/6a/7b1ad45eb852917bf7bc32d757d3016729a574 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/6a/7b1ad45eb852917bf7bc32d757d3016729a574 2015-08-27 20:25:35 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/6b' === added file 'vim/bundle/unite-outline/.git/objects/6b/5a07d91ace526ef976c986c17cbedb6132ae58' --- vim/bundle/unite-outline/.git/objects/6b/5a07d91ace526ef976c986c17cbedb6132ae58 1970-01-01 00:00:00 +0000 +++ vim/bundle/unite-outline/.git/objects/6b/5a07d91ace526ef976c986c17cbedb6132ae58 2015-08-27 20:25:35 +0000 @@ -0,0 +1,5 @@ +xTk0޳ +5a; Aac[RJ,%#HqVT";Y5W0 _T. +LnxWZ.6J8+^b?@OdzW@*"l/ +j 7eAMOC0@W%vht*-Lo?INIo6Ȕ] ŅIsʬį<4> D!+j_:etB,B9{s(nQ@PYM\ҠkK ug \گ'*Jc!5P9yǣ%L^sPw\c2ebf(_LTbmMU:tlP J.$n;ߧ-ྔ&(s)RWw`+~zל۽ tOm6>-J Uܶv]ZG.V{PH>[,r@G-?9RLU.+{0n*fJ0bJ!`؃doC2d)Gl9nVl۴ЉVgc q~XƲ ۲m Ss㰿]$FÐd8RG=hOIxxD,hA +/&T=[Cy҂c/N \ No newline at end of file === removed directory 'vim/bundle/unite-outline/.git/objects/74' === removed file 'vim/bundle/unite-outline/.git/objects/74/804c49c704c6d15726030c8bc693105a99823c' Binary files vim/bundle/unite-outline/.git/objects/74/804c49c704c6d15726030c8bc693105a99823c 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/74/804c49c704c6d15726030c8bc693105a99823c 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/unite-outline/.git/objects/74/feb4c50bd08de70470bc48af21290fb5a9e7e0' Binary files vim/bundle/unite-outline/.git/objects/74/feb4c50bd08de70470bc48af21290fb5a9e7e0 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/74/feb4c50bd08de70470bc48af21290fb5a9e7e0 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/78' === added file 'vim/bundle/unite-outline/.git/objects/78/8a2cbe4835116ed75562c25181cc156d1f6d0c' Binary files vim/bundle/unite-outline/.git/objects/78/8a2cbe4835116ed75562c25181cc156d1f6d0c 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/78/8a2cbe4835116ed75562c25181cc156d1f6d0c 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/79' === added file 'vim/bundle/unite-outline/.git/objects/79/65a567c242f8563050ab59922ac1f92ca8273a' Binary files vim/bundle/unite-outline/.git/objects/79/65a567c242f8563050ab59922ac1f92ca8273a 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/79/65a567c242f8563050ab59922ac1f92ca8273a 2015-08-27 20:25:35 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/83' === added file 'vim/bundle/unite-outline/.git/objects/83/0b9568cce6c0aedbf3d929325c242d9fc4621c' Binary files vim/bundle/unite-outline/.git/objects/83/0b9568cce6c0aedbf3d929325c242d9fc4621c 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/83/0b9568cce6c0aedbf3d929325c242d9fc4621c 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/85' === added file 'vim/bundle/unite-outline/.git/objects/85/4f0ef734002b8c0bbe4062c24e87fd0ec8bb2d' Binary files vim/bundle/unite-outline/.git/objects/85/4f0ef734002b8c0bbe4062c24e87fd0ec8bb2d 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/85/4f0ef734002b8c0bbe4062c24e87fd0ec8bb2d 2015-08-27 20:25:35 +0000 differ === removed directory 'vim/bundle/unite-outline/.git/objects/88' === removed file 'vim/bundle/unite-outline/.git/objects/88/208d11ebed8278191e65852b5bf73ae26dbe81' Binary files vim/bundle/unite-outline/.git/objects/88/208d11ebed8278191e65852b5bf73ae26dbe81 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/88/208d11ebed8278191e65852b5bf73ae26dbe81 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/unite-outline/.git/objects/88/bfa869ff22b225b65f83c01221f72fe1c9ead5' Binary files vim/bundle/unite-outline/.git/objects/88/bfa869ff22b225b65f83c01221f72fe1c9ead5 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/88/bfa869ff22b225b65f83c01221f72fe1c9ead5 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/unite-outline/.git/objects/89' === removed file 'vim/bundle/unite-outline/.git/objects/89/09803036b0ed7105bc8c291cab295cdd25aacd' Binary files vim/bundle/unite-outline/.git/objects/89/09803036b0ed7105bc8c291cab295cdd25aacd 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/89/09803036b0ed7105bc8c291cab295cdd25aacd 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/8d' === added file 'vim/bundle/unite-outline/.git/objects/8d/bd6773497f055d0c570df73aedfbbcbb5e7bd3' Binary files vim/bundle/unite-outline/.git/objects/8d/bd6773497f055d0c570df73aedfbbcbb5e7bd3 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/8d/bd6773497f055d0c570df73aedfbbcbb5e7bd3 2015-08-27 20:25:35 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/91' === added file 'vim/bundle/unite-outline/.git/objects/91/4a94a0f716be05cc6d0237545b9060ac7a4aa7' Binary files vim/bundle/unite-outline/.git/objects/91/4a94a0f716be05cc6d0237545b9060ac7a4aa7 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/91/4a94a0f716be05cc6d0237545b9060ac7a4aa7 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/95' === added file 'vim/bundle/unite-outline/.git/objects/95/d2efa12dcdef29846b0757f520f1a83c962fe1' Binary files vim/bundle/unite-outline/.git/objects/95/d2efa12dcdef29846b0757f520f1a83c962fe1 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/95/d2efa12dcdef29846b0757f520f1a83c962fe1 2015-08-27 20:25:35 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/97' === added file 'vim/bundle/unite-outline/.git/objects/97/b1a6566612ef9522951a9d4a2a5adc0578f6f1' Binary files vim/bundle/unite-outline/.git/objects/97/b1a6566612ef9522951a9d4a2a5adc0578f6f1 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/97/b1a6566612ef9522951a9d4a2a5adc0578f6f1 2015-08-27 20:25:35 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/98' === added file 'vim/bundle/unite-outline/.git/objects/98/91f151c94358d6ab1c5f2bfa106279774d970b' Binary files vim/bundle/unite-outline/.git/objects/98/91f151c94358d6ab1c5f2bfa106279774d970b 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/98/91f151c94358d6ab1c5f2bfa106279774d970b 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/unite-outline/.git/objects/9b' === removed file 'vim/bundle/unite-outline/.git/objects/9b/dd595d20216d71680fef5f828bf3e2c77b5fce' Binary files vim/bundle/unite-outline/.git/objects/9b/dd595d20216d71680fef5f828bf3e2c77b5fce 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/9b/dd595d20216d71680fef5f828bf3e2c77b5fce 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/unite-outline/.git/objects/9c' === removed file 'vim/bundle/unite-outline/.git/objects/9c/47b8694c4c6533a340bc8d133a1e6d4b6ab1a8' Binary files vim/bundle/unite-outline/.git/objects/9c/47b8694c4c6533a340bc8d133a1e6d4b6ab1a8 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/9c/47b8694c4c6533a340bc8d133a1e6d4b6ab1a8 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/unite-outline/.git/objects/9c/7f78e163203ec5d55e26e03bad583d8d346d1a' Binary files vim/bundle/unite-outline/.git/objects/9c/7f78e163203ec5d55e26e03bad583d8d346d1a 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/9c/7f78e163203ec5d55e26e03bad583d8d346d1a 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/unite-outline/.git/objects/9d/0208a12813886b9ee9db7171823478c12207c2' Binary files vim/bundle/unite-outline/.git/objects/9d/0208a12813886b9ee9db7171823478c12207c2 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/9d/0208a12813886b9ee9db7171823478c12207c2 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/unite-outline/.git/objects/9d/41047d25b9ac41060728c537693628053e1e69' Binary files vim/bundle/unite-outline/.git/objects/9d/41047d25b9ac41060728c537693628053e1e69 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/9d/41047d25b9ac41060728c537693628053e1e69 2015-08-27 20:25:35 +0000 differ === removed directory 'vim/bundle/unite-outline/.git/objects/a4' === removed file 'vim/bundle/unite-outline/.git/objects/a4/9898d106f2162938820ed23d3e691466d9ec21' Binary files vim/bundle/unite-outline/.git/objects/a4/9898d106f2162938820ed23d3e691466d9ec21 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/a4/9898d106f2162938820ed23d3e691466d9ec21 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/a5' === added file 'vim/bundle/unite-outline/.git/objects/a5/84bc71500acffa05969ec3d5d0b3a491498192' Binary files vim/bundle/unite-outline/.git/objects/a5/84bc71500acffa05969ec3d5d0b3a491498192 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/a5/84bc71500acffa05969ec3d5d0b3a491498192 2015-08-27 20:25:35 +0000 differ === added file 'vim/bundle/unite-outline/.git/objects/a5/f226a126c2d899675d48d30fe021fb8f45139d' Binary files vim/bundle/unite-outline/.git/objects/a5/f226a126c2d899675d48d30fe021fb8f45139d 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/a5/f226a126c2d899675d48d30fe021fb8f45139d 2015-08-27 20:25:35 +0000 differ === removed directory 'vim/bundle/unite-outline/.git/objects/a6' === removed file 'vim/bundle/unite-outline/.git/objects/a6/b8a6764aa51f1adba610b7802243a8c3194b23' Binary files vim/bundle/unite-outline/.git/objects/a6/b8a6764aa51f1adba610b7802243a8c3194b23 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/a6/b8a6764aa51f1adba610b7802243a8c3194b23 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/unite-outline/.git/objects/a9/c0155f9701a6e842db28c946c6cce497b35bdd' Binary files vim/bundle/unite-outline/.git/objects/a9/c0155f9701a6e842db28c946c6cce497b35bdd 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/a9/c0155f9701a6e842db28c946c6cce497b35bdd 2015-08-27 20:25:35 +0000 differ === removed file 'vim/bundle/unite-outline/.git/objects/a9/e31a8a943f245b071db3911833acf8f9804baf' Binary files vim/bundle/unite-outline/.git/objects/a9/e31a8a943f245b071db3911833acf8f9804baf 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/a9/e31a8a943f245b071db3911833acf8f9804baf 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/unite-outline/.git/objects/aa' === removed file 'vim/bundle/unite-outline/.git/objects/aa/479d5359c1cdb535f10956a3843661cf800d30' Binary files vim/bundle/unite-outline/.git/objects/aa/479d5359c1cdb535f10956a3843661cf800d30 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/aa/479d5359c1cdb535f10956a3843661cf800d30 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/ab' === added file 'vim/bundle/unite-outline/.git/objects/ab/70fffe3c309024dcbaacd5f1eda8f73b41c90f' Binary files vim/bundle/unite-outline/.git/objects/ab/70fffe3c309024dcbaacd5f1eda8f73b41c90f 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/ab/70fffe3c309024dcbaacd5f1eda8f73b41c90f 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/af' === added file 'vim/bundle/unite-outline/.git/objects/af/459df2f74e04392735241767b65f2eaa55a0c3' Binary files vim/bundle/unite-outline/.git/objects/af/459df2f74e04392735241767b65f2eaa55a0c3 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/af/459df2f74e04392735241767b65f2eaa55a0c3 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/unite-outline/.git/objects/b2/a8a076cee0530d4b3a35c11bd7c4a7e666c8c1' Binary files vim/bundle/unite-outline/.git/objects/b2/a8a076cee0530d4b3a35c11bd7c4a7e666c8c1 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/b2/a8a076cee0530d4b3a35c11bd7c4a7e666c8c1 2015-08-27 20:25:35 +0000 differ === removed file 'vim/bundle/unite-outline/.git/objects/b2/d01defbf8049e2f5597353e6ddd0a7a0e0f71b' Binary files vim/bundle/unite-outline/.git/objects/b2/d01defbf8049e2f5597353e6ddd0a7a0e0f71b 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/b2/d01defbf8049e2f5597353e6ddd0a7a0e0f71b 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/unite-outline/.git/objects/b3/8081511c47870acb478aa66575362fffd92bc6' Binary files vim/bundle/unite-outline/.git/objects/b3/8081511c47870acb478aa66575362fffd92bc6 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/b3/8081511c47870acb478aa66575362fffd92bc6 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/b5' === added file 'vim/bundle/unite-outline/.git/objects/b5/28ddde06ded018c29359969cec610518a43dc6' Binary files vim/bundle/unite-outline/.git/objects/b5/28ddde06ded018c29359969cec610518a43dc6 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/b5/28ddde06ded018c29359969cec610518a43dc6 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/unite-outline/.git/objects/b7' === removed file 'vim/bundle/unite-outline/.git/objects/b7/f8f94490ffbfc6b0b4d0054aaa58db4774ed05' Binary files vim/bundle/unite-outline/.git/objects/b7/f8f94490ffbfc6b0b4d0054aaa58db4774ed05 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/b7/f8f94490ffbfc6b0b4d0054aaa58db4774ed05 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/unite-outline/.git/objects/b8/fec594d71a4d8ce940ada9030dcc52b95a9628' Binary files vim/bundle/unite-outline/.git/objects/b8/fec594d71a4d8ce940ada9030dcc52b95a9628 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/b8/fec594d71a4d8ce940ada9030dcc52b95a9628 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/b9' === added file 'vim/bundle/unite-outline/.git/objects/b9/8a86402599b9961bc4b6ec325eea0a0a9de501' Binary files vim/bundle/unite-outline/.git/objects/b9/8a86402599b9961bc4b6ec325eea0a0a9de501 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/b9/8a86402599b9961bc4b6ec325eea0a0a9de501 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/unite-outline/.git/objects/bd' === removed file 'vim/bundle/unite-outline/.git/objects/bd/e25ab083fcc55c5de94dd730e94de810af3195' Binary files vim/bundle/unite-outline/.git/objects/bd/e25ab083fcc55c5de94dd730e94de810af3195 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/bd/e25ab083fcc55c5de94dd730e94de810af3195 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/unite-outline/.git/objects/bd/e4f18519adfe4c75bface480cfe1ebcadfd8c6' Binary files vim/bundle/unite-outline/.git/objects/bd/e4f18519adfe4c75bface480cfe1ebcadfd8c6 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/bd/e4f18519adfe4c75bface480cfe1ebcadfd8c6 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/be' === added file 'vim/bundle/unite-outline/.git/objects/be/0bffe30c3ed8daccd0fb1b965d99cf1c278879' Binary files vim/bundle/unite-outline/.git/objects/be/0bffe30c3ed8daccd0fb1b965d99cf1c278879 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/be/0bffe30c3ed8daccd0fb1b965d99cf1c278879 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/unite-outline/.git/objects/c0' === removed file 'vim/bundle/unite-outline/.git/objects/c0/20541668226ee41b197a8872f3a956be67cc4c' Binary files vim/bundle/unite-outline/.git/objects/c0/20541668226ee41b197a8872f3a956be67cc4c 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/c0/20541668226ee41b197a8872f3a956be67cc4c 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/unite-outline/.git/objects/c1' === removed file 'vim/bundle/unite-outline/.git/objects/c1/bbb02311983d21527b8d04995cfa35b28f58a6' Binary files vim/bundle/unite-outline/.git/objects/c1/bbb02311983d21527b8d04995cfa35b28f58a6 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/c1/bbb02311983d21527b8d04995cfa35b28f58a6 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/c2' === added file 'vim/bundle/unite-outline/.git/objects/c2/3db0594e364ad892529faec4d607b530b273ec' --- vim/bundle/unite-outline/.git/objects/c2/3db0594e364ad892529faec4d607b530b273ec 1970-01-01 00:00:00 +0000 +++ vim/bundle/unite-outline/.git/objects/c2/3db0594e364ad892529faec4d607b530b273ec 2015-08-27 20:25:35 +0000 @@ -0,0 +1,2 @@ +xSM0ٿb-,](iYDZ@$o_#[6̛R?f{}7۝D3&$iJ8V&GuP ,V:mfm(j*n]/6I3|V9ԙq+6E vZs(],eZUW!'kΏcvbm<,[KTo|Nvڋ`Uj(Izo4Vh:^Ǜ(*[; +'ed<9̹7s"0Z&e"T7$::!a!nq AdyH~5x XY!aaI`*3XM`yӰy} Ȁ \ No newline at end of file === removed directory 'vim/bundle/unite-outline/.git/objects/cb' === removed file 'vim/bundle/unite-outline/.git/objects/cb/67954a0eb6995fffc542d4c46a421c29246d11' --- vim/bundle/unite-outline/.git/objects/cb/67954a0eb6995fffc542d4c46a421c29246d11 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/.git/objects/cb/67954a0eb6995fffc542d4c46a421c29246d11 1970-01-01 00:00:00 +0000 @@ -1,5 +0,0 @@ -xSr0Xa@*73C -\`CF7YHrNɿ=p/v߾hs>(&XmE6FLmD&he0-p+|*vUEPZw4BP> -/ϕOJ(ͥhWdpɗ2PZISP"|z(g(C4mۖۚCn. V*\:y4mPVrƜ1jŒu 6O{&& -,59mcdxb7o7ϋկ3!zlhy>?Mߡ#ePf1}`*'c؁H`Jߡp24ETbkeXgS$GI}aiB9 eA|C I$h#X)K":%q} D%$ g.4]^dO Jm0U -4awfar` @ #>;XNxf;4d1֨$:q \ No newline at end of file === removed file 'vim/bundle/unite-outline/.git/objects/ce/418512e0a4f8a1331d14e928101d037d3396e9' Binary files vim/bundle/unite-outline/.git/objects/ce/418512e0a4f8a1331d14e928101d037d3396e9 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/ce/418512e0a4f8a1331d14e928101d037d3396e9 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/unite-outline/.git/objects/ce/6abfe6c3e09a9f264a40965567fb645c983105' Binary files vim/bundle/unite-outline/.git/objects/ce/6abfe6c3e09a9f264a40965567fb645c983105 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/ce/6abfe6c3e09a9f264a40965567fb645c983105 2015-08-27 20:25:35 +0000 differ === removed directory 'vim/bundle/unite-outline/.git/objects/d0' === removed file 'vim/bundle/unite-outline/.git/objects/d0/3053ccc73708291fe9586122d9515f6474a181' Binary files vim/bundle/unite-outline/.git/objects/d0/3053ccc73708291fe9586122d9515f6474a181 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/d0/3053ccc73708291fe9586122d9515f6474a181 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/d2' === added file 'vim/bundle/unite-outline/.git/objects/d2/53e34741264ef4824ec88de97004c62e1eb2bc' Binary files vim/bundle/unite-outline/.git/objects/d2/53e34741264ef4824ec88de97004c62e1eb2bc 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/d2/53e34741264ef4824ec88de97004c62e1eb2bc 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/unite-outline/.git/objects/d3' === removed file 'vim/bundle/unite-outline/.git/objects/d3/7f58b0718a931909b0239ccb5c96de18d585ab' Binary files vim/bundle/unite-outline/.git/objects/d3/7f58b0718a931909b0239ccb5c96de18d585ab 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/d3/7f58b0718a931909b0239ccb5c96de18d585ab 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/unite-outline/.git/objects/d4' === removed file 'vim/bundle/unite-outline/.git/objects/d4/8f01563685c6b914b16e90883bedb7d5cdef49' Binary files vim/bundle/unite-outline/.git/objects/d4/8f01563685c6b914b16e90883bedb7d5cdef49 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/d4/8f01563685c6b914b16e90883bedb7d5cdef49 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/d6' === added file 'vim/bundle/unite-outline/.git/objects/d6/051ebabcfb30ced012db23d66277216a56ce42' Binary files vim/bundle/unite-outline/.git/objects/d6/051ebabcfb30ced012db23d66277216a56ce42 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/d6/051ebabcfb30ced012db23d66277216a56ce42 2015-08-27 20:25:35 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/d9' === added file 'vim/bundle/unite-outline/.git/objects/d9/244492b913616e8e031ee280910ede6ff8abca' --- vim/bundle/unite-outline/.git/objects/d9/244492b913616e8e031ee280910ede6ff8abca 1970-01-01 00:00:00 +0000 +++ vim/bundle/unite-outline/.git/objects/d9/244492b913616e8e031ee280910ede6ff8abca 2015-08-25 11:01:00 +0000 @@ -0,0 +1,3 @@ +xRQ@9b}Hm} V,PD,44kaw8$؁@vfovRaz7d= $G +#-uVN jgrv$¸2sllp/bJ>8|n+}m]Fֽu[K:Uam]dCd:N&$qQY8U7 ;*:i"]so'1f&!%ce;XP _nwܡB(AP:'x66{c~2ArFM=#3_2xχ0 +BMBs|JOyV~>52t}&gsD=9= N΂So/"CQ9o T|Np#h(nۧ권jۄMXTjyQ^c( t-G(x -UhENr0"]zU>{+lI ԂK.%f?f43{jJ8˅*m#鎒7I'd3+>v7A?\C4䚮&[=<>i%Jik$(NlBb[\, ꉂ <(EcKdt)+04ÁTQH M+$A1޴%tBTfSrxarԵDVۦYAV2a6_RN,hs8oaTB[CA[)qN&}ag]^m9Omޮsl-+ފlkcw(?ŨRhOBa|.ȟG v>.uGF:@-8L YilCw9/; \ No newline at end of file === removed file 'vim/bundle/unite-outline/.git/objects/ea/98a994cc1780c18c5a3991a622cdada020ac7b' Binary files vim/bundle/unite-outline/.git/objects/ea/98a994cc1780c18c5a3991a622cdada020ac7b 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/ea/98a994cc1780c18c5a3991a622cdada020ac7b 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/eb' === added file 'vim/bundle/unite-outline/.git/objects/eb/53c821a1fd38a79b328d518047c2b32b4ad4a6' Binary files vim/bundle/unite-outline/.git/objects/eb/53c821a1fd38a79b328d518047c2b32b4ad4a6 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/eb/53c821a1fd38a79b328d518047c2b32b4ad4a6 2015-08-27 20:25:35 +0000 differ === removed directory 'vim/bundle/unite-outline/.git/objects/ec' === removed file 'vim/bundle/unite-outline/.git/objects/ec/2c86b15a7fc8a5c96495f821119d3ba1135f53' Binary files vim/bundle/unite-outline/.git/objects/ec/2c86b15a7fc8a5c96495f821119d3ba1135f53 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/ec/2c86b15a7fc8a5c96495f821119d3ba1135f53 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/ee' === added file 'vim/bundle/unite-outline/.git/objects/ee/0e50a318602aac10ff387fccfe45022fd0ddf8' Binary files vim/bundle/unite-outline/.git/objects/ee/0e50a318602aac10ff387fccfe45022fd0ddf8 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/ee/0e50a318602aac10ff387fccfe45022fd0ddf8 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/unite-outline/.git/objects/f3' === added file 'vim/bundle/unite-outline/.git/objects/f3/d72f396758f2dfbf39d9fd2061d737a2b5964a' Binary files vim/bundle/unite-outline/.git/objects/f3/d72f396758f2dfbf39d9fd2061d737a2b5964a 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/f3/d72f396758f2dfbf39d9fd2061d737a2b5964a 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/unite-outline/.git/objects/f6/63c96aeda2f380c753668f6e87812f1323d13e' Binary files vim/bundle/unite-outline/.git/objects/f6/63c96aeda2f380c753668f6e87812f1323d13e 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/f6/63c96aeda2f380c753668f6e87812f1323d13e 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/unite-outline/.git/objects/f7' === removed file 'vim/bundle/unite-outline/.git/objects/f7/642f8b8c310780f8d7be3a2953d0c10bdd1ab0' Binary files vim/bundle/unite-outline/.git/objects/f7/642f8b8c310780f8d7be3a2953d0c10bdd1ab0 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/f7/642f8b8c310780f8d7be3a2953d0c10bdd1ab0 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/unite-outline/.git/objects/fc/23430a1ed11a9ea4f518f646ecd6226c68b3ca' Binary files vim/bundle/unite-outline/.git/objects/fc/23430a1ed11a9ea4f518f646ecd6226c68b3ca 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/fc/23430a1ed11a9ea4f518f646ecd6226c68b3ca 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/unite-outline/.git/objects/fc/d145720b1b3b61e1a6eb7b745ef408ff511f9a' Binary files vim/bundle/unite-outline/.git/objects/fc/d145720b1b3b61e1a6eb7b745ef408ff511f9a 1970-01-01 00:00:00 +0000 and vim/bundle/unite-outline/.git/objects/fc/d145720b1b3b61e1a6eb7b745ef408ff511f9a 2015-08-27 20:25:35 +0000 differ === removed directory 'vim/bundle/unite-outline/.git/objects/fd' === removed file 'vim/bundle/unite-outline/.git/objects/fd/d3a71499f0b3d3275ace3cf2dd691091949081' Binary files vim/bundle/unite-outline/.git/objects/fd/d3a71499f0b3d3275ace3cf2dd691091949081 2016-08-04 08:15:51 +0000 and vim/bundle/unite-outline/.git/objects/fd/d3a71499f0b3d3275ace3cf2dd691091949081 1970-01-01 00:00:00 +0000 differ === modified file 'vim/bundle/unite-outline/.git/packed-refs' --- vim/bundle/unite-outline/.git/packed-refs 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/.git/packed-refs 2015-08-27 20:25:35 +0000 @@ -1,2 +1,2 @@ # pack-refs with: peeled fully-peeled -1950ac514ba20409fd517c52a7102526ad8e16af refs/remotes/origin/master +0686316a5bd40f10cfd153d3c2d4c4dcfc1ab10a refs/remotes/origin/master === modified file 'vim/bundle/unite-outline/.git/refs/heads/master' --- vim/bundle/unite-outline/.git/refs/heads/master 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/.git/refs/heads/master 2015-08-27 20:25:35 +0000 @@ -1,1 +1,1 @@ -1950ac514ba20409fd517c52a7102526ad8e16af +0686316a5bd40f10cfd153d3c2d4c4dcfc1ab10a === modified file 'vim/bundle/unite-outline/.git/shallow' --- vim/bundle/unite-outline/.git/shallow 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/.git/shallow 2015-08-27 20:25:35 +0000 @@ -1,1 +1,1 @@ -1950ac514ba20409fd517c52a7102526ad8e16af +0686316a5bd40f10cfd153d3c2d4c4dcfc1ab10a === modified file 'vim/bundle/unite-outline/autoload/unite/filters/outline_formatter.vim' --- vim/bundle/unite-outline/autoload/unite/filters/outline_formatter.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/filters/outline_formatter.vim 2015-08-25 11:01:00 +0000 @@ -29,7 +29,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#filters#outline_formatter#define() abort +function! unite#filters#outline_formatter#define() return s:formatter endfunction @@ -47,7 +47,7 @@ \ 'description': 'view formatter for outline tree', \ } -function! s:formatter.filter(candidates, unite_context) abort +function! s:formatter.filter(candidates, unite_context) if empty(a:candidates) | return a:candidates | endif let bufnr = a:unite_context.source__outline_source_bufnr @@ -72,7 +72,7 @@ return candidates endfunction -function! s:insert_blanks(candidates, context) abort +function! s:insert_blanks(candidates, context) let oinfo = a:context.outline_info if a:context.extracted_by !=# 'filetype' || \ (empty(oinfo.heading_groups) && !has_key(oinfo, 'need_blank_between')) === modified file 'vim/bundle/unite-outline/autoload/unite/filters/outline_matcher_glob.vim' --- vim/bundle/unite-outline/autoload/unite/filters/outline_matcher_glob.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/filters/outline_matcher_glob.vim 2015-08-27 20:25:35 +0000 @@ -29,7 +29,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#filters#outline_matcher_glob#define() abort +function! unite#filters#outline_matcher_glob#define() return s:matcher endfunction @@ -43,7 +43,7 @@ " Derived from: " unite/autoload/filters/matcher_glob.vim " -function! s:matcher.filter(candidates, unite_context) abort +function! s:matcher.filter(candidates, unite_context) if empty(a:candidates) | return a:candidates | endif call s:Tree.List.reset_marks(a:candidates) === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline.vim 2015-08-27 20:25:35 +0000 @@ -40,7 +40,7 @@ " NOTE: source <- [aliases...] let s:OUTLINE_ALIASES = { - \ 'markdown': ['mkd', 'pandoc'], + \ 'markdown': ['mkd'], \ 'cpp' : ['c'], \ 'dosini' : ['cfg'], \ 'tex' : ['plaintex'], @@ -81,13 +81,13 @@ "----------------------------------------------------------------------------- " Functions -function! unite#sources#outline#define() abort +function! unite#sources#outline#define() return s:source endfunction " Defines an alias of filetype {ftype}. " -function! unite#sources#outline#alias(alias, ftype) abort +function! unite#sources#outline#alias(alias, ftype) if type(a:alias) == type([]) call s:define_filetype_aliases(a:alias, a:ftype) elseif type(a:alias) == type('') @@ -99,7 +99,7 @@ let s:ftype_alias_table = {} -function! s:define_filetype_aliases(aliases, ftype) abort +function! s:define_filetype_aliases(aliases, ftype) for alias in a:aliases let s:ftype_alias_table[alias] = a:ftype endfor @@ -108,10 +108,10 @@ " Accessor functions for the outline data, that is a Dictionary assigned to " the buffer local variable. -function! unite#sources#outline#has_outline_data(...) abort +function! unite#sources#outline#has_outline_data(...) return call('s:has_outline_data', a:000) endfunction -function! s:has_outline_data(bufnr, ...) abort +function! s:has_outline_data(bufnr, ...) if a:0 let key = a:1 let data = getbufvar(a:bufnr, s:BUFVAR_OUTLINE_DATA) @@ -126,10 +126,10 @@ " isn't available, returns {default}. When {key} is omitted, returns an " outline data's Dictionary. " -function! unite#sources#outline#get_outline_data(...) abort +function! unite#sources#outline#get_outline_data(...) return call('s:get_outline_data', a:000) endfunction -function! s:get_outline_data(bufnr, ...) abort +function! s:get_outline_data(bufnr, ...) let data = getbufvar(a:bufnr, s:BUFVAR_OUTLINE_DATA) let argc = len(a:000) if argc == 0 @@ -143,30 +143,30 @@ " Sets the value of outline data {key} for buffer {bufnr} to {value}. " -function! unite#sources#outline#set_outline_data(...) abort +function! unite#sources#outline#set_outline_data(...) call call('s:set_outline_data', a:000) endfunction -function! s:set_outline_data(bufnr, key, value) abort +function! s:set_outline_data(bufnr, key, value) let data = getbufvar(a:bufnr, s:BUFVAR_OUTLINE_DATA) let data[a:key] = a:value endfunction " Removes the value of outline data {key} for buffer {bufnr}. " -function! unite#sources#outline#remove_outline_data(...) abort +function! unite#sources#outline#remove_outline_data(...) call call('s:remove_outline_data', a:000) endfunction -function! s:remove_outline_data(bufnr, key) abort +function! s:remove_outline_data(bufnr, key) let data = getbufvar(a:bufnr, s:BUFVAR_OUTLINE_DATA) unlet data[a:key] endfunction -function! s:has_outline_buffer_ids(winnr) abort +function! s:has_outline_buffer_ids(winnr) let winvars = getwinvar(a:winnr, '') return has_key(winvars, s:WINVAR_OUTLINE_BUFFER_IDS) endfunction -function! s:get_outline_buffer_ids(winnr) abort +function! s:get_outline_buffer_ids(winnr) let winvars = getwinvar(a:winnr, '') return winvars[s:WINVAR_OUTLINE_BUFFER_IDS] endfunction @@ -175,10 +175,10 @@ " empty Dictionary. When {ftype} is a Dictionary, assumes it is a Context and " takes the context buffer's filetype. " -function! unite#sources#outline#get_outline_info(...) abort +function! unite#sources#outline#get_outline_info(...) return call('s:get_outline_info', a:000) endfunction -function! s:get_outline_info(ftype, ...) abort +function! s:get_outline_info(ftype, ...) if type(a:ftype) == type({}) let ftype = join(a:ftype.buffer.filetypes, '.') let context = a:ftype @@ -214,7 +214,7 @@ return {} endfunction -function! s:find_loadable_func(ftype, paths) abort +function! s:find_loadable_func(ftype, paths) let ftype = substitute(a:ftype, '\.', '_', 'g') for path in a:paths let path = substitute(path, '^autoload/', '', '') . ftype @@ -234,16 +234,16 @@ " Reloads an autoload script where autoload function {funcname} is defined. " -function! s:reload_autoload_script(funcname) abort +function! s:reload_autoload_script(funcname) " path#to#file#func() -> autoload/path/to/file.vim -> full path let path = 'autoload/' . join(split(a:funcname, '#')[:-2], '/') . '.vim' let path = get(split(globpath(&runtimepath, path), "\"), 0, '') let path = fnamemodify(path, ':p') " Re-source the autoload script. - execute 'source' fnameescape(path) + source `=path` endfunction -function! s:load_outline_info(load_func, context, reload) abort +function! s:load_outline_info(load_func, context, reload) if a:reload call s:reload_autoload_script(a:load_func) endif @@ -260,7 +260,7 @@ return oinfo endfunction -function! s:initialize_outline_info(oinfo, name) abort +function! s:initialize_outline_info(oinfo, name) if has_key(a:oinfo, 'super') if a:oinfo.__initialized__ > a:oinfo.super.__initialized__ return @@ -289,7 +289,7 @@ endif endfunction -function! s:normalize_skip_info(oinfo) abort +function! s:normalize_skip_info(oinfo) if has_key(a:oinfo.skip, 'header') let value_type = type(a:oinfo.skip.header) if value_type == type("") @@ -313,11 +313,11 @@ endif endfunction -function! s:normalize_block_patterns(patterns) abort +function! s:normalize_block_patterns(patterns) return { 'begin': a:patterns[0], 'end': a:patterns[1] } endfunction -function! s:normalize_heading_groups(oinfo) abort +function! s:normalize_heading_groups(oinfo) if !has_key(a:oinfo, 'heading_groups') let a:oinfo.heading_groups = {} let group_map = {} @@ -338,10 +338,10 @@ " Returns the value of filetype option {key} for filetype {ftype}. " If the value isn't available, returns {default}. " -function! unite#sources#outline#get_filetype_option(...) abort +function! unite#sources#outline#get_filetype_option(...) return call('s:get_filetype_option', a:000) endfunction -function! s:get_filetype_option(ftype, key, ...) abort +function! s:get_filetype_option(ftype, key, ...) for ftype in s:resolve_filetype(a:ftype) if has_key(g:unite_source_outline_filetype_options, ftype) let options = g:unite_source_outline_filetype_options[ftype] @@ -367,7 +367,7 @@ " |/ " (9)aaa -> ($)aliases " -function! s:resolve_filetype(ftype) abort +function! s:resolve_filetype(ftype) let ftcands = [] let ftype = a:ftype while 1 @@ -388,7 +388,7 @@ return ftcands endfunction -function! s:resolve_filetype_alias(ftype) abort +function! s:resolve_filetype_alias(ftype) let seen = {} let ftcands = [] let ftype = a:ftype @@ -407,10 +407,10 @@ return ftcands endfunction -function! unite#sources#outline#get_highlight(...) abort +function! unite#sources#outline#get_highlight(...) return call('s:get_highlight', a:000) endfunction -function! s:get_highlight(...) abort +function! s:get_highlight(...) for name in a:000 if has_key(g:unite_source_outline_highlight, name) return g:unite_source_outline_highlight[name] @@ -421,12 +421,12 @@ return s:default_highlight.normal endfunction -function! unite#sources#outline#import(name, ...) abort +function! unite#sources#outline#import(name, ...) let name = tolower(substitute(a:name, '\(\l\)\(\u\)', '\1_\2', 'g')) return call('unite#sources#outline#modules#' . name . '#import', a:000) endfunction -function! unite#sources#outline#remove_cache_files() abort +function! unite#sources#outline#remove_cache_files() call s:FileCache.clear() endfunction @@ -507,7 +507,7 @@ let s:Tree = unite#sources#outline#import('Tree') let s:Util = unite#sources#outline#import('Util') -function! s:get_SID() abort +function! s:get_SID() return matchstr(expand(''), '\d\+_') endfunction let s:SID = s:get_SID() @@ -520,10 +520,10 @@ \ 'matchers' : ['outline_matcher_glob', 'outline_formatter'], \ 'syntax' : 'uniteSource__Outline', \ - \ 'hooks': {}, 'alias_table': {}, 'default_action': {}, + \ 'hooks': {}, 'action_table': {}, 'alias_table': {}, 'default_action': {}, \ } -function! s:Source_Hooks_on_init(source_args, unite_context) abort +function! s:Source_Hooks_on_init(source_args, unite_context) let a:unite_context.source__outline_buffer_id = s:outline_buffer_id let a:unite_context.source__outline_source_bufnr = bufnr('%') call s:initialize_outline_data() @@ -535,7 +535,7 @@ " Initialize the current buffer's outline data and register autocommands to " manage the data if the buffer hasn't been initialized yet. " -function! s:initialize_outline_data() abort +function! s:initialize_outline_data() let bufnr = bufnr('%') let bufvars = getbufvar(bufnr, '') if !has_key(bufvars, s:BUFVAR_OUTLINE_DATA) @@ -548,7 +548,7 @@ " Associate the current buffer's window with the outline buffer {buffer_id} " where the headings from the buffer will be displayed. " -function! s:attach_outline_buffer(buffer_id) abort +function! s:attach_outline_buffer(buffer_id) let winnr = winnr() let winvars = getwinvar(winnr, '') if !has_key(winvars, s:WINVAR_OUTLINE_BUFFER_IDS) @@ -557,10 +557,10 @@ call add(winvars[s:WINVAR_OUTLINE_BUFFER_IDS], a:buffer_id) endfunction -function! s:Source_Hooks_on_syntax(source_args, unite_context) abort +function! s:Source_Hooks_on_syntax(source_args, unite_context) let bufnr = a:unite_context.source__outline_source_bufnr let odata = s:get_outline_data(bufnr) - if type(odata) != type({}) || odata.state !=# 'OK' + if odata.state !=# 'OK' return endif let oinfo = odata.context.outline_info @@ -583,7 +583,7 @@ endfunction let s:source.hooks.on_syntax = function(s:SID . 'Source_Hooks_on_syntax') -function! s:Source_gather_candidates(source_args, unite_context) abort +function! s:Source_gather_candidates(source_args, unite_context) " Save the Vim options. let save_cpoptions = &cpoptions let save_ignorecase = &ignorecase @@ -645,11 +645,11 @@ endfunction let s:source.gather_candidates = function(s:SID . 'Source_gather_candidates') -function! s:source.complete(args, context, arglead, cmdline, cursorpos) abort "{{{ +function! s:source.complete(args, context, arglead, cmdline, cursorpos) "{{{ return s:supported_arguments endfunction"}}} -function! s:parse_source_arguments(source_args, unite_context) abort +function! s:parse_source_arguments(source_args, unite_context) let options = { \ 'is_force': 0, \ 'extracted_by': '?', @@ -675,7 +675,7 @@ " Creates a context Dictionary. " -function! s:create_context(bufnr, ...) abort +function! s:create_context(bufnr, ...) let buffer = { \ 'nr' : a:bufnr, \ 'path': fnamemodify(bufname(a:bufnr), ':p'), @@ -694,7 +694,7 @@ " Returns True if the cached {candidates} is valid and reusable. " -function! s:is_valid_candidates(candidates, context) abort +function! s:is_valid_candidates(candidates, context) let last_method = (!empty(a:candidates) && \ a:candidates[0].source__heading_type ==# 'folding' ? 'folding' : 'filetype') if a:context.extracted_by == '?' @@ -706,13 +706,13 @@ " Returns False if {cache_data}'s format is not compatible with the current " version of unite-outline. " -function! s:is_valid_filecache(cache_data) abort +function! s:is_valid_filecache(cache_data) return (type(a:cache_data) == type({}) \ && has_key(a:cache_data, s:FILECACHE_FORMAT_VERSION_KEY) \ && a:cache_data[s:FILECACHE_FORMAT_VERSION_KEY] == s:FILECACHE_FORMAT_VERSION) endfunction -function! s:get_candidates(bufnr, options) abort +function! s:get_candidates(bufnr, options) " Update the context Dictionary. let context = s:create_context(a:bufnr, a:options) call s:set_outline_data(a:bufnr, 'context', context) @@ -777,7 +777,7 @@ return candidates endfunction -function! s:extract_headings(context) abort +function! s:extract_headings(context) let src_winnr = bufwinnr(a:context.buffer.nr) if src_winnr == -1 throw "NoWindowError:" @@ -881,7 +881,7 @@ endtry endfunction -function! s:benchmark_start() abort +function! s:benchmark_start() if get(g:, 'unite_source_outline_profile', 0) && has("reltime") return s:get_reltime() else @@ -889,7 +889,7 @@ endif endfunction -function! s:benchmark_stop(start_time, num_lines) abort +function! s:benchmark_stop(start_time, num_lines) if get(g:, 'unite_source_outline_profile', 0) && has("reltime") let used_time = s:get_reltime() - a:start_time let used_time_100l = used_time * (str2float("100") / a:num_lines) @@ -898,14 +898,14 @@ endif endfunction -function! s:get_reltime() abort +function! s:get_reltime() return str2float(reltimestr(reltime())) endfunction " Extract headings from the source buffer in its filetype specific way using " the filetype's outline info. " -function! s:extract_filetype_headings(context) abort +function! s:extract_filetype_headings(context) let buffer = a:context.buffer let oinfo = a:context.outline_info if empty(oinfo) @@ -951,7 +951,7 @@ return headings endfunction -function! s:builtin_extract_headings(context) abort +function! s:builtin_extract_headings(context) let oinfo = a:context.outline_info let [which, pattern] = s:build_heading_pattern(oinfo) @@ -1041,7 +1041,7 @@ " [ ['dummy', 'dummy', 'heading-1', 'heading', 'heading+1'], " '\%(\(heading-1\)\|\(heading\)\|\(heading+1\)\)' ] " -function! s:build_heading_pattern(oinfo) abort +function! s:build_heading_pattern(oinfo) let which = ['dummy', 'dummy'] " NOTE: searchpos() returns submatch counted from 2. let sub_patterns = [] @@ -1061,7 +1061,7 @@ let pattern = '\%(' . join(sub_patterns, '\|') . '\)' return [which, pattern] endfunction -function! s:_substitue_sub_pattern(pattern) abort +function! s:_substitue_sub_pattern(pattern) " Substitute all '\(' with '\%(' let meta_lparen = '\(\(^\|[^\\]\)\(\\\{2}\)*\)\@<=\\(' return '\(' . substitute(a:pattern, meta_lparen, '\\%(', 'g') . '\)' @@ -1069,7 +1069,7 @@ " Returns a List of ranges to be skipped while the extraction. " -function! s:get_skip_ranges(context) abort +function! s:get_skip_ranges(context) let oinfo = a:context.outline_info if !has_key(oinfo, 'skip') | return [] | endif let ranges = [] @@ -1103,7 +1103,7 @@ return ranges endfunction -function! s:get_header_range(context) abort +function! s:get_header_range(context) let oinfo = a:context.outline_info let header = oinfo.skip.header let has_leading = has_key(header, 'leading') @@ -1128,7 +1128,7 @@ endif endfunction -function! s:skip_while(pattern, from) abort +function! s:skip_while(pattern, from) let lnum = a:from + 1 | let num_lines = line('$') while lnum <= num_lines let line = getline(lnum) @@ -1140,7 +1140,7 @@ return lnum endfunction -function! s:skip_until(pattern, from) abort +function! s:skip_until(pattern, from) let lnum = a:from | let num_lines = line('$') while lnum <= num_lines let line = getline(lnum) @@ -1152,7 +1152,7 @@ return lnum endfunction -function! s:extract_folding_headings(context) abort +function! s:extract_folding_headings(context) let headings = [] let foldinfo = [] let num_lines = line('$') @@ -1205,7 +1205,7 @@ return headings endfunction -function! s:normalize_heading(heading, context) abort +function! s:normalize_heading(heading, context) let oinfo = a:context.outline_info let a:heading.id = s:heading_id let a:heading.word = s:normalize_heading_word(a:heading.word) @@ -1231,7 +1231,7 @@ return a:heading endfunction -function! s:normalize_heading_word(word) abort +function! s:normalize_heading_word(word) let word = substitute(substitute(a:word, '^\s*', '', ''), '\s*$', '', '') let word = substitute(word, '\s\+', ' ', 'g') return word @@ -1240,7 +1240,7 @@ let s:SIGNATURE_RANGE = 10 let s:SIGNATURE_PRECISION = 2 -function! s:calc_signature(lnum, lines) abort +function! s:calc_signature(lnum, lines) let range = s:SIGNATURE_RANGE let from = max([1, a:lnum - range]) let to = min([a:lnum + range, len(a:lines) - 1]) @@ -1248,7 +1248,7 @@ let fwd_lines = a:lines[a:lnum : to] return s:_calc_signature(bwd_lines, fwd_lines) endfunction -function! s:_calc_signature(bwd_lines, fwd_lines) abort +function! s:_calc_signature(bwd_lines, fwd_lines) let precision = s:SIGNATURE_PRECISION let is_not_blank = 'v:val =~ "\\S"' let bwd_lines = filter(a:bwd_lines, is_not_blank)[-precision-1 : -2] @@ -1257,7 +1257,7 @@ endfunction " Quick and Dirty Digest -function! s:digest_line(line) abort +function! s:digest_line(line) let line = substitute(a:line, '\s*', '', 'g') if s:strchars(line) <= 20 let digest = line @@ -1269,17 +1269,17 @@ endfunction if v:version >= 703 - function! s:strchars(str) abort + function! s:strchars(str) return strchars(a:str) endfunction else - function! s:strchars(str) abort + function! s:strchars(str) return strlen(substitute(a:str, '.', 'c', 'g')) endfunction endif " Heading Type Filter -function! s:filter_headings(headings, ignore_types) abort +function! s:filter_headings(headings, ignore_types) if empty(a:ignore_types) | return a:headings | endif let headings = a:headings let ignore_types = copy(a:ignore_types) @@ -1299,14 +1299,14 @@ return headings endfunction -function! s:convert_headings_to_candidates(headings, bufnr) abort +function! s:convert_headings_to_candidates(headings, bufnr) if empty(a:headings) | return [] | endif let path = fnamemodify(bufname(a:bufnr), ':p') let candidates = map(copy(a:headings), 's:create_candidate(v:val, path)') return candidates endfunction -function! s:create_candidate(heading, path) abort +function! s:create_candidate(heading, path) " NOTE: " abbr - String for displaying " word - String for narrowing @@ -1328,7 +1328,7 @@ return cand endfunction -function! s:Source_calc_signature(lnum) abort +function! s:Source_calc_signature(lnum) let range = s:SIGNATURE_RANGE let from = max([1, a:lnum - range]) let to = min([a:lnum + range, line('$')]) @@ -1338,10 +1338,103 @@ endfunction let s:source.calc_signature = function(s:SID . 'Source_calc_signature') +"--------------------------------------- +" Actions + +let s:action_table = {} +let s:action_table.preview = { + \ 'description' : 'preview this position', + \ 'is_selectable': 0, + \ 'is_quit' : 0, + \ } +function! s:Action_preview(candidate) + let cand = a:candidate + + " NOTE: Executing :pedit for a nofile buffer clears the buffer content at + " all, so prohibit it. + let bufnr = bufnr(unite#util#escape_file_searching(cand.action__path)) + if getbufvar(bufnr, '&buftype') =~# '\' + call unite#print_error("unite-outline: Can't preview the nofile buffer.") + return + endif + + " workaround for `cursor-goes-to-top' problem on :pedit % + let save_cursors = s:save_window_cursors(bufnr) + let n_wins = winnr('$') + call unite#take_action('preview', cand) + wincmd p + let preview_winnr = winnr() + call s:adjust_scroll(s:best_winline()) + wincmd p + call s:restore_window_cursors(save_cursors, preview_winnr, (winnr('$') > n_wins)) +endfunction +let s:action_table.preview.func = function(s:SID . 'Action_preview') + +function! s:save_window_cursors(bufnr) + let save_cursors = {} + let save_winnr = winnr() + let winnr = 1 + while winnr <= winnr('$') + if winbufnr(winnr) == a:bufnr + execute winnr . 'wincmd w' + let save_cursors[winnr] = { + \ 'cursor' : getpos('.'), + \ 'winline': winline(), + \ } + endif + let winnr += 1 + endwhile + execute save_winnr . 'wincmd w' + return save_cursors +endfunction + +function! s:restore_window_cursors(save_cursors, preview_winnr, is_new) + let save_winnr = winnr() + for [winnr, saved] in items(a:save_cursors) + if winnr == a:preview_winnr + continue + elseif a:is_new && winnr >= a:preview_winnr + let winnr += 1 + endif + execute winnr . 'wincmd w' + if getpos('.') != saved.cursor + call setpos('.', saved.cursor) + call s:adjust_scroll(saved.winline) + endif + endfor + execute save_winnr . 'wincmd w' +endfunction + +function! s:best_winline() + return max([1, winheight(0) * g:unite_kind_jump_list_after_jump_scroll / 100]) +endfunction + +function! s:adjust_scroll(best_winline) + normal! zt + let save_cursor = getpos('.') + let winl = 1 + " Scroll the cursor line down to the best position. + while winl <= a:best_winline + let prev_winl = winl + execute "normal! \" + let winl = winline() + if winl == prev_winl + break + end + let prev_winl = winl + endwhile + if winl > a:best_winline + execute "normal! \" + endif + call setpos('.', save_cursor) +endfunction + +let s:source.action_table.jump_list = s:action_table + "----------------------------------------------------------------------------- " Auto-update -function! s:register_autocmds() abort +function! s:register_autocmds() augroup plugin-unite-source-outline autocmd! * autocmd CursorHold call s:on_cursor_hold() @@ -1354,7 +1447,7 @@ autocmd BufWinEnter * call s:on_buf_win_enter() augroup END -function! s:on_cursor_hold() abort +function! s:on_cursor_hold() let bufnr = bufnr('%') if !s:has_outline_data(bufnr) return @@ -1366,7 +1459,7 @@ endif endfunction -function! s:on_buf_write_post() abort +function! s:on_buf_write_post() let bufnr = bufnr('%') if !s:has_outline_data(bufnr) return @@ -1380,14 +1473,14 @@ " Update the change count of the current buffer. " -function! s:update_buffer_changenr() abort +function! s:update_buffer_changenr() call s:set_outline_data(bufnr('%'), 'buffer_changenr', changenr()) endfunction " Returns True if the current buffer has been changed and the headings of the " buffer should be updated. " -function! s:should_update(event) abort +function! s:should_update(event) let auto_update_enabled = s:get_filetype_option(&l:filetype, 'auto_update') if !auto_update_enabled return 0 @@ -1406,7 +1499,7 @@ " commands decrease the changenr. endfunction -function! s:update_headings(bufnr) abort +function! s:update_headings(bufnr) call s:Util.print_debug('event', 'update_headings') try " Update the Model data (headings). @@ -1430,7 +1523,7 @@ " Returns a List of bufnrs of the outline buffers that are displaying the " heading list of the buffer {src_bufnr}. " -function! s:find_outline_buffers(src_bufnr) abort +function! s:find_outline_buffers(src_bufnr) let outline_bufnrs = [] let bufnr = 1 while bufnr <= bufnr('$') @@ -1457,11 +1550,11 @@ return outline_bufnrs endfunction -function! s:is_unite_buffer(bufnr) abort +function! s:is_unite_buffer(bufnr) return (bufname(a:bufnr) =~# '^\[unite\]') endfunction -function! s:Unite_find_outline_source(unite) abort +function! s:Unite_find_outline_source(unite) let result = filter(copy(a:unite.sources), 'v:val.name ==# "outline"') if empty(result) return {} @@ -1470,7 +1563,7 @@ endif endfunction -function! s:on_buf_win_enter() abort +function! s:on_buf_win_enter() let winnr = winnr() if !s:has_outline_buffer_ids(winnr) return @@ -1489,7 +1582,7 @@ " Swaps the heading lists displayed in the outline buffers whose buffer ids " are one of {outline_buffer_ids} for the heading list of buffer {new_bufnr}. " -function! s:swap_headings(outline_buffer_ids, new_bufnr) abort +function! s:swap_headings(outline_buffer_ids, new_bufnr) let bufnr = 1 while bufnr <= bufnr('$') if bufwinnr(bufnr) > 0 === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/asciidoc.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/asciidoc.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/asciidoc.vim 2015-08-27 20:25:35 +0000 @@ -11,7 +11,7 @@ " Default outline info for Asciidoc " Version: 0.0.1 -function! unite#sources#outline#defaults#asciidoc#outline_info() abort +function! unite#sources#outline#defaults#asciidoc#outline_info() return s:outline_info endfunction @@ -23,7 +23,7 @@ \ 'heading+1': '^=\{4,}$\|^-\{4,}$\|^\~\{4,}$\|^\^\{4,}$\|^+\{4,}$', \ } -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let heading = { \ 'word' : a:heading_line, \ 'level': 0, === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/changelog.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/changelog.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/changelog.vim 2015-08-25 11:01:00 +0000 @@ -12,7 +12,7 @@ " Default outline info for ChangeLog " Version: 0.0.2 -function! unite#sources#outline#defaults#changelog#outline_info() abort +function! unite#sources#outline#defaults#changelog#outline_info() return s:outline_info endfunction @@ -34,7 +34,7 @@ \ ], \} -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let heading = { \ 'word' : a:heading_line, \ 'level': 0, === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/coffee.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/coffee.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/coffee.vim 2015-08-27 20:25:35 +0000 @@ -19,11 +19,11 @@ \ 'heading': s:heading \ } -function! unite#sources#outline#defaults#coffee#outline_info() abort +function! unite#sources#outline#defaults#coffee#outline_info() return s:outline_info endfunction -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let h_lnum = a:context.heading_lnum let level = s:Util.get_indent_level(a:context, h_lnum) let heading = { === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/conf.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/conf.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/conf.vim 2015-08-25 11:01:00 +0000 @@ -11,7 +11,7 @@ " Default outline info for Conf files " Version: 0.0.5 -function! unite#sources#outline#defaults#conf#outline_info() abort +function! unite#sources#outline#defaults#conf#outline_info() return s:outline_info endfunction @@ -28,7 +28,7 @@ \ }, \} -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let heading = { \ 'word' : a:heading_line, \ 'level': 0, === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/cpp.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/cpp.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/cpp.vim 2015-08-25 11:01:00 +0000 @@ -11,7 +11,7 @@ " Default outline info for C++ " Version: 0.2.0 -function! unite#sources#outline#defaults#cpp#outline_info() abort +function! unite#sources#outline#defaults#cpp#outline_info() return s:outline_info endfunction @@ -49,6 +49,6 @@ \ ], \} -function! s:outline_info.extract_headings(context) abort +function! s:outline_info.extract_headings(context) return s:Ctags.extract_headings(a:context) endfunction === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/cs.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/cs.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/cs.vim 2015-08-27 20:25:35 +0000 @@ -11,7 +11,7 @@ " Default outline info for C# " Version: 0.2.0 -function! unite#sources#outline#defaults#cs#outline_info() abort +function! unite#sources#outline#defaults#cs#outline_info() return s:outline_info endfunction @@ -48,6 +48,6 @@ \ ], \} -function! s:outline_info.extract_headings(context) abort +function! s:outline_info.extract_headings(context) return s:Ctags.extract_headings(a:context) endfunction === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/css.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/css.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/css.vim 2015-08-25 11:01:00 +0000 @@ -11,7 +11,7 @@ " Default outline info for CSS " Version: 0.0.3 -function! unite#sources#outline#defaults#css#outline_info() abort +function! unite#sources#outline#defaults#css#outline_info() return s:outline_info endfunction @@ -31,7 +31,7 @@ \ }, \} -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let heading = { \ 'word' : a:heading_line, \ 'level': 0, === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/dosini.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/dosini.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/dosini.vim 2015-08-25 11:01:00 +0000 @@ -11,7 +11,7 @@ " Default outline info for Windows INI files " Version: 0.0.2 -function! unite#sources#outline#defaults#dosini#outline_info() abort +function! unite#sources#outline#defaults#dosini#outline_info() return s:outline_info endfunction @@ -22,7 +22,7 @@ \ 'heading': '^\s*\[[^\]]\+\]', \ } -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let heading = { \ 'word' : a:heading_line, \ 'level': 1, === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/go.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/go.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/go.vim 2015-08-27 20:25:35 +0000 @@ -10,7 +10,7 @@ " Default outline info for Go -function! unite#sources#outline#defaults#go#outline_info() abort +function! unite#sources#outline#defaults#go#outline_info() return s:outline_info endfunction @@ -48,7 +48,7 @@ \ ], \ } -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let type = 'generic' let level = 0 === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/godoc.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/godoc.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/godoc.vim 2015-08-27 20:25:35 +0000 @@ -10,7 +10,7 @@ " Default outline info for Go -function! unite#sources#outline#defaults#godoc#outline_info() abort +function! unite#sources#outline#defaults#godoc#outline_info() return s:outline_info endfunction @@ -53,7 +53,7 @@ let s:parsing_block = '' -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) if a:which !=# 'heading' return {} endif === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/haskell.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/haskell.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/haskell.vim 2015-08-27 20:25:35 +0000 @@ -31,6 +31,6 @@ \ 'skip': s:skip \ } -function! unite#sources#outline#defaults#haskell#outline_info() abort +function! unite#sources#outline#defaults#haskell#outline_info() return s:outline_info endfunction === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/hatena.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/hatena.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/hatena.vim 2015-08-27 20:25:35 +0000 @@ -11,7 +11,7 @@ " Default outline info for Hatena annotation " Version: 0.0.1 -function! unite#sources#outline#defaults#hatena#outline_info() abort +function! unite#sources#outline#defaults#hatena#outline_info() return s:outline_info endfunction @@ -19,7 +19,7 @@ \ 'heading' : '^\*\+', \ } -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let heading = { \ 'word' : a:heading_line, \ 'level': strlen(matchstr(a:heading_line, '^*\+')), === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/help.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/help.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/help.vim 2015-08-25 11:01:00 +0000 @@ -11,7 +11,7 @@ " Default outline info for Vim Help " Version: 0.1.2 -function! unite#sources#outline#defaults#help#outline_info() abort +function! unite#sources#outline#defaults#help#outline_info() return s:outline_info endfunction @@ -58,7 +58,7 @@ \ s:pat_upper_word . '.*\%(' . s:pat_helptag . '\|\~\)\)', \ } -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let heading = { \ 'word' : a:heading_line, \ 'level': 0, @@ -97,7 +97,7 @@ endif endfunction -function! s:normalize_heading_word(word) abort +function! s:normalize_heading_word(word) let word = substitute(a:word, '\%(\~\|{{{\d\=\)\s*$', '', '') let word = substitute(word, s:pat_helptag, '', 'g') if word !~ '\l' === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/html.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/html.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/html.vim 2015-08-25 11:01:00 +0000 @@ -11,7 +11,7 @@ " Default outline info for HTML " Version: 0.0.8 -function! unite#sources#outline#defaults#html#outline_info() abort +function! unite#sources#outline#defaults#html#outline_info() return s:outline_info endfunction @@ -45,7 +45,7 @@ \ ], \} -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let heading = { \ 'word' : a:heading_line, \ 'level': 0, @@ -70,7 +70,7 @@ endif endfunction -function! s:get_text_content(level, context) abort +function! s:get_text_content(level, context) let h_lnum = a:context.heading_lnum let text = s:Util.join_to(a:context, h_lnum, ']*>') let text = substitute(text, '\n', '', 'g') === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/jade.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/jade.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/jade.vim 2015-08-27 20:25:35 +0000 @@ -15,11 +15,11 @@ \ 'heading': s:heading \ } -function! unite#sources#outline#defaults#jade#outline_info() abort +function! unite#sources#outline#defaults#jade#outline_info() return s:outline_info endfunction -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let h_lnum = a:context.heading_lnum let level = s:Util.get_indent_level(a:context, h_lnum) let heading = { === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/java.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/java.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/java.vim 2015-08-25 11:01:00 +0000 @@ -11,7 +11,7 @@ " Default outline info for Java " Version: 0.1.6 -function! unite#sources#outline#defaults#java#outline_info() abort +function! unite#sources#outline#defaults#java#outline_info() return s:outline_info endfunction @@ -44,6 +44,6 @@ \ ], \} -function! s:outline_info.extract_headings(context) abort +function! s:outline_info.extract_headings(context) return s:Ctags.extract_headings(a:context) endfunction === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/javascript.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/javascript.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/javascript.vim 2015-08-25 11:01:00 +0000 @@ -15,7 +15,7 @@ " TODO: Use jsctags for much better heading list! -function! unite#sources#outline#defaults#javascript#outline_info() abort +function! unite#sources#outline#defaults#javascript#outline_info() return s:outline_info endfunction @@ -26,32 +26,22 @@ let s:pat_indent = '\<\h\w*\>' -let s:pat_assign = '\%(\%(var\|let\|const\)\s\+\)\=\(' . s:pat_indent . '\%(\.' . s:pat_indent . '\)*\)\s*=' +let s:pat_assign = '\%(var\s\+\)\=\(' . s:pat_indent . '\%(\.' . s:pat_indent . '\)*\)\s*=' " NOTE: This sub pattern contains 1 capture; 1:lvalue let s:pat_label = '\(' . s:pat_indent . '\)\s*:' " NOTE: This sub pattern contains 1 capture; 1:label -let s:pat_rvalue = '\(function\s*(\([^)]*\))\|(\(.*\))\s*{\|\s*{\|\(\w\+\)\s*(\(.*\))\s*{\)' +let s:pat_rvalue = '\(function\s*(\([^)]*\))\|{\)' " NOTE: This sub pattern contains 2 captures; 1:rvalue [, 2:arg_list] -let s:pat_def = '\%(\%(export\s\+\%(default\s\+\)\=\)\=function\>\)' - -let s:pat_es6_class = '^\s*\%(export\s\+\%(default\s\+\)\=\)\=class\s\+\(\S\+\)\s*{$' -" NOTE: This sub pattern contains 1 capture; 1:className - -let s:pat_es6_method = '^\s*\(\%(static\s\+\)\?\w\+\)\s*(\([^)]*\))\s*{$' -" NOTE: This sub pattern contains 2 capture; 1:methodName [, 2:arg_list] - "----------------------------------------------------------------------------- " Outline Info let s:outline_info = { \ 'heading-1': s:Util.shared_pattern('cpp', 'heading-1'), - \ 'heading' : '^\s*\%(' . s:pat_def . '\|' . - \ '\%(' . - \ '\%(export\s\+\%(default\s\+\)\=\)\=class\s\+\(\S\+\)\s\+\%(extends\s\+\w\+\)\?\|\s*\%(static\s\+\)\?\w\+\s*\|' . s:pat_assign . '\|' . s:pat_label . - \ '\)\s*' . s:pat_rvalue . '\)', + \ 'heading' : '^\s*\%(function\>\|' . + \ '\%(' . s:pat_assign . '\|' . s:pat_label . '\)\s*' . s:pat_rvalue . '\)', \ \ 'skip': { \ 'header': s:Util.shared_pattern('cpp', 'header'), @@ -62,7 +52,7 @@ \ ], \} -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let h_lnum = a:context.heading_lnum " Level 1 to 3 are reserved for comment headings. let level = s:Util.get_indent_level(a:context, h_lnum) + 3 @@ -80,7 +70,7 @@ elseif a:which ==# 'heading' let matched_list = matchlist(a:heading_line, - \ '^\s*' . s:pat_def . '\s\+\(' . s:pat_indent . '\)\s*(\(.*\))') + \ '^\s*function\s\+\(' . s:pat_indent . '\)\s*(\(.*\))') if len(matched_list) > 0 " function Foo(...) -> Foo(...) " function foo(...) -> foo(...) @@ -104,7 +94,7 @@ let heading.word = lvalue . '(' . arg_list . ')' else " Foo.bar = function(...) -> bar(...) - "let heading.level += 1 + let heading.level += 1 let heading.word = prop_name . '(' . arg_list . ')' endif else @@ -140,23 +130,6 @@ let heading.level = 0 endif endif - else - let matched_list = matchlist(a:heading_line, s:pat_es6_class) - if len(matched_list) > 0 - let heading.level = 1 - let heading.word = 'class ' . matched_list[1] - else - let heading.level = 2 - let matched_list = matchlist(a:heading_line, s:pat_es6_method) - if len(matched_list) > 0 - if match(a:heading_line, '^\s*\%(for\|if\|while\|switch\)\>') != -1 - let heading.level = 0 - else - let [func_name, arg_list] = matched_list[1:2] - let heading.word = func_name . '(' . arg_list . ')' - endif - endif - endif endif endif === removed file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/lisp.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/lisp.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/lisp.vim 1970-01-01 00:00:00 +0000 @@ -1,110 +0,0 @@ -"============================================================================= -" File : autoload/unite/sources/outline/defaults/lisp.vim -" Author : adolenc -" Updated : 2016-04-08 -" -" Licensed under the MIT license: -" http://www.opensource.org/licenses/mit-license.php -" -"============================================================================= - -function! unite#sources#outline#defaults#lisp#outline_info() abort - return s:outline_info -endfunction - -let s:Util = unite#sources#outline#import('Util') - -"----------------------------------------------------------------------------- -" Outline Info - -let s:DEF_PATTERN = '\(\S*:\)\?def\S*' -let s:FEATURE_PATTERN = '#\(+\|-\)\(([^)]\+)\|\S[^(]*\)' - -let s:outline_info = { - \ 'heading' : '^' . s:FEATURE_PATTERN . '\s*(\|^(\|^\s*(' . s:DEF_PATTERN, - \ - \ 'skip': { - \ 'header': '^;', - \ 'block': ['^\s*"', '[^\\]"'], - \ }, - \ - \ 'not_match_patterns': [ - \ s:Util.shared_pattern('*', 'parameter_list'), - \ ], - \ - \ 'heading_groups': { - \ 'function' : ['defun', 'defmacro', 'defgeneric', 'defmethod'], - \ 'variable' : ['defvar', 'defparameter', 'defconstant'], - \ 'type' : ['defclass', 'defstruct', 'define-condition', 'deftype'], - \ 'method-combination' : ['define-method-combination'], - \ 'compiler-macro' : ['define-compiler-macro'], - \ 'package' : ['defpackage'], - \ }, - \ - \ 'highlight_rules': [ - \ { 'name' : 'function', - \ 'pattern' : '/ [^ ]* \zs.*/' }, - \ { 'name' : 'type', - \ 'pattern' : '/' . s:DEF_PATTERN . '/' }, - \ { 'name' : 'special', - \ 'pattern' : '/.*:: toplevel form/' }, - \ ], - \} - -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort - let first_form = s:remove_feature_check(a:heading_line) - let heading = { - \ 'word' : s:splice_form(first_form), - \ 'level': s:Util.get_indent_level(a:context, a:context.heading_lnum), - \ 'type' : matchstr(first_form, '^\s*(\zs\S\+\ze'), - \ } - let form_args = matchstr(heading.word, '^\S\+\s\+\zs.*') - - " Whether we are checking a def* or a top-level form, fix the heading by - " appending appropriate type information after `::'. - if heading.type =~ '^' . s:DEF_PATTERN - let heading.word = heading.type . ' ' . s:add_ldots(form_args) - else - let heading.word = s:add_ldots(heading.word) . ' :: toplevel form' - endif - return heading -endfunction - -function! s:count_occurences(char, string) abort - " Count number of occurences of {char} in {string}. - return len(split(a:string, a:char, 1)) - 1 -endfunction - -function! s:has_balanced_chars(line, open, close) abort - " Check whether {line} has balanced {open} and {close} characters. - " Actually just fake it by checking if they appear same number of times - let n_open_chars = s:count_occurences(a:open, a:line) - if a:open == a:close - return (n_open_chars % 2) == 0 - endif - let n_close_chars = s:count_occurences(a:close, a:line) - return n_open_chars == n_close_chars -endfunction - -function! s:splice_form(line) abort - " Remove the outermost parentheses from {line}. - if s:has_balanced_chars(a:line, '(', ')') - return matchstr(a:line, '^\s*(\zs.*\ze)\s*$') - else - return matchstr(a:line, '^\s*(\zs.*') - endif -endfunction - -function! s:remove_feature_check(line) abort - " Remove the (#+|#-)[feature] expression from {line} if it exists. - return matchstr(a:line, '^\(' . s:FEATURE_PATTERN . '\)\?\zs.*') -endfunction - -function! s:add_ldots(line) abort - " Add `...' to the end of {line} in case it has unbalanced parentheses or - " quotes. - if !s:has_balanced_chars(a:line, '(', ')') || !s:has_balanced_chars(a:line, '"', '"') - return a:line . ' ...' - endif - return a:line -endfunction === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/lua.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/lua.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/lua.vim 2015-08-27 20:25:35 +0000 @@ -8,7 +8,7 @@ " "============================================================================= -function! unite#sources#outline#defaults#lua#outline_info() abort +function! unite#sources#outline#defaults#lua#outline_info() return s:outline_info endfunction @@ -33,7 +33,7 @@ \ ] \} -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let h_lnum = a:context.heading_lnum let level = s:Util.get_indent_level(a:context, h_lnum) === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/magma.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/magma.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/magma.vim 2015-08-27 20:25:35 +0000 @@ -11,7 +11,7 @@ " Default outline info for Magma files " Version: 0.1.0 -function! unite#sources#outline#defaults#magma#outline_info() abort +function! unite#sources#outline#defaults#magma#outline_info() return s:outline_info endfunction @@ -46,7 +46,7 @@ \ ], \} -function! s:strip(input_string) abort +function! s:strip(input_string) return substitute(a:input_string, '^\s*\(.\{-}\)\s*$', '\1', '') endfunction === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/man.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/man.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/man.vim 2015-08-27 20:25:35 +0000 @@ -41,7 +41,7 @@ \} -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let heading = { \ 'word' : a:heading_line, @@ -65,7 +65,7 @@ " Default outline info for man files -function! unite#sources#outline#defaults#man#outline_info() abort +function! unite#sources#outline#defaults#man#outline_info() return s:outline_info endfunction === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/markdown.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/markdown.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/markdown.vim 2015-08-25 11:01:00 +0000 @@ -11,7 +11,7 @@ " Default outline info for Markdown " Version: 0.0.5 -function! unite#sources#outline#defaults#markdown#outline_info() abort +function! unite#sources#outline#defaults#markdown#outline_info() return s:outline_info endfunction @@ -21,10 +21,9 @@ let s:outline_info = { \ 'heading' : '^#\+', \ 'heading+1': '^[-=]\+$', - \ 'skip': {'block': ['^\s*```.*$', '^\s*```$']}, \ } -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let heading = { \ 'word' : a:heading_line, \ 'level': 0, === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/perl.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/perl.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/perl.vim 2015-08-27 20:25:35 +0000 @@ -11,7 +11,7 @@ " Default outline info for Perl " Version: 0.1.0 -function! unite#sources#outline#defaults#perl#outline_info() abort +function! unite#sources#outline#defaults#perl#outline_info() return s:outline_info endfunction @@ -50,7 +50,7 @@ \ ], \} -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let h_lnum = a:context.heading_lnum " Level 1 to 3 are reserved for comment headings. let level = s:Util.get_indent_level(a:context, h_lnum) + 3 === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/php.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/php.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/php.vim 2015-08-27 20:25:35 +0000 @@ -13,7 +13,7 @@ " Default outline info for PHP " Version: 0.1.2 -function! unite#sources#outline#defaults#php#outline_info() abort +function! unite#sources#outline#defaults#php#outline_info() return s:outline_info endfunction @@ -59,7 +59,7 @@ \ ], \} -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let h_lnum = a:context.heading_lnum " Level 1 to 3 are reserved for comment headings. let level = s:Util.get_indent_level(a:context, h_lnum) + 3 @@ -112,7 +112,7 @@ return heading endfunction -function! s:outline_info.need_blank_between(cand1, cand2, memo) abort +function! s:outline_info.need_blank_between(cand1, cand2, memo) if a:cand1.source__heading_group == 'function' && a:cand2.source__heading_group == 'function' " Don't insert a blank between two sibling functions. return 0 === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/pir.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/pir.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/pir.vim 2015-08-25 11:01:00 +0000 @@ -11,7 +11,7 @@ " Default outline info for PIR " Version: 0.0.3 (draft) -function! unite#sources#outline#defaults#pir#outline_info() abort +function! unite#sources#outline#defaults#pir#outline_info() return s:outline_info endfunction === removed file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/pony.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/pony.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/pony.vim 1970-01-01 00:00:00 +0000 @@ -1,156 +0,0 @@ -"============================================================================= -" File : autoload/unite/sources/outline/defaults/pony.vim -" Author : locksfree -" Updated : 2016-07-17 -" -" Licensed under the MIT license: -" http://www.opensource.org/licenses/mit-license.php -" -"============================================================================= - -" Default outline info for Pony -" Version: 0.1.0 - -function! unite#sources#outline#defaults#pony#outline_info() abort - return s:outline_info -endfunction - -let s:Util = unite#sources#outline#import('Util') - -"--------------------------------------- -" Sub Pattern - -let s:pat_type = '\%(interface\|be\|type\|class\|trait\|actor\|fun\|new\|primitive\)\>' -let s:pat_typename = '\%(iso\|trn\|ref\|tag\|val\|box\)\?\s*\zs\h\%(\w\+\)' - -"----------------------------------------------------------------------------- -" Outline Info - -let s:outline_info = { - \ 'heading' : '^\s*\%(\h\w*\s\+\)*' . s:pat_type, - \ - \ 'heading_groups': { - \ 'type' : ['type', 'interface', 'class', 'trait', 'actor', 'primitive'], - \ 'function' : ['fun', 'new', 'be'], - \ }, - \ 'not_match_patterns': [ - \ s:Util.shared_pattern('*', 'parameter_list'), - \ ], - \ - \ 'highlight_rules': [ - \ { 'name' : 'type', - \ 'pattern': '/\S\+\ze : \%(interface\|class\|trait\|actor\|type\|primitive\)/' }, - \ { 'name' : 'function', - \ 'pattern': '/\(new\|be\|fun\)/' }, - \ { 'name' : 'parameter_list', - \ 'pattern': '/(.*)/' }, - \ ], - \} - -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort - let h_lnum = a:context.heading_lnum - let level = s:Util.get_indent_level(a:context, h_lnum) - let heading = { - \ 'word' : a:heading_line, - \ 'level': level, - \ 'type' : 'generic', - \ } - - if a:which ==# 'heading' - let heading.word = substitute(heading.word, '\s*{.*$', '', '') - - let heading_type = '' - if heading.word =~# '^\s*interface\>' - let heading_type = 'interface' - elseif heading.word =~# '^\s*class\>' - let heading_type = 'class' - elseif heading.word =~# '^\s*trait\>' - let heading_type = 'trait' - elseif heading.word =~# '^\s*actor\>' - let heading_type = 'actor' - elseif heading.word =~# '^\s*type\>' - let heading_type = 'type' - elseif heading.word =~# '^\s*primitive\>' - let heading_type = 'primitive' - endif - if heading_type !=# '' - let heading.type = 'type' - let heading.level = 1 - endif - - if heading.type !=# 'generic' - let name = matchstr(heading.word, '\zs\<' . heading_type . '\s\+' . s:pat_typename) - if len(name) > 0 - let heading.word = name . ' : ' . heading_type - else - let heading.word = '' - let heading.type = 'generic' - end - end - - if heading.word =~# '^\s*\%(fun\|be\|new\)\>' - " Function / Behaviour / Constructor - let heading.type = 'function' - let heading.level = 2 - let fun_type = matchstr(heading.word, '\%(fun\|be\|new\)') - - " There might be a receiver capability, we need to get it if it is there - let receiver_capa = matchstr(heading.word, '\%(fun\|be\|new\)\s\+\%(ref\|box\|trn\|iso\|val\|tag\)') - let receiver_capa = matchstr(receiver_capa, '\%(ref\|box\|trn\|iso\|val\|tag\)', '') - if len(receiver_capa) > 0 - let receiver_capa = '[' . receiver_capa . '] ' - endif - - " There might be a return type, we need to get it if it is there - let return_type = matchstr(heading.word, '[\)]\s*\:\%([^>]\+\)\%([=][>]\|$\)') - if len(return_type) > 0 - let return_type = matchstr(return_type, ':.*', '') - let return_type = substitute(return_type, '\%(^\s\+\|\s\+$\)', '', 'g') - - " The line may end with the start/full body starting with => or - " simply stop mid way $ - if len(matchstr(return_type, '[=][>]')) > 0 - let return_type = return_type[1:-4] - else - let return_type = return_type[1:-2] - endif - let return_type = ' : ' . substitute(return_type, '\%(^\s\+\|\s\+$\)', '', 'g') - endif - - " Let's extract the name - let name = matchstr(heading.word, '\zs\<' . fun_type . '\(\s\+\zs\h\w*\)\+') - - " Let's indicate the visibility (+ or -) for package or public - let prefix = '+ ' - if len(matchstr(name, '^\s*[_]')) > 0 - let prefix = '- ' - end - - let heading.word = prefix . fun_type . ' ' . receiver_capa . name . '(...)' . return_type - endif - - " For anything but a function, we need to put the visibility - if heading.type !=# 'function' && heading.type !=# 'generic' - let prefix = '+ ' - if len(matchstr(heading.word, '^\s*[_]')) > 0 - let prefix = '- ' - endif - let heading.word = prefix . heading.word - endif - - if len(substitute(heading.word, '\%(^\s\+\|\s\+$\)', '', 'g')) == 0 || heading.type ==# 'generic' - let heading = {} - endif - endif - - return heading -endfunction - -function! s:outline_info.need_blank_between(cand1, cand2, memo) abort - if a:cand1.source__heading_type ==# 'function' && a:cand2.source__heading_type ==# 'function' - " Don't insert a blank between two sibling functions. - return 0 - else - return a:cand1.source__has_marked_child || a:cand2.source__has_marked_child - endif -endfunction === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/python.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/python.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/python.vim 2015-08-25 11:01:00 +0000 @@ -11,7 +11,7 @@ " Default outline info for Python " Version: 0.2.0 -function! unite#sources#outline#defaults#python#outline_info() abort +function! unite#sources#outline#defaults#python#outline_info() return s:outline_info endfunction @@ -47,7 +47,7 @@ \ ], \} -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let h_lnum = a:context.heading_lnum let level = s:Util.get_indent_level(a:context, h_lnum) let heading = { @@ -70,7 +70,7 @@ return heading endfunction -function! s:outline_info.need_blank_between(cand1, cand2, memo) abort +function! s:outline_info.need_blank_between(cand1, cand2, memo) if a:cand1.source__heading_group == 'function' && a:cand2.source__heading_group == 'function' " Don't insert a blank between two sibling functions. return 0 === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/review.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/review.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/review.vim 2015-08-25 11:01:00 +0000 @@ -11,7 +11,7 @@ " Default outline info for ReVIEW " Version: 0.0.2 -function! unite#sources#outline#defaults#review#outline_info() abort +function! unite#sources#outline#defaults#review#outline_info() return s:outline_info endfunction @@ -22,7 +22,7 @@ \ 'heading': '^=\+', \ } -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let heading = { \ 'word' : substitute(a:heading_line, '^=\+\s*', '', ''), \ 'level': strlen(matchstr(a:heading_line, '^=\+')), === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/rst.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/rst.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/rst.vim 2015-08-25 11:01:00 +0000 @@ -11,7 +11,7 @@ " Default outline info for reStructuredText " Version: 0.0.3 -function! unite#sources#outline#defaults#rst#outline_info() abort +function! unite#sources#outline#defaults#rst#outline_info() return s:outline_info endfunction @@ -22,12 +22,12 @@ \ 'heading+1': '^[[:punct:]]\{4,}$', \ } -function! s:outline_info.before(context) abort +function! s:outline_info.before(context) let s:adornment_levels = {} let s:adornment_id = 2 endfunction -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let heading = { \ 'word' : a:heading_line, \ 'level': 0, === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/ruby.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/ruby.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/ruby.vim 2015-08-27 20:25:35 +0000 @@ -11,7 +11,7 @@ " Default outline info for Ruby " Version: 0.1.5 -function! unite#sources#outline#defaults#ruby#outline_info(...) abort +function! unite#sources#outline#defaults#ruby#outline_info(...) if a:0 " Redirect to DSL's outline info. let context = a:1 @@ -72,11 +72,11 @@ \ ], \} -function! s:outline_info.initialize() abort +function! s:outline_info.initialize() let self.heading = '^\s*\(' . join(self.heading_keywords, '\|') . '\)\>' endfunction -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let word = a:heading_line let type = 'generic' let level = 0 @@ -157,7 +157,7 @@ return heading endfunction -function! s:outline_info.fold_ruby_block(context, lnum) abort +function! s:outline_info.fold_ruby_block(context, lnum) let line = a:context.lines[a:lnum] let indent = matchlist(line, '^\(\s*\)')[1] let line = s:Util.join_to(a:context, a:lnum, indent . '%\(end\>\|}\)') @@ -166,7 +166,7 @@ return line endfunction -function! s:outline_info.need_blank_between(cand1, cand2, memo) abort +function! s:outline_info.need_blank_between(cand1, cand2, memo) if a:cand1.source__heading_group == 'method' && a:cand2.source__heading_group == 'method' " Don't insert a blank between two sibling methods. return 0 === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/ruby/rspec.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/ruby/rspec.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/ruby/rspec.vim 2015-08-25 11:01:00 +0000 @@ -13,7 +13,7 @@ " Default outline info for Ruby/RSpec " Version: 0.1.2 -function! unite#sources#outline#defaults#ruby#rspec#outline_info() abort +function! unite#sources#outline#defaults#ruby#rspec#outline_info() return s:outline_info endfunction @@ -61,14 +61,14 @@ \ ], \}) -function! s:outline_info.initialize() abort +function! s:outline_info.initialize() let self.rspec_heading = '^\s*\(' . join(self.rspec_heading_keywords, '\|') . '\)\>' let self.heading_keywords += self.rspec_heading_keywords let self.highlight_rules += self.rspec_highlight_rules call call(self.super.initialize, [], self) endfunction -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let word = a:heading_line let type = 'generic' let level = 0 === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/sass.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/sass.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/sass.vim 2015-08-27 20:25:35 +0000 @@ -11,7 +11,7 @@ " Default outline info for SASS " Version: 0.0.1 -function! unite#sources#outline#defaults#sass#outline_info() abort +function! unite#sources#outline#defaults#sass#outline_info() return s:outline_info endfunction @@ -25,7 +25,7 @@ \ 'header' : '^//|^/\*', \} -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let heading = { \ 'word' : a:heading_line, \ 'level': 0, === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/scala.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/scala.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/scala.vim 2015-08-27 20:25:35 +0000 @@ -14,7 +14,7 @@ let g:unite_source_outline_scala_show_all_declarations = \ get(g:, 'unite_source_outline_scala_show_all_declarations', 0) -function! unite#sources#outline#defaults#scala#outline_info() abort +function! unite#sources#outline#defaults#scala#outline_info() return s:outline_info endfunction @@ -55,7 +55,7 @@ \ ] \} -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let h_lnum = a:context.heading_lnum " Level 1 to 3 are reserved for comment headings. let level = s:Util.get_indent_level(a:context, h_lnum) + 3 === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/scheme.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/scheme.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/scheme.vim 2015-08-25 11:01:00 +0000 @@ -11,7 +11,7 @@ " Default outline info for Scheme " Version: 0.0.6 (draft) -function! unite#sources#outline#defaults#scheme#outline_info() abort +function! unite#sources#outline#defaults#scheme#outline_info() return s:outline_info endfunction @@ -27,7 +27,7 @@ \ 'skip': { 'header': '^;' }, \} -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let heading = { \ 'word' : a:heading_line, \ 'level': 0, === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/scss.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/scss.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/scss.vim 2015-08-27 20:25:35 +0000 @@ -11,7 +11,7 @@ " Default outline info for SCSS " Version: 0.0.1 -function! unite#sources#outline#defaults#scss#outline_info() abort +function! unite#sources#outline#defaults#scss#outline_info() return unite#sources#outline#defaults#css#outline_info() endfunction === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/sh.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/sh.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/sh.vim 2015-08-25 11:01:00 +0000 @@ -11,7 +11,7 @@ " Default outline info for Shell script " Version: 0.1.0 -function! unite#sources#outline#defaults#sh#outline_info() abort +function! unite#sources#outline#defaults#sh#outline_info() return s:outline_info endfunction @@ -36,7 +36,7 @@ \ ], \} -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let heading = { \ 'word' : a:heading_line, \ 'level': 0, === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/swift.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/swift.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/swift.vim 2015-08-27 20:25:35 +0000 @@ -10,7 +10,7 @@ " Default outline info for Apple Swift -function! unite#sources#outline#defaults#swift#outline_info() abort +function! unite#sources#outline#defaults#swift#outline_info() return s:outline_info endfunction @@ -89,7 +89,7 @@ \ ], \ } -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let type = 'generic' let level = 0 === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/tex.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/tex.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/tex.vim 2015-08-27 20:25:35 +0000 @@ -11,7 +11,7 @@ " Default outline info for TeX " Version: 0.1.1 -function! unite#sources#outline#defaults#tex#outline_info() abort +function! unite#sources#outline#defaults#tex#outline_info() return s:outline_info endfunction @@ -49,12 +49,12 @@ \ 'label' : 7, \ } -function! s:outline_info.before(context) abort +function! s:outline_info.before(context) let s:unit_count = map(copy(s:unit_level_map), '0') let s:bib_level = 7 endfunction -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let heading = { \ 'word' : a:heading_line, \ 'level': 0, @@ -98,7 +98,7 @@ endif endfunction -function! s:normalize_heading_word(word, unit) abort +function! s:normalize_heading_word(word, unit) let word = substitute(a:word, '\\\\\n', '', 'g') let word = matchstr(word, '^\s*\\\w\+{\zs.*\ze}\s*\%(%.*\)\?$') let word = s:unit_seqnr_prefix(a:unit) . word @@ -108,7 +108,7 @@ return word endfunction -function! s:unit_seqnr_prefix(unit) abort +function! s:unit_seqnr_prefix(unit) let seqnr = [] if a:unit ==# 'part' === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/textile.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/textile.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/textile.vim 2015-08-25 11:01:00 +0000 @@ -12,7 +12,7 @@ " Default outline info for Textile " Version: 0.0.2 -function! unite#sources#outline#defaults#textile#outline_info() abort +function! unite#sources#outline#defaults#textile#outline_info() return s:outline_info endfunction @@ -23,7 +23,7 @@ \ 'heading': '^h[1-6]\.\s', \ } -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let heading = { \ 'word' : substitute(a:heading_line, '^h[1-6]\.\s\+', '', ''), \ 'level': str2nr(matchstr(a:heading_line, '^h\zs[1-6]\ze\.\s')), === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/typescript.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/typescript.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/typescript.vim 2015-08-27 20:25:35 +0000 @@ -13,7 +13,7 @@ " Download typescript ctags at https://github.com/jb55/typescript-ctags -function! unite#sources#outline#defaults#typescript#outline_info() abort +function! unite#sources#outline#defaults#typescript#outline_info() return s:outline_info endfunction @@ -37,6 +37,6 @@ \ ], \} -function! s:outline_info.extract_headings(context) abort +function! s:outline_info.extract_headings(context) return s:Ctags.extract_headings(a:context) endfunction === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/unittest.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/unittest.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/unittest.vim 2015-08-25 11:01:00 +0000 @@ -14,7 +14,7 @@ " h1mesuke/vim-unittest - GitHub " https://github.com/h1mesuke/vim-unittest -function! unite#sources#outline#defaults#unittest#outline_info() abort +function! unite#sources#outline#defaults#unittest#outline_info() return s:outline_info endfunction @@ -28,7 +28,7 @@ \ 'heading' : '^\s*\d\+) \%(Failure\|Error\): ', \} -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let heading = { \ 'word' : a:heading_line, \ 'level': 0, === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/vim.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/vim.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/defaults/vim.vim 2015-08-25 11:01:00 +0000 @@ -11,7 +11,7 @@ " Default outline info for Vim script " Version: 0.1.5 -function! unite#sources#outline#defaults#vim#outline_info() abort +function! unite#sources#outline#defaults#vim#outline_info() return s:outline_info endfunction @@ -43,7 +43,7 @@ \ ], \} -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let heading = { \ 'word' : a:heading_line, \ 'level': 0, === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/misc/wzmemo_text.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/misc/wzmemo_text.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/misc/wzmemo_text.vim 2015-08-25 11:01:00 +0000 @@ -21,7 +21,7 @@ " " autocmd BufRead,BufNewFile *.txt set filetype=text -function! unite#sources#outline#defaults#text#outline_info() abort +function! unite#sources#outline#defaults#text#outline_info() return s:outline_info endfunction @@ -29,7 +29,7 @@ \ 'heading' : '^\.\+', \ } -function! s:outline_info.create_heading(which, heading_line, matched_line, context) abort +function! s:outline_info.create_heading(which, heading_line, matched_line, context) let level = strlen(matchstr(a:heading_line, '^\.\+')) let heading = { \ 'word' : substitute(a:heading_line, '^\.\+\s*', '', ''), === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/modules/base.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/modules/base.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/modules/base.vim 2015-08-25 11:01:00 +0000 @@ -29,7 +29,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#sources#outline#modules#base#new(name, sid) abort +function! unite#sources#outline#modules#base#new(name, sid) let module = copy(s:Module) let module.__name__ = a:name let module.__prefix__ = a:sid . a:name . '_' @@ -39,7 +39,7 @@ "----------------------------------------------------------------------------- -function! s:get_SID() abort +function! s:get_SID() return matchstr(expand(''), '\d\+_') endfunction let s:SID = s:get_SID() === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/modules/ctags.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/modules/ctags.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/modules/ctags.vim 2015-08-27 20:25:35 +0000 @@ -30,7 +30,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#sources#outline#modules#ctags#import() abort +function! unite#sources#outline#modules#ctags#import() return s:Ctags endfunction @@ -38,9 +38,9 @@ let s:Tree = unite#sources#outline#import('Tree') let s:Util = unite#sources#outline#import('Util') -let s:Process = unite#util#get_vital().import('Process') +let s:Process = vital#of('unite').import('Process') -function! s:get_SID() abort +function! s:get_SID() return matchstr(expand(''), '\d\+_') endfunction let s:SID = s:get_SID() @@ -55,7 +55,7 @@ " Find the Exuberant Ctags and identify its binary name. If not found, returns " empty String. " -function! s:find_exuberant_ctags() abort +function! s:find_exuberant_ctags() let ctags_exe_names = [ \ 'ctags-exuberant', \ 'exctags', @@ -89,14 +89,14 @@ " Returns True if the Exuberant Ctags is available. " -function! s:Ctags_exists() abort +function! s:Ctags_exists() return !empty(s:Ctags.exe) endfunction call s:Ctags.function('exists') " Returns True if the Exuberant Ctags supports {filetype}. " -function! s:Ctags_supports(filetype) abort +function! s:Ctags_supports(filetype) if !has_key(s:Ctags.lang_info, a:filetype) return 0 else @@ -109,7 +109,7 @@ " Executes the Ctags and returns a List of tag objects. " -function! s:execute_ctags(context) abort +function! s:execute_ctags(context) " Write the current content of the buffer to a temporary file. let input = join(a:context.lines[1:], "\") let input = s:Process.iconv(input, &encoding, &termencoding) @@ -176,7 +176,7 @@ " extension_fields " := key:valuekey:value... " -function! s:create_tag(tag_line, lang_info) abort +function! s:create_tag(tag_line, lang_info) let fields = split(a:tag_line, "\") if len(fields) < 3 " The line doesn't seem a tag line, so ignore it. @@ -207,7 +207,7 @@ " Extract headings from the context buffer's file using the Ctags and then " returns a tree of the headings. " -function! s:Ctags_extract_headings(context) abort +function! s:Ctags_extract_headings(context) let filetype = a:context.buffer.filetype if !s:Ctags_exists() call unite#print_message("[unite-outline] Sorry, Exuberant Ctags required.") @@ -291,7 +291,7 @@ " Creates a heading from {tag}. " -function! s:create_heading(tag, context) abort +function! s:create_heading(tag, context) let line = a:context.lines[a:tag.lnum] let heading = { \ 'word' : a:tag.name, @@ -313,7 +313,7 @@ " Pseudo headings are the headings whose tags don't exists actually because " maybe they belong to the other files. " -function! s:create_pseudo_heading(tag) abort +function! s:create_pseudo_heading(tag) let heading = { \ 'word' : '(' . a:tag.scope . ') : ' . a:tag.scope_kind, \ 'type' : a:tag.scope_kind, @@ -325,7 +325,7 @@ " Gets a full parameter list from the context buffer's line. " -function! s:get_param_list(context, lnum) abort +function! s:get_param_list(context, lnum) let line = s:Util.join_to_rparen(a:context, a:lnum) return matchstr(line, '([^)]*)') endfunction @@ -337,7 +337,7 @@ \ 'protected': '#', \ 'private' : '-' \ } -function! s:get_tag_access_mark(tag) abort +function! s:get_tag_access_mark(tag) let access = has_key(a:tag, 'access') ? a:tag.access : 'unknown' return get(s:OOP_ACCESS_MARKS, access, '_') . ' ' endfunction @@ -345,7 +345,7 @@ " Count up {tag}'s name and returns an ID suffix (#2, #3, ...) for {tag}. " If the {tag} is the first one that has the name, returns empty String. " -function! s:get_tag_id(tag) abort +function! s:get_tag_id(tag) let name = a:tag.qualified_name if has_key(a:tag, 'signature') let name .= a:tag.signature @@ -365,13 +365,13 @@ " " [c] classes " [d] macro definitions -" [e] enumerators (values inside an enumeration) +" e enumerators (values inside an enumeration) " [f] function definitions " [g] enumeration names " l local variables -" [m] class, struct, and union members +" m class, struct, and union members " [n] namespaces -" [p] function prototypes, pure virtual functions +" p function prototypes " [s] structure names " [t] typedefs " [u] union names @@ -380,11 +380,11 @@ " let s:Ctags.lang_info.cpp = { \ 'name': 'C++', - \ 'ctags_options': ' --c++-kinds=cdefgmnstup ', - \ 'scope_kinds' : ['namespace', 'class', 'struct', 'enum'], + \ 'ctags_options': ' --c++-kinds=cdfgnstu ', + \ 'scope_kinds' : ['namespace', 'class', 'struct'], \ 'scope_delim' : '::', \ } -function! s:Ctags.lang_info.cpp.create_heading(tag, context) abort +function! s:Ctags.lang_info.cpp.create_heading(tag, context) let line = a:context.lines[a:tag.lnum] let heading = { \ 'word' : a:tag.name, @@ -427,7 +427,7 @@ return ignore ? {} : heading endfunction -function! s:get_expanded(context, lnum, macro) abort +function! s:get_expanded(context, lnum, macro) let line = a:context.lines[a:lnum] let expanded = matchstr(line, a:macro . '\%(([^)]*)\)\=\s\+\zs.*') let lnum = a:lnum + 1 === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/modules/file_cache.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/modules/file_cache.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/modules/file_cache.vim 2015-08-27 20:25:35 +0000 @@ -29,7 +29,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#sources#outline#modules#file_cache#import(dir) abort +function! unite#sources#outline#modules#file_cache#import(dir) let s:FileCache.DIR = a:dir return s:FileCache endfunction @@ -38,7 +38,7 @@ let s:Util = unite#sources#outline#import('Util') -function! s:get_SID() abort +function! s:get_SID() return matchstr(expand(''), '\d\+_') endfunction let s:SID = s:get_SID() @@ -69,13 +69,13 @@ " Returns True if the cache file associated with file {path} exists. " -function! s:cache_file_exists(path) abort +function! s:cache_file_exists(path) return (s:cache_dir_exists() && filereadable(s:get_cache_file_path(a:path))) endfunction " Returns True if the cache directory exists. " -function! s:cache_dir_exists() abort +function! s:cache_dir_exists() if isdirectory(s:FileCache.DIR) return 1 elseif unite#util#is_sudo() @@ -93,13 +93,13 @@ " Returns a full pathname of the file opened at the buffer {bufnr}. " -function! s:get_buffer_path(bufnr) abort +function! s:get_buffer_path(bufnr) return fnamemodify(bufname(a:bufnr), ':p') endfunction " Returns a full pathname of the cache file for the file {path}. " -function! s:get_cache_file_path(path) abort +function! s:get_cache_file_path(path) return s:FileCache.DIR . '/' . s:encode_file_path(a:path) endfunction @@ -108,7 +108,7 @@ " Original source from Shougo's neocomplcache " https://github.com/Shougo/neocomplcache " -function! s:encode_file_path(path) abort +function! s:encode_file_path(path) if len(s:FileCache.DIR) + len(a:path) < 150 " Encode {path} to a basename. return substitute(substitute(a:path, ':', '=-', 'g'), '[/\\]', '=+', 'g') @@ -131,7 +131,7 @@ endfunction call s:FileCache.function('get') -function! s:load_cache_file(path) abort +function! s:load_cache_file(path) let cache_file = s:get_cache_file_path(a:path) let lines = readfile(cache_file) if !empty(lines) @@ -165,7 +165,7 @@ endfunction call s:FileCache.function('set') -function! s:save_cache_file(path, data) abort +function! s:save_cache_file(path, data) let cache_file = s:get_cache_file_path(a:path) let dumped_data = string(a:data) if !unite#util#is_sudo() && writefile([dumped_data], cache_file) == 0 @@ -189,7 +189,7 @@ endfunction call s:FileCache.function('remove') -function! s:remove_file(path) abort +function! s:remove_file(path) if delete(a:path) == 0 call s:print_debug("[DELETED] cache file: " . a:path) else @@ -199,7 +199,7 @@ " Remove all cache files. " -function! s:FileCache_clear() abort +function! s:FileCache_clear() if s:cache_dir_exists() call s:cleanup_all_cache_files() echomsg "unite-outline: Deleted all cache files." @@ -209,13 +209,13 @@ endfunction call s:FileCache.function('clear') -function! s:cleanup_all_cache_files() abort +function! s:cleanup_all_cache_files() call s:cleanup_cache_files(1) endfunction " Remove old cache files. " -function! s:cleanup_cache_files(...) abort +function! s:cleanup_cache_files(...) let delete_all = (a:0 ? a:1 : 0) let cache_files = split(globpath(s:FileCache.DIR, '*'), "\") let dlt_files = [] @@ -241,7 +241,7 @@ endfor endfunction -function! s:print_debug(msg) abort +function! s:print_debug(msg) call s:Util.print_debug('cache', a:msg) endfunction === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/modules/tree.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/modules/tree.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/modules/tree.vim 2015-08-25 11:01:00 +0000 @@ -29,13 +29,13 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#sources#outline#modules#tree#import() abort +function! unite#sources#outline#modules#tree#import() return s:Tree endfunction "----------------------------------------------------------------------------- -function! s:get_SID() abort +function! s:get_SID() return matchstr(expand(''), '\d\+_') endfunction let s:SID = s:get_SID() @@ -79,14 +79,14 @@ " Creates a new root node. " -function! s:Tree_new() abort +function! s:Tree_new() return { '__root__': 1, 'id': 0, 'level': 0, 'children': [] } endfunction call s:Tree.function('new') " Append {child} to a List of children of {node}. " -function! s:Tree_append_child(node, child) abort +function! s:Tree_append_child(node, child) if !has_key(a:node, 'children') let a:node.children = [] endif @@ -115,7 +115,7 @@ " | | | | " : +--2 : +--2 " -function! s:Tree_build(elems) abort +function! s:Tree_build(elems) let root = s:Tree_new() if empty(a:elems) | return root | endif " Build a Tree. @@ -146,7 +146,7 @@ " | | | | " : +--2 : +--2 " -function! s:normalize_levels(node) abort +function! s:normalize_levels(node) for child in a:node.children let child.level = a:node.level + 1 call s:normalize_levels(child) @@ -155,7 +155,7 @@ " Flattens a Tree into a List with setting the levels of nodes. " -function! s:Tree_flatten(node) abort +function! s:Tree_flatten(node) let elems = [] for child in a:node.children let child.level = a:node.level + 1 @@ -177,7 +177,7 @@ " Normalize the levels of {objs}. " -function! s:List_normalize_levels(objs) abort +function! s:List_normalize_levels(objs) let tree = s:Tree_build(a:objs) let objs = s:fast_flatten(tree) return objs @@ -186,7 +186,7 @@ " Flattens a Tree into a List without setting the levels of nodes. " -function! s:fast_flatten(node) abort +function! s:fast_flatten(node) let objs = [] " Push toplevel nodes. let stack = reverse(copy(a:node.children)) @@ -202,7 +202,7 @@ " Resets the matched-marks of the candidates. " -function! s:List_reset_marks(candidates) abort +function! s:List_reset_marks(candidates) if empty(a:candidates) | return a:candidates | endif let prev_cand = { \ 'is_matched': 1, 'source__is_marked': 1, @@ -227,7 +227,7 @@ " NOTE: unite-outline's matcher and formatter see these flags to accomplish " their tree-aware filtering and formatting tasks. " -function! s:List_mark(candidates, pred, ...) abort +function! s:List_mark(candidates, pred, ...) let pred = substitute(a:pred, '\', 'cand', 'g') let mark_reserved = map(range(0, s:Tree.MAX_DEPTH), 0) for cand in reverse(copy(a:candidates)) @@ -255,7 +255,7 @@ " Remove the matched headings and their descendants. " -function! s:List_remove(headings, pred) abort +function! s:List_remove(headings, pred) let pred = substitute(a:pred, '\', 'head', 'g') let matched_level = s:Tree.MAX_DEPTH + 1 let headings = [] === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/modules/util.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/modules/util.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/modules/util.vim 2015-08-27 20:25:35 +0000 @@ -29,13 +29,13 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#sources#outline#modules#util#import() abort +function! unite#sources#outline#modules#util#import() return s:Util endfunction "----------------------------------------------------------------------------- -function! s:get_SID() abort +function! s:get_SID() return matchstr(expand(''), '\d\+_') endfunction let s:SID = s:get_SID() @@ -46,7 +46,7 @@ "----------------------------------------------------------------------------- " Heading -function! s:Util_get_indent_level(context, lnum) abort +function! s:Util_get_indent_level(context, lnum) let line = a:context.lines[a:lnum] let sw = a:context.buffer.sw let ts = a:context.buffer.ts @@ -55,7 +55,7 @@ endfunction call s:Util.function('get_indent_level') -function! s:Util_get_comment_heading_level(context, lnum, ...) abort +function! s:Util_get_comment_heading_level(context, lnum, ...) let line = a:context.lines[a:lnum] if line =~ '^\s' let level = (a:0 ? a:1 : s:Util_get_indent_level(a:context, a:lnum) + 3) @@ -71,7 +71,7 @@ " Matching " join_to( {context}, {lnum}, {pattern} [, {limit}]) -function! s:Util_join_to(context, lnum, pattern, ...) abort +function! s:Util_join_to(context, lnum, pattern, ...) let lines = a:context.lines let limit = (a:0 ? a:1 : 3) if limit < 0 @@ -90,7 +90,7 @@ endfunction call s:Util.function('join_to') -function! s:join_to_backward(context, lnum, pattern, limit) abort +function! s:join_to_backward(context, lnum, pattern, limit) let lines = a:context.lines let lnum = max([1, a:lnum - a:limit]) while lnum > 0 @@ -103,7 +103,7 @@ return join(lines[lnum : a:lnum], "\n") endfunction -function! s:Util_join_to_rparen(context, lnum, ...) abort +function! s:Util_join_to_rparen(context, lnum, ...) let limit = (a:0 ? a:1 : 3) let line = s:Util_join_to(a:context, a:lnum, ')', limit) let line = substitute(line, "\\s*\n\\s*", ' ', 'g') @@ -113,7 +113,7 @@ call s:Util.function('join_to_rparen') " neighbor_match( {context}, {lnum}, {pattern} [, {range} [, {exclusive}]) -function! s:Util_neighbor_match(context, lnum, pattern, ...) abort +function! s:Util_neighbor_match(context, lnum, pattern, ...) let lines = a:context.lines let range = get(a:000, 0, 1) let exclusive = !!get(a:000, 1, 0) @@ -137,7 +137,7 @@ endfunction call s:Util.function('neighbor_match') -function! s:neighbor_ranges(context, lnum, prev, next, exclusive) abort +function! s:neighbor_ranges(context, lnum, prev, next, exclusive) let max_lnum = len(a:context.lines) - 1 let bwd_range = range(max([1, a:lnum - a:prev]), max([1, a:lnum - a:exclusive])) let fwd_range = range(min([a:lnum + a:exclusive, max_lnum]), min([a:lnum + a:next, max_lnum])) @@ -145,7 +145,7 @@ endfunction " neighbor_matchstr( {context}, {lnum}, {pattern} [, {range} [, {exclusive}]) -function! s:Util_neighbor_matchstr(context, lnum, pattern, ...) abort +function! s:Util_neighbor_matchstr(context, lnum, pattern, ...) let lines = a:context.lines let range = get(a:000, 0, 1) let exclusive = !!get(a:000, 1, 0) @@ -197,7 +197,7 @@ \ }, \} -function! s:Util_shared_pattern(filetype, which) abort +function! s:Util_shared_pattern(filetype, which) return s:SHARED_PATTERNS[a:filetype][a:which] endfunction call s:Util.function('shared_pattern') @@ -208,10 +208,10 @@ let s:List = unite#sources#outline#modules#base#new('List', s:SID) let s:Util.List = s:List -function! s:List_sort_by_lnum(dicts) abort +function! s:List_sort_by_lnum(dicts) return sort(a:dicts, 's:compare_by_lnum') endfunction -function! s:compare_by_lnum(d1, d2) abort +function! s:compare_by_lnum(d1, d2) let n1 = a:d1.lnum let n2 = a:d2.lnum return n1 == n2 ? 0 : n1 > n2 ? 1 : -1 @@ -227,7 +227,7 @@ let s:Util.Path = s:Path " Path.normalize( {path} [, {mods}]) -function! s:Path_normalize(path, ...) abort +function! s:Path_normalize(path, ...) let path = a:path if a:0 let mods = a:0 @@ -247,7 +247,7 @@ let s:Util.String = s:String " String.capitalize( {str} [, {flag}]) -function! s:String_capitalize(str, ...) abort +function! s:String_capitalize(str, ...) let flag = (a:0 ? a:1 : '') return substitute(a:str, '\<\(\h\)\(\w\+\)\>', '\u\1\L\2', flag) endfunction @@ -256,7 +256,7 @@ " Ported from: " Sample code from Programing Ruby, page 145 " -function! s:String_nr2roman(nr) abort +function! s:String_nr2roman(nr) if a:nr <= 0 || 4999 < a:nr return string(a:nr) endif @@ -279,7 +279,7 @@ endfunction call s:String.function('nr2roman') -function! s:String_shellescape(str) abort +function! s:String_shellescape(str) if &shell =~? '^\%(cmd\%(\.exe\)\=\|command\.com\)\%(\s\|$\)' || unite#util#is_windows() return '"' . substitute(a:str, '"', '""', 'g') . '"' else @@ -293,20 +293,20 @@ "----------------------------------------------------------------------------- " Misc -function! s:Util_print_debug(which, msg) abort +function! s:Util_print_debug(which, msg) if get(g:, 'unite_source_outline_' . a:which . '_debug', 0) echomsg "unite-outline: " . a:msg endif endfunction call s:Util.function('print_debug') -function! s:Util_print_progress(msg) abort +function! s:Util_print_progress(msg) echon a:msg redraw endfunction call s:Util.function('print_progress') -function! s:Util__cpp_is_in_comment(heading_line, matched_line) abort +function! s:Util__cpp_is_in_comment(heading_line, matched_line) return ((a:matched_line =~ '^\s*//' && a:heading_line =~ '^\s*//') || \ (a:matched_line =~ '^\s*/\*' && a:matched_line !~ '\*/\s*$')) endfunction === modified file 'vim/bundle/unite-outline/autoload/unite/sources/outline/util.vim' --- vim/bundle/unite-outline/autoload/unite/sources/outline/util.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/autoload/unite/sources/outline/util.vim 2015-08-25 11:01:00 +0000 @@ -37,75 +37,75 @@ "----------------------------------------------------------------------------- " Heading -function! unite#sources#outline#util#get_indent_level(...) abort +function! unite#sources#outline#util#get_indent_level(...) return call(s:Util.get_indent_level, a:000) endfunction -function! unite#sources#outline#util#get_comment_heading_level(...) abort +function! unite#sources#outline#util#get_comment_heading_level(...) return call(s:Util.get_comment_heading_level, a:000) endfunction "----------------------------------------------------------------------------- " Matching -function! unite#sources#outline#util#join_to(...) abort +function! unite#sources#outline#util#join_to(...) return call(s:Util.join_to, a:000) endfunction -function! unite#sources#outline#util#join_to_rparen(...) abort +function! unite#sources#outline#util#join_to_rparen(...) return call(s:Util.join_to_rparen, a:000) endfunction -function! unite#sources#outline#util#neighbor_match(...) abort +function! unite#sources#outline#util#neighbor_match(...) return call(s:Util.neighbor_match, a:000) endfunction -function! unite#sources#outline#util#neighbor_matchstr(...) abort +function! unite#sources#outline#util#neighbor_matchstr(...) return call(s:Util.neighbor_matchstr, a:000) endfunction -function! unite#sources#outline#util#shared_pattern(...) abort +function! unite#sources#outline#util#shared_pattern(...) return call(s:Util.shared_pattern, a:000) endfunction "----------------------------------------------------------------------------- " Path -function! unite#sources#outline#util#normalize_path(...) abort +function! unite#sources#outline#util#normalize_path(...) return call(s:Util.Path.normalize, a:000) endfunction "----------------------------------------------------------------------------- " String -function! unite#sources#outline#util#capitalize(...) abort +function! unite#sources#outline#util#capitalize(...) return call(s:Util.String.capitalize, a:000) endfunction -function! unite#sources#outline#util#nr2roman(...) abort +function! unite#sources#outline#util#nr2roman(...) return call(s:Util.String.nr2roman, a:000) endfunction -function! unite#sources#outline#util#shellescape(...) abort +function! unite#sources#outline#util#shellescape(...) return call(s:Util.String.shellescape, a:000) endfunction "----------------------------------------------------------------------------- " Misc -function! unite#sources#outline#util#print_debug(...) abort +function! unite#sources#outline#util#print_debug(...) return call(s:Util.print_debug, a:000) endfunction -function! unite#sources#outline#util#print_progress(...) abort +function! unite#sources#outline#util#print_progress(...) return call(s:Util.print_progress, a:000) endfunction -function! unite#sources#outline#util#sort_by_lnum(...) abort +function! unite#sources#outline#util#sort_by_lnum(...) return call(s:Util.List.sort_by_lnum, a:000) endfunction -function! unite#sources#outline#util#_cpp_is_in_comment(...) abort +function! unite#sources#outline#util#_cpp_is_in_comment(...) return call(s:Util._cpp_is_in_comment, a:000) endfunction === removed file 'vim/bundle/unite-outline/doc/tags-ja' --- vim/bundle/unite-outline/doc/tags-ja 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-outline/doc/tags-ja 1970-01-01 00:00:00 +0000 @@ -1,57 +0,0 @@ -!_TAG_FILE_ENCODING utf-8 // -g:unite_source_outline_cache_limit unite-outline.jax /*g:unite_source_outline_cache_limit* -g:unite_source_outline_filetype_options unite-outline.jax /*g:unite_source_outline_filetype_options* -g:unite_source_outline_highlight unite-outline.jax /*g:unite_source_outline_highlight* -g:unite_source_outline_indent_width unite-outline.jax /*g:unite_source_outline_indent_width* -g:unite_source_outline_info unite-outline.jax /*g:unite_source_outline_info* -g:unite_source_outline_max_headings unite-outline.jax /*g:unite_source_outline_max_headings* -unite#sources#outline#alias() unite-outline.jax /*unite#sources#outline#alias()* -unite#sources#outline#get_filetype_option() unite-outline.jax /*unite#sources#outline#get_filetype_option()* -unite#sources#outline#get_highlight() unite-outline.jax /*unite#sources#outline#get_highlight()* -unite#sources#outline#get_outline_info() unite-outline.jax /*unite#sources#outline#get_outline_info()* -unite#sources#outline#import() unite-outline.jax /*unite#sources#outline#import()* -unite#sources#outline#remove_cache_files() unite-outline.jax /*unite#sources#outline#remove_cache_files()* -unite-outline unite-outline.jax /*unite-outline* -unite-outline-Util.get_indent_level() unite-outline.jax /*unite-outline-Util.get_indent_level()* -unite-outline-Util.join_to() unite-outline.jax /*unite-outline-Util.join_to()* -unite-outline-Util.neighbor_match() unite-outline.jax /*unite-outline-Util.neighbor_match()* -unite-outline-Util.neighbor_matchstr() unite-outline.jax /*unite-outline-Util.neighbor_matchstr()* -unite-outline-changelog unite-outline.jax /*unite-outline-changelog* -unite-outline-contents unite-outline.jax /*unite-outline-contents* -unite-outline-context-object unite-outline.jax /*unite-outline-context-object* -unite-outline-filetype-option-auto-update unite-outline.jax /*unite-outline-filetype-option-auto-update* -unite-outline-filetype-option-auto-update-event unite-outline.jax /*unite-outline-filetype-option-auto-update-event* -unite-outline-filetype-option-ignore-types unite-outline.jax /*unite-outline-filetype-option-ignore-types* -unite-outline-functions unite-outline.jax /*unite-outline-functions* -unite-outline-heading-object unite-outline.jax /*unite-outline-heading-object* -unite-outline-info unite-outline.jax /*unite-outline-info* -unite-outline-info-after() unite-outline.jax /*unite-outline-info-after()* -unite-outline-info-attributes unite-outline.jax /*unite-outline-info-attributes* -unite-outline-info-before() unite-outline.jax /*unite-outline-info-before()* -unite-outline-info-create unite-outline.jax /*unite-outline-info-create* -unite-outline-info-create_heading() unite-outline.jax /*unite-outline-info-create_heading()* -unite-outline-info-external-programs unite-outline.jax /*unite-outline-info-external-programs* -unite-outline-info-extract_headings() unite-outline.jax /*unite-outline-info-extract_headings()* -unite-outline-info-heading unite-outline.jax /*unite-outline-info-heading* -unite-outline-info-heading+1 unite-outline.jax /*unite-outline-info-heading+1* -unite-outline-info-heading-1 unite-outline.jax /*unite-outline-info-heading-1* -unite-outline-info-heading-pattern-restrictions unite-outline.jax /*unite-outline-info-heading-pattern-restrictions* -unite-outline-info-heading_groups unite-outline.jax /*unite-outline-info-heading_groups* -unite-outline-info-highlight_rules unite-outline.jax /*unite-outline-info-highlight_rules* -unite-outline-info-hooks unite-outline.jax /*unite-outline-info-hooks* -unite-outline-info-initialize() unite-outline.jax /*unite-outline-info-initialize()* -unite-outline-info-is_volatile unite-outline.jax /*unite-outline-info-is_volatile* -unite-outline-info-not_match_patterns unite-outline.jax /*unite-outline-info-not_match_patterns* -unite-outline-info-skip unite-outline.jax /*unite-outline-info-skip* -unite-outline-info-skip-block unite-outline.jax /*unite-outline-info-skip-block* -unite-outline-info-skip-header unite-outline.jax /*unite-outline-info-skip-header* -unite-outline-install unite-outline.jax /*unite-outline-install* -unite-outline-introduction unite-outline.jax /*unite-outline-introduction* -unite-outline-issues unite-outline.jax /*unite-outline-issues* -unite-outline-settings unite-outline.jax /*unite-outline-settings* -unite-outline-settings-example unite-outline.jax /*unite-outline-settings-example* -unite-outline-todo unite-outline.jax /*unite-outline-todo* -unite-outline-usage unite-outline.jax /*unite-outline-usage* -unite-outline-utility-functions unite-outline.jax /*unite-outline-utility-functions* -unite-outline-variables unite-outline.jax /*unite-outline-variables* -unite-outline.txt unite-outline.jax /*unite-outline.txt* === modified file 'vim/bundle/unite-quickfix/.git/config' (properties changed: -x to +x) === modified file 'vim/bundle/unite-quickfix/.git/hooks/applypatch-msg.sample' --- vim/bundle/unite-quickfix/.git/hooks/applypatch-msg.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-quickfix/.git/hooks/applypatch-msg.sample 2015-08-25 11:01:00 +0000 @@ -10,6 +10,6 @@ # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup -commitmsg="$(git rev-parse --git-path hooks/commit-msg)" -test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} +test -x "$GIT_DIR/hooks/commit-msg" && + exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} : === modified file 'vim/bundle/unite-quickfix/.git/hooks/pre-applypatch.sample' --- vim/bundle/unite-quickfix/.git/hooks/pre-applypatch.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-quickfix/.git/hooks/pre-applypatch.sample 2015-08-25 11:01:00 +0000 @@ -9,6 +9,6 @@ # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup -precommit="$(git rev-parse --git-path hooks/pre-commit)" -test -x "$precommit" && exec "$precommit" ${1+"$@"} +test -x "$GIT_DIR/hooks/pre-commit" && + exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} : === modified file 'vim/bundle/unite-quickfix/.git/hooks/pre-push.sample' --- vim/bundle/unite-quickfix/.git/hooks/pre-push.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-quickfix/.git/hooks/pre-push.sample 2015-08-25 11:01:00 +0000 @@ -24,6 +24,7 @@ z40=0000000000000000000000000000000000000000 +IFS=' ' while read local_ref local_sha remote_ref remote_sha do if [ "$local_sha" = $z40 ] === modified file 'vim/bundle/unite-quickfix/.git/hooks/update.sample' --- vim/bundle/unite-quickfix/.git/hooks/update.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-quickfix/.git/hooks/update.sample 2015-08-25 11:01:00 +0000 @@ -1,6 +1,6 @@ #!/bin/sh # -# An example hook script to block unannotated tags from entering. +# An example hook script to blocks unannotated tags from entering. # Called by "git receive-pack" with arguments: refname sha1-old sha1-new # # To enable this hook, rename this file to "update". === modified file 'vim/bundle/unite-quickfix/.git/index' Binary files vim/bundle/unite-quickfix/.git/index 2016-08-04 08:15:51 +0000 and vim/bundle/unite-quickfix/.git/index 2015-08-25 11:01:00 +0000 differ === modified file 'vim/bundle/unite-quickfix/.git/logs/HEAD' --- vim/bundle/unite-quickfix/.git/logs/HEAD 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-quickfix/.git/logs/HEAD 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 f9b8d5f95ff2536abca1e81bd67dc740e5ee24a6 Jan Pobrislo 1470298381 +0200 clone: from https://github.com/osyo-manga/unite-quickfix.git +0000000000000000000000000000000000000000 f9b8d5f95ff2536abca1e81bd67dc740e5ee24a6 Jan Pobrislo 1440499749 +0200 clone: from https://github.com/osyo-manga/unite-quickfix.git === modified file 'vim/bundle/unite-quickfix/.git/logs/refs/heads/master' --- vim/bundle/unite-quickfix/.git/logs/refs/heads/master 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-quickfix/.git/logs/refs/heads/master 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 f9b8d5f95ff2536abca1e81bd67dc740e5ee24a6 Jan Pobrislo 1470298381 +0200 clone: from https://github.com/osyo-manga/unite-quickfix.git +0000000000000000000000000000000000000000 f9b8d5f95ff2536abca1e81bd67dc740e5ee24a6 Jan Pobrislo 1440499749 +0200 clone: from https://github.com/osyo-manga/unite-quickfix.git === modified file 'vim/bundle/unite-quickfix/.git/logs/refs/remotes/origin/HEAD' --- vim/bundle/unite-quickfix/.git/logs/refs/remotes/origin/HEAD 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-quickfix/.git/logs/refs/remotes/origin/HEAD 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 f9b8d5f95ff2536abca1e81bd67dc740e5ee24a6 Jan Pobrislo 1470298381 +0200 clone: from https://github.com/osyo-manga/unite-quickfix.git +0000000000000000000000000000000000000000 f9b8d5f95ff2536abca1e81bd67dc740e5ee24a6 Jan Pobrislo 1440499749 +0200 clone: from https://github.com/osyo-manga/unite-quickfix.git === modified file 'vim/bundle/unite-tag/.git/config' (properties changed: -x to +x) === modified file 'vim/bundle/unite-tag/.git/hooks/applypatch-msg.sample' --- vim/bundle/unite-tag/.git/hooks/applypatch-msg.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-tag/.git/hooks/applypatch-msg.sample 2015-08-25 11:01:00 +0000 @@ -10,6 +10,6 @@ # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup -commitmsg="$(git rev-parse --git-path hooks/commit-msg)" -test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} +test -x "$GIT_DIR/hooks/commit-msg" && + exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} : === modified file 'vim/bundle/unite-tag/.git/hooks/pre-applypatch.sample' --- vim/bundle/unite-tag/.git/hooks/pre-applypatch.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-tag/.git/hooks/pre-applypatch.sample 2015-08-25 11:01:00 +0000 @@ -9,6 +9,6 @@ # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup -precommit="$(git rev-parse --git-path hooks/pre-commit)" -test -x "$precommit" && exec "$precommit" ${1+"$@"} +test -x "$GIT_DIR/hooks/pre-commit" && + exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} : === modified file 'vim/bundle/unite-tag/.git/hooks/pre-push.sample' --- vim/bundle/unite-tag/.git/hooks/pre-push.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-tag/.git/hooks/pre-push.sample 2015-08-25 11:01:00 +0000 @@ -24,6 +24,7 @@ z40=0000000000000000000000000000000000000000 +IFS=' ' while read local_ref local_sha remote_ref remote_sha do if [ "$local_sha" = $z40 ] === modified file 'vim/bundle/unite-tag/.git/hooks/update.sample' --- vim/bundle/unite-tag/.git/hooks/update.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-tag/.git/hooks/update.sample 2015-08-25 11:01:00 +0000 @@ -1,6 +1,6 @@ #!/bin/sh # -# An example hook script to block unannotated tags from entering. +# An example hook script to blocks unannotated tags from entering. # Called by "git receive-pack" with arguments: refname sha1-old sha1-new # # To enable this hook, rename this file to "update". === modified file 'vim/bundle/unite-tag/.git/index' Binary files vim/bundle/unite-tag/.git/index 2016-08-04 08:15:51 +0000 and vim/bundle/unite-tag/.git/index 2015-08-25 11:01:00 +0000 differ === modified file 'vim/bundle/unite-tag/.git/logs/HEAD' --- vim/bundle/unite-tag/.git/logs/HEAD 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-tag/.git/logs/HEAD 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 478585124a52bea51344bc61f4b9a85a791591ac Jan Pobrislo 1470298383 +0200 clone: from https://github.com/tsukkee/unite-tag.git +0000000000000000000000000000000000000000 6b507bae22340448b189a905fea6579820ba8d9d Jan Pobrislo 1440499751 +0200 clone: from https://github.com/tsukkee/unite-tag.git === modified file 'vim/bundle/unite-tag/.git/logs/refs/heads/master' --- vim/bundle/unite-tag/.git/logs/refs/heads/master 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-tag/.git/logs/refs/heads/master 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 478585124a52bea51344bc61f4b9a85a791591ac Jan Pobrislo 1470298383 +0200 clone: from https://github.com/tsukkee/unite-tag.git +0000000000000000000000000000000000000000 6b507bae22340448b189a905fea6579820ba8d9d Jan Pobrislo 1440499751 +0200 clone: from https://github.com/tsukkee/unite-tag.git === modified file 'vim/bundle/unite-tag/.git/logs/refs/remotes/origin/HEAD' --- vim/bundle/unite-tag/.git/logs/refs/remotes/origin/HEAD 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-tag/.git/logs/refs/remotes/origin/HEAD 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 478585124a52bea51344bc61f4b9a85a791591ac Jan Pobrislo 1470298383 +0200 clone: from https://github.com/tsukkee/unite-tag.git +0000000000000000000000000000000000000000 6b507bae22340448b189a905fea6579820ba8d9d Jan Pobrislo 1440499751 +0200 clone: from https://github.com/tsukkee/unite-tag.git === removed directory 'vim/bundle/unite-tag/.git/objects/01' === removed file 'vim/bundle/unite-tag/.git/objects/01/6aa2549653dfda6132a0f60fdea4fc7f0671aa' Binary files vim/bundle/unite-tag/.git/objects/01/6aa2549653dfda6132a0f60fdea4fc7f0671aa 2016-08-04 08:15:51 +0000 and vim/bundle/unite-tag/.git/objects/01/6aa2549653dfda6132a0f60fdea4fc7f0671aa 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/unite-tag/.git/objects/07' === added file 'vim/bundle/unite-tag/.git/objects/07/6baf73f022078312b5bb2f6d4cf7e03bf739d2' Binary files vim/bundle/unite-tag/.git/objects/07/6baf73f022078312b5bb2f6d4cf7e03bf739d2 1970-01-01 00:00:00 +0000 and vim/bundle/unite-tag/.git/objects/07/6baf73f022078312b5bb2f6d4cf7e03bf739d2 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/unite-tag/.git/objects/25' === removed file 'vim/bundle/unite-tag/.git/objects/25/a2893c7efa95238acef094c62c850f02644744' Binary files vim/bundle/unite-tag/.git/objects/25/a2893c7efa95238acef094c62c850f02644744 2016-08-04 08:15:51 +0000 and vim/bundle/unite-tag/.git/objects/25/a2893c7efa95238acef094c62c850f02644744 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/unite-tag/.git/objects/35' === removed file 'vim/bundle/unite-tag/.git/objects/35/5fd1b691496589f65b369ab14f67aa4d4739c0' Binary files vim/bundle/unite-tag/.git/objects/35/5fd1b691496589f65b369ab14f67aa4d4739c0 2016-08-04 08:15:51 +0000 and vim/bundle/unite-tag/.git/objects/35/5fd1b691496589f65b369ab14f67aa4d4739c0 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/unite-tag/.git/objects/42' === removed file 'vim/bundle/unite-tag/.git/objects/42/5409f14762ddfad4cda4bc8505d8cbf45c9dfe' Binary files vim/bundle/unite-tag/.git/objects/42/5409f14762ddfad4cda4bc8505d8cbf45c9dfe 2016-08-04 08:15:51 +0000 and vim/bundle/unite-tag/.git/objects/42/5409f14762ddfad4cda4bc8505d8cbf45c9dfe 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/unite-tag/.git/objects/47' === removed file 'vim/bundle/unite-tag/.git/objects/47/8585124a52bea51344bc61f4b9a85a791591ac' Binary files vim/bundle/unite-tag/.git/objects/47/8585124a52bea51344bc61f4b9a85a791591ac 2016-08-04 08:15:51 +0000 and vim/bundle/unite-tag/.git/objects/47/8585124a52bea51344bc61f4b9a85a791591ac 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/unite-tag/.git/objects/60' === added file 'vim/bundle/unite-tag/.git/objects/60/af76587b318d1a2269c8f3be244ec06c406e4a' Binary files vim/bundle/unite-tag/.git/objects/60/af76587b318d1a2269c8f3be244ec06c406e4a 1970-01-01 00:00:00 +0000 and vim/bundle/unite-tag/.git/objects/60/af76587b318d1a2269c8f3be244ec06c406e4a 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/unite-tag/.git/objects/6b' === added file 'vim/bundle/unite-tag/.git/objects/6b/507bae22340448b189a905fea6579820ba8d9d' --- vim/bundle/unite-tag/.git/objects/6b/507bae22340448b189a905fea6579820ba8d9d 1970-01-01 00:00:00 +0000 +++ vim/bundle/unite-tag/.git/objects/6b/507bae22340448b189a905fea6579820ba8d9d 2015-08-25 11:01:00 +0000 @@ -0,0 +1,2 @@ +xM1Y$? 2օ+OJ*vtO#K*`4]j<9c +v49['NCĎ)O1.K嵿*:b}So`&8zFAZ*Ҟ[eX5=̐Y8IdU \ No newline at end of file === added directory 'vim/bundle/unite-tag/.git/objects/6e' === added file 'vim/bundle/unite-tag/.git/objects/6e/66b4c19f4d00d3bb3588a2edefa4aeb34c2f99' Binary files vim/bundle/unite-tag/.git/objects/6e/66b4c19f4d00d3bb3588a2edefa4aeb34c2f99 1970-01-01 00:00:00 +0000 and vim/bundle/unite-tag/.git/objects/6e/66b4c19f4d00d3bb3588a2edefa4aeb34c2f99 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/unite-tag/.git/objects/80' === added file 'vim/bundle/unite-tag/.git/objects/80/21586f34086dffdab33fc5ca503ec68fa1e2b4' Binary files vim/bundle/unite-tag/.git/objects/80/21586f34086dffdab33fc5ca503ec68fa1e2b4 1970-01-01 00:00:00 +0000 and vim/bundle/unite-tag/.git/objects/80/21586f34086dffdab33fc5ca503ec68fa1e2b4 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/unite-tag/.git/objects/83' === removed file 'vim/bundle/unite-tag/.git/objects/83/4e27ef7380b35893ca791b065af3a532d29c23' Binary files vim/bundle/unite-tag/.git/objects/83/4e27ef7380b35893ca791b065af3a532d29c23 2016-08-04 08:15:51 +0000 and vim/bundle/unite-tag/.git/objects/83/4e27ef7380b35893ca791b065af3a532d29c23 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/unite-tag/.git/objects/91' === added file 'vim/bundle/unite-tag/.git/objects/91/2b8747a1bbf5adc4565b52374114ae174a02f2' Binary files vim/bundle/unite-tag/.git/objects/91/2b8747a1bbf5adc4565b52374114ae174a02f2 1970-01-01 00:00:00 +0000 and vim/bundle/unite-tag/.git/objects/91/2b8747a1bbf5adc4565b52374114ae174a02f2 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/unite-tag/.git/objects/91/b5d811c775f52f86f16c7cb67d2e57ec2d3e3a' Binary files vim/bundle/unite-tag/.git/objects/91/b5d811c775f52f86f16c7cb67d2e57ec2d3e3a 1970-01-01 00:00:00 +0000 and vim/bundle/unite-tag/.git/objects/91/b5d811c775f52f86f16c7cb67d2e57ec2d3e3a 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/unite-tag/.git/objects/a9' === removed file 'vim/bundle/unite-tag/.git/objects/a9/f9bb592d32bd191eec0728376e8fc464ac1728' Binary files vim/bundle/unite-tag/.git/objects/a9/f9bb592d32bd191eec0728376e8fc464ac1728 2016-08-04 08:15:51 +0000 and vim/bundle/unite-tag/.git/objects/a9/f9bb592d32bd191eec0728376e8fc464ac1728 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/unite-tag/.git/objects/d1' === added file 'vim/bundle/unite-tag/.git/objects/d1/e29d97d06b6c95584c2891f672a1b2700e2b5b' Binary files vim/bundle/unite-tag/.git/objects/d1/e29d97d06b6c95584c2891f672a1b2700e2b5b 1970-01-01 00:00:00 +0000 and vim/bundle/unite-tag/.git/objects/d1/e29d97d06b6c95584c2891f672a1b2700e2b5b 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/unite-tag/.git/objects/f6' === removed file 'vim/bundle/unite-tag/.git/objects/f6/ea7f1acc8c5b0c23736ae14495e1764551e3d5' Binary files vim/bundle/unite-tag/.git/objects/f6/ea7f1acc8c5b0c23736ae14495e1764551e3d5 2016-08-04 08:15:51 +0000 and vim/bundle/unite-tag/.git/objects/f6/ea7f1acc8c5b0c23736ae14495e1764551e3d5 1970-01-01 00:00:00 +0000 differ === modified file 'vim/bundle/unite-tag/.git/packed-refs' --- vim/bundle/unite-tag/.git/packed-refs 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-tag/.git/packed-refs 2015-08-25 11:01:00 +0000 @@ -1,2 +1,2 @@ # pack-refs with: peeled fully-peeled -478585124a52bea51344bc61f4b9a85a791591ac refs/remotes/origin/master +6b507bae22340448b189a905fea6579820ba8d9d refs/remotes/origin/master === modified file 'vim/bundle/unite-tag/.git/refs/heads/master' --- vim/bundle/unite-tag/.git/refs/heads/master 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-tag/.git/refs/heads/master 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -478585124a52bea51344bc61f4b9a85a791591ac +6b507bae22340448b189a905fea6579820ba8d9d === modified file 'vim/bundle/unite-tag/.git/shallow' --- vim/bundle/unite-tag/.git/shallow 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-tag/.git/shallow 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -478585124a52bea51344bc61f4b9a85a791591ac +6b507bae22340448b189a905fea6579820ba8d9d === modified file 'vim/bundle/unite-tag/autoload/unite/sources/tag.vim' --- vim/bundle/unite-tag/autoload/unite/sources/tag.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-tag/autoload/unite/sources/tag.vim 2015-08-25 11:01:00 +0000 @@ -24,38 +24,28 @@ " }}} " define source -function! unite#sources#tag#define() abort +function! unite#sources#tag#define() return [s:source, s:source_files, s:source_include] endfunction let g:unite_source_tag_max_name_length = \ get(g:, 'unite_source_tag_max_name_length', 25) -let g:unite_source_tag_max_kind_length = - \ get(g:, 'unite_source_tag_max_kind_length', 8) let g:unite_source_tag_max_fname_length = \ get(g:, 'unite_source_tag_max_fname_length', 20) -let g:unite_source_tag_name_footer_length = - \ get(g:, 'unite_source_tag_name_footer_length', 10) -let g:unite_source_tag_fname_footer_length = - \ get(g:, 'unite_source_tag_fname_footer_length', 15) - " When enabled, use multi-byte aware string truncate method let g:unite_source_tag_strict_truncate_string = \ get(g:, 'unite_source_tag_strict_truncate_string', 1) +let g:unite_source_tag_show_location = + \ get(g:, 'unite_source_tag_show_location', 1) + let g:unite_source_tag_show_fname = \ get(g:, 'unite_source_tag_show_fname', 1) -let g:unite_source_tag_show_kind = - \ get(g:, 'unite_source_tag_show_kind', 1) - let g:unite_source_tag_relative_fname = \ get(g:, 'unite_source_tag_relative_fname', 1) -let g:unite_source_tag_show_location = - \ get(g:, 'unite_source_tag_show_location', 1) - " cache let s:tagfile_cache = {} let s:input_cache = {} @@ -67,7 +57,8 @@ endif " use vital -let s:C = unite#util#get_vital_cache() +let s:V = vital#of('unite') +let s:C = s:V.import('System.Cache') " source let s:source = { @@ -79,19 +70,15 @@ \ 'syntax': 'uniteSource__Tag', \} -function! s:source.hooks.on_syntax(args, context) abort +function! s:source.hooks.on_syntax(args, context) syntax match uniteSource__Tag_File / @.\{-} /ms=s+2,me=e-2 \ containedin=uniteSource__Tag contained - \ nextgroup=uniteSource__Tag_Kind, - \uniteSource__Tag_Pat,uniteSource__Tag_Line skipwhite - syntax match uniteSource__Tag_Kind /k:\h\w*\s\+/ contained - \ nextgroup=uniteSource__Tag_Pat,uniteSource__Tag_Line + \ nextgroup=uniteSource__Tag_Pat,uniteSource__Tag_Line skipwhite syntax match uniteSource__Tag_Pat /pat:.\{-}\ze\s*$/ contained syntax match uniteSource__Tag_Line /line:.\{-}\ze\s*$/ contained - highlight default link uniteSource__Tag_File Constant - highlight default link uniteSource__Tag_Kind Type + highlight default link uniteSource__Tag_File Type highlight default link uniteSource__Tag_Pat Comment - highlight default link uniteSource__Tag_Line LineNr + highlight default link uniteSource__Tag_Line Constant if has('conceal') syntax match uniteSource__Tag_Ignore /pat:/ \ containedin=uniteSource__Tag_Pat conceal @@ -102,26 +89,25 @@ endif endfunction -function! s:source.hooks.on_init(args, context) abort +function! s:source.hooks.on_init(args, context) let a:context.source__tagfiles = tagfiles() let a:context.source__name = 'tag' endfunction -function! s:source.gather_candidates(args, context) abort +function! s:source.gather_candidates(args, context) let a:context.source__continuation = [] if a:context.input != '' - return s:taglist_filter(a:context.input, self.name) + return s:taglist_filter(a:context.input) endif let result = [] for tagfile in a:context.source__tagfiles - let tagdata = s:get_tagdata(tagfile, a:context) + let tagdata = s:get_tagdata(tagfile) if empty(tagdata) continue endif let result += tagdata.tags if has_key(tagdata, 'cont') - let a:context.is_async = 1 call add(a:context.source__continuation, tagdata) endif endfor @@ -132,7 +118,7 @@ return s:pre_filter(result, a:args) endfunction -function! s:source.async_gather_candidates(args, context) abort +function! s:source.async_gather_candidates(args, context) " caching has done if empty(a:context.source__continuation) let a:context.is_async = 0 @@ -204,17 +190,16 @@ \ 'async_gather_candidates': s:source.async_gather_candidates, \} -function! s:source_files.gather_candidates(args, context) abort +function! s:source_files.gather_candidates(args, context) let a:context.source__continuation = [] let files = {} for tagfile in a:context.source__tagfiles - let tagdata = s:get_tagdata(tagfile, a:context) + let tagdata = s:get_tagdata(tagfile) if empty(tagdata) continue endif call extend(files, tagdata.files) if has_key(tagdata, 'cont') - let a:context.is_async = 1 call add(a:context.source__continuation, tagdata) endif endfor @@ -233,11 +218,8 @@ \ 'candidates from files contained in include tag file' let s:source_include.max_candidates = 0 -function! s:source_include.hooks.on_init(args, context) abort +function! s:source_include.hooks.on_init(args, context) if get(g:, 'loaded_neoinclude', 0) - if empty(neoinclude#include#get_tag_files()) - NeoIncludeMakeCache - endif let a:context.source__tagfiles = neoinclude#include#get_tag_files() else let a:context.source__tagfiles = [] @@ -245,7 +227,7 @@ let a:context.source__name = 'tag/include' endfunction -function! s:source_include.gather_candidates(args, context) abort +function! s:source_include.gather_candidates(args, context) if empty(a:context.source__tagfiles) call unite#print_message( \ printf('[%s] Nothing include files.', a:context.source__name)) @@ -254,13 +236,12 @@ let a:context.source__continuation = [] let result = [] for tagfile in a:context.source__tagfiles - let tagdata = s:get_tagdata(tagfile, a:context) + let tagdata = s:get_tagdata(tagfile) if empty(tagdata) continue endif let result += tagdata.tags if has_key(tagdata, 'cont') - let a:context.is_async = 1 call add(a:context.source__continuation, tagdata) endif endfor @@ -272,33 +253,22 @@ endfunction " filter defined by unite's parameter (e.g. Unite tag:filter) -function! s:pre_filter(result, args) abort - if empty(a:args) - return unite#util#uniq_by(a:result, 'v:val.abbr') +function! s:pre_filter(result, args) + if !empty(a:args) + let arg = a:args[0] + if arg !=# '' + if arg ==# '/' + let pat = arg[1 : ] + call filter(a:result, 'v:val.word =~? pat') + else + call filter(a:result, 'v:val.word == arg') + endif + endif endif - - for arg in a:args - if arg ==# '' - continue - endif - if arg ==# '%' - " Current buffer tags - let bufname = (&ft==#'unite' ? - \ bufname(b:unite.prev_bufnr) : expand('%:p')) - call filter(a:result, 'v:val.action__path ==# bufname') - elseif arg =~# '/' - " Pattern matching name - let pat = arg[1 : ] - call filter(a:result, 'v:val.word =~? pat') - else - " Normal matching name - call filter(a:result, 'v:val.word ==# arg') - endif - endfor return unite#util#uniq_by(a:result, 'v:val.abbr') endfunction -function! s:get_tagdata(tagfile, context) abort +function! s:get_tagdata(tagfile) let tagfile = fnamemodify(a:tagfile, ':p') if !filereadable(tagfile) return {} @@ -312,7 +282,6 @@ " - cache data is expired if !has_key(s:tagfile_cache, tagfile) \ || s:tagfile_cache[tagfile].time != getftime(tagfile) - \ || a:context.is_redraw let lines = readfile(tagfile) let s:tagfile_cache[tagfile] = { \ 'time': getftime(tagfile), @@ -330,7 +299,7 @@ return s:tagfile_cache[tagfile] endfunction -function! s:taglist_filter(input, name) abort +function! s:taglist_filter(input) let key = string(tagfiles()).a:input if has_key(s:input_cache, key) return s:input_cache[key] @@ -338,27 +307,18 @@ let taglist = map(taglist(a:input), "{ \ 'word': v:val.name, - \ 'abbr': printf('%s%s%s%s', + \ 'abbr': printf('%s %s %s', \ s:truncate(v:val.name, - \ g:unite_source_tag_max_name_length, - \ g:unite_source_tag_name_footer_length, '..'), - \ (!g:unite_source_tag_show_fname ? '' : - \ ' ' . s:truncate('@'.fnamemodify( - \ v:val.filename, (a:name ==# 'tag/include' - \ || !g:unite_source_tag_relative_fname ? - \ ':t' : ':~:.')), - \ g:unite_source_tag_max_fname_length, - \ g:unite_source_tag_fname_footer_length, '..')), - \ (!g:unite_source_tag_show_kind ? '' : - \ ' k:' . s:truncate(v:val.kind, - \ g:unite_source_tag_max_kind_length, 2, '..')), - \ (!g:unite_source_tag_show_location ? '' : - \ ' pat:' . matchstr(v:val.cmd, - \ '^[?/]\\^\\?\\zs.\\{-1,}\\ze\\$\\?[?/]$')) + \ g:unite_source_tag_max_name_length, 15, '..'), + \ s:truncate('@'.fnamemodify( + \ v:val.filename, ':.'), + \ g:unite_source_tag_max_fname_length, 10, '..'), + \ 'pat:' . matchstr(v:val.cmd, + \ '^[?/]\\^\\?\\zs.\\{-1,}\\ze\\$\\?[?/]$') \ ), \ 'kind': 'jump_list', \ 'action__path': unite#util#substitute_path_separator( - \ fnamemodify(v:val.filename, ':p')), + \ v:val.filename), \ 'action__tagname': v:val.name, \ 'source__cmd': v:val.cmd, \}") @@ -389,7 +349,7 @@ return taglist endfunction -function! s:truncate(str, max, footer_width, sep) abort +function! s:truncate(str, max, footer_width, sep) if g:unite_source_tag_strict_truncate_string return unite#util#truncate_smart(a:str, a:max, a:footer_width, a:sep) else @@ -403,13 +363,13 @@ endif endfunction -function! s:next(tagdata, line, name) abort +function! s:next(tagdata, line, name) let is_file = a:name ==# 'tag/file' let cont = a:tagdata.cont " parsing tag files is faster than using taglist() - let line = cont.encoding != '' ? iconv(a:line, cont.encoding, &encoding) - \ : a:line - let [name, filename, cmd] = s:parse_tag_line(line) + let [name, filename, cmd] = s:parse_tag_line( + \ cont.encoding != '' ? iconv(a:line, cont.encoding, &encoding) + \ : a:line) " check comment line if empty(name) @@ -441,10 +401,7 @@ \ unite#util#substitute_path_separator( \ fnamemodify(cont.basedir . '/' . filename, ':p:.')) - let option = s:parse_option(line) - - let abbr = s:truncate(name, g:unite_source_tag_max_name_length, - \ g:unite_source_tag_name_footer_length, '..') + let abbr = s:truncate(name, g:unite_source_tag_max_name_length, 15, '..') if g:unite_source_tag_show_fname let abbr .= ' ' let abbr .= s:truncate('@'. @@ -452,26 +409,21 @@ \ (a:name ==# 'tag/include' \ || !g:unite_source_tag_relative_fname) ? \ ':t' : ':~:.')), - \ g:unite_source_tag_max_fname_length, - \ g:unite_source_tag_fname_footer_length, '..') - endif - if g:unite_source_tag_show_kind && option.kind != '' - let abbr .= ' k:' . s:truncate(option.kind, - \ g:unite_source_tag_max_kind_length, 2, '..') + \ g:unite_source_tag_max_fname_length, 10, '..') endif if g:unite_source_tag_show_location - let abbr .= linenr ? ' line:' . linenr - \ : ' pat:' . - \ matchstr(cmd, '^[?/]\^\?\zs.\{-1,}\ze\$\?[?/]$') + if linenr + let abbr .= ' line:' . linenr + else + let abbr .= ' ' . matchstr(cmd, '^[?/]\^\?\zs.\{-1,}\ze\$\?[?/]$') + endif endif - let fullpath = unite#util#substitute_path_separator( - \ fnamemodify(path, ':p')) let tag = { \ 'word': name, \ 'abbr': abbr, \ 'kind': 'jump_list', - \ 'action__path': fullpath, + \ 'action__path': path, \ 'action__tagname': name \} if linenr @@ -483,13 +435,14 @@ let result = is_file ? [] : [tag] + let fullpath = fnamemodify(path, ':p') if !has_key(a:tagdata.files, fullpath) let file = { - \ 'word': fullpath, - \ 'abbr': fnamemodify(fullpath, ':.'), - \ 'kind': 'jump_list', - \ 'action__path': fullpath, - \ 'action__directory': unite#util#path2directory(fullpath), + \ "word": fullpath, + \ "abbr": fnamemodify(fullpath, ":."), + \ "kind": "jump_list", + \ "action__path": fullpath, + \ "action__directory": unite#util#path2directory(fullpath), \ } let a:tagdata.files[fullpath] = file if is_file @@ -511,7 +464,7 @@ " 3. the first part is tag_name, the second part is file_name " and ex_cmd is taken by joining remain parts with " 4. parsing extension_fields -function! s:parse_tag_line(line) abort +function! s:parse_tag_line(line) " 0. if a:line[0] == '!' let enc = matchstr(a:line, '\C^!_TAG_FILE_ENCODING\t\zs\S\+\ze\t') @@ -545,58 +498,42 @@ return [name, file, cmd] endfunction " " test case -" let s:test = 'Hoge test.php /^function! Hoge()\/*$\/;" f test:*\/ {$/;" f' +" let s:test = 'Hoge test.php /^function Hoge()\/*$\/;" f test:*\/ {$/;" f' " echomsg string(s:parse_tag_line(s:test)) " let s:test = 'Hoge Hoge/Fuga.php /^class Hoge$/;" c line:15' " echomsg string(s:parse_tag_line(s:test)) " cache to file -function! s:filename_to_cachename(filename) abort +function s:filename_to_cachename(filename) return s:cache_dir . '/' . substitute(a:filename, '[\/]', '+=', 'g') endfunction -function! s:write_cache(filename) abort +function s:write_cache(filename) call s:C.writefile(s:cache_dir, a:filename, \ [string(s:tagfile_cache[a:filename])]) endfunction -function! s:read_cache(filename) abort +function s:read_cache(filename) if !s:C.check_old_cache(s:cache_dir, a:filename) let data = s:C.readfile(s:cache_dir, a:filename) sandbox let s:tagfile_cache[a:filename] = eval(data[0]) endif endfunction -function! s:parse_option(line) abort - let option = {} - let option.kind = '' - - for opt in split(a:line[len(matchstr(a:line, '.*/;"')):], '\t', 1) - let key = matchstr(opt, '^\h\w*\ze:') - if key == '' - let option.kind = opt - else - let option[key] = matchstr(opt, '^\h\w*:\zs.*') - endif - endfor - - return option -endfunction - " action let s:action_table = {} let s:action_table.jump = { \ 'description': 'jump to the selected tag' \} -function! s:action_table.jump.func(candidate) abort +function! s:action_table.jump.func(candidate) execute "tjump" a:candidate.action__tagname endfunction let s:action_table.select = { \ 'description': 'list the tags matching the selected tag pattern' \} -function! s:action_table.select.func(candidate) abort +function! s:action_table.select.func(candidate) execute "tselect" a:candidate.action__tagname endfunction @@ -604,7 +541,7 @@ \ 'description': 'split window and jump to the selected tag', \ 'is_selectable': 1 \} -function! s:action_table.jsplit.func(candidates) abort +function! s:action_table.jsplit.func(candidates) for c in a:candidates execute "stjump" c.action__tagname endfor === modified file 'vim/bundle/unite-tag/doc/unite-tag.txt' --- vim/bundle/unite-tag/doc/unite-tag.txt 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite-tag/doc/unite-tag.txt 2015-08-25 11:01:00 +0000 @@ -61,12 +61,7 @@ > :Unite tag:text < -Other filters: > - - :Unite tag:% " Current-buffer - :Unite tag:/pattern " Filter with pattern - -< + This plugin does not block vim because tags' information is aggregated asynchronously. @@ -92,48 +87,27 @@ Max length of tag name field in candidate. The default value is 25. - -g:unite_source_tag_max_kind_length *g:unite_source_tag_max_kind_length* - Max length of tag kind field in candidate. - The default value is 8. - - g:unite_source_tag_max_fname_length *g:unite_source_tag_max_fname_length* Max length of file name field in candidate. The default value is 20. -g:unite_source_tag_name_footer_length *g:unite_source_tag_name_footer_length* - Leave this many characters from the end of the tag's name. - The default value is 10. - - -g:unite_source_tag_fname_footer_length *g:unite_source_tag_fname_footer_length* - Leave this many characters from the end of the tag's file name. - The default value is 15. - - *g:unite_source_tag_strict_truncate_string* g:unite_source_tag_strict_truncate_string Use multi-byte aware string truncate method(precise, but slower). The default value is 1. +g:unite_source_tag_show_location *g:unite_source_tag_show_location* + Show source location field. + The default value is 1. + + g:unite_source_tag_show_fname *g:unite_source_tag_show_fname* Show file name field. The default value is 1. -g:unite_source_tag_show_kind *g:unite_source_tag_show_kind* - Show kind field. - The default value is 1. - - -g:unite_source_tag_show_location *g:unite_source_tag_show_location* - Show source location field. - The default value is 1. - - g:unite_source_tag_relative_fname *g:unite_source_tag_relative_fname* Use relative file name in the file name field. The default value is 1. === modified file 'vim/bundle/unite.vim/.git/config' (properties changed: -x to +x) === modified file 'vim/bundle/unite.vim/.git/hooks/applypatch-msg.sample' --- vim/bundle/unite.vim/.git/hooks/applypatch-msg.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/.git/hooks/applypatch-msg.sample 2015-08-25 11:01:00 +0000 @@ -10,6 +10,6 @@ # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup -commitmsg="$(git rev-parse --git-path hooks/commit-msg)" -test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} +test -x "$GIT_DIR/hooks/commit-msg" && + exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} : === modified file 'vim/bundle/unite.vim/.git/hooks/pre-applypatch.sample' --- vim/bundle/unite.vim/.git/hooks/pre-applypatch.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/.git/hooks/pre-applypatch.sample 2015-08-25 11:01:00 +0000 @@ -9,6 +9,6 @@ # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup -precommit="$(git rev-parse --git-path hooks/pre-commit)" -test -x "$precommit" && exec "$precommit" ${1+"$@"} +test -x "$GIT_DIR/hooks/pre-commit" && + exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} : === modified file 'vim/bundle/unite.vim/.git/hooks/pre-push.sample' --- vim/bundle/unite.vim/.git/hooks/pre-push.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/.git/hooks/pre-push.sample 2015-08-25 11:01:00 +0000 @@ -24,6 +24,7 @@ z40=0000000000000000000000000000000000000000 +IFS=' ' while read local_ref local_sha remote_ref remote_sha do if [ "$local_sha" = $z40 ] === modified file 'vim/bundle/unite.vim/.git/hooks/update.sample' --- vim/bundle/unite.vim/.git/hooks/update.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/.git/hooks/update.sample 2015-08-25 11:01:00 +0000 @@ -1,6 +1,6 @@ #!/bin/sh # -# An example hook script to block unannotated tags from entering. +# An example hook script to blocks unannotated tags from entering. # Called by "git receive-pack" with arguments: refname sha1-old sha1-new # # To enable this hook, rename this file to "update". === modified file 'vim/bundle/unite.vim/.git/index' Binary files vim/bundle/unite.vim/.git/index 2016-08-04 08:15:51 +0000 and vim/bundle/unite.vim/.git/index 2015-08-25 11:01:00 +0000 differ === modified file 'vim/bundle/unite.vim/.git/logs/HEAD' --- vim/bundle/unite.vim/.git/logs/HEAD 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/.git/logs/HEAD 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 06b927532e1a92a948a011a07f4eb799bc8710ba Jan Pobrislo 1470298386 +0200 clone: from https://github.com/Shougo/unite.vim.git +0000000000000000000000000000000000000000 52a787619d19db75f13f5ac3fd79c17d4c133b29 Jan Pobrislo 1440499754 +0200 clone: from https://github.com/Shougo/unite.vim.git === modified file 'vim/bundle/unite.vim/.git/logs/refs/heads/master' --- vim/bundle/unite.vim/.git/logs/refs/heads/master 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/.git/logs/refs/heads/master 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 06b927532e1a92a948a011a07f4eb799bc8710ba Jan Pobrislo 1470298386 +0200 clone: from https://github.com/Shougo/unite.vim.git +0000000000000000000000000000000000000000 52a787619d19db75f13f5ac3fd79c17d4c133b29 Jan Pobrislo 1440499754 +0200 clone: from https://github.com/Shougo/unite.vim.git === modified file 'vim/bundle/unite.vim/.git/logs/refs/remotes/origin/HEAD' --- vim/bundle/unite.vim/.git/logs/refs/remotes/origin/HEAD 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/.git/logs/refs/remotes/origin/HEAD 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 06b927532e1a92a948a011a07f4eb799bc8710ba Jan Pobrislo 1470298386 +0200 clone: from https://github.com/Shougo/unite.vim.git +0000000000000000000000000000000000000000 52a787619d19db75f13f5ac3fd79c17d4c133b29 Jan Pobrislo 1440499754 +0200 clone: from https://github.com/Shougo/unite.vim.git === added file 'vim/bundle/unite.vim/.git/objects/pack/pack-50939e234d23f4a1fa1fd0e6131490791bbc3754.idx' Binary files vim/bundle/unite.vim/.git/objects/pack/pack-50939e234d23f4a1fa1fd0e6131490791bbc3754.idx 1970-01-01 00:00:00 +0000 and vim/bundle/unite.vim/.git/objects/pack/pack-50939e234d23f4a1fa1fd0e6131490791bbc3754.idx 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/unite.vim/.git/objects/pack/pack-50939e234d23f4a1fa1fd0e6131490791bbc3754.pack' Binary files vim/bundle/unite.vim/.git/objects/pack/pack-50939e234d23f4a1fa1fd0e6131490791bbc3754.pack 1970-01-01 00:00:00 +0000 and vim/bundle/unite.vim/.git/objects/pack/pack-50939e234d23f4a1fa1fd0e6131490791bbc3754.pack 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/unite.vim/.git/objects/pack/pack-aa8e29e608513accf7486ad4dc3aeaa45301e13b.idx' Binary files vim/bundle/unite.vim/.git/objects/pack/pack-aa8e29e608513accf7486ad4dc3aeaa45301e13b.idx 2016-08-04 08:15:51 +0000 and vim/bundle/unite.vim/.git/objects/pack/pack-aa8e29e608513accf7486ad4dc3aeaa45301e13b.idx 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/unite.vim/.git/objects/pack/pack-aa8e29e608513accf7486ad4dc3aeaa45301e13b.pack' Binary files vim/bundle/unite.vim/.git/objects/pack/pack-aa8e29e608513accf7486ad4dc3aeaa45301e13b.pack 2016-08-04 08:15:51 +0000 and vim/bundle/unite.vim/.git/objects/pack/pack-aa8e29e608513accf7486ad4dc3aeaa45301e13b.pack 1970-01-01 00:00:00 +0000 differ === modified file 'vim/bundle/unite.vim/.git/packed-refs' --- vim/bundle/unite.vim/.git/packed-refs 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/.git/packed-refs 2015-08-25 11:01:00 +0000 @@ -1,2 +1,2 @@ # pack-refs with: peeled fully-peeled -06b927532e1a92a948a011a07f4eb799bc8710ba refs/remotes/origin/master +52a787619d19db75f13f5ac3fd79c17d4c133b29 refs/remotes/origin/master === modified file 'vim/bundle/unite.vim/.git/refs/heads/master' --- vim/bundle/unite.vim/.git/refs/heads/master 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/.git/refs/heads/master 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -06b927532e1a92a948a011a07f4eb799bc8710ba +52a787619d19db75f13f5ac3fd79c17d4c133b29 === modified file 'vim/bundle/unite.vim/.git/shallow' --- vim/bundle/unite.vim/.git/shallow 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/.git/shallow 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -06b927532e1a92a948a011a07f4eb799bc8710ba +52a787619d19db75f13f5ac3fd79c17d4c133b29 === removed directory 'vim/bundle/unite.vim/.github' === removed file 'vim/bundle/unite.vim/.github/ISSUE_TEMPLATE.md' --- vim/bundle/unite.vim/.github/ISSUE_TEMPLATE.md 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/.github/ISSUE_TEMPLATE.md 1970-01-01 00:00:00 +0000 @@ -1,30 +0,0 @@ -# Problems summary - - -## Expected - - -## Environment Information - * OS: - * Vim version: - - -## Provide a minimal .vimrc with less than 50 lines (Required!) - -```vim -" Your minimal .vimrc -set runtimepath+=~/path/to/unite.nvim/ -``` - - -## The reproduce ways from Vim starting (Required!) - - 1. foo - 2. bar - 3. baz - - -## Screen shot (if possible) - - -## Upload the log messages by `:redir` and `:message` === modified file 'vim/bundle/unite.vim/.gitignore' --- vim/bundle/unite.vim/.gitignore 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/.gitignore 2015-08-25 11:01:00 +0000 @@ -1,2 +1,1 @@ doc/tags* -*.pyc === modified file 'vim/bundle/unite.vim/.travis.yml' --- vim/bundle/unite.vim/.travis.yml 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/.travis.yml 2015-08-25 11:01:00 +0000 @@ -1,5 +1,3 @@ -sudo: false - before_script: - git clone https://github.com/syngan/vim-vimlint /tmp/vim-vimlint - git clone https://github.com/ynkdir/vim-vimlparser /tmp/vim-vimlparser === added file 'vim/bundle/unite.vim/CONTRIBUTING.md' --- vim/bundle/unite.vim/CONTRIBUTING.md 1970-01-01 00:00:00 +0000 +++ vim/bundle/unite.vim/CONTRIBUTING.md 2015-08-25 11:01:00 +0000 @@ -0,0 +1,62 @@ +## Reporting an issue + +When you report an issue, please use the following issue template. + + * Problems summary + + * Expected + + * Environment Information + * OS: + * Vim version: + + * Minimal vimrc less than 50 lines + + ```VimL + " Your vimrc + set nocompatible + + set runtimepath+=~/path/to/unite.vim/ + ``` + + * How to reproduce + + 0. startup vim (Write with option arguments if necessary). + 1. + 2. + 3. + + * Screen shot (if possible) + +### Example + +* Problems summary + + file/new doesn't work on windows. + +* Expected + + I want to save the file there is a space. + +* Environment Information + * OS:Windows7 64bit + * Vim version:Vim 7.4.111 + +* Minimal vimrc less than 50 lines + + ```VimL + " minimal.vimrc + if has('vim_starting') + set nocompatible + set runtimepath+=~/.cache/neobundle/unite.vim/ + endif + ``` + +* How to reproduce + + 0. startup vim: `vim -u minimal.vimrc` + 1. `:Unite file/new`. + 2. Input `C:/Foo\ Bar/test.txt` + 3. Enter candidate. + 4. `:w` + 5. Can not be saved. === modified file 'vim/bundle/unite.vim/README.md' --- vim/bundle/unite.vim/README.md 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/README.md 2015-08-25 11:01:00 +0000 @@ -13,8 +13,6 @@ ## Usage -[![Join the chat at https://gitter.im/Shougo/unite.vim](https://badges.gitter.im/Shougo/unite.vim.svg)](https://gitter.im/Shougo/unite.vim?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) - Run unite to display files and buffers as sources to pick from. :Unite file buffer @@ -122,44 +120,41 @@ ------------------------------------ ![Unite menu source with customization.](https://f.cloud.github.com/assets/390964/734885/82b91006-e2e1-11e2-9957-fb279bc71311.png) -```viml -let g:unite_source_menu_menus = get(g:,'unite_source_menu_menus',{}) -let g:unite_source_menu_menus.git = { - \ 'description' : ' gestionar repositorios git - \ ⌘ [espacio]g', - \} -let g:unite_source_menu_menus.git.command_candidates = [ - \['▷ tig ⌘ ,gt', - \'normal ,gt'], - \['▷ git status (Fugitive) ⌘ ,gs', - \'Gstatus'], - \['▷ git diff (Fugitive) ⌘ ,gd', - \'Gdiff'], - \['▷ git commit (Fugitive) ⌘ ,gc', - \'Gcommit'], - \['▷ git log (Fugitive) ⌘ ,gl', - \'exe "silent Glog | Unite quickfix"'], - \['▷ git blame (Fugitive) ⌘ ,gb', - \'Gblame'], - \['▷ git stage (Fugitive) ⌘ ,gw', - \'Gwrite'], - \['▷ git checkout (Fugitive) ⌘ ,go', - \'Gread'], - \['▷ git rm (Fugitive) ⌘ ,gr', - \'Gremove'], - \['▷ git mv (Fugitive) ⌘ ,gm', - \'exe "Gmove " input("destino: ")'], - \['▷ git push (Fugitive, salida por buffer) ⌘ ,gp', - \'Git! push'], - \['▷ git pull (Fugitive, salida por buffer) ⌘ ,gP', - \'Git! pull'], - \['▷ git prompt (Fugitive, salida por buffer) ⌘ ,gi', - \'exe "Git! " input("comando git: ")'], - \['▷ git cd (Fugitive)', - \'Gcd'], - \] -nnoremap [menu]g :Unite -silent -start-insert menu:git -``` + let g:unite_source_menu_menus.git = { + \ 'description' : ' gestionar repositorios git + \ ⌘ [espacio]g', + \} + let g:unite_source_menu_menus.git.command_candidates = [ + \['▷ tig ⌘ ,gt', + \'normal ,gt'], + \['▷ git status (Fugitive) ⌘ ,gs', + \'Gstatus'], + \['▷ git diff (Fugitive) ⌘ ,gd', + \'Gdiff'], + \['▷ git commit (Fugitive) ⌘ ,gc', + \'Gcommit'], + \['▷ git log (Fugitive) ⌘ ,gl', + \'exe "silent Glog | Unite quickfix"'], + \['▷ git blame (Fugitive) ⌘ ,gb', + \'Gblame'], + \['▷ git stage (Fugitive) ⌘ ,gw', + \'Gwrite'], + \['▷ git checkout (Fugitive) ⌘ ,go', + \'Gread'], + \['▷ git rm (Fugitive) ⌘ ,gr', + \'Gremove'], + \['▷ git mv (Fugitive) ⌘ ,gm', + \'exe "Gmove " input("destino: ")'], + \['▷ git push (Fugitive, salida por buffer) ⌘ ,gp', + \'Git! push'], + \['▷ git pull (Fugitive, salida por buffer) ⌘ ,gP', + \'Git! pull'], + \['▷ git prompt (Fugitive, salida por buffer) ⌘ ,gi', + \'exe "Git! " input("comando git: ")'], + \['▷ git cd (Fugitive)', + \'Gcd'], + \] + nnoremap [menu]g :Unite -silent -start-insert menu:git ## Video === modified file 'vim/bundle/unite.vim/autoload/unite.vim' --- vim/bundle/unite.vim/autoload/unite.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite.vim 2015-08-25 11:01:00 +0000 @@ -27,105 +27,102 @@ set cpo&vim augroup plugin-unite + autocmd CursorHold * + \ call unite#handlers#_on_cursor_hold() augroup END -if !has('timers') - autocmd plugin-unite CursorHold * - \ call unite#handlers#_on_cursor_hold() -endif - -function! unite#version() abort "{{{ - return str2nr(printf('%02d%02d', 6, 3)) +function! unite#version() "{{{ + return str2nr(printf('%02d%02d', 6, 2)) endfunction"}}} " User functions. "{{{ -function! unite#set_profile(profile_name, option_name, value) abort "{{{ +function! unite#set_profile(profile_name, option_name, value) "{{{ return unite#custom#profile(a:profile_name, a:option_name, a:value) endfunction"}}} -function! unite#get_profile(profile_name, option_name) abort "{{{ +function! unite#get_profile(profile_name, option_name) "{{{ return unite#custom#get_profile(a:profile_name, a:option_name) endfunction"}}} -function! unite#set_substitute_pattern(buffer_name, pattern, subst, ...) abort "{{{ +function! unite#set_substitute_pattern(buffer_name, pattern, subst, ...) "{{{ call unite#print_error('unite#set_substitute_pattern() is deprecated.') call unite#print_error('Please use unite#set_profile() '. \ 'or unite#custom#substitute() instead of it.') endfunction"}}} -function! unite#set_buffer_name_option(buffer_name, option_name, value) abort "{{{ +function! unite#set_buffer_name_option(buffer_name, option_name, value) "{{{ call unite#print_error('unite#set_buffer_name_options() is deprecated.') call unite#print_error('Please use unite#set_profile() instead of it.') endfunction"}}} -function! unite#custom_filters(source_name, expr) abort "{{{ +function! unite#custom_filters(source_name, expr) "{{{ return unite#custom#source(a:source_name, 'filters', a:expr) endfunction"}}} -function! unite#custom_alias(kind, name, action) abort "{{{ +function! unite#custom_alias(kind, name, action) "{{{ return unite#custom#alias(a:kind, a:name, a:action) endfunction"}}} -function! unite#custom_default_action(kind, default_action) abort "{{{ +function! unite#custom_default_action(kind, default_action) "{{{ return unite#custom#default_action(a:kind, a:default_action) endfunction"}}} -function! unite#custom_action(kind, name, action) abort "{{{ +function! unite#custom_action(kind, name, action) "{{{ return unite#custom#action(a:kind, a:name, a:action) endfunction"}}} -function! unite#custom_max_candidates(source_name, max) abort "{{{ +function! unite#custom_max_candidates(source_name, max) "{{{ return unite#custom#source(a:source_name, \ 'max_candidates', a:max) endfunction"}}} -function! unite#custom_source(source_name, option_name, value) abort "{{{ +function! unite#custom_source(source_name, option_name, value) "{{{ return unite#custom#source( \ a:source_name, a:option_name, a:value) endfunction"}}} -function! unite#define_source(source) abort "{{{ +function! unite#define_source(source) "{{{ let dynamic = unite#variables#dynamic() for source in unite#util#convert2list(a:source) let dynamic.sources[source.name] = source endfor endfunction"}}} -function! unite#define_kind(kind) abort "{{{ +function! unite#define_kind(kind) "{{{ let dynamic = unite#variables#dynamic() for kind in unite#util#convert2list(a:kind) let dynamic.kinds[kind.name] = kind endfor endfunction"}}} -function! unite#define_filter(filter) abort "{{{ +function! unite#define_filter(filter) "{{{ let dynamic = unite#variables#dynamic() for filter in unite#util#convert2list(a:filter) let dynamic.filters[filter.name] = filter endfor endfunction"}}} -function! unite#undef_source(name) abort "{{{ +function! unite#undef_source(name) "{{{ let dynamic = unite#variables#dynamic() if has_key(dynamic.sources, a:name) call remove(dynamic.sources, a:name) endif endfunction"}}} -function! unite#undef_kind(name) abort "{{{ +function! unite#undef_kind(name) "{{{ let dynamic = unite#variables#dynamic() if has_key(dynamic.kinds, a:name) call remove(dynamic.kinds, a:name) endif endfunction"}}} -function! unite#undef_filter(name) abort "{{{ +function! unite#undef_filter(name) "{{{ let dynamic = unite#variables#dynamic() if has_key(dynamic.filters, a:name) call remove(dynamic.filters, a:name) endif endfunction"}}} -function! unite#do_action(action) abort "{{{ +function! unite#do_action(action) "{{{ return printf("%s:\call unite#action#do(%s)\", \ (mode() ==# 'i' ? "\" : ''), string(a:action)) endfunction"}}} -function! unite#smart_map(narrow_map, select_map) abort "{{{ +function! unite#smart_map(narrow_map, select_map) "{{{ return (line('.') == unite#get_current_unite().prompt_linenr \ && empty(unite#helper#get_marked_candidates())) ? \ a:narrow_map : a:select_map endfunction"}}} -function! unite#start_complete(...) abort "{{{ +function! unite#start_complete(...) "{{{ return call('unite#start#complete', a:000) endfunction "}}} -function! unite#get_cur_text() abort "{{{ +function! unite#get_cur_text() "{{{ let cur_text = \ (mode() ==# 'i' ? (col('.')-1) : col('.')) >= len(getline('.')) ? \ getline('.') : @@ -135,56 +132,56 @@ return cur_text endfunction "}}} -function! unite#take_action(action_name, candidate) abort "{{{ +function! unite#take_action(action_name, candidate) "{{{ call unite#action#take(a:action_name, a:candidate, 0) endfunction"}}} -function! unite#take_parents_action(action_name, candidate, extend_candidate) abort "{{{ +function! unite#take_parents_action(action_name, candidate, extend_candidate) "{{{ call unite#action#take(a:action_name, \ extend(deepcopy(a:candidate), a:extend_candidate), 1) endfunction"}}} "}}} " Core functions. "{{{ -function! unite#get_kinds(...) abort "{{{ +function! unite#get_kinds(...) "{{{ return call('unite#variables#kinds', a:000) endfunction"}}} -function! unite#get_sources(...) abort "{{{ +function! unite#get_sources(...) "{{{ return call('unite#variables#sources', a:000) endfunction"}}} -function! unite#get_all_sources(...) abort "{{{ +function! unite#get_all_sources(...) "{{{ return call('unite#variables#all_sources', a:000) endfunction"}}} -function! unite#get_filters(...) abort "{{{ +function! unite#get_filters(...) "{{{ return call('unite#variables#filters', a:000) endfunction"}}} "}}} " Helper functions. "{{{ -function! unite#is_win() abort "{{{ +function! unite#is_win() "{{{ return unite#util#is_windows() endfunction"}}} -function! unite#loaded_source_names() abort "{{{ +function! unite#loaded_source_names() "{{{ return map(copy(unite#loaded_sources_list()), 'v:val.name') endfunction"}}} -function! unite#loaded_source_names_string() abort "{{{ +function! unite#loaded_source_names_string() "{{{ return join(unite#loaded_source_names()) endfunction"}}} -function! unite#loaded_sources_list() abort "{{{ +function! unite#loaded_sources_list() "{{{ return unite#variables#loaded_sources() endfunction"}}} -function! unite#get_vimfiler_source_names() abort "{{{ +function! unite#get_vimfiler_source_names() "{{{ return map(filter(values(unite#init#_sources()), \ 'has_key(v:val, "vimfiler_check_filetype")'), 'v:val.name') endfunction"}}} -function! unite#get_unite_candidates() abort "{{{ +function! unite#get_unite_candidates() "{{{ return unite#get_current_unite().current_candidates endfunction"}}} -function! unite#get_context() abort "{{{ +function! unite#get_context() "{{{ let unite = unite#get_current_unite() return has_key(unite, 'context') ? \ unite.context : unite#init#_context({}) endfunction"}}} -function! unite#set_context(context) abort "{{{ +function! unite#set_context(context) "{{{ let old_context = unite#get_context() if exists('b:unite') && !unite#variables#use_current_unite() @@ -196,17 +193,17 @@ return old_context endfunction"}}} -function! unite#get_unite_winnr(buffer_name) abort "{{{ +function! unite#get_unite_winnr(buffer_name) "{{{ return unite#helper#get_unite_winnr(a:buffer_name) endfunction"}}} -function! unite#force_redraw(...) abort "{{{ +function! unite#force_redraw(...) "{{{ call unite#view#_redraw(1, get(a:000, 0, 0), get(a:000, 1, 0)) endfunction"}}} -function! unite#redraw(...) abort "{{{ +function! unite#redraw(...) "{{{ call unite#view#_redraw(0, get(a:000, 0, 0), get(a:000, 1, 0)) endfunction"}}} -function! unite#get_status_string() abort "{{{ +function! unite#get_status_string() "{{{ if !exists('b:unite') return '' endif @@ -214,29 +211,29 @@ return unite#view#_get_status_plane_string() \ . ' | '. unite#view#_get_status_tail_string() endfunction"}}} -function! unite#get_marked_candidates() abort "{{{ +function! unite#get_marked_candidates() "{{{ return unite#helper#get_marked_candidates() endfunction"}}} -function! unite#get_input() abort "{{{ +function! unite#get_input() "{{{ return unite#helper#get_input() endfunction"}}} -function! unite#get_self_functions() abort "{{{ +function! unite#get_self_functions() "{{{ return split(matchstr(expand(''), '^function \zs.*$'), '\.\.')[: -2] endfunction"}}} -function! unite#get_current_unite() abort "{{{ +function! unite#get_current_unite() "{{{ return exists('b:unite') && !unite#variables#use_current_unite() ? \ b:unite : unite#variables#current_unite() endfunction"}}} -function! unite#set_current_unite(unite) abort "{{{ +function! unite#set_current_unite(unite) "{{{ return unite#variables#set_current_unite(a:unite) endfunction"}}} -function! unite#add_previewed_buffer_list(bufnr) abort "{{{ +function! unite#add_previewed_buffer_list(bufnr) "{{{ return unite#view#_add_previewed_buffer_list(a:bufnr) endfunction"}}} -function! unite#remove_previewed_buffer_list(bufnr) abort "{{{ +function! unite#remove_previewed_buffer_list(bufnr) "{{{ return unite#view#_remove_previewed_buffer_list(a:bufnr) endfunction"}}} -function! unite#get_data_directory() abort "{{{ +function! unite#get_data_directory() "{{{ let g:unite_data_directory = \ substitute(substitute(fnamemodify( \ get(g:, 'unite_data_directory', @@ -253,86 +250,83 @@ " Utils. -function! unite#print_error(message) abort "{{{ +function! unite#print_error(message) "{{{ return unite#view#_print_error(a:message) endfunction"}}} -function! unite#print_source_error(message, source_name) abort "{{{ +function! unite#print_source_error(message, source_name) "{{{ return unite#view#_print_source_error(a:message, a:source_name) endfunction"}}} -function! unite#print_message(message) abort "{{{ +function! unite#print_message(message) "{{{ return unite#view#_print_message(a:message) endfunction"}}} -function! unite#print_source_message(message, source_name) abort "{{{ +function! unite#print_source_message(message, source_name) "{{{ return unite#view#_print_source_message(a:message, a:source_name) endfunction"}}} -function! unite#add_source_message(message, source_name) abort "{{{ +function! unite#add_source_message(message, source_name) "{{{ return unite#view#_add_source_message(a:message, a:source_name) endfunction"}}} -function! unite#clear_message() abort "{{{ +function! unite#clear_message() "{{{ return unite#view#_clear_message() endfunction"}}} -function! unite#substitute_path_separator(path) abort "{{{ +function! unite#substitute_path_separator(path) "{{{ return unite#util#substitute_path_separator(a:path) endfunction"}}} -function! unite#path2directory(path) abort "{{{ +function! unite#path2directory(path) "{{{ return unite#util#path2directory(a:path) endfunction"}}} "}}} " Command functions. -function! unite#start(...) abort "{{{ +function! unite#start(...) "{{{ return call('unite#start#standard', a:000) endfunction"}}} -function! unite#start_script(...) abort "{{{ +function! unite#start_script(...) "{{{ return call('unite#start#script', a:000) endfunction"}}} -function! unite#start_temporary(...) abort "{{{ +function! unite#start_temporary(...) "{{{ return call('unite#start#temporary', a:000) endfunction"}}} -function! unite#vimfiler_check_filetype(...) abort "{{{ +function! unite#vimfiler_check_filetype(...) "{{{ return call('unite#start#vimfiler_check_filetype', a:000) endfunction"}}} -function! unite#get_candidates(...) abort "{{{ +function! unite#get_candidates(...) "{{{ return call('unite#start#get_candidates', a:000) endfunction"}}} -function! unite#get_vimfiler_candidates(...) abort "{{{ +function! unite#get_vimfiler_candidates(...) "{{{ return call('unite#start#get_vimfiler_candidates', a:000) endfunction"}}} -function! unite#resume(...) abort "{{{ +function! unite#resume(...) "{{{ return call('unite#start#resume', a:000) endfunction"}}} -function! unite#vimfiler_complete(sources, arglead, cmdline, cursorpos) abort "{{{ +function! unite#vimfiler_complete(sources, arglead, cmdline, cursorpos) "{{{ return unite#complete#vimfiler(a:sources, a:arglead, a:cmdline, a:cursorpos) endfunction"}}} -function! unite#complete_source(arglead, cmdline, cursorpos) abort "{{{ +function! unite#complete_source(arglead, cmdline, cursorpos) "{{{ return unite#complete#source(a:arglead, a:cmdline, a:cursorpos) endfunction"}}} -function! unite#complete_buffer_name(arglead, cmdline, cursorpos) abort "{{{ +function! unite#complete_buffer_name(arglead, cmdline, cursorpos) "{{{ return unite#complete#buffer_name(a:arglead, a:cmdline, a:cursorpos) endfunction"}}} -function! unite#args_complete(sources, arglead, cmdline, cursorpos) abort "{{{ +function! unite#args_complete(sources, arglead, cmdline, cursorpos) "{{{ return unite#complete#args(a:sources, a:arglead, a:cmdline, a:cursorpos) endfunction"}}} -function! unite#dummy_completefunc(findstart, base) abort "{{{ +function! unite#dummy_completefunc(findstart, base) "{{{ return a:findstart ? -1 : [] endfunction"}}} -function! unite#all_quit_session(...) abort "{{{ +function! unite#all_quit_session(...) "{{{ call unite#view#_quit(get(a:000, 0, 1), 1) endfunction"}}} -function! unite#force_quit_session() abort "{{{ +function! unite#force_quit_session() "{{{ call unite#view#_quit(1) let context = unite#get_context() if context.temporary && !empty(context.unite__old_buffer_info) call unite#start#resume_from_temporary(context) - if context.script - call unite#force_redraw() - endif endif endfunction"}}} -function! unite#quit_session() abort "{{{ +function! unite#quit_session() "{{{ call unite#view#_quit(0) let context = unite#get_context() === modified file 'vim/bundle/unite.vim/autoload/unite/action.vim' --- vim/bundle/unite.vim/autoload/unite/action.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/action.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#action#get_action_table(source_name, kind, self_func, ...) abort "{{{ +function! unite#action#get_action_table(source_name, kind, self_func, ...) "{{{ let is_parents_action = get(a:000, 0, 0) let source_table = get(a:000, 1, {}) @@ -41,7 +41,7 @@ return action_table endfunction"}}} -function! unite#action#get_alias_table(source_name, kind, ...) abort "{{{ +function! unite#action#get_alias_table(source_name, kind, ...) "{{{ let source_table = get(a:000, 0, {}) let alias_table = {} for kind_name in unite#util#convert2list(a:kind) @@ -52,13 +52,13 @@ return alias_table endfunction"}}} -function! unite#action#get_default_action(source_name, kind) abort "{{{ +function! unite#action#get_default_action(source_name, kind) "{{{ let kinds = unite#util#convert2list(a:kind) return s:get_default_action(a:source_name, kinds[-1]) endfunction"}}} -function! s:get_action_table(source_name, kind_name, self_func, is_parents_action, source_table) abort "{{{ +function! s:get_action_table(source_name, kind_name, self_func, is_parents_action, source_table) "{{{ let kind = unite#get_kinds(a:kind_name) let source = empty(a:source_table) ? \ unite#get_sources(a:source_name) : @@ -199,7 +199,7 @@ return filter(action_table, 'v:key !=# "nop"') endfunction"}}} -function! s:get_alias_table(source_name, kind_name, source_table) abort "{{{ +function! s:get_alias_table(source_name, kind_name, source_table) "{{{ let kind = unite#get_kinds(a:kind_name) let source = empty(a:source_table) ? \ unite#get_sources(a:source_name) : @@ -244,7 +244,7 @@ return table endfunction"}}} -function! s:get_default_action(source_name, kind_name) abort "{{{ +function! s:get_default_action(source_name, kind_name) "{{{ let source = unite#get_all_sources(a:source_name) if empty(source) return '' @@ -285,7 +285,7 @@ return get(kind, 'default_action', '') endfunction"}}} -function! unite#action#take(action_name, candidate, is_parent_action) abort "{{{ +function! unite#action#take(action_name, candidate, is_parent_action) "{{{ let candidate_head = type(a:candidate) == type([]) ? \ a:candidate[0] : a:candidate @@ -311,7 +311,7 @@ \ [a:candidate] : a:candidate) endfunction"}}} -function! unite#action#do(action_name, ...) abort "{{{ +function! unite#action#do(action_name, ...) "{{{ if &filetype == 'vimfiler' && has_key(b:vimfiler, 'unite') " Restore unite condition in vimfiler. call unite#set_current_unite(b:vimfiler.unite) @@ -369,14 +369,6 @@ \ && !table.action.is_start \ && !(table.action.is_tab && !unite.context.quit) call unite#all_quit_session(0) - if unite.context.file_quit && &buftype =~# 'nofile' - " Switch to file buffer. - let winnr = get(filter(range(1, winnr('$')), - \ "getwinvar(v:val, '&buftype') !~# 'nofile'"), 0, 0) - if winnr > 0 - execute winnr.'wincmd w' - endif - endif let is_quit = 1 endif @@ -444,7 +436,7 @@ return _ endfunction"}}} -function! unite#action#do_candidates(action_name, candidates, ...) abort "{{{ +function! unite#action#do_candidates(action_name, candidates, ...) "{{{ let context = get(a:000, 0, {}) let context = unite#init#_context(context) let context.unite__is_interactive = 0 @@ -455,13 +447,13 @@ \ a:action_name, a:candidates, context) endfunction"}}} -function! unite#action#_get_candidate_action_table(candidate, sources) abort "{{{ +function! unite#action#_get_candidate_action_table(candidate, sources) "{{{ return unite#action#get_action_table( \ a:candidate.source, a:candidate.kind, \ unite#get_self_functions()[-1], 0, a:sources) endfunction"}}} -function! s:get_candidates_action_table(action_name, candidates, sources) abort "{{{ +function! s:get_candidates_action_table(action_name, candidates, sources) "{{{ let action_tables = [] for candidate in a:candidates let action_table = unite#action#_get_candidate_action_table( @@ -523,7 +515,7 @@ return action_tables endfunction"}}} -function! s:extend_actions(self_func, action_table1, action_table2, ...) abort "{{{ +function! s:extend_actions(self_func, action_table1, action_table2, ...) "{{{ let filterd_table = s:filter_self_func(a:action_table2, a:self_func) if a:0 > 0 @@ -534,7 +526,7 @@ return extend(a:action_table1, filterd_table, 'keep') endfunction"}}} -function! s:filter_alias_action(action_table, alias_table, from) abort "{{{ +function! s:filter_alias_action(action_table, alias_table, from) "{{{ for [alias_name, alias_action] in items(a:alias_table) if alias_action ==# 'nop' if has_key(a:action_table, alias_name) @@ -548,11 +540,11 @@ endif endfor endfunction"}}} -function! s:filter_self_func(action_table, self_func) abort "{{{ +function! s:filter_self_func(action_table, self_func) "{{{ return filter(copy(a:action_table), \ printf("string(v:val.func) !=# \"function('%s')\"", a:self_func)) endfunction"}}} -function! s:clear_marks(candidates) abort "{{{ +function! s:clear_marks(candidates) "{{{ for candidate in a:candidates let candidate.unite__is_marked = 0 endfor === modified file 'vim/bundle/unite.vim/autoload/unite/candidates.vim' --- vim/bundle/unite.vim/autoload/unite/candidates.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/candidates.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#candidates#_recache(input, is_force) abort "{{{ +function! unite#candidates#_recache(input, is_force) "{{{ let unite = unite#get_current_unite() " Save options. @@ -41,7 +41,7 @@ let &ignorecase = context.ignorecase endif - let context.is_redraw = a:is_force || context.is_redraw + let context.is_redraw = a:is_force let context.is_changed = a:input !=# unite.last_input \ || context.path !=# unite.last_path @@ -127,6 +127,11 @@ endif endif + if source.is_grouped + let source.unite__candidates = + \ unite#candidates#_group_post_filters(source.unite__candidates) + endif + " Call post_filter hook. let source.unite__context.candidates = \ source.unite__candidates @@ -144,13 +149,12 @@ \ 'v:val.unite__context.is_async')) > 0 finally let &ignorecase = ignorecase_save - let context.is_redraw = 0 endtry call unite#handlers#_save_updatetime() endfunction"}}} -function! unite#candidates#gather(...) abort "{{{ +function! unite#candidates#gather(...) "{{{ let is_gather_all = get(a:000, 0, 0) let unite = unite#get_current_unite() @@ -204,7 +208,7 @@ return candidates endfunction"}}} -function! unite#candidates#_gather_pos(offset) abort "{{{ +function! unite#candidates#_gather_pos(offset) "{{{ let unite = unite#get_current_unite() if unite.context.is_redraw || unite.candidates_pos == 0 return [] @@ -219,7 +223,7 @@ return unite#init#_candidates(candidates) endfunction"}}} -function! s:recache_candidates_loop(context, is_force) abort "{{{ +function! s:recache_candidates_loop(context, is_force) "{{{ let unite = unite#get_current_unite() let input_len = unite#util#strchars(a:context.input) @@ -250,8 +254,7 @@ let context.is_changed = a:context.is_changed let context.is_invalidate = source.unite__is_invalidate let context.is_list_input = a:context.is_list_input - let context.input_list = - \ unite#helper#get_input_list(context.input) + let context.input_list = split(context.input, '\\\@ 0 let source_candidates = source_candidates[: \ context.unite__max_candidates - 1] endif + let source_candidates = unite#helper#call_source_filters( + \ converters, source_candidates, context, source) endif " Get execute_command. @@ -329,10 +318,11 @@ endif endfunction"}}} -function! s:get_source_candidates(source) abort "{{{ +function! s:get_source_candidates(source) "{{{ + let context = a:source.unite__context let custom_source = get(unite#custom#get().sources, a:source.name, {}) let context_ignore = { - \ 'path' : a:source.unite__context.path, + \ 'path' : context.path, \ 'ignore_pattern' : get(custom_source, \ 'ignore_pattern', a:source.ignore_pattern), \ 'ignore_globs' : get(custom_source, @@ -340,7 +330,6 @@ \ 'white_globs' : get(custom_source, \ 'white_globs', a:source.white_globs), \ } - let context = extend(a:source.unite__context, context_ignore) let funcname = 's:get_source_candidates()' try @@ -358,19 +347,14 @@ endif endif - " Recaching. - if (context.is_redraw || a:source.unite__is_invalidate) - \ && (!has_key(a:source, 'async_gather_candidates') - \ || has_key(a:source, 'gather_candidates')) - " Note: If the source has not gather_candidates, the recaching is - " disabled. - + if context.is_redraw || a:source.unite__is_invalidate + " Recaching. let a:source.unite__cached_candidates = [] let funcname = 'gather_candidates' if has_key(a:source, 'gather_candidates') let a:source.unite__cached_candidates += - \ unite#helper#ignore_candidates(copy( + \ s:ignore_candidates(copy( \ a:source.gather_candidates(a:source.args, \ a:source.unite__context)), context_ignore) endif @@ -382,7 +366,7 @@ " Recaching. let funcname = 'change_candidates' let a:source.unite__cached_change_candidates = - \ unite#helper#ignore_candidates(a:source.change_candidates( + \ s:ignore_candidates(a:source.change_candidates( \ a:source.args, a:source.unite__context), context_ignore) endif @@ -391,7 +375,7 @@ let funcname = 'async_gather_candidates' while 1 let a:source.unite__cached_candidates += - \ unite#helper#ignore_candidates( + \ s:ignore_candidates( \ a:source.async_gather_candidates(a:source.args, context), \ context_ignore) @@ -416,6 +400,28 @@ \ + a:source.unite__cached_change_candidates endfunction"}}} +function! s:ignore_candidates(candidates, context) "{{{ + let candidates = copy(a:candidates) + + if a:context.ignore_pattern != '' + let candidates = unite#filters#vim_filter_pattern( + \ candidates, a:context.ignore_pattern) + endif + + if !empty(a:context.ignore_globs) + let candidates = unite#filters#filter_patterns(candidates, + \ unite#filters#globs2patterns(a:context.ignore_globs), + \ unite#filters#globs2patterns(a:context.white_globs)) + endif + + if a:context.path != '' + let candidates = unite#filters#{unite#util#has_lua()? 'lua' : 'vim'} + \_filter_head(candidates, a:context.path) + endif + + return candidates +endfunction"}}} + let &cpo = s:save_cpo unlet s:save_cpo === modified file 'vim/bundle/unite.vim/autoload/unite/complete.vim' --- vim/bundle/unite.vim/autoload/unite/complete.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/complete.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#complete#source(arglead, cmdline, cursorpos) abort "{{{ +function! unite#complete#source(arglead, cmdline, cursorpos) "{{{ let ret = unite#helper#parse_options_args(a:cmdline)[0] let source_name = ret[-1][0] let source_args = ret[-1][1:] @@ -39,9 +39,12 @@ " Source name completion. if mode() ==# 'c' || unite#util#is_cmdwin() || &l:filetype ==# 'unite' - let _ += keys(filter(unite#init#_sources([], ''), + let _ += keys(filter(unite#init#_sources([], a:arglead), \ 'v:val.is_listed')) endif + if exists('*neobundle#get_unite_sources') + let _ += neobundle#get_unite_sources() + endif else " Add "{source-name}:". let _ = map(_, 'source_name.":".v:val') @@ -64,7 +67,7 @@ return sort(filter(_, 'stridx(v:val, a:arglead) == 0')) endfunction"}}} -function! unite#complete#buffer_name(arglead, cmdline, cursorpos) abort "{{{ +function! unite#complete#buffer_name(arglead, cmdline, cursorpos) "{{{ let _ = map(filter(range(1, bufnr('$')), \ 'getbufvar(v:val, "&filetype") ==# "unite"'), \ 'getbufvar(v:val, "unite").buffer_name') @@ -73,7 +76,7 @@ return filter(_, printf('stridx(v:val, %s) == 0', string(a:arglead))) endfunction"}}} -function! unite#complete#vimfiler(sources, arglead, cmdline, cursorpos) abort "{{{ +function! unite#complete#vimfiler(sources, arglead, cmdline, cursorpos) "{{{ let context = {} let context = unite#init#_context(context, \ unite#helper#get_source_names(a:sources)) @@ -97,7 +100,7 @@ return _ endfunction"}}} -function! unite#complete#args(sources, arglead, cmdline, cursorpos) abort "{{{ +function! unite#complete#args(sources, arglead, cmdline, cursorpos) "{{{ let context = {} let context = unite#init#_context(context, \ unite#helper#get_source_names(a:sources)) @@ -131,13 +134,13 @@ return _ endfunction"}}} -function! unite#complete#gather(candidates, input) abort "{{{ +function! unite#complete#gather(candidates, input) "{{{ return unite#util#has_lua() ? \ unite#complete#gather_lua(a:candidates, a:input) : \ unite#complete#gather_vim(a:candidates, a:input) endfunction"}}} -function! unite#complete#gather_vim(candidates, input) abort "{{{ +function! unite#complete#gather_vim(candidates, input) "{{{ let dup = {} let _ = [] let search_input = tolower(a:input) @@ -163,7 +166,7 @@ return _ endfunction"}}} -function! unite#complete#gather_lua(candidates, input) abort "{{{ +function! unite#complete#gather_lua(candidates, input) "{{{ let _ = [] lua << EOF === modified file 'vim/bundle/unite.vim/autoload/unite/custom.vim' --- vim/bundle/unite.vim/autoload/unite/custom.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/custom.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#custom#get() abort "{{{ +function! unite#custom#get() "{{{ if !exists('s:custom') let s:custom = {} let s:custom.sources = {} @@ -40,15 +40,15 @@ return s:custom endfunction"}}} -function! unite#custom#source(source_name, option_name, value) abort "{{{ +function! unite#custom#source(source_name, option_name, value) "{{{ return s:custom_base('sources', a:source_name, a:option_name, a:value) endfunction"}}} -function! unite#custom#alias(kind, name, action) abort "{{{ +function! unite#custom#alias(kind, name, action) "{{{ call s:custom_base('aliases', a:kind, a:name, a:action) endfunction"}}} -function! unite#custom#default_action(kind, default_action) abort "{{{ +function! unite#custom#default_action(kind, default_action) "{{{ let custom = unite#custom#get() let custom = unite#custom#get().default_actions @@ -61,11 +61,11 @@ endfor endfunction"}}} -function! unite#custom#action(kind, name, action) abort "{{{ +function! unite#custom#action(kind, name, action) "{{{ return s:custom_base('actions', a:kind, a:name, a:action) endfunction"}}} -function! unite#custom#profile(profile_name, option_name, value) abort "{{{ +function! unite#custom#profile(profile_name, option_name, value) "{{{ if a:option_name ==# 'smartcase' \ || a:option_name ==# 'ignorecase' call unite#print_error( @@ -109,7 +109,7 @@ endif endfor endfunction"}}} -function! unite#custom#get_profile(profile_name, option_name) abort "{{{ +function! unite#custom#get_profile(profile_name, option_name) "{{{ let custom = unite#custom#get() let profile_name = \ (a:profile_name == '' || !has_key(custom.profiles, a:profile_name)) ? @@ -129,7 +129,7 @@ return custom.profiles[profile_name][a:option_name] endfunction"}}} -function! unite#custom#get_context(profile_name) abort "{{{ +function! unite#custom#get_context(profile_name) "{{{ let context = copy(unite#custom#get_profile(a:profile_name, 'context')) for option in map(filter(items(context), \ "stridx(v:val[0], 'no_') == 0 && v:val[1]"), 'v:val[0]') @@ -138,7 +138,7 @@ return context endfunction"}}} -function! unite#custom#substitute(profile, pattern, subst, ...) abort "{{{ +function! unite#custom#substitute(profile, pattern, subst, ...) "{{{ let priority = get(a:000, 0, 0) call unite#custom#profile(a:profile, 'substitute_patterns', { \ 'pattern': a:pattern, @@ -147,7 +147,7 @@ \ }) endfunction"}}} -function! s:custom_base(key, kind, name, value) abort "{{{ +function! s:custom_base(key, kind, name, value) "{{{ let custom = unite#custom#get()[a:key] for key in split(a:kind, '\s*,\s*') === modified file 'vim/bundle/unite.vim/autoload/unite/exrename.vim' --- vim/bundle/unite.vim/autoload/unite/exrename.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/exrename.vim 2015-08-25 11:01:00 +0000 @@ -25,11 +25,11 @@ " }}} "============================================================================= let s:PREFIX = unite#util#is_windows() ? '[exrename]' : '*exrename*' -function! s:void(exrename) abort +function! s:void(exrename) endfunction let s:VOID = function('s:void') -function! unite#exrename#create_buffer(candidates, ...) abort "{{{ +function! unite#exrename#create_buffer(candidates, ...) "{{{ let options = extend({ \ 'cwd': getcwd(), \ 'bufnr': bufnr('%'), @@ -80,8 +80,7 @@ let candidate.action__path = b:exrename.cwd . candidate.action__path endif " make sure that the 'action__path' exists - if !filewritable(candidate.action__path) - \ && !isdirectory(candidate.action__path) + if !filewritable(candidate.action__path) && !isdirectory(candidate.action__path) redraw echo candidate.action__path "does not exist. Skip." continue @@ -98,8 +97,7 @@ let filename = filename[len(b:exrename.cwd) :] endif " directory should end with a trailing slash (to distinguish easily) - if get(candidate, 'vimfiler__is_directory', - \ get(candidate, 'kind', '') == 'directory') + if get(candidate, 'vimfiler__is_directory', get(candidate, 'kind', '') == 'directory') let filename .= '/' endif @@ -117,11 +115,11 @@ setlocal nomodified endfunction"}}} -function! s:is_absolute(path) abort "{{{ +function! s:is_absolute(path) "{{{ return a:path =~# '^\%(\a\a\+:\)\|^\%(\a:\|/\)' endfunction "}}} -function! s:do_rename() abort "{{{ +function! s:do_rename() "{{{ if line('$') != len(b:exrename.filenames) echohl Error | echo 'Invalid rename buffer!' | echohl None return @@ -143,12 +141,7 @@ if new_file !~ '^\%(\a\a\+:\)\|^\%(\a:\|/\)' let new_file = b:exrename.cwd . new_file endif - - if unite#kinds#file#do_rename(old_file, new_file) - " Rename error - continue - endif - + call unite#kinds#file#do_rename(old_file, new_file) " update b:exrename let b:exrename.filenames[linenr - 1] = getline(linenr) let b:exrename.candidates[linenr - 1].action__path = new_file @@ -166,7 +159,7 @@ endif endfunction"}}} -function! s:exit(bufnr) abort "{{{ +function! s:exit(bufnr) "{{{ if !bufexists(a:bufnr) return endif @@ -180,7 +173,7 @@ silent execute 'bdelete!' a:bufnr endfunction "}}} -function! s:check_lines() abort "{{{ +function! s:check_lines() "{{{ if !exists('b:exrename') return endif @@ -191,7 +184,7 @@ endif endfunction "}}} -function! s:custom_alternate_buffer() abort "{{{ +function! s:custom_alternate_buffer() "{{{ if bufnr('%') != bufnr('#') && buflisted(bufnr('#')) buffer # endif === modified file 'vim/bundle/unite.vim/autoload/unite/filters.vim' --- vim/bundle/unite.vim/autoload/unite/filters.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/filters.vim 2015-08-25 11:01:00 +0000 @@ -27,7 +27,7 @@ set cpo&vim " filter() for matchers. -function! unite#filters#filter_matcher(list, expr, context) abort "{{{ +function! unite#filters#filter_matcher(list, expr, context) "{{{ if a:context.unite__max_candidates <= 0 \ || a:expr == '' \ || !a:context.unite__is_interactive @@ -36,10 +36,10 @@ return a:expr == '' ? a:list : \ (a:expr ==# 'if_lua') ? \ unite#filters#lua_matcher( - \ a:list, a:context.input_lua, &ignorecase) : + \ a:list, a:context, &ignorecase) : \ (a:expr ==# 'if_lua_fuzzy') ? \ unite#filters#lua_fuzzy_matcher( - \ a:list, a:context.input_lua, &ignorecase) : + \ a:list, a:context, &ignorecase) : \ filter(a:list, a:expr) endif @@ -52,11 +52,9 @@ let list = a:list[cnt*offset : cnt*offset + offset] let list = \ (a:expr ==# 'if_lua') ? - \ unite#filters#lua_matcher( - \ list, a:context.input_lua, &ignorecase) : + \ unite#filters#lua_matcher(list, a:context, &ignorecase) : \ (a:expr ==# 'if_lua_fuzzy') ? - \ unite#filters#lua_fuzzy_matcher( - \ list, a:context.input_lua, &ignorecase) : + \ unite#filters#lua_fuzzy_matcher(list, a:context, &ignorecase) : \ filter(list, a:expr) let len += len(list) let _ += list @@ -68,14 +66,16 @@ return _[: max] endfunction"}}} - -" @vimlint(EVL102, 1, l:input) -function! unite#filters#lua_matcher(candidates, input, ignorecase) abort "{{{ +function! unite#filters#lua_matcher(candidates, context, ignorecase) "{{{ if !has('lua') return [] endif - let input = a:ignorecase ? tolower(a:input) : a:input + let input = substitute(a:context.input, '\\ ', ' ', 'g') + let input = substitute(input, '\\\(.\)', '\1', 'g') + if a:ignorecase + let input = tolower(input) + endif lua << EOF do @@ -99,20 +99,15 @@ return a:candidates endfunction"}}} -" @vimlint(EVL102, 0, l:input) - -" @vimlint(EVL102, 1, l:input) -function! unite#filters#lua_fuzzy_matcher(candidates, input, ignorecase) abort "{{{ +function! unite#filters#lua_fuzzy_matcher(candidates, context, ignorecase) "{{{ if !has('lua') return [] endif - let input = a:ignorecase ? tolower(a:input) : a:input - lua << EOF do - local pattern = vim.eval('unite#filters#fuzzy_escape(input)') - local input = vim.eval('input') + local pattern = vim.eval('unite#filters#fuzzy_escape(a:context.input)') + local input = vim.eval('a:context.input') local candidates = vim.eval('a:candidates') if vim.eval('a:ignorecase') ~= 0 then pattern = string.lower(pattern) @@ -136,9 +131,8 @@ return a:candidates endfunction"}}} -" @vimlint(EVL102, 0, l:input) -function! unite#filters#fuzzy_escape(string) abort "{{{ +function! unite#filters#fuzzy_escape(string) "{{{ " Escape string for lua regexp. let [head, input] = unite#filters#matcher_fuzzy#get_fuzzy_input( \ unite#filters#escape(a:string)) @@ -146,7 +140,7 @@ \ '\%([[:alnum:]_/-]\|%.\)\ze.', '\0.-', 'g') endfunction"}}} -function! unite#filters#escape(string) abort "{{{ +function! unite#filters#escape(string) "{{{ " Escape string for lua regexp. return substitute(substitute(substitute(substitute(a:string, \ '\\ ', ' ', 'g'), @@ -155,7 +149,7 @@ \ '\*\*\+', '.*', 'g') endfunction"}}} -function! unite#filters#lua_filter_head(candidates, input) abort "{{{ +function! unite#filters#lua_filter_head(candidates, input) "{{{ lua << EOF do local input = vim.eval('tolower(a:input)') @@ -173,26 +167,26 @@ return a:candidates endfunction"}}} -function! unite#filters#vim_filter_head(candidates, input) abort "{{{ +function! unite#filters#vim_filter_head(candidates, input) "{{{ let input = tolower(a:input) return filter(a:candidates, \ "stridx(tolower(get(v:val, 'action__path', \ v:val.word)), input) == 0") endfunction"}}} -function! unite#filters#vim_filter_pattern(candidates, pattern) abort "{{{ +function! unite#filters#vim_filter_pattern(candidates, pattern) "{{{ return filter(a:candidates, \ "get(v:val, 'action__path', v:val.word) !~? a:pattern") endfunction"}}} -function! unite#filters#filter_patterns(candidates, patterns, whites) abort "{{{ +function! unite#filters#filter_patterns(candidates, patterns, whites) "{{{ return unite#util#has_lua()? \ unite#filters#lua_filter_patterns( \ a:candidates, a:patterns, a:whites) : \ unite#filters#vim_filter_patterns( \ a:candidates, a:patterns, a:whites) endfunction"}}} -function! unite#filters#lua_filter_patterns(candidates, patterns, whites) abort "{{{ +function! unite#filters#lua_filter_patterns(candidates, patterns, whites) "{{{ lua << EOF do local patterns = vim.eval('a:patterns') @@ -224,7 +218,7 @@ return a:candidates endfunction"}}} " @vimlint(EVL102, 1, l:pattern) -function! unite#filters#vim_filter_patterns(candidates, patterns, whites) abort "{{{ +function! unite#filters#vim_filter_patterns(candidates, patterns, whites) "{{{ let pattern = join(a:patterns, '\|') let white = join(a:whites, '\|') return filter(a:candidates, @@ -233,15 +227,15 @@ endfunction"}}} " @vimlint(EVL102, 0, l:pattern) -function! unite#filters#globs2patterns(globs) abort "{{{ +function! unite#filters#globs2patterns(globs) "{{{ return unite#util#has_lua() ? \ unite#filters#globs2lua_patterns(a:globs) : \ unite#filters#globs2vim_patterns(a:globs) endfunction"}}} -function! unite#filters#globs2vim_patterns(globs) abort "{{{ +function! unite#filters#globs2vim_patterns(globs) "{{{ return map(copy(a:globs), 's:glob2_pattern(v:val, 0)') endfunction"}}} -function! unite#filters#globs2lua_patterns(globs) abort "{{{ +function! unite#filters#globs2lua_patterns(globs) "{{{ return map(copy(a:globs), 's:glob2_pattern(v:val, 1)') endfunction"}}} function! s:glob2_pattern(glob, is_lua) abort "{{{ @@ -274,63 +268,6 @@ return glob endfunction"}}} -function! unite#filters#uniq(list) abort "{{{ - let dict = {} - for word in a:list - let key = matchstr(word, '[^/]\+/\?$') - if key == '' - let key = word - endif - if !has_key(dict, key) - let dict[key] = [word] - else - call add(dict[key], word) - endif - endfor - - " Remove the unique keys - for key in keys(dict) - if len(dict[key]) == 1 - call remove(dict, key) - else - let dict[key] = unite#filters#common_string(dict[key]) - endif - endfor - - let uniq = [] - for word in a:list - let key = matchstr(word, '[^/]\+/\?$') - if key != '' - if !has_key(dict, key) - let word = key - elseif dict[key] != '/' && dict[key] != '' - let rest = split(word[len(dict[key]):], '/', 1) - let word = '.../' . (len(rest) > 3 ? - \ (rest[0] . '/.../' . rest[-2] . '/' . rest[-1]) : - \ join(rest, '/')) - endif - endif - call add(uniq, word) - endfor - return uniq -endfunction"}}} -function! unite#filters#common_string(list) abort "{{{ - if empty(a:list) - return '' - endif - let splits = split(a:list[0], '/', 1) - let common_str = join(splits[: -2], '/') . '/' - let splits = splits[: -2] - for word in a:list[1:] - while common_str != '/' && stridx(word, common_str) != 0 - let common_str = join(splits[: -2], '/') . '/' - let splits = splits[: -2] - endwhile - endfor - - return common_str -endfunction"}}} - let &cpo = s:save_cpo unlet s:save_cpo === removed file 'vim/bundle/unite.vim/autoload/unite/filters/converter_abbr_word.vim' --- vim/bundle/unite.vim/autoload/unite/filters/converter_abbr_word.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/filters/converter_abbr_word.vim 1970-01-01 00:00:00 +0000 @@ -1,49 +0,0 @@ -"============================================================================= -" FILE: converter_abbr_word.vim -" AUTHOR: Shougo Matsushita -" License: MIT license {{{ -" Permission is hereby granted, free of charge, to any person obtaining -" a copy of this software and associated documentation files (the -" "Software"), to deal in the Software without restriction, including -" without limitation the rights to use, copy, modify, merge, publish, -" distribute, sublicense, and/or sell copies of the Software, and to -" permit persons to whom the Software is furnished to do so, subject to -" the following conditions: -" -" The above copyright notice and this permission notice shall be included -" in all copies or substantial portions of the Software. -" -" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -" IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -" }}} -"============================================================================= - -let s:save_cpo = &cpo -set cpo&vim - -function! unite#filters#converter_abbr_word#define() abort "{{{ - return s:converter -endfunction"}}} - -let s:converter = { - \ 'name' : 'converter_abbr_word', - \ 'description' : 'abbr to word converter', - \} - -function! s:converter.filter(candidates, context) abort "{{{ - for candidate in a:candidates - let candidate.word = get(candidate, 'abbr', candidate.word) - endfor - - return a:candidates -endfunction"}}} - -let &cpo = s:save_cpo -unlet s:save_cpo - -" vim: foldmethod=marker === modified file 'vim/bundle/unite.vim/autoload/unite/filters/converter_default.vim' --- vim/bundle/unite.vim/autoload/unite/filters/converter_default.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/filters/converter_default.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#filters#converter_default#define() abort "{{{ +function! unite#filters#converter_default#define() "{{{ return s:converter endfunction"}}} @@ -35,7 +35,7 @@ \ 'description' : 'default converter', \} -function! s:converter.filter(candidates, context) abort "{{{ +function! s:converter.filter(candidates, context) "{{{ let candidates = a:candidates for default in s:default_converters let filter = unite#get_filters(default) @@ -49,10 +49,10 @@ let s:default_converters = ['converter_nothing'] -function! unite#filters#converter_default#get() abort "{{{ +function! unite#filters#converter_default#get() "{{{ return s:default_converters endfunction"}}} -function! unite#filters#converter_default#use(converters) abort "{{{ +function! unite#filters#converter_default#use(converters) "{{{ let s:default_converters = type(a:converters) == type([]) ? \ a:converters : [a:converters] endfunction"}}} === modified file 'vim/bundle/unite.vim/autoload/unite/filters/converter_file_directory.vim' --- vim/bundle/unite.vim/autoload/unite/filters/converter_file_directory.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/filters/converter_file_directory.vim 2015-08-25 11:01:00 +0000 @@ -27,7 +27,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#filters#converter_file_directory#define() abort "{{{ +function! unite#filters#converter_file_directory#define() "{{{ return s:converter endfunction"}}} @@ -36,7 +36,7 @@ \ 'description' : 'converter to separate file and directory', \} -function! s:converter.filter(candidates, context) abort +function! s:converter.filter(candidates, context) let candidates = copy(a:candidates) let max = min([max(map(copy(candidates), " @@ -60,7 +60,7 @@ return candidates endfunction -function! s:convert_to_abbr(path) abort +function! s:convert_to_abbr(path) return printf('%s (%s)', fnamemodify(a:path, ':p:t'), \ fnamemodify(a:path, ':p:h:t')) endfunction === modified file 'vim/bundle/unite.vim/autoload/unite/filters/converter_full_path.vim' --- vim/bundle/unite.vim/autoload/unite/filters/converter_full_path.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/filters/converter_full_path.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#filters#converter_full_path#define() abort "{{{ +function! unite#filters#converter_full_path#define() "{{{ return s:converter endfunction"}}} @@ -35,7 +35,7 @@ \ 'description' : 'converts word to full path of filename', \} -function! s:converter.filter(candidates, context) abort "{{{ +function! s:converter.filter(candidates, context) "{{{ for candidate in a:candidates if !has_key(candidate, 'abbr') " Save original word. === modified file 'vim/bundle/unite.vim/autoload/unite/filters/converter_nothing.vim' --- vim/bundle/unite.vim/autoload/unite/filters/converter_nothing.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/filters/converter_nothing.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#filters#converter_nothing#define() abort "{{{ +function! unite#filters#converter_nothing#define() "{{{ return s:converter endfunction"}}} @@ -35,7 +35,7 @@ \ 'description' : 'nothing converter', \} -function! s:converter.filter(candidates, context) abort "{{{ +function! s:converter.filter(candidates, context) "{{{ " Nothing. return a:candidates endfunction"}}} === modified file 'vim/bundle/unite.vim/autoload/unite/filters/converter_relative_abbr.vim' --- vim/bundle/unite.vim/autoload/unite/filters/converter_relative_abbr.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/filters/converter_relative_abbr.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#filters#converter_relative_abbr#define() abort "{{{ +function! unite#filters#converter_relative_abbr#define() "{{{ return s:converter endfunction"}}} @@ -35,7 +35,7 @@ \ 'description' : 'relative path abbr converter', \} -function! s:converter.filter(candidates, context) abort "{{{ +function! s:converter.filter(candidates, context) "{{{ try let directory = unite#util#substitute_path_separator(getcwd()) let old_dir = directory === modified file 'vim/bundle/unite.vim/autoload/unite/filters/converter_relative_word.vim' --- vim/bundle/unite.vim/autoload/unite/filters/converter_relative_word.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/filters/converter_relative_word.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#filters#converter_relative_word#define() abort "{{{ +function! unite#filters#converter_relative_word#define() "{{{ return s:converter endfunction"}}} @@ -35,7 +35,7 @@ \ 'description' : 'relative path word converter', \} -function! s:converter.filter(candidates, context) abort "{{{ +function! s:converter.filter(candidates, context) "{{{ if a:context.input =~ '^\%(/\|\a\+:/\)' " Use full path. return unite#filters#converter_full_path#define().filter( @@ -74,7 +74,7 @@ return a:candidates endfunction"}}} -function! unite#filters#converter_relative_word#lua(candidates, cwd) abort "{{{ +function! unite#filters#converter_relative_word#lua(candidates, cwd) "{{{ let cwd = a:cwd if cwd != '/' && cwd[-1:] != '/' let cwd .= '/' === modified file 'vim/bundle/unite.vim/autoload/unite/filters/converter_smart_path.vim' --- vim/bundle/unite.vim/autoload/unite/filters/converter_smart_path.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/filters/converter_smart_path.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#filters#converter_smart_path#define() abort "{{{ +function! unite#filters#converter_smart_path#define() "{{{ return s:converter endfunction"}}} @@ -35,7 +35,7 @@ \ 'description' : 'converts word to smart path of filename', \} -function! s:converter.filter(candidates, context) abort "{{{ +function! s:converter.filter(candidates, context) "{{{ if a:context.input =~ '^\%(\a\+:/\|/\)' return unite#filters#converter_full_path#define().filter( \ a:candidates, a:context) === modified file 'vim/bundle/unite.vim/autoload/unite/filters/converter_tail.vim' --- vim/bundle/unite.vim/autoload/unite/filters/converter_tail.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/filters/converter_tail.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#filters#converter_tail#define() abort "{{{ +function! unite#filters#converter_tail#define() "{{{ return s:converter endfunction"}}} @@ -35,7 +35,7 @@ \ 'description' : 'converts word to tail of filename', \} -function! s:converter.filter(candidates, context) abort "{{{ +function! s:converter.filter(candidates, context) "{{{ for candidate in a:candidates if !has_key(candidate, 'abbr') " Save original word. === modified file 'vim/bundle/unite.vim/autoload/unite/filters/converter_tail_abbr.vim' --- vim/bundle/unite.vim/autoload/unite/filters/converter_tail_abbr.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/filters/converter_tail_abbr.vim 2015-08-25 11:01:00 +0000 @@ -27,7 +27,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#filters#converter_tail_abbr#define() abort "{{{ +function! unite#filters#converter_tail_abbr#define() "{{{ return s:converter endfunction"}}} @@ -36,10 +36,9 @@ \ 'description' : 'converts abbr to tail of filename', \} -function! s:converter.filter(candidates, context) abort "{{{ +function! s:converter.filter(candidates, context) "{{{ for candidate in a:candidates - let candidate.abbr = fnamemodify(get(candidate, - \ 'action__path', candidate.word), ':t') + let candidate.abbr = fnamemodify(get(candidate, 'action__path', candidate.word), ':t') endfor return a:candidates endfunction"}}} === removed file 'vim/bundle/unite.vim/autoload/unite/filters/converter_uniq_word.vim' --- vim/bundle/unite.vim/autoload/unite/filters/converter_uniq_word.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/filters/converter_uniq_word.vim 1970-01-01 00:00:00 +0000 @@ -1,52 +0,0 @@ -"============================================================================= -" FILE: converter_uniq_word.vim -" AUTHOR: Shougo Matsushita -" License: MIT license {{{ -" Permission is hereby granted, free of charge, to any person obtaining -" a copy of this software and associated documentation files (the -" "Software"), to deal in the Software without restriction, including -" without limitation the rights to use, copy, modify, merge, publish, -" distribute, sublicense, and/or sell copies of the Software, and to -" permit persons to whom the Software is furnished to do so, subject to -" the following conditions: -" -" The above copyright notice and this permission notice shall be included -" in all copies or substantial portions of the Software. -" -" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -" IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -" }}} -"============================================================================= - -let s:save_cpo = &cpo -set cpo&vim - -function! unite#filters#converter_uniq_word#define() abort "{{{ - return s:converter -endfunction"}}} - -let s:converter = { - \ 'name' : 'converter_uniq_word', - \ 'description' : 'converts word to unique of the filenames', - \} - -function! s:converter.filter(candidates, context) abort "{{{ - let uniq = unite#filters#uniq(map(copy(a:candidates), 'v:val.word')) - let cnt = 0 - for candidate in a:candidates - let candidate.word = uniq[cnt] - let cnt += 1 - endfor - - return a:candidates -endfunction"}}} - -let &cpo = s:save_cpo -unlet s:save_cpo - -" vim: foldmethod=marker === removed file 'vim/bundle/unite.vim/autoload/unite/filters/converter_word_abbr.vim' --- vim/bundle/unite.vim/autoload/unite/filters/converter_word_abbr.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/filters/converter_word_abbr.vim 1970-01-01 00:00:00 +0000 @@ -1,49 +0,0 @@ -"============================================================================= -" FILE: converter_word_abbr.vim -" AUTHOR: Shougo Matsushita -" License: MIT license {{{ -" Permission is hereby granted, free of charge, to any person obtaining -" a copy of this software and associated documentation files (the -" "Software"), to deal in the Software without restriction, including -" without limitation the rights to use, copy, modify, merge, publish, -" distribute, sublicense, and/or sell copies of the Software, and to -" permit persons to whom the Software is furnished to do so, subject to -" the following conditions: -" -" The above copyright notice and this permission notice shall be included -" in all copies or substantial portions of the Software. -" -" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -" IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -" }}} -"============================================================================= - -let s:save_cpo = &cpo -set cpo&vim - -function! unite#filters#converter_word_abbr#define() abort "{{{ - return s:converter -endfunction"}}} - -let s:converter = { - \ 'name' : 'converter_word_abbr', - \ 'description' : 'word to abbr converter', - \} - -function! s:converter.filter(candidates, context) abort "{{{ - for candidate in a:candidates - let candidate.abbr = candidate.word - endfor - - return a:candidates -endfunction"}}} - -let &cpo = s:save_cpo -unlet s:save_cpo - -" vim: foldmethod=marker === modified file 'vim/bundle/unite.vim/autoload/unite/filters/matcher_context.vim' --- vim/bundle/unite.vim/autoload/unite/filters/matcher_context.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/filters/matcher_context.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#filters#matcher_context#define() abort "{{{ +function! unite#filters#matcher_context#define() "{{{ return s:matcher endfunction"}}} @@ -35,7 +35,7 @@ \ 'description' : 'context matcher', \} -function! s:matcher.filter(candidates, context) abort "{{{ +function! s:matcher.filter(candidates, context) "{{{ if a:context.input == '' return unite#filters#filter_matcher( \ a:candidates, '', a:context) @@ -55,7 +55,7 @@ return candidates endfunction"}}} -function! s:matcher.pattern(input) abort "{{{ +function! s:matcher.pattern(input) "{{{ return (a:input =~# '\^.*') ? \ unite#filters#matcher_regexp#define().pattern(a:input) : \ unite#filters#matcher_glob#define().pattern(a:input) === modified file 'vim/bundle/unite.vim/autoload/unite/filters/matcher_default.vim' --- vim/bundle/unite.vim/autoload/unite/filters/matcher_default.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/filters/matcher_default.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#filters#matcher_default#define() abort "{{{ +function! unite#filters#matcher_default#define() "{{{ return s:matcher endfunction"}}} @@ -35,7 +35,7 @@ \ 'description' : 'default matcher', \} -function! s:matcher.pattern(input) abort "{{{ +function! s:matcher.pattern(input) "{{{ let patterns = map(filter(copy(map(copy(s:default_matchers), \ 'unite#get_filters(v:val)')), \ "v:val != self && has_key(v:val, 'pattern')"), @@ -43,7 +43,7 @@ return join(patterns,'\|') endfunction"}}} -function! s:matcher.filter(candidates, context) abort "{{{ +function! s:matcher.filter(candidates, context) "{{{ let candidates = a:candidates for default in s:default_matchers let filter = unite#get_filters(default) @@ -57,10 +57,10 @@ let s:default_matchers = ['matcher_context'] -function! unite#filters#matcher_default#get() abort "{{{ +function! unite#filters#matcher_default#get() "{{{ return s:default_matchers endfunction"}}} -function! unite#filters#matcher_default#use(matchers) abort "{{{ +function! unite#filters#matcher_default#use(matchers) "{{{ let s:default_matchers = unite#util#convert2list(a:matchers) endfunction"}}} === modified file 'vim/bundle/unite.vim/autoload/unite/filters/matcher_fuzzy.vim' --- vim/bundle/unite.vim/autoload/unite/filters/matcher_fuzzy.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/filters/matcher_fuzzy.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#filters#matcher_fuzzy#define() abort "{{{ +function! unite#filters#matcher_fuzzy#define() "{{{ return s:matcher endfunction"}}} @@ -37,7 +37,7 @@ \ 'description' : 'fuzzy matcher', \} -function! s:matcher.pattern(input) abort "{{{ +function! s:matcher.pattern(input) "{{{ let chars = map(split(a:input, '\zs'), "escape(v:val, '\\[]^$.*')") if empty(chars) return '' @@ -50,7 +50,7 @@ return pattern endfunction"}}} -function! s:matcher.filter(candidates, context) abort "{{{ +function! s:matcher.filter(candidates, context) "{{{ if a:context.input == '' return unite#filters#filter_matcher( \ a:candidates, '', a:context) @@ -66,7 +66,8 @@ let $LC_NUMERIC = 'en_US.utf8' let candidates = a:candidates - for input in a:context.input_list + for input_orig in a:context.input_list + let input = substitute(unite#util#expand(input_orig), '\\ ', ' ', 'g') if input == '!' || input == '' continue elseif input =~ '^:' @@ -75,14 +76,14 @@ continue endif - let pattern = s:matcher.pattern(input) + let input = s:matcher.pattern(input) - let expr = (pattern =~ '^!') ? - \ 'v:val.word !~ ' . string(pattern[1:]) : - \ 'v:val.word =~ ' . string(pattern) + let expr = (input =~ '^!') ? + \ 'v:val.word !~ ' . string(input[1:]) : + \ 'v:val.word =~ ' . string(input) if input !~ '^!' && unite#util#has_lua() let expr = 'if_lua_fuzzy' - let a:context.input_lua = input + let a:context.input = input_orig endif let candidates = unite#filters#filter_matcher( @@ -92,7 +93,7 @@ return candidates endfunction"}}} -function! unite#filters#matcher_fuzzy#get_fuzzy_input(input) abort "{{{ +function! unite#filters#matcher_fuzzy#get_fuzzy_input(input) "{{{ let input = a:input let head = '' if len(input) > g:unite_matcher_fuzzy_max_input_length === modified file 'vim/bundle/unite.vim/autoload/unite/filters/matcher_glob.vim' --- vim/bundle/unite.vim/autoload/unite/filters/matcher_glob.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/filters/matcher_glob.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#filters#matcher_glob#define() abort "{{{ +function! unite#filters#matcher_glob#define() "{{{ return s:matcher endfunction"}}} @@ -35,12 +35,12 @@ \ 'description' : 'glob matcher', \} -function! s:matcher.pattern(input) abort "{{{ +function! s:matcher.pattern(input) "{{{ return substitute(unite#util#escape_match(a:input), \ '\\\@= 0 return a:candidates endif === modified file 'vim/bundle/unite.vim/autoload/unite/filters/matcher_migemo.vim' --- vim/bundle/unite.vim/autoload/unite/filters/matcher_migemo.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/filters/matcher_migemo.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#filters#matcher_migemo#define() abort "{{{ +function! unite#filters#matcher_migemo#define() "{{{ if !has('migemo') && !executable('cmigemo') " Not supported. return {} @@ -44,7 +44,7 @@ return s:matcher endfunction"}}} -function! s:search_dict() abort +function! s:search_dict() let dict = s:search_dict2('cmigemo/'.&encoding.'/migemo-dict') if dict == '' let dict = s:search_dict2('migemo/'.&encoding.'/migemo-dict') @@ -59,7 +59,7 @@ return dict endfunction -function! s:search_dict2(name) abort +function! s:search_dict2(name) let path = $VIM . ',' . &runtimepath let dict = globpath(path, 'dict/'.a:name) if dict == '' @@ -85,7 +85,7 @@ \ 'description' : 'migemo matcher', \} -function! s:matcher.filter(candidates, context) abort "{{{ +function! s:matcher.filter(candidates, context) "{{{ if a:context.input == '' return a:candidates endif @@ -118,11 +118,11 @@ return candidates endfunction"}}} -function! s:matcher.pattern(input) abort "{{{ +function! s:matcher.pattern(input) "{{{ return s:get_migemo_pattern(a:input) endfunction"}}} -function! s:get_migemo_pattern(input) abort +function! s:get_migemo_pattern(input) if has('migemo') " Use migemo(). return migemo(a:input) === modified file 'vim/bundle/unite.vim/autoload/unite/filters/matcher_project_files.vim' --- vim/bundle/unite.vim/autoload/unite/filters/matcher_project_files.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/filters/matcher_project_files.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#filters#matcher_project_files#define() abort "{{{ +function! unite#filters#matcher_project_files#define() "{{{ return s:matcher endfunction"}}} @@ -35,7 +35,7 @@ \ 'description' : 'project files matcher', \} -function! s:matcher.filter(candidates, context) abort "{{{ +function! s:matcher.filter(candidates, context) "{{{ let path = a:context.path != '' ? a:context.path : getcwd() let project = unite#util#path2project_directory(path) . '/' === modified file 'vim/bundle/unite.vim/autoload/unite/filters/matcher_project_ignore_files.vim' --- vim/bundle/unite.vim/autoload/unite/filters/matcher_project_ignore_files.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/filters/matcher_project_ignore_files.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#filters#matcher_project_ignore_files#define() abort "{{{ +function! unite#filters#matcher_project_ignore_files#define() "{{{ return s:matcher endfunction"}}} @@ -37,7 +37,7 @@ let s:cache_ignore_files = {} -function! s:matcher.filter(candidates, context) abort "{{{ +function! s:matcher.filter(candidates, context) "{{{ let path = a:context.path != '' ? a:context.path : getcwd() let project = unite#util#path2project_directory(path) . '/' @@ -63,7 +63,7 @@ \ a:context.filter__project_ignore_whites) endfunction"}}} -function! unite#filters#matcher_project_ignore_files#get_ignore_results(path) abort "{{{ +function! unite#filters#matcher_project_ignore_files#get_ignore_results(path) "{{{ let globs = [] let whites = [] for ignore in [ @@ -81,7 +81,7 @@ \ unite#filters#globs2patterns(whites)] endfunction"}}} -function! s:parse_ignore_file(file, prefix) abort "{{{ +function! s:parse_ignore_file(file, prefix) "{{{ " Note: whitelist "!glob" and "syntax: regexp" in .hgignore features is not " supported. let patterns = [] === modified file 'vim/bundle/unite.vim/autoload/unite/filters/matcher_regexp.vim' --- vim/bundle/unite.vim/autoload/unite/filters/matcher_regexp.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/filters/matcher_regexp.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#filters#matcher_regexp#define() abort "{{{ +function! unite#filters#matcher_regexp#define() "{{{ return s:matcher endfunction"}}} @@ -35,11 +35,11 @@ \ 'description' : 'regular expression matcher', \} -function! s:matcher.pattern(input) abort "{{{ +function! s:matcher.pattern(input) "{{{ return a:input endfunction"}}} -function! s:matcher.filter(candidates, context) abort "{{{ +function! s:matcher.filter(candidates, context) "{{{ if a:context.input == '' return unite#filters#filter_matcher( \ a:candidates, '', a:context) @@ -47,9 +47,6 @@ let candidates = a:candidates for input in a:context.input_list - if input == '!' || input == '' - continue - endif let a:context.input = input let candidates = unite#filters#matcher_regexp#regexp_matcher( \ candidates, input, a:context) @@ -58,7 +55,7 @@ return candidates endfunction"}}} -function! unite#filters#matcher_regexp#regexp_matcher(candidates, input, context) abort "{{{ +function! unite#filters#matcher_regexp#regexp_matcher(candidates, input, context) "{{{ let expr = unite#filters#matcher_regexp#get_expr(a:input, a:context) try @@ -67,7 +64,7 @@ return [] endtry endfunction"}}} -function! unite#filters#matcher_regexp#get_expr(input, context) abort "{{{ +function! unite#filters#matcher_regexp#get_expr(input, context) "{{{ let input = a:input if input =~ '^!' @@ -84,7 +81,6 @@ elseif input !~ '[~\\.^$\[\]*]' if unite#util#has_lua() let expr = 'if_lua' - let a:context.input_lua = input else " Optimized filter. let input = substitute(input, '\\\(.\)', '\1', 'g') === modified file 'vim/bundle/unite.vim/autoload/unite/filters/sorter_default.vim' --- vim/bundle/unite.vim/autoload/unite/filters/sorter_default.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/filters/sorter_default.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#filters#sorter_default#define() abort "{{{ +function! unite#filters#sorter_default#define() "{{{ return s:sorter endfunction"}}} @@ -35,7 +35,7 @@ \ 'description' : 'default sorter', \} -function! s:sorter.filter(candidates, context) abort "{{{ +function! s:sorter.filter(candidates, context) "{{{ let candidates = a:candidates for default in s:default_sorters let filter = unite#get_filters(default) @@ -49,10 +49,10 @@ let s:default_sorters = ['sorter_nothing'] -function! unite#filters#sorter_default#get() abort "{{{ +function! unite#filters#sorter_default#get() "{{{ return s:default_sorters endfunction"}}} -function! unite#filters#sorter_default#use(sorters) abort "{{{ +function! unite#filters#sorter_default#use(sorters) "{{{ let s:default_sorters = type(a:sorters) == type([]) ? \ a:sorters : [a:sorters] endfunction"}}} === modified file 'vim/bundle/unite.vim/autoload/unite/filters/sorter_ftime.vim' --- vim/bundle/unite.vim/autoload/unite/filters/sorter_ftime.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/filters/sorter_ftime.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#filters#sorter_ftime#define() abort "{{{ +function! unite#filters#sorter_ftime#define() "{{{ return s:sorter endfunction"}}} @@ -35,7 +35,7 @@ \ 'description' : 'sort by getftime() order', \} -function! s:sorter.filter(candidates, context) abort "{{{ +function! s:sorter.filter(candidates, context) "{{{ return unite#util#sort_by(a:candidates, " \ has_key(v:val, 'action__path') ? \ getftime(v:val.action__path) === modified file 'vim/bundle/unite.vim/autoload/unite/filters/sorter_length.vim' --- vim/bundle/unite.vim/autoload/unite/filters/sorter_length.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/filters/sorter_length.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#filters#sorter_length#define() abort "{{{ +function! unite#filters#sorter_length#define() "{{{ return s:sorter endfunction"}}} @@ -35,7 +35,7 @@ \ 'description' : 'sort by length order', \} -function! s:sorter.filter(candidates, context) abort "{{{ +function! s:sorter.filter(candidates, context) "{{{ return unite#util#sort_by(a:candidates, \ "len(v:val.word) + 100*len(substitute(v:val.word, '[^/]', '', 'g'))") endfunction"}}} === modified file 'vim/bundle/unite.vim/autoload/unite/filters/sorter_nothing.vim' --- vim/bundle/unite.vim/autoload/unite/filters/sorter_nothing.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/filters/sorter_nothing.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#filters#sorter_nothing#define() abort "{{{ +function! unite#filters#sorter_nothing#define() "{{{ return s:sorter endfunction"}}} @@ -35,7 +35,7 @@ \ 'description' : 'nothing sorter', \} -function! s:sorter.filter(candidates, context) abort "{{{ +function! s:sorter.filter(candidates, context) "{{{ " Nothing. return a:candidates endfunction"}}} === modified file 'vim/bundle/unite.vim/autoload/unite/filters/sorter_rank.vim' --- vim/bundle/unite.vim/autoload/unite/filters/sorter_rank.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/filters/sorter_rank.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#filters#sorter_rank#define() abort "{{{ +function! unite#filters#sorter_rank#define() "{{{ return s:sorter endfunction"}}} @@ -35,16 +35,16 @@ \ 'description' : 'sort by matched rank order', \} -function! s:sorter.filter(candidates, context) abort "{{{ +function! s:sorter.filter(candidates, context) "{{{ if a:context.input == '' || !has('float') || empty(a:candidates) return a:candidates endif return unite#filters#sorter_rank#_sort( - \ a:candidates, a:context.input_list, unite#util#has_lua()) + \ a:candidates, a:context.input, unite#util#has_lua()) endfunction"}}} -function! unite#filters#sorter_rank#_sort(candidates, input_list, has_lua) abort "{{{ +function! unite#filters#sorter_rank#_sort(candidates, input, has_lua) "{{{ " Initialize. let is_path = has_key(a:candidates[0], 'action__path') for candidate in a:candidates @@ -54,8 +54,9 @@ endfor - let inputs = map(a:input_list, " - \ tolower(substitute(v:val, '\\*', '', 'g'))") + let inputs = map(split(a:input, '\\\@:p:h') let s:sorter = { \ 'name' : 'sorter_selecta', \ 'description' : 'sort by selecta algorithm', \} -if exists(':Python2or3') != 2 - if has('python3') && get(g:, 'pymode_python', '') !=# 'python' - command! -nargs=1 Python2or3 python3 - else - command! -nargs=1 Python2or3 python - endif -endif - -function! s:sorter.filter(candidates, context) abort +function! s:sorter.filter(candidates, context) if a:context.input == '' || !has('float') || empty(a:candidates) return a:candidates endif @@ -60,7 +50,7 @@ \ a:candidates, a:context.input) endfunction -function! unite#filters#sorter_selecta#_sort(candidates, input) abort +function! unite#filters#sorter_selecta#_sort(candidates, input) " Initialize. let is_path = has_key(a:candidates[0], 'action__path') for candidate in a:candidates @@ -74,17 +64,20 @@ \ tolower(substitute(substitute(v:val, '\\\\ ', ' ', 'g'), \ '\\*', '', 'g'))") - let candidates = s:sort_python(a:candidates, inputs) + let candidates = s:sort_ruby(a:candidates, inputs) return candidates endfunction " @vimlint(EVL102, 1, l:input) " @vimlint(EVL102, 1, l:candidate) -function! s:sort_python(candidates, inputs) abort +function! s:sort_ruby(candidates, inputs) for input in a:inputs for candidate in a:candidates - Python2or3 score() +ruby << RUBYEOF + score = Score.score(VIM::evaluate('candidate.word'), VIM::evaluate('input')) + VIM::command("let candidate.filter__rank += #{1.0 / score}") if score != 0 +RUBYEOF endfor endfor @@ -93,20 +86,72 @@ " @vimlint(EVL102, 0, l:input) " @vimlint(EVL102, 0, l:candidate) -" @vimlint(EVL102, 1, l:root) -function! s:def_python() abort - if !(has('python') || has('python3')) - return - endif - let root = s:root - Python2or3 import sys - Python2or3 import vim - Python2or3 sys.path.insert(0, vim.eval('root')) - Python2or3 from sorter_selecta import score +function! s:def_ruby() + ruby << RUBYEOF + class Score + class << self + def score(choice, query) + return 1.0 if query.length == 0 + return 0.0 if choice.length == 0 + + choice = choice.downcase + query = query.downcase + + match_length = compute_match_length(choice, query.each_char.to_a) + return 0.0 unless match_length + + # Penalize longer matches. + score = query.length.to_f / match_length.to_f + + # Normalize vs. the length of the choice, penalizing longer strings. + score / choice.length + end + + # Find the length of the shortest substring matching the given characters. + def compute_match_length(string, chars) + first_char, *rest = chars + first_indexes = find_char_in_string(string, first_char) + + first_indexes.map do |first_index| + last_index = find_end_of_match(string, rest, first_index) + if last_index + last_index - first_index + 1 + else + nil + end + end.compact.min + end + + # Find all occurrences of the character in the string, returning their indexes. + def find_char_in_string(string, char) + index = 0 + indexes = [] + while index + index = string.index(char, index) + if index + indexes << index + index += 1 + end + end + indexes + end + + # Find each of the characters in the string, moving strictly left to right. + def find_end_of_match(string, chars, first_index) + last_index = first_index + chars.each do |this_char| + index = string.index(this_char, last_index + 1) + return nil unless index + last_index = index + end + last_index + end + end + end +RUBYEOF endfunction -" @vimlint(EVL102, 0, l:root) -call s:def_python() +call s:def_ruby() let &cpo = s:save_cpo unlet s:save_cpo === modified file 'vim/bundle/unite.vim/autoload/unite/filters/sorter_word.vim' --- vim/bundle/unite.vim/autoload/unite/filters/sorter_word.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/filters/sorter_word.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#filters#sorter_word#define() abort "{{{ +function! unite#filters#sorter_word#define() "{{{ return s:sorter endfunction"}}} @@ -35,7 +35,7 @@ \ 'description' : 'sort by word order', \} -function! s:sorter.filter(candidates, context) abort "{{{ +function! s:sorter.filter(candidates, context) "{{{ return unite#util#sort_by(a:candidates, (&ignorecase ? \ 'tolower(v:val.word)' : 'v:val.word')) endfunction"}}} === modified file 'vim/bundle/unite.vim/autoload/unite/handlers.vim' --- vim/bundle/unite.vim/autoload/unite/handlers.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/handlers.vim 2015-08-25 11:01:00 +0000 @@ -26,11 +26,13 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#handlers#_on_insert_enter() abort "{{{ +function! unite#handlers#_on_insert_enter() "{{{ if &filetype !=# 'unite' return endif + setlocal modifiable + let unite = unite#get_current_unite() let unite.is_insert = 1 @@ -40,17 +42,11 @@ " Restore prompt let unite.prompt_linenr = unite.init_prompt_linenr - let modifiable_save = &l:modifiable - try - setlocal modifiable - call append((unite.context.prompt_direction ==# 'below' ? - \ '$' : 0), '') - finally - let &l:modifiable = modifiable_save - endtry + call append((unite.context.prompt_direction ==# 'below' ? + \ '$' : 0), '') call unite#view#_redraw_prompt() endfunction"}}} -function! unite#handlers#_on_insert_leave() abort "{{{ +function! unite#handlers#_on_insert_leave() "{{{ let unite = unite#get_current_unite() if line('.') != unite.prompt_linenr @@ -64,7 +60,7 @@ setlocal nomodifiable endif endfunction"}}} -function! unite#handlers#_on_cursor_hold_i() abort "{{{ +function! unite#handlers#_on_cursor_hold_i() "{{{ let unite = unite#get_current_unite() call unite#view#_change_highlight() @@ -74,12 +70,12 @@ call s:check_redraw() endif - if unite.is_async && &l:modifiable && !has('timers') + if unite.is_async && &l:modifiable " Ignore key sequences. call feedkeys("a\", 'n') endif endfunction"}}} -function! unite#handlers#_on_cursor_moved_i() abort "{{{ +function! unite#handlers#_on_cursor_moved_i() "{{{ let unite = unite#get_current_unite() let prompt_linenr = unite.prompt_linenr @@ -94,13 +90,13 @@ startinsert! endif endfunction"}}} -function! unite#handlers#_on_text_changed() abort "{{{ +function! unite#handlers#_on_text_changed() "{{{ let unite = unite#get_current_unite() if unite#helper#get_input(1) !=# unite.last_input call s:check_redraw() endif endfunction"}}} -function! unite#handlers#_on_bufwin_enter(bufnr) abort "{{{ +function! unite#handlers#_on_bufwin_enter(bufnr) "{{{ silent! let unite = getbufvar(a:bufnr, 'unite') if type(unite) != type({}) \ || bufwinnr(a:bufnr) < 1 @@ -112,7 +108,6 @@ execute bufwinnr(a:bufnr) 'wincmd w' endif - call unite#handlers#_init_timer() call unite#handlers#_save_updatetime() call s:restore_statusline() @@ -130,7 +125,7 @@ call unite#init#_tab_variables() let t:unite.last_unite_bufnr = a:bufnr endfunction"}}} -function! unite#handlers#_on_cursor_hold() abort "{{{ +function! unite#handlers#_on_cursor_hold() "{{{ let is_async = 0 call s:restore_statusline() @@ -159,12 +154,12 @@ endfor endif - if is_async && !has('timers') + if is_async " Ignore key sequences. call feedkeys("g\" . (v:count > 0 ? v:count : ''), 'n') endif endfunction"}}} -function! unite#handlers#_on_cursor_moved() abort "{{{ +function! unite#handlers#_on_cursor_moved() "{{{ if &filetype !=# 'unite' return endif @@ -265,9 +260,8 @@ call setpos('.', pos) endif"}}} endfunction"}}} -function! unite#handlers#_on_buf_unload(bufname) abort "{{{ +function! unite#handlers#_on_buf_unload(bufname) "{{{ call unite#view#_clear_match() - call unite#view#_clear_match_highlight() " Save unite value. silent! let unite = getbufvar(a:bufname, 'unite') @@ -276,7 +270,7 @@ return endif - if &l:statusline == unite.statusline + if &l:statusline == unite#get_current_unite().statusline " Restore statusline. let &l:statusline = &g:statusline endif @@ -297,7 +291,7 @@ call unite#helper#call_hook(unite#loaded_sources_list(), 'on_close') let unite.is_finalized = 1 endfunction"}}} -function! unite#handlers#_on_insert_char_pre() abort "{{{ +function! unite#handlers#_on_insert_char_pre() "{{{ let prompt_linenr = unite#get_current_unite().prompt_linenr if line('.') == prompt_linenr @@ -309,17 +303,16 @@ call unite#handlers#_on_cursor_moved() endfunction"}}} -function! unite#handlers#_save_updatetime() abort "{{{ +function! unite#handlers#_save_updatetime() "{{{ let unite = unite#get_current_unite() if unite.is_async && unite.context.update_time > 0 \ && &updatetime > unite.context.update_time - \ && !has('timers') let unite.update_time_save = &updatetime let &updatetime = unite.context.update_time endif endfunction"}}} -function! unite#handlers#_restore_updatetime() abort "{{{ +function! unite#handlers#_restore_updatetime() "{{{ let unite = unite#get_current_unite() if !has_key(unite, 'update_time_save') @@ -328,11 +321,10 @@ if unite.context.update_time > 0 \ && &updatetime < unite.update_time_save - \ && !has('timers') let &updatetime = unite.update_time_save endif endfunction"}}} -function! s:restore_statusline() abort "{{{ +function! s:restore_statusline() "{{{ if &filetype !=# 'unite' || !g:unite_force_overwrite_statusline return endif @@ -345,34 +337,7 @@ endif endfunction"}}} -function! s:timer_handler(timer) abort "{{{ - if mode() ==# 'i' - if &filetype ==# 'unite' - call unite#handlers#_on_cursor_hold_i() - endif - else - call unite#handlers#_on_cursor_hold() - endif - - if !empty(filter(range(1, winnr('$')), - \ "getbufvar(winbufnr(v:val), '&filetype') ==# 'unite'")) - \ || !exists('s:timer') - return - endif - - call timer_stop(s:timer) - unlet s:timer -endfunction"}}} -function! unite#handlers#_init_timer() abort "{{{ - if has('timers') && !exists('s:timer') - let s:timer = timer_start(500, - \ function('s:timer_handler'), {'repeat': -1}) - autocmd plugin-unite VimLeavePre * - \ if exists('s:timer') | call timer_stop(s:timer) | endif - endif -endfunction"}}} - -function! s:check_redraw() abort "{{{ +function! s:check_redraw() "{{{ let unite = unite#get_current_unite() let prompt_linenr = unite.prompt_linenr if line('.') == prompt_linenr || unite.context.is_redraw @@ -381,7 +346,7 @@ endif endfunction"}}} -function! s:cursor_up() abort "{{{ +function! s:cursor_up() "{{{ nnoremap (unite_loop_cursor_up) \ unite#mappings#cursor_up(0) nnoremap (unite_skip_cursor_up) @@ -391,7 +356,7 @@ inoremap (unite_skip_previous_line) \ unite#mappings#cursor_up(1) endfunction"}}} -function! s:cursor_down() abort "{{{ +function! s:cursor_down() "{{{ nnoremap (unite_loop_cursor_down) \ unite#mappings#cursor_down(0) nnoremap (unite_skip_cursor_down) === modified file 'vim/bundle/unite.vim/autoload/unite/helper.vim' --- vim/bundle/unite.vim/autoload/unite/helper.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/helper.vim 2015-08-25 11:01:00 +0000 @@ -26,25 +26,20 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#helper#call_hook(sources, hook_name) abort "{{{ +function! unite#helper#call_hook(sources, hook_name) "{{{ let context = unite#get_context() if context.unite__disable_hooks return endif - let custom = unite#custom#get() for source in a:sources - let custom_source = get(custom.sources, source.name, {}) + if !has_key(source.hooks, a:hook_name) + continue + endif try - if has_key(source.hooks, a:hook_name) - call call(source.hooks[a:hook_name], - \ [source.args, source.unite__context], source.hooks) - endif - if has_key(custom_source, a:hook_name) - call call(custom_source[a:hook_name], - \ [source.args, source.unite__context]) - endif + call call(source.hooks[a:hook_name], + \ [source.args, source.unite__context], source.hooks) catch call unite#print_error(v:throwpoint) call unite#print_error(v:exception) @@ -56,7 +51,7 @@ endfor endfunction"}}} -function! unite#helper#get_substitute_input(input) abort "{{{ +function! unite#helper#get_substitute_input(input) "{{{ let unite = unite#get_current_unite() let input = a:input @@ -85,7 +80,7 @@ return map(inputs, 'head . v:val') endfunction"}}} -function! unite#helper#get_substitute_input_loop(input, substitute_patterns) abort "{{{ +function! unite#helper#get_substitute_input_loop(input, substitute_patterns) "{{{ if empty(a:substitute_patterns) return [a:input] endif @@ -117,7 +112,7 @@ return inputs endfunction"}}} -function! unite#helper#adjustments(currentwinwidth, the_max_source_name, size) abort "{{{ +function! unite#helper#adjustments(currentwinwidth, the_max_source_name, size) "{{{ let max_width = a:currentwinwidth - a:the_max_source_name - a:size if max_width < 20 return [a:currentwinwidth - a:size, 0] @@ -126,7 +121,7 @@ endif endfunction"}}} -function! unite#helper#parse_options(cmdline) abort "{{{ +function! unite#helper#parse_options(cmdline) "{{{ let args = [] let options = {} @@ -151,7 +146,7 @@ return [args, options] endfunction"}}} -function! unite#helper#parse_options_args(cmdline) abort "{{{ +function! unite#helper#parse_options_args(cmdline) "{{{ let _ = [] let [args, options] = unite#helper#parse_options(a:cmdline) for arg in args @@ -166,7 +161,7 @@ return [_, options] endfunction"}}} -function! unite#helper#parse_options_user(args) abort "{{{ +function! unite#helper#parse_options_user(args) "{{{ " Add for history/unite. let [args, options] = unite#helper#parse_options_args(a:args) let options.unite__is_manual = 1 @@ -194,7 +189,7 @@ return cmdline endfunction"}}} -function! unite#helper#parse_source_args(args) abort "{{{ +function! unite#helper#parse_source_args(args) "{{{ let args = copy(a:args) if empty(args) return [] @@ -204,7 +199,7 @@ return args endfunction"}}} -function! unite#helper#parse_source_path(path) abort "{{{ +function! unite#helper#parse_source_path(path) "{{{ " Expand ?!/buffer_project_subdir, !/project_subdir and ?/buffer_subdir if a:path =~ '^?!' " Use project directory from buffer directory @@ -241,12 +236,12 @@ return path endfunction"}}} -function! unite#helper#get_marked_candidates() abort "{{{ +function! unite#helper#get_marked_candidates() "{{{ return unite#util#sort_by(filter(copy(unite#get_unite_candidates()), \ 'v:val.unite__is_marked'), 'v:val.unite__marked_time') endfunction"}}} -function! unite#helper#get_input(...) abort "{{{ +function! unite#helper#get_input(...) "{{{ let is_force = get(a:000, 0, 0) let unite = unite#get_current_unite() if !is_force && mode() !=# 'i' @@ -273,13 +268,13 @@ return getline(unite.prompt_linenr)[len(unite.context.prompt):] endfunction"}}} -function! unite#helper#get_source_names(sources) abort "{{{ +function! unite#helper#get_source_names(sources) "{{{ return map(map(copy(a:sources), \ "type(v:val) == type([]) ? v:val[0] : v:val"), \ "type(v:val) == type('') ? v:val : v:val.name") endfunction"}}} -function! unite#helper#get_postfix(prefix, is_create, ...) abort "{{{ +function! unite#helper#get_postfix(prefix, is_create, ...) "{{{ let prefix = substitute(a:prefix, '@\d\+$', '', '') let buffers = get(a:000, 0, range(1, bufnr('$'))) let buflist = sort(filter(map(buffers, @@ -292,11 +287,11 @@ \ : matchstr(buflist[-1], '@\d\+$') endfunction"}}} -function! s:sort_buffer_name(lhs, rhs) abort "{{{ +function! s:sort_buffer_name(lhs, rhs) "{{{ return matchstr(a:lhs, '@\zs\d\+$') - matchstr(a:rhs, '@\zs\d\+$') endfunction"}}} -function! unite#helper#convert_source_name(source_name) abort "{{{ +function! unite#helper#convert_source_name(source_name) "{{{ let unite = unite#get_current_unite() return (len(unite.sources) == 1 || \ !unite.context.short_source_names) ? a:source_name : @@ -304,7 +299,7 @@ \ substitute(a:source_name, '\a\zs\a\+', '', 'g') endfunction"}}} -function! unite#helper#invalidate_cache(source_name) abort "{{{ +function! unite#helper#invalidate_cache(source_name) "{{{ for source in unite#get_current_unite().sources if source.name ==# a:source_name let source.unite__is_invalidate = 1 @@ -312,7 +307,7 @@ endfor endfunction"}}} -function! unite#helper#get_unite_winnr(buffer_name) abort "{{{ +function! unite#helper#get_unite_winnr(buffer_name) "{{{ for winnr in filter(range(1, winnr('$')), \ "getbufvar(winbufnr(v:val), '&filetype') ==# 'unite'") let buffer_context = get(getbufvar( @@ -331,7 +326,7 @@ return -1 endfunction"}}} -function! unite#helper#get_unite_bufnr(buffer_name) abort "{{{ +function! unite#helper#get_unite_bufnr(buffer_name) "{{{ for bufnr in filter(range(1, bufnr('$')), \ "getbufvar(v:val, '&filetype') ==# 'unite'") let buffer_context = get(getbufvar(bufnr, 'unite'), 'context', {}) @@ -351,7 +346,7 @@ return -1 endfunction"}}} -function! unite#helper#get_current_candidate(...) abort "{{{ +function! unite#helper#get_current_candidate(...) "{{{ let linenr = a:0 >= 1? a:1 : line('.') let unite = unite#get_current_unite() if unite.context.prompt_direction ==# 'below' @@ -369,7 +364,7 @@ return get(unite#get_unite_candidates(), num, {}) endfunction"}}} -function! unite#helper#get_current_candidate_linenr(num) abort "{{{ +function! unite#helper#get_current_candidate_linenr(num) "{{{ let candidate_num = 0 let num = 0 for candidate in unite#get_unite_candidates() @@ -377,11 +372,11 @@ let candidate_num += 1 endif - if candidate_num > a:num + let num += 1 + + if candidate_num >= a:num break endif - - let num += 1 endfor let unite = unite#get_current_unite() @@ -390,14 +385,12 @@ if unite.prompt_linenr == 0 let num += line('$') + 1 endif - else - let num += 1 endif return unite.prompt_linenr + num endfunction"}}} -function! unite#helper#call_filter(filter_name, candidates, context) abort "{{{ +function! unite#helper#call_filter(filter_name, candidates, context) "{{{ let filter = unite#get_filters(a:filter_name) if empty(filter) return a:candidates @@ -405,7 +398,7 @@ return filter.filter(a:candidates, a:context) endfunction"}}} -function! unite#helper#call_source_filters(filters, candidates, context, source) abort "{{{ +function! unite#helper#call_source_filters(filters, candidates, context, source) "{{{ let candidates = a:candidates for l:Filter in a:filters if type(l:Filter) == type('') @@ -421,12 +414,12 @@ return candidates endfunction"}}} -function! unite#helper#get_source_args(sources) abort "{{{ +function! unite#helper#get_source_args(sources) "{{{ return map(copy(a:sources), \ 'type(v:val) == type([]) ? [v:val[0], v:val[1:]] : [v:val, []]') endfunction"}}} -function! unite#helper#choose_window() abort "{{{ +function! unite#helper#choose_window() "{{{ " Create key table. let keys = {} for [key, number] in items(g:unite_quick_match_table) @@ -437,11 +430,7 @@ let save_statuslines = map(unite#helper#get_choose_windows(), \ "[v:val, getbufvar(winbufnr(v:val), '&statusline')]") - let save_laststatus = &laststatus - try - let &laststatus = 2 - let winnr_save = winnr() for [winnr, statusline] in save_statuslines noautocmd execute winnr.'wincmd w' @@ -467,8 +456,6 @@ echo '' endwhile finally - let &laststatus = save_laststatus - echo '' let winnr_save = winnr() @@ -483,7 +470,7 @@ endtry endfunction"}}} -function! unite#helper#get_choose_windows() abort "{{{ +function! unite#helper#get_choose_windows() "{{{ return filter(range(1, winnr('$')), "v:val != winnr() \ && !getwinvar(v:val, '&previewwindow') \ && (getwinvar(v:val, '&buftype') !~# 'nofile' @@ -491,7 +478,7 @@ \ && !getwinvar(v:val, '&filetype') !=# 'qf'") endfunction"}}} -function! unite#helper#get_buffer_directory(bufnr) abort "{{{ +function! unite#helper#get_buffer_directory(bufnr) "{{{ let filetype = getbufvar(a:bufnr, '&filetype') if filetype ==# 'vimfiler' let dir = getbufvar(a:bufnr, 'vimfiler').current_dir @@ -507,14 +494,14 @@ return dir endfunction"}}} -function! unite#helper#cursor_prompt() abort "{{{ +function! unite#helper#cursor_prompt() "{{{ " Move to prompt linenr. let unite = unite#get_current_unite() call cursor((unite.context.prompt_direction ==# 'below' ? \ line('$') : unite.init_prompt_linenr), 0) endfunction"}}} -function! unite#helper#skip_prompt() abort "{{{ +function! unite#helper#skip_prompt() "{{{ " Skip prompt linenr. let unite = unite#get_current_unite() if line('.') == unite.prompt_linenr @@ -524,7 +511,7 @@ endfunction"}}} if unite#util#has_lua() - function! unite#helper#paths2candidates(paths) abort "{{{ + function! unite#helper#paths2candidates(paths) "{{{ let candidates = [] lua << EOF do @@ -542,7 +529,7 @@ return candidates endfunction"}}} else - function! unite#helper#paths2candidates(paths) abort "{{{ + function! unite#helper#paths2candidates(paths) "{{{ return map(copy(a:paths), "{ \ 'word' : v:val, \ 'action__path' : v:val, @@ -550,20 +537,20 @@ endfunction"}}} endif -function! unite#helper#get_candidate_directory(candidate) abort "{{{ +function! unite#helper#get_candidate_directory(candidate) "{{{ return has_key(a:candidate, 'action__directory') ? \ a:candidate.action__directory : \ unite#util#path2directory(a:candidate.action__path) endfunction"}}} -function! unite#helper#is_prompt(line) abort "{{{ +function! unite#helper#is_prompt(line) "{{{ let prompt_linenr = unite#get_current_unite().prompt_linenr let context = unite#get_context() return (context.prompt_direction ==# 'below' && a:line >= prompt_linenr) \ || (context.prompt_direction !=# 'below' && a:line <= prompt_linenr) endfunction"}}} -function! unite#helper#relative_target(target) abort "{{{ +function! unite#helper#relative_target(target) "{{{ let target = unite#util#substitute_path_separator(fnamemodify( \ substitute(a:target, '[^:]\zs/$', '', ''), ':.')) if target == unite#util#substitute_path_separator(getcwd()) @@ -577,56 +564,14 @@ return target endfunction"}}} -function! unite#helper#join_targets(targets) abort "{{{ +function! unite#helper#join_targets(targets) "{{{ return join(map(copy(a:targets), \ "unite#util#escape_shell(unite#helper#relative_target(v:val))")) endfunction"}}} -function! unite#helper#is_pty(command) abort "{{{ - " Note: "pt" and "ack" and "ag" and "hw" needs pty. - " It is too bad. - return fnamemodify(a:command, ':t:r') =~# - \ '^pt$\|^ack\%(-grep\)\?$\|^ag$\|^hw$' -endfunction"}}} - -function! unite#helper#complete_search_history(arglead, cmdline, cursorpos) abort "{{{ - return filter(map(unite#util#uniq(s:histget('search') - \ + s:histget('input')), - \ "substitute(v:val, '\\c^\\(\\\\[cmv<]\\)*\\|\\\\>$', '', 'g')"), - \ "stridx(tolower(v:val), tolower(a:arglead)) == 0") -endfunction"}}} - -function! unite#helper#get_input_list(input) abort "{{{ - return map(split(a:input, '\\\@ @@ -207,6 +192,8 @@ \ call unite#handlers#_on_insert_enter() autocmd InsertLeave \ call unite#handlers#_on_insert_leave() + autocmd CursorHoldI + \ call unite#handlers#_on_cursor_hold_i() autocmd CursorMovedI \ call unite#handlers#_on_cursor_moved_i() autocmd CursorMoved,CursorMovedI nested @@ -215,6 +202,8 @@ \ call unite#handlers#_on_buf_unload(expand('')) autocmd WinEnter,BufWinEnter \ call unite#handlers#_on_bufwin_enter(bufnr(expand(''))) + autocmd WinLeave,BufWinLeave + \ call unite#handlers#_restore_updatetime() augroup END if v:version > 703 || v:version == 703 && has('patch418') @@ -227,12 +216,6 @@ autocmd plugin-unite TextChanged \ call unite#handlers#_on_text_changed() endif - if !has('timers') - autocmd plugin-unite CursorHoldI - \ call unite#handlers#_on_cursor_hold_i() - else - call unite#handlers#_init_timer() - endif if context.prompt != '' execute printf( @@ -264,7 +247,7 @@ setfiletype unite endfunction"}}} -function! unite#init#_current_unite(sources, context) abort "{{{ +function! unite#init#_current_unite(sources, context) "{{{ let context = a:context " Overwrite previous unite buffer. @@ -309,12 +292,7 @@ let unite.prev_bufnr = \ (exists('b:unite') && !context.split) ? \ b:unite.prev_bufnr : bufnr('%') - let unite.prev_pos = - \ exists('b:unite') ? b:unite.prev_pos : getpos('.') - let unite.alternate_bufnr = - \ exists('b:unite') ? b:unite.alternate_bufnr : bufnr('#') let unite.prev_winnr = winnr() - let unite.prev_winsaveview = winsaveview() let unite.prev_line = 0 let unite.update_time_save = &updatetime let unite.statusline = unite#view#_get_status_string(unite) @@ -341,9 +319,12 @@ let unite.access_time = localtime() let unite.is_finalized = 0 let unite.previewed_buffer_list = [] - let unite.current_matchers = [] - let unite.current_sorters = [] - let unite.current_converters = [] + let unite.current_matchers = unite#util#convert2list( + \ unite#custom#get_profile(unite.profile_name, 'matchers')) + let unite.current_sorters = unite#util#convert2list( + \ unite#custom#get_profile(unite.profile_name, 'converters')) + let unite.current_converters = unite#util#convert2list( + \ unite#custom#get_profile(unite.profile_name, 'converters')) let unite.preview_candidate = {} let unite.highlight_candidate = {} let unite.max_source_name = 0 @@ -362,10 +343,6 @@ let unite.match_id = 11 let unite.sign_offset = 0 - if has('nvim') && exists(':UniteInitializePython') - UniteInitializePython - endif - if context.here let context.winheight = winheight(0) - winline() + 1 if context.winheight < 5 @@ -391,7 +368,7 @@ endfunction"}}} " @vimlint(EVL102, 1, l:max_source_name) -function! unite#init#_candidates(candidates) abort "{{{ +function! unite#init#_candidates(candidates) "{{{ let unite = unite#get_current_unite() let context = unite.context let [max_width, max_source_name] = unite#helper#adjustments( @@ -481,11 +458,8 @@ endfunction"}}} " @vimlint(EVL102, 0, l:max_source_name) -function! unite#init#_candidates_source(candidates, source_name) abort "{{{ +function! unite#init#_candidates_source(candidates, source_name) "{{{ let source = unite#variables#loaded_sources(a:source_name) - if empty(source) - return [] - endif let default_candidate = { \ 'kind' : source.default_kind, @@ -506,10 +480,22 @@ return candidates endfunction"}}} -function! unite#init#_default_scripts(kind, names) abort "{{{ +function! unite#init#_default_scripts(kind, names) "{{{ let names = empty(a:names) ? [''] : a:names if a:kind ==# 'sources' && !empty(a:names) call add(names, 'alias') + + if !exists('*neobundle#autoload#unite_sources') + " Dummy call. + try + call neobundle#autoload#unite_sources([]) + catch /E117.*/ + endtry + endif + + if exists('*neobundle#autoload#unite_sources') + call neobundle#autoload#unite_sources(a:names) + endif endif let loaded_defaults = unite#variables#loaded_defaults() @@ -558,27 +544,18 @@ \ fnamemodify(v:val, ':t')) < 0") endif - try - for file in files - let define = unite#{a:kind}#{fnamemodify(file, ':t:r')}#define() - for dict in filter(unite#util#convert2list(define), - \ '!empty(v:val) && !has_key(static[a:kind], v:val.name)') - let static[a:kind][dict.name] = dict - endfor - unlet define + for define in map(files, + \ "unite#{a:kind}#{fnamemodify(v:val, ':t:r')}#define()") + for dict in filter(unite#util#convert2list(define), + \ '!empty(v:val) && !has_key(static[a:kind], v:val.name)') + let static[a:kind][dict.name] = dict endfor - catch - call unite#print_error(v:throwpoint) - call unite#print_error(v:exception) - call unite#print_error( - \ 'Error occurred in source initialization!') - call unite#print_error( - \ 'Source name is ' . file) - endtry + unlet define + endfor endfor endfunction"}}} -function! unite#init#_kinds() abort "{{{ +function! unite#init#_kinds() "{{{ let kinds = extend(copy(unite#variables#static().kinds), \ unite#variables#dynamic().kinds) for kind in values(filter(copy(kinds), @@ -597,12 +574,12 @@ return kinds endfunction"}}} -function! unite#init#_filters() abort "{{{ +function! unite#init#_filters() "{{{ return extend(copy(unite#variables#static().filters), \ unite#variables#dynamic().filters) endfunction"}}} -function! unite#init#_loaded_sources(sources, context) abort "{{{ +function! unite#init#_loaded_sources(sources, context) "{{{ let all_sources = unite#init#_sources( \ unite#helper#get_source_names(a:sources)) let sources = [] @@ -663,7 +640,7 @@ return sources endfunction"}}} -function! unite#init#_sources(...) abort "{{{ +function! unite#init#_sources(...) "{{{ " args: source_names or source_definition " Initialize load. @@ -681,6 +658,7 @@ \ 'is_volatile' : 0, \ 'is_listed' : 1, \ 'is_forced' : 0, + \ 'is_grouped' : 0, \ 'action_table' : {}, \ 'default_action' : {}, \ 'default_kind' : 'common', @@ -813,7 +791,7 @@ return sources endfunction"}}} -function! unite#init#_tab_variables() abort "{{{ +function! unite#init#_tab_variables() "{{{ if !exists('t:unite') let t:unite = { 'last_unite_bufnr' : -1 } endif === modified file 'vim/bundle/unite.vim/autoload/unite/kinds/buffer.vim' --- vim/bundle/unite.vim/autoload/unite/kinds/buffer.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/kinds/buffer.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#kinds#buffer#define() abort "{{{ +function! unite#kinds#buffer#define() "{{{ return s:kind endfunction"}}} @@ -42,18 +42,16 @@ \ 'description' : 'open buffer', \ 'is_selectable' : 1, \ } -function! s:kind.action_table.open.func(candidates) abort "{{{ +function! s:kind.action_table.open.func(candidates) "{{{ for candidate in a:candidates - if bufexists(candidate.action__buffer_nr) - execute 'buffer' candidate.action__buffer_nr - endif + execute 'buffer' candidate.action__buffer_nr endfor endfunction"}}} let s:kind.action_table.goto = { \ 'description' : 'goto buffer tab', \ } -function! s:kind.action_table.goto.func(candidate) abort "{{{ +function! s:kind.action_table.goto.func(candidate) "{{{ for i in range(tabpagenr('$')) let tabnr = i + 1 for nr in tabpagebuflist(tabnr) @@ -75,7 +73,7 @@ \ 'is_quit' : 0, \ 'is_selectable' : 1, \ } -function! s:kind.action_table.delete.func(candidates) abort "{{{ +function! s:kind.action_table.delete.func(candidates) "{{{ for candidate in a:candidates call s:delete('bdelete', candidate) endfor @@ -87,7 +85,7 @@ \ 'is_quit' : 0, \ 'is_selectable' : 1, \ } -function! s:kind.action_table.fdelete.func(candidates) abort "{{{ +function! s:kind.action_table.fdelete.func(candidates) "{{{ for candidate in a:candidates call s:delete('bdelete!', candidate) endfor @@ -99,7 +97,7 @@ \ 'is_quit' : 0, \ 'is_selectable' : 1, \ } -function! s:kind.action_table.wipeout.func(candidates) abort "{{{ +function! s:kind.action_table.wipeout.func(candidates) "{{{ for candidate in a:candidates call s:delete('bwipeout', candidate) endfor @@ -111,7 +109,7 @@ \ 'is_quit' : 0, \ 'is_selectable' : 1, \ } -function! s:kind.action_table.unload.func(candidates) abort "{{{ +function! s:kind.action_table.unload.func(candidates) "{{{ for candidate in a:candidates call s:delete('unload', candidate) endfor @@ -121,7 +119,7 @@ \ 'description' : 'preview buffer', \ 'is_quit' : 0, \ } -function! s:kind.action_table.preview.func(candidate) abort "{{{ +function! s:kind.action_table.preview.func(candidate) "{{{ call unite#view#_preview_file(a:candidate.action__path) let filetype = getbufvar(a:candidate.action__buffer_nr, '&filetype') @@ -139,7 +137,7 @@ \ 'is_quit' : 0, \ 'is_selectable' : 1, \ } -function! s:kind.action_table.rename.func(candidates) abort "{{{ +function! s:kind.action_table.rename.func(candidates) "{{{ for candidate in a:candidates if getbufvar(candidate.action__buffer_nr, '&buftype') =~ 'nofile' " Skip nofile buffer. @@ -158,7 +156,7 @@ "}}} " Misc -function! s:delete(delete_command, candidate) abort "{{{ +function! s:delete(delete_command, candidate) "{{{ " Not to close window, move to alternate buffer. let winnr = 1 === modified file 'vim/bundle/unite.vim/autoload/unite/kinds/cdable.vim' --- vim/bundle/unite.vim/autoload/unite/kinds/cdable.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/kinds/cdable.vim 2015-08-25 11:01:00 +0000 @@ -32,7 +32,7 @@ call unite#util#set_default('g:unite_kind_cdable_lcd_command', \ 'lcd', 'g:unite_kind_openable_lcd_command') " }}} -function! unite#kinds#cdable#define() abort "{{{ +function! unite#kinds#cdable#define() "{{{ return s:kind endfunction"}}} @@ -47,7 +47,7 @@ let s:kind.action_table.cd = { \ 'description' : 'change current directory', \ } -function! s:kind.action_table.cd.func(candidate) abort "{{{ +function! s:kind.action_table.cd.func(candidate) "{{{ let directory = unite#helper#get_candidate_directory(a:candidate) if !s:check_is_directory(directory) return @@ -63,7 +63,7 @@ let s:kind.action_table.lcd = { \ 'description' : 'change window local current directory', \ } -function! s:kind.action_table.lcd.func(candidate) abort "{{{ +function! s:kind.action_table.lcd.func(candidate) "{{{ let directory = unite#helper#get_candidate_directory(a:candidate) if !s:check_is_directory(directory) return @@ -79,7 +79,7 @@ let s:kind.action_table.project_cd = { \ 'description' : 'change current directory to project directory', \ } -function! s:kind.action_table.project_cd.func(candidate) abort "{{{ +function! s:kind.action_table.project_cd.func(candidate) "{{{ let directory = unite#helper#get_candidate_directory(a:candidate) if !s:check_is_directory(directory) return @@ -98,7 +98,7 @@ \ 'description' : 'open a new tab page here', \ 'is_tab' : 1, \ } -function! s:kind.action_table.tabnew_cd.func(candidate) abort "{{{ +function! s:kind.action_table.tabnew_cd.func(candidate) "{{{ let directory = unite#helper#get_candidate_directory(a:candidate) if !s:check_is_directory(directory) return @@ -115,7 +115,7 @@ \ 'description' : 'open a new tab page here with lcd', \ 'is_tab' : 1, \ } -function! s:kind.action_table.tabnew_lcd.func(candidate) abort "{{{ +function! s:kind.action_table.tabnew_lcd.func(candidate) "{{{ let directory = unite#helper#get_candidate_directory(a:candidate) if !s:check_is_directory(directory) return @@ -133,7 +133,7 @@ \ 'is_quit' : 0, \ 'is_start' : 1, \ } -function! s:kind.action_table.narrow.func(candidate) abort "{{{ +function! s:kind.action_table.narrow.func(candidate) "{{{ let directory = unite#helper#get_candidate_directory(a:candidate) if !s:check_is_directory(directory) return @@ -146,7 +146,7 @@ let s:kind.action_table.vimshell = { \ 'description' : 'open vimshell buffer here', \ } -function! s:kind.action_table.vimshell.func(candidate) abort "{{{ +function! s:kind.action_table.vimshell.func(candidate) "{{{ if !exists(':VimShell') echo 'vimshell is not installed.' return @@ -163,7 +163,7 @@ \ 'description' : 'tabopen vimshell buffer here', \ 'is_tab' : 1, \ } -function! s:kind.action_table.tabvimshell.func(candidate) abort "{{{ +function! s:kind.action_table.tabvimshell.func(candidate) "{{{ if !exists(':VimShellTab') echo 'vimshell is not installed.' return @@ -180,7 +180,7 @@ let s:kind.action_table.vimfiler = { \ 'description' : 'open vimfiler buffer here', \ } -function! s:kind.action_table.vimfiler.func(candidate) abort "{{{ +function! s:kind.action_table.vimfiler.func(candidate) "{{{ if !exists(':VimFiler') echo 'vimfiler is not installed.' return @@ -205,7 +205,7 @@ \ 'description' : 'tabopen vimfiler buffer here', \ 'is_tab' : 1, \ } -function! s:kind.action_table.tabvimfiler.func(candidate) abort "{{{ +function! s:kind.action_table.tabvimfiler.func(candidate) "{{{ if !exists(':VimFilerTab') echo 'vimfiler is not installed.' return @@ -232,7 +232,7 @@ \ 'is_start' : 1, \} -function! s:cdable_action_rec.func(candidate) abort +function! s:cdable_action_rec.func(candidate) call unite#start_script([['file_rec', \ unite#helper#get_candidate_directory(a:candidate)]]) endfunction @@ -242,7 +242,7 @@ \ 'is_start' : 1, \} -function! s:cdable_action_rec_parent.func(candidate) abort +function! s:cdable_action_rec_parent.func(candidate) call unite#start_script([['file_rec', unite#util#substitute_path_separator( \ fnamemodify(unite#helper#get_candidate_directory(a:candidate), ':h')) \ ]]) @@ -253,7 +253,7 @@ \ 'is_start' : 1, \} -function! s:cdable_action_rec_project.func(candidate) abort +function! s:cdable_action_rec_project.func(candidate) call unite#start_script([['file_rec', unite#util#substitute_path_separator( \ unite#util#path2project_directory( \ unite#helper#get_candidate_directory(a:candidate))) @@ -265,7 +265,7 @@ \ 'is_start' : 1, \} -function! s:cdable_action_rec_async.func(candidate) abort +function! s:cdable_action_rec_async.func(candidate) call unite#start_script([['file_rec/async', \ unite#helper#get_candidate_directory(a:candidate)]]) endfunction @@ -275,7 +275,7 @@ \ 'is_start' : 1, \} -function! s:cdable_action_rec_parent_async.func(candidate) abort +function! s:cdable_action_rec_parent_async.func(candidate) call unite#start_script([['file_rec/async', unite#util#substitute_path_separator( \ fnamemodify(unite#helper#get_candidate_directory(a:candidate), ':h')) \ ]]) @@ -286,7 +286,7 @@ \ 'is_start' : 1, \} -function! s:cdable_action_rec_project_async.func(candidate) abort +function! s:cdable_action_rec_project_async.func(candidate) call unite#start_script([['file_rec/async', unite#util#substitute_path_separator( \ unite#util#path2project_directory( \ unite#helper#get_candidate_directory(a:candidate))) @@ -314,7 +314,7 @@ "}}} -function! s:external_cd(candidate) abort "{{{ +function! s:external_cd(candidate) "{{{ let directory = unite#helper#get_candidate_directory(a:candidate) if &filetype ==# 'vimfiler' call vimfiler#mappings#cd(directory) @@ -323,7 +323,7 @@ execute 'VimShell' escape(directory, '\\ ') endif endfunction"}}} -function! s:move_vimfiler_cursor(candidate) abort "{{{ +function! s:move_vimfiler_cursor(candidate) "{{{ if &filetype !=# 'vimfiler' return endif @@ -336,7 +336,7 @@ endif endfunction"}}} -function! s:check_is_directory(directory) abort +function! s:check_is_directory(directory) if !isdirectory(a:directory) if unite#util#is_sudo() return 0 === modified file 'vim/bundle/unite.vim/autoload/unite/kinds/command.vim' --- vim/bundle/unite.vim/autoload/unite/kinds/command.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/kinds/command.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#kinds#command#define() abort "{{{ +function! unite#kinds#command#define() "{{{ return s:kind endfunction"}}} @@ -42,7 +42,7 @@ \ 'description' : 'execute command', \ 'is_selectable' : 1, \ } -function! s:kind.action_table.execute.func(candidates) abort "{{{ +function! s:kind.action_table.execute.func(candidates) "{{{ for candidate in a:candidates if get(candidate, 'action__command_args', '0') !=# '0' " Use edit action @@ -61,7 +61,7 @@ let s:kind.action_table.edit = { \ 'description' : 'edit command', \ } -function! s:kind.action_table.edit.func(candidate) abort "{{{ +function! s:kind.action_table.edit.func(candidate) "{{{ if has_key(a:candidate, 'action__description') " Print description. @@ -89,23 +89,14 @@ call s:execute_command(command) endif endfunction"}}} -let s:kind.action_table.grep = { - \ 'description' : 'grep this command', - \ 'is_start' : 1, - \ } -function! s:kind.action_table.grep.func(candidate) abort "{{{ - call unite#start_script([ - \ ['grep', '', '', a:candidate.action__command]], - \ { 'no_quit' : 1, 'no_empty' : 1 }) -endfunction"}}} "}}} -function! s:add_history(type, command) abort "{{{ +function! s:add_history(type, command) "{{{ call histadd(a:type, a:command) if a:type ==# '/' let @/ = a:command endif endfunction"}}} -function! s:execute_command(command) abort "{{{ +function! s:execute_command(command) "{{{ let temp = tempname() try call writefile([a:command], temp) === modified file 'vim/bundle/unite.vim/autoload/unite/kinds/common.vim' --- vim/bundle/unite.vim/autoload/unite/kinds/common.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/kinds/common.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#kinds#common#define() abort "{{{ +function! unite#kinds#common#define() "{{{ return s:kind endfunction"}}} @@ -41,7 +41,7 @@ let s:kind.action_table.nop = { \ 'description' : 'no operation', \ } -function! s:kind.action_table.nop.func(candidate) abort "{{{ +function! s:kind.action_table.nop.func(candidate) "{{{ endfunction"}}} let s:kind.action_table.yank = { @@ -49,7 +49,7 @@ \ 'is_selectable' : 1, \ 'is_quit' : 0, \ } -function! s:kind.action_table.yank.func(candidates) abort "{{{ +function! s:kind.action_table.yank.func(candidates) "{{{ let text = join(map(copy(a:candidates), \ 's:get_candidate_text(v:val)'), "\n") let @" = text @@ -65,7 +65,7 @@ let s:kind.action_table.yank_escape = { \ 'description' : 'yank escaped word or text', \ } -function! s:kind.action_table.yank_escape.func(candidate) abort "{{{ +function! s:kind.action_table.yank_escape.func(candidate) "{{{ let @" = escape(s:get_candidate_text(a:candidate), " *?[{`$\\%#\"|!<>") endfunction"}}} @@ -73,7 +73,7 @@ \ 'description' : 'insert candidates into command line', \ 'is_selectable' : 1, \ } -function! s:kind.action_table.ex.func(candidates) abort "{{{ +function! s:kind.action_table.ex.func(candidates) "{{{ " Result is ':| {candidate}', here '|' means the cursor position. call feedkeys(printf(": %s\", \ join(map(map(copy(a:candidates), @@ -84,7 +84,7 @@ let s:kind.action_table.insert = { \ 'description' : 'insert word or text', \ } -function! s:kind.action_table.insert.func(candidate) abort "{{{ +function! s:kind.action_table.insert.func(candidate) "{{{ call s:paste(s:get_candidate_text(a:candidate), 'P', \ { 'regtype' : get(a:candidate, 'action__regtype', 'v')}) endfunction"}}} @@ -92,7 +92,7 @@ let s:kind.action_table.append = { \ 'description' : 'append word or text', \ } -function! s:kind.action_table.append.func(candidate) abort "{{{ +function! s:kind.action_table.append.func(candidate) "{{{ call s:paste(s:get_candidate_text(a:candidate), 'p', \ { 'regtype' : get(a:candidate, 'action__regtype', 'v')}) endfunction"}}} @@ -100,7 +100,7 @@ let s:kind.action_table.insert_directory = { \ 'description' : 'insert directory', \ } -function! s:kind.action_table.insert_directory.func(candidate) abort "{{{ +function! s:kind.action_table.insert_directory.func(candidate) "{{{ if has_key(a:candidate,'action__directory') let directory = a:candidate.action__directory elseif has_key(a:candidate, 'action__path') @@ -118,7 +118,7 @@ \ 'description' : 'preview word', \ 'is_quit' : 0, \ } -function! s:kind.action_table.preview.func(candidate) abort "{{{ +function! s:kind.action_table.preview.func(candidate) "{{{ redraw echo s:get_candidate_text(a:candidate) endfunction"}}} @@ -127,12 +127,12 @@ \ 'description' : 'echo candidates for debug', \ 'is_selectable' : 1, \ } -function! s:kind.action_table.echo.func(candidates) abort "{{{ +function! s:kind.action_table.echo.func(candidates) "{{{ echomsg string(a:candidates) endfunction"}}} "}}} -function! unite#kinds#common#insert_word(word, ...) abort "{{{ +function! unite#kinds#common#insert_word(word, ...) "{{{ let unite = unite#get_current_unite() let context = unite.context let opt = get(a:000, 0, {}) @@ -154,7 +154,7 @@ startinsert! endif endfunction"}}} -function! s:paste(word, command, opt) abort "{{{ +function! s:paste(word, command, opt) "{{{ let regtype = get(a:opt, 'regtype', 'v') " Paste. @@ -170,7 +170,7 @@ " Open folds. normal! zv endfunction"}}} -function! s:get_candidate_text(candidate) abort "{{{ +function! s:get_candidate_text(candidate) "{{{ return get(a:candidate, 'action__text', a:candidate.word) endfunction"}}} === modified file 'vim/bundle/unite.vim/autoload/unite/kinds/completion.vim' --- vim/bundle/unite.vim/autoload/unite/kinds/completion.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/kinds/completion.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#kinds#completion#define() abort "{{{ +function! unite#kinds#completion#define() "{{{ return s:kind endfunction"}}} @@ -40,7 +40,7 @@ let s:kind.action_table.insert = { \ 'description' : 'insert word', \ } -function! s:kind.action_table.insert.func(candidate) abort "{{{ +function! s:kind.action_table.insert.func(candidate) "{{{ call unite#kinds#common#insert_word( \ a:candidate.action__complete_word, \ { 'col' : a:candidate.action__complete_pos}) @@ -50,7 +50,7 @@ \ 'description' : 'preview word in echo area', \ 'is_quit' : 0, \ } -function! s:kind.action_table.preview.func(candidate) abort "{{{ +function! s:kind.action_table.preview.func(candidate) "{{{ echo '' redraw === modified file 'vim/bundle/unite.vim/autoload/unite/kinds/directory.vim' --- vim/bundle/unite.vim/autoload/unite/kinds/directory.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/kinds/directory.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#kinds#directory#define() abort "{{{ +function! unite#kinds#directory#define() "{{{ return s:kind endfunction"}}} === modified file 'vim/bundle/unite.vim/autoload/unite/kinds/file.vim' --- vim/bundle/unite.vim/autoload/unite/kinds/file.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/kinds/file.vim 2015-08-25 11:01:00 +0000 @@ -55,7 +55,7 @@ \ unite#util#is_windows() && unite#util#has_vimproc()) "}}} -function! unite#kinds#file#define() abort "{{{ +function! unite#kinds#file#define() "{{{ return s:kind endfunction"}}} @@ -69,7 +69,7 @@ \ 'file_vimfiler_base', 'cdable', 'uri'], \} -function! s:external(command, dest_dir, src_files) abort "{{{ +function! s:external(command, dest_dir, src_files) "{{{ let dest_dir = a:dest_dir if dest_dir =~ '[^:]/$' " Delete last /. @@ -91,9 +91,9 @@ return unite#util#get_last_status() endfunction"}}} -function! s:input_overwrite_method(dest, src) abort "{{{ +function! s:input_overwrite_method(dest, src) "{{{ redraw - echo 'File already exists!' + echo 'File is already exists!' echo printf('dest: %s %d bytes %s', a:dest, getfsize(a:dest), \ strftime('%y/%m/%d %H:%M', getftime(a:dest))) echo printf('src: %s %d bytes %s', a:src, getfsize(a:src), @@ -111,11 +111,11 @@ return method endfunction"}}} -function! unite#kinds#file#complete_overwrite_method(arglead, cmdline, cursorpos) abort "{{{ +function! unite#kinds#file#complete_overwrite_method(arglead, cmdline, cursorpos) "{{{ return filter(['force', 'time', 'underbar', 'no', 'rename'], \ 'stridx(v:val, a:arglead) == 0') endfunction"}}} -function! s:check_over_write(dest_dir, filename, overwrite_method, is_reset_method) abort "{{{ +function! s:check_over_write(dest_dir, filename, overwrite_method, is_reset_method) "{{{ let is_reset_method = a:is_reset_method let dest_filename = a:dest_dir . fnamemodify(a:filename, ':t') let is_continue = 0 @@ -165,9 +165,9 @@ return [dest_filename, overwrite_method, is_reset_method, is_continue] endfunction"}}} -function! unite#kinds#file#do_rename(old_filename, new_filename) abort "{{{ +function! unite#kinds#file#do_rename(old_filename, new_filename) "{{{ if a:old_filename ==# a:new_filename - return 0 + return endif if a:old_filename !=? a:new_filename && @@ -175,7 +175,7 @@ " Failed. call unite#print_error( \ printf('file: "%s" is already exists!', a:new_filename)) - return 1 + return endif " Convert to relative path. @@ -219,18 +219,17 @@ call unite#print_error( \ printf('Failed rename: "%s" to "%s".', \ a:old_filename, a:new_filename)) - return 1 endif finally " Restore path. - call unite#util#lcd(current_dir_save) + if isdirectory(current_dir_save) + call unite#util#lcd(current_dir_save) + endif let &l:hidden = hidden_save endtry - - return 0 endfunction"}}} -function! unite#kinds#file#do_action(candidates, dest_dir, action_name) abort "{{{ +function! unite#kinds#file#do_action(candidates, dest_dir, action_name) "{{{ let overwrite_method = '' let is_reset_method = 1 let dest_filename = '' @@ -302,11 +301,11 @@ endif return dest_filename endfunction"}}} -function! s:check_delete_func(filename) abort "{{{ +function! s:check_delete_func(filename) "{{{ return isdirectory(a:filename) ? \ 'delete_directory' : 'delete_file' endfunction"}}} -function! s:check_copy_func(filename) abort "{{{ +function! s:check_copy_func(filename) "{{{ return isdirectory(a:filename) ? \ 'copy_directory' : 'copy_file' endfunction"}}} === modified file 'vim/bundle/unite.vim/autoload/unite/kinds/file_base.vim' --- vim/bundle/unite.vim/autoload/unite/kinds/file_base.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/kinds/file_base.vim 2015-08-25 11:01:00 +0000 @@ -32,7 +32,7 @@ endif "}}} -function! unite#kinds#file_base#define() abort "{{{ +function! unite#kinds#file_base#define() "{{{ return s:kind endfunction"}}} @@ -48,7 +48,7 @@ \ 'description' : 'open files', \ 'is_selectable' : 1, \ } -function! s:kind.action_table.open.func(candidates) abort "{{{ +function! s:kind.action_table.open.func(candidates) "{{{ for candidate in a:candidates if buflisted(candidate.action__path) execute 'buffer' bufnr(candidate.action__path) @@ -70,7 +70,7 @@ \ 'description' : 'preview file', \ 'is_quit' : 0, \ } -function! s:kind.action_table.preview.func(candidate) abort "{{{ +function! s:kind.action_table.preview.func(candidate) "{{{ let buflisted = buflisted(a:candidate.action__path) if !filereadable(a:candidate.action__path) return @@ -91,7 +91,9 @@ wincmd P try if !buflisted - call unite#add_previewed_buffer_list(bufnr('%')) + doautocmd BufRead + setlocal nomodified + call unite#add_previewed_buffer_list(a:candidate.action__path) endif finally execute winnr.'wincmd w' @@ -104,7 +106,7 @@ \ 'is_quit' : 0, \ 'is_invalidate_cache' : 1, \ } -function! s:kind.action_table.mkdir.func(candidate) abort "{{{ +function! s:kind.action_table.mkdir.func(candidate) "{{{ let dirname = input('New directory name: ', \ a:candidate.action__path, 'dir') redraw @@ -127,7 +129,7 @@ \ 'is_invalidate_cache' : 1, \ 'is_selectable' : 1, \ } -function! s:kind.action_table.rename.func(candidates) abort "{{{ +function! s:kind.action_table.rename.func(candidates) "{{{ for candidate in a:candidates let filename = unite#util#substitute_path_separator( \ unite#util#expand(input(printf('New file name: %s -> ', @@ -145,7 +147,7 @@ \ 'is_invalidate_cache' : 1, \ 'is_selectable' : 1, \ } -function! s:kind.action_table.backup.func(candidates) abort "{{{ +function! s:kind.action_table.backup.func(candidates) "{{{ for candidate in a:candidates let filename = candidate.action__path . '.' . strftime('%y%m%d_%H%M') @@ -157,7 +159,7 @@ \ 'description' : ':read files', \ 'is_selectable' : 1, \ } -function! s:kind.action_table.read.func(candidates) abort "{{{ +function! s:kind.action_table.read.func(candidates) "{{{ for candidate in a:candidates call s:execute_command('read', candidate) endfor @@ -167,7 +169,7 @@ \ 'description' : 'write by unix fileformat', \ 'is_selectable' : 1, \ } -function! s:kind.action_table.wunix.func(candidates) abort "{{{ +function! s:kind.action_table.wunix.func(candidates) "{{{ let current_bufnr = bufnr('%') for candidate in a:candidates @@ -189,7 +191,7 @@ \ 'description' : 'diff with the other candidate or current buffer', \ 'is_selectable' : 1, \ } -function! s:kind.action_table.diff.func(candidates) abort "{{{ +function! s:kind.action_table.diff.func(candidates) if !empty(filter(copy(a:candidates), 'isdirectory(v:val.action__path)')) echo 'Invalid files.' return @@ -207,12 +209,11 @@ try " Use selected candidates or current buffer. if &filetype ==# 'vimfiler' - let file = get(vimfiler#get_marked_files( - \ b:vimfiler), 0, vimfiler#get_file(b:vimfiler)) + let file = get(vimfiler#get_marked_files(), 0, vimfiler#get_file()) if empty(file) || isdirectory(file.action__path) echo 'Invalid candidate is detected.' return - elseif len(vimfiler#get_marked_files(b:vimfiler)) > 1 + elseif len(vimfiler#get_marked_files()) > 1 echo 'Too many candidates!' return endif @@ -240,13 +241,13 @@ else echo 'Too many candidates!' endif -endfunction"}}} +endfunction let s:kind.action_table.dirdiff = { \ 'description' : ':DirDiff with the other candidate', \ 'is_selectable' : 1, \ } -function! s:kind.action_table.dirdiff.func(candidates) abort "{{{ +function! s:kind.action_table.dirdiff.func(candidates) if !exists(':DirDiff') echo 'DirDiff.vim is not installed.' return @@ -261,15 +262,17 @@ execute 'DirDiff' unite#helper#get_candidate_directory(a:candidates[0]) \ unite#helper#get_candidate_directory(a:candidates[1]) endif -endfunction"}}} +endfunction " For grep. let s:kind.action_table.grep = { \ 'description': 'grep this file', + \ 'is_quit': 1, + \ 'is_invalidate_cache': 1, \ 'is_selectable': 1, \ 'is_start' : 1, \ } -function! s:kind.action_table.grep.func(candidates) abort "{{{ +function! s:kind.action_table.grep.func(candidates) "{{{ call unite#start_script([ \ ['grep', join(map(copy(a:candidates), 'v:val.action__path'), "\n"), \ ]], { 'no_quit' : 1, 'no_empty' : 1 }) @@ -278,10 +281,12 @@ " For vimgrep let s:kind.action_table.vimgrep = { \ 'description': 'vimgrep this files', + \ 'is_quit': 1, + \ 'is_invalidate_cache': 1, \ 'is_selectable': 1, \ 'is_start' : 1, \ } -function! s:kind.action_table.vimgrep.func(candidates) abort "{{{ +function! s:kind.action_table.vimgrep.func(candidates) "{{{ call unite#start_script([ \ ['vimgrep', join(map(copy(a:candidates), \ 'substitute(v:val.action__path, "/$", "", "g")'), "\n"), @@ -291,27 +296,18 @@ " For find. let s:kind.action_table.find = { \ 'description': 'find this directory', + \ 'is_quit': 1, + \ 'is_invalidate_cache': 1, \ 'is_start' : 1, \ } -function! s:kind.action_table.find.func(candidate) abort "{{{ +function! s:kind.action_table.find.func(candidate) "{{{ call unite#start_script([['find', \ unite#helper#get_candidate_directory(a:candidate)]], \ {'no_quit' : 1}) endfunction "}}} - -let s:kind.action_table.argadd = { - \ 'description' : 'add candidates into the argument list', - \ 'is_selectable' : 1, - \ } -function! s:kind.action_table.argadd.func(candidates) abort "{{{ - for candidate in a:candidates - execute 'argadd' fnameescape(candidate.action__path) - endfor -endfunction"}}} - "}}} -function! s:execute_command(command, candidate) abort "{{{ +function! s:execute_command(command, candidate) "{{{ let dir = unite#util#path2directory( \ unite#util#expand(a:candidate.action__path)) " Auto make directory. @@ -333,7 +329,7 @@ \ 'is_invalidate_cache': 1, \ 'is_selectable': 1, \ } -function! s:kind.action_table.exrename.func(candidates) abort "{{{ +function! s:kind.action_table.exrename.func(candidates) let context = unite#get_context() let buffer_name = context.buffer_name if buffer_name ==# 'default' @@ -342,7 +338,7 @@ call unite#exrename#create_buffer(a:candidates, { \ 'buffer_name': buffer_name, \}) -endfunction"}}} +endfunction let &cpo = s:save_cpo unlet s:save_cpo === modified file 'vim/bundle/unite.vim/autoload/unite/kinds/file_vimfiler_base.vim' --- vim/bundle/unite.vim/autoload/unite/kinds/file_vimfiler_base.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/kinds/file_vimfiler_base.vim 2015-08-25 11:01:00 +0000 @@ -55,7 +55,7 @@ \ unite#util#is_windows() && unite#util#has_vimproc()) "}}} -function! unite#kinds#file_vimfiler_base#define() abort "{{{ +function! unite#kinds#file_vimfiler_base#define() "{{{ return s:kind endfunction"}}} @@ -77,7 +77,7 @@ \ 'is_selectable' : 1, \ 'is_listed' : 0, \ } -function! s:kind.action_table.vimfiler__move.func(candidates) abort "{{{ +function! s:kind.action_table.vimfiler__move.func(candidates) "{{{ if !unite#util#input_yesno('Really move files?') echo 'Canceled.' return @@ -138,14 +138,16 @@ call s:search_cursor(filename, dest_dir, a:candidates[-1]) endif finally - call unite#util#lcd(current_dir) + if isdirectory(current_dir) + call unite#util#lcd(current_dir) + endif endtry endfunction"}}} let s:kind.action_table.move = \ deepcopy(s:kind.action_table.vimfiler__move) let s:kind.action_table.move.is_listed = 1 -function! s:kind.action_table.move.func(candidates) abort "{{{ +function! s:kind.action_table.move.func(candidates) "{{{ return s:kind.action_table.vimfiler__move.func(a:candidates) endfunction"}}} @@ -156,7 +158,7 @@ \ 'is_selectable' : 1, \ 'is_listed' : 0, \ } -function! s:kind.action_table.vimfiler__copy.func(candidates) abort "{{{ +function! s:kind.action_table.vimfiler__copy.func(candidates) "{{{ let vimfiler_current_dir = \ get(unite#get_context(), 'vimfiler__current_directory', '') if vimfiler_current_dir == '' @@ -196,13 +198,15 @@ call s:search_cursor(filename, dest_dir, a:candidates[-1]) endif finally - call unite#util#lcd(current_dir) + if isdirectory(current_dir) + call unite#util#lcd(current_dir) + endif endtry endfunction"}}} let s:kind.action_table.copy = deepcopy(s:kind.action_table.vimfiler__copy) let s:kind.action_table.copy.is_listed = 1 -function! s:kind.action_table.copy.func(candidates) abort "{{{ +function! s:kind.action_table.copy.func(candidates) "{{{ return s:kind.action_table.vimfiler__copy.func(a:candidates) endfunction"}}} @@ -213,7 +217,7 @@ \ 'is_selectable' : 1, \ 'is_listed' : 0, \ } -function! s:kind.action_table.vimfiler__delete.func(candidates) abort "{{{ +function! s:kind.action_table.vimfiler__delete.func(candidates) "{{{ if g:unite_kind_file_delete_file_command == '' \ || g:unite_kind_file_delete_directory_command == '' call unite#print_error('Please install rm.exe.') @@ -234,7 +238,7 @@ \ 'is_invalidate_cache' : 1, \ 'is_listed' : 0, \ } -function! s:kind.action_table.vimfiler__rename.func(candidate) abort "{{{ +function! s:kind.action_table.vimfiler__rename.func(candidate) "{{{ let vimfiler_current_dir = \ get(unite#get_context(), 'vimfiler__current_directory', '') if vimfiler_current_dir == '' @@ -260,7 +264,9 @@ call s:search_cursor(filename, '', {}) endif finally - call unite#util#lcd(current_dir) + if isdirectory(current_dir) + call unite#util#lcd(current_dir) + endif endtry endfunction"}}} @@ -270,7 +276,7 @@ \ 'is_invalidate_cache' : 1, \ 'is_listed' : 0, \ } -function! s:kind.action_table.vimfiler__newfile.func(candidate) abort "{{{ +function! s:kind.action_table.vimfiler__newfile.func(candidate) "{{{ let vimfiler_current_dir = \ get(unite#get_context(), \ 'vimfiler__current_directory', '') @@ -305,17 +311,23 @@ call mkdir(dir, 'p') endif - if filename !~ '/$' - let file = unite#sources#file#create_file_dict(filename, '') - let file.source = 'file' - - call writefile([], filename) - endif - - call s:search_cursor(filename, '', {}) + let file = unite#sources#file#create_file_dict( + \ filename, filename !~ '^\%(/\|\a\+:/\)') + let file.source = 'file' + + call writefile([], filename) + + call unite#action#do( + \ (vimfiler_current_dir == '' ? + \ 'open' : vimfiler#get_context().edit_action), + \ [file], { 'no_quit' : 1 }) + + execute 'doautocmd BufNewFile' fnameescape(filename) endfor finally - call unite#util#lcd(current_dir) + if isdirectory(current_dir) + call unite#util#lcd(current_dir) + endif endtry endfunction"}}} @@ -326,7 +338,7 @@ \ 'description' : 'popup shell', \ 'is_listed' : 0, \ } -function! s:kind.action_table.vimfiler__shell.func(candidate) abort "{{{ +function! s:kind.action_table.vimfiler__shell.func(candidate) "{{{ if !exists(':VimShellPop') shell return @@ -348,7 +360,7 @@ \ 'is_listed' : 0, \ 'is_start' : 1, \ } -function! s:kind.action_table.vimfiler__shellcmd.func(candidate) abort "{{{ +function! s:kind.action_table.vimfiler__shellcmd.func(candidate) "{{{ let vimfiler_current_dir = \ get(unite#get_context(), 'vimfiler__current_directory', '') if vimfiler_current_dir == '' @@ -365,7 +377,9 @@ call unite#start_script([['output', output]]) endif finally - call unite#util#lcd(current_dir) + if isdirectory(current_dir) + call unite#util#lcd(current_dir) + endif endtry endfunction"}}} @@ -376,7 +390,7 @@ \ 'is_listed' : 0, \ 'is_selectable' : 1, \ } -function! s:kind.action_table.vimfiler__mkdir.func(candidates) abort "{{{ +function! s:kind.action_table.vimfiler__mkdir.func(candidates) "{{{ let context = unite#get_context() let vimfiler_current_dir = get(context, 'vimfiler__current_directory', '') if vimfiler_current_dir == '' @@ -416,7 +430,9 @@ call s:search_cursor(dirname, '', {}) finally - call unite#util#lcd(current_dir) + if isdirectory(current_dir) + call unite#util#lcd(current_dir) + endif endtry endfunction"}}} @@ -425,7 +441,7 @@ \ 'is_selectable' : 1, \ 'is_listed' : 0, \ } -function! s:kind.action_table.vimfiler__execute.func(candidates) abort "{{{ +function! s:kind.action_table.vimfiler__execute.func(candidates) "{{{ let vimfiler_current_dir = \ get(unite#get_context(), 'vimfiler__current_directory', '') if vimfiler_current_dir == '' @@ -446,7 +462,9 @@ call s:System.open(path) endfor finally - call unite#util#lcd(current_dir) + if isdirectory(current_dir) + call unite#util#lcd(current_dir) + endif endtry endfunction"}}} @@ -454,7 +472,7 @@ \ 'description' : 'open file with external file explorer', \ 'is_listed' : 0, \ } -function! s:kind.action_table.vimfiler__external_filer.func(candidate) abort "{{{ +function! s:kind.action_table.vimfiler__external_filer.func(candidate) "{{{ let vimfiler_current_dir = \ get(unite#get_context(), 'vimfiler__current_directory', '') if vimfiler_current_dir == '' @@ -498,14 +516,16 @@ call unite#util#print_error(output) endif finally - call unite#util#lcd(current_dir) + if isdirectory(current_dir) + call unite#util#lcd(current_dir) + endif endtry endfunction"}}} let s:kind.action_table.vimfiler__write = { \ 'description' : 'save file', \ 'is_listed' : 0, \ } -function! s:kind.action_table.vimfiler__write.func(candidate) abort "{{{ +function! s:kind.action_table.vimfiler__write.func(candidate) "{{{ let context = unite#get_context() let lines = getline(context.vimfiler__line1, context.vimfiler__line2) @@ -517,7 +537,7 @@ endfunction"}}} "}}} -function! s:move_to_other_drive(candidate, filename) abort "{{{ +function! s:move_to_other_drive(candidate, filename) "{{{ " move command doesn't supported directory over drive move in Windows. if g:unite_kind_file_copy_file_command == '' \ || g:unite_kind_file_copy_directory_command == '' @@ -540,7 +560,7 @@ endif endfunction"}}} -function! s:search_cursor(filename, dest_dir, candidate) abort "{{{ +function! s:search_cursor(filename, dest_dir, candidate) "{{{ if &filetype !=# 'vimfiler' return endif === modified file 'vim/bundle/unite.vim/autoload/unite/kinds/guicmd.vim' --- vim/bundle/unite.vim/autoload/unite/kinds/guicmd.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/kinds/guicmd.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#kinds#guicmd#define() abort "{{{ +function! unite#kinds#guicmd#define() "{{{ return s:kind endfunction"}}} @@ -41,7 +41,7 @@ let s:kind.action_table.execute = { \ 'description' : 'execute command', \ } -function! s:kind.action_table.execute.func(candidate) abort "{{{ +function! s:kind.action_table.execute.func(candidate) "{{{ let args = [a:candidate.action__path] if has_key(a:candidate, 'action__args') let args += a:candidate.action__args @@ -65,7 +65,7 @@ let s:kind.action_table.edit = { \ 'description' : 'edit command args', \ } -function! s:kind.action_table.edit.func(candidate) abort "{{{ +function! s:kind.action_table.edit.func(candidate) "{{{ let args = [a:candidate.action__path] if has_key(a:candidate, 'action__args') let args += a:candidate.action__args === modified file 'vim/bundle/unite.vim/autoload/unite/kinds/jump_list.vim' --- vim/bundle/unite.vim/autoload/unite/kinds/jump_list.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/kinds/jump_list.vim 2015-08-25 11:01:00 +0000 @@ -35,7 +35,7 @@ endif "}}} -function! unite#kinds#jump_list#define() abort "{{{ +function! unite#kinds#jump_list#define() "{{{ let kind = { \ 'name' : 'jump_list', \ 'default_action' : 'open', @@ -49,7 +49,7 @@ \ 'description' : 'jump to this position', \ 'is_selectable' : 1, \ } - function! kind.action_table.open.func(candidates) abort "{{{ + function! kind.action_table.open.func(candidates) "{{{ for candidate in a:candidates " Save current line in jump_list execute 'normal!' line('.').'G' @@ -65,23 +65,15 @@ " Open folds. normal! zv call s:adjust_scroll(s:best_winline()) - call unite#view#_clear_match_highlight() + call s:clear_highlight() endfor - - " Add search history - let context = unite#get_context() - if has_key(context, 'input_list') - \ && len(context.input_list) == 1 - \ && context.input != '' - call histadd("search", context.input) - endif endfunction"}}} let kind.action_table.preview = { \ 'description' : 'preview this position', \ 'is_quit' : 0, \ } - function! kind.action_table.preview.func(candidate) abort "{{{ + function! kind.action_table.preview.func(candidate) "{{{ let filename = s:get_filename(a:candidate) let bufwinnr = bufwinnr(filename) let buflisted = buflisted(filename) @@ -95,8 +87,12 @@ wincmd P try let bufnr = s:open(a:candidate) - if bufwinnr < 0 && !buflisted - call unite#add_previewed_buffer_list(bufnr) + if bufwinnr < 0 + doautocmd BufRead + setlocal nomodified + if !buflisted + call unite#add_previewed_buffer_list(bufnr) + endif endif call s:jump(a:candidate, 1) finally @@ -108,13 +104,20 @@ \ 'description' : 'highlight this position', \ 'is_quit' : 0, \ } - function! kind.action_table.highlight.func(candidate) abort "{{{ + function! kind.action_table.highlight.func(candidate) "{{{ let candidate_winnr = bufwinnr(s:get_bufnr(a:candidate)) if candidate_winnr > 0 let unite = unite#get_current_unite() + let context = unite.context let current_winnr = winnr() + if context.vertical + setlocal winfixwidth + else + setlocal winfixheight + endif + noautocmd execute candidate_winnr 'wincmd w' call s:jump(a:candidate, 1) @@ -133,7 +136,7 @@ \ 'description' : 'replace with qfreplace', \ 'is_selectable' : 1, \ } - function! kind.action_table.replace.func(candidates) abort "{{{ + function! kind.action_table.replace.func(candidates) "{{{ if globpath(&runtimepath, 'autoload/qfreplace.vim') == '' echo 'qfreplace.vim is not installed.' return @@ -164,7 +167,7 @@ "}}} " Misc. -function! s:jump(candidate, is_highlight) abort "{{{ +function! s:jump(candidate, is_highlight) "{{{ let line = get(a:candidate, 'action__line', 1) let pattern = get(a:candidate, 'action__pattern', '') @@ -240,11 +243,11 @@ call s:open_current_line(a:is_highlight) endfunction"}}} -function! s:best_winline() abort "{{{ +function! s:best_winline() "{{{ return max([1, winheight(0) * g:unite_kind_jump_list_after_jump_scroll / 100]) endfunction"}}} -function! s:adjust_scroll(best_winline) abort "{{{ +function! s:adjust_scroll(best_winline) "{{{ normal! zt let save_cursor = getpos('.') let winl = 1 @@ -264,22 +267,22 @@ call setpos('.', save_cursor) endfunction"}}} -function! s:open_current_line(is_highlight) abort "{{{ +function! s:open_current_line(is_highlight) "{{{ normal! zv normal! zz if a:is_highlight - call unite#view#_clear_match_highlight() + call s:clear_highlight() call unite#view#_match_line('Search', line('.'), 10) endif endfunction"}}} -function! s:open(candidate) abort "{{{ +function! s:open(candidate) "{{{ let bufnr = s:get_bufnr(a:candidate) if bufnr != bufnr('%') if has_key(a:candidate, 'action__buffer_nr') silent execute 'keepjumps buffer' bufnr else - silent call unite#util#smart_execute_command( + call unite#util#smart_execute_command( \ 'keepjumps edit!', unite#util#expand( \ fnamemodify(a:candidate.action__path, ':~:.'))) let bufnr = bufnr('%') @@ -288,19 +291,22 @@ return bufnr endfunction"}}} -function! s:get_filename(candidate) abort "{{{ +function! s:get_filename(candidate) "{{{ return has_key(a:candidate, 'action__path') ? \ a:candidate.action__path : \ bufname(a:candidate.action__buffer_nr) endfunction"}}} -function! s:get_bufnr(candidate) abort "{{{ +function! s:get_bufnr(candidate) "{{{ return has_key(a:candidate, 'action__buffer_nr') ? \ a:candidate.action__buffer_nr : \ bufnr(a:candidate.action__path) endfunction"}}} -function! s:convert_path(path) abort "{{{ +function! s:convert_path(path) "{{{ return unite#util#substitute_path_separator(fnamemodify(a:path, ':p')) endfunction"}}} +function! s:clear_highlight() "{{{ + silent! call matchdelete(10) +endfunction"}}} let &cpo = s:save_cpo unlet s:save_cpo === modified file 'vim/bundle/unite.vim/autoload/unite/kinds/openable.vim' --- vim/bundle/unite.vim/autoload/unite/kinds/openable.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/kinds/openable.vim 2015-08-25 11:01:00 +0000 @@ -29,7 +29,7 @@ " Variables "{{{ call unite#util#set_default('g:unite_kind_openable_persist_open_blink_time', '250m') "}}} -function! unite#kinds#openable#define() abort "{{{ +function! unite#kinds#openable#define() "{{{ return s:kind endfunction"}}} @@ -45,7 +45,7 @@ \ 'is_selectable' : 1, \ 'is_tab' : 1, \ } -function! s:kind.action_table.tabopen.func(candidates) abort "{{{ +function! s:kind.action_table.tabopen.func(candidates) "{{{ for candidate in a:candidates let hidden_save = &hidden try @@ -62,7 +62,7 @@ \ 'description' : 'choose windows and open items', \ 'is_selectable' : 1, \ } -function! s:kind.action_table.choose.func(candidates) abort "{{{ +function! s:kind.action_table.choose.func(candidates) "{{{ for candidate in a:candidates if winnr('$') != 1 let winnr = unite#helper#choose_window() @@ -79,7 +79,7 @@ \ 'description' : 'horizontal split open items', \ 'is_selectable' : 1, \ } -function! s:kind.action_table.split.func(candidates) abort "{{{ +function! s:kind.action_table.split.func(candidates) "{{{ for candidate in a:candidates call unite#util#command_with_restore_cursor('split') call unite#take_action('open', candidate) @@ -90,7 +90,7 @@ \ 'description' : 'vertical split open items', \ 'is_selectable' : 1, \ } -function! s:kind.action_table.vsplit.func(candidates) abort "{{{ +function! s:kind.action_table.vsplit.func(candidates) "{{{ for candidate in a:candidates call unite#util#command_with_restore_cursor('vsplit') call unite#take_action('open', candidate) @@ -101,7 +101,7 @@ \ 'description' : 'vertical left split items', \ 'is_selectable' : 1, \ } -function! s:kind.action_table.left.func(candidates) abort "{{{ +function! s:kind.action_table.left.func(candidates) "{{{ for candidate in a:candidates call unite#util#command_with_restore_cursor('leftabove vsplit') call unite#take_action('open', candidate) @@ -112,7 +112,7 @@ \ 'description' : 'vertical right split open items', \ 'is_selectable' : 1, \ } -function! s:kind.action_table.right.func(candidates) abort "{{{ +function! s:kind.action_table.right.func(candidates) "{{{ for candidate in a:candidates call unite#util#command_with_restore_cursor('rightbelow vsplit') call unite#take_action('open', candidate) @@ -123,7 +123,7 @@ \ 'description' : 'horizontal above split open items', \ 'is_selectable' : 1, \ } -function! s:kind.action_table.above.func(candidates) abort "{{{ +function! s:kind.action_table.above.func(candidates) "{{{ for candidate in a:candidates call unite#util#command_with_restore_cursor('leftabove split') call unite#take_action('open', candidate) @@ -134,7 +134,7 @@ \ 'description' : 'horizontal below split open items', \ 'is_selectable' : 1, \ } -function! s:kind.action_table.below.func(candidates) abort "{{{ +function! s:kind.action_table.below.func(candidates) "{{{ for candidate in a:candidates call unite#util#command_with_restore_cursor('rightbelow split') call unite#take_action('open', candidate) @@ -145,7 +145,7 @@ \ 'description' : 'persistent open', \ 'is_quit' : 0, \ } -function! s:kind.action_table.persist_open.func(candidate) abort "{{{ +function! s:kind.action_table.persist_open.func(candidate) "{{{ let unite = unite#get_current_unite() let current_winnr = winnr() @@ -163,18 +163,12 @@ call unite#take_action('open', a:candidate) let unite.prev_bufnr = bufnr('%') - let unite.prev_pos = getpos('.') if g:unite_kind_openable_persist_open_blink_time != '' - let left = getpos("'<") - let right = getpos("'>") - let vimode = visualmode() normal! V redraw! execute 'sleep ' . g:unite_kind_openable_persist_open_blink_time - execute "normal! \" . vimode . "\" - call setpos("'<", left) - call setpos("'>", right) + execute "normal! \" endif let unite_winnr = bufwinnr(unite.bufnr) @@ -191,7 +185,7 @@ \ 'is_selectable' : 1, \ 'is_tab' : 1, \ } -function! s:kind.action_table.tabsplit.func(candidates) abort "{{{ +function! s:kind.action_table.tabsplit.func(candidates) "{{{ let hidden_save = &hidden try set nohidden @@ -214,11 +208,9 @@ \ . ' or jump to existing window/tabpage', \ 'is_selectable' : 1, \ } -function! s:kind.action_table.switch.func(candidates) abort "{{{ +function! s:kind.action_table.switch.func(candidates) "{{{ for candidate in a:candidates - if s:switch(candidate) - call unite#take_action('open', candidate) - endif + call s:switch(candidate) endfor endfunction"}}} @@ -227,7 +219,7 @@ \ . ' or jump to existing window/tabpage', \ 'is_selectable' : 1, \ } -function! s:kind.action_table.tabswitch.func(candidates) abort "{{{ +function! s:kind.action_table.tabswitch.func(candidates) "{{{ for candidate in a:candidates if s:switch(candidate) call unite#take_action('tabopen', candidate) @@ -240,7 +232,7 @@ \ . ' or jump to existing window/tabpage', \ 'is_selectable' : 1, \ } -function! s:kind.action_table.splitswitch.func(candidates) abort "{{{ +function! s:kind.action_table.splitswitch.func(candidates) "{{{ for candidate in a:candidates if s:switch(candidate) call unite#take_action('split', candidate) @@ -253,7 +245,7 @@ \ . ' or jump to existing window/tabpage', \ 'is_selectable' : 1, \ } -function! s:kind.action_table.vsplitswitch.func(candidates) abort "{{{ +function! s:kind.action_table.vsplitswitch.func(candidates) "{{{ for candidate in a:candidates if s:switch(candidate) call unite#take_action('vsplit', candidate) @@ -263,7 +255,7 @@ "}}} -function! s:search_buffer(candidate) abort "{{{ +function! s:search_buffer(candidate) "{{{ let bufnr = bufnr(a:candidate.action__path) for tabnr in range(1, tabpagenr('$')) if index(tabpagebuflist(tabnr), bufnr) >= 0 @@ -274,14 +266,16 @@ return -1 endfunction"}}} -function! s:switch(candidate) abort "{{{ +function! s:switch(candidate) "{{{ let tabnr = s:search_buffer(a:candidate) if tabnr < 0 + " Not found return 1 endif execute 'tabnext' tabnr execute bufwinnr(a:candidate.action__path) . 'wincmd w' + call unite#take_action('open', a:candidate) endfunction"}}} let &cpo = s:save_cpo === modified file 'vim/bundle/unite.vim/autoload/unite/kinds/source.vim' --- vim/bundle/unite.vim/autoload/unite/kinds/source.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/kinds/source.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#kinds#source#define() abort "{{{ +function! unite#kinds#source#define() "{{{ return s:kind endfunction"}}} @@ -43,7 +43,7 @@ \ 'is_quit' : 1, \ 'is_start' : 1, \ } -function! s:kind.action_table.start.func(candidates) abort "{{{ +function! s:kind.action_table.start.func(candidates) "{{{ call unite#start_temporary(map(copy(a:candidates), \ 'has_key(v:val, "action__source_args") ?' \ . 'insert(copy(v:val.action__source_args), v:val.action__source_name) :' @@ -55,7 +55,7 @@ \ 'is_quit' : 0, \ 'is_start' : 0, \ } -function! s:kind.action_table.edit.func(candidate) abort "{{{ +function! s:kind.action_table.edit.func(candidate) "{{{ let default_args = get(a:candidate, 'action__source_args', '') if type(default_args) != type('') \ || type(default_args) != type(0) === modified file 'vim/bundle/unite.vim/autoload/unite/kinds/tab.vim' --- vim/bundle/unite.vim/autoload/unite/kinds/tab.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/kinds/tab.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#kinds#tab#define() abort "{{{ +function! unite#kinds#tab#define() "{{{ return s:kind endfunction"}}} @@ -41,7 +41,7 @@ let s:kind.action_table.open = { \ 'description' : 'open this tab', \ } -function! s:kind.action_table.open.func(candidate) abort "{{{ +function! s:kind.action_table.open.func(candidate) "{{{ execute 'tabnext' a:candidate.action__tab_nr endfunction"}}} @@ -51,7 +51,7 @@ \ 'is_invalidate_cache' : 1, \ 'is_quit' : 0, \ } -function! s:kind.action_table.delete.func(candidates) abort "{{{ +function! s:kind.action_table.delete.func(candidates) "{{{ for candidate in sort(a:candidates, 's:compare') execute 'tabclose' candidate.action__tab_nr endfor @@ -61,7 +61,7 @@ \ 'description' : 'preview tab', \ 'is_quit' : 0, \ } -function! s:kind.action_table.preview.func(candidate) abort "{{{ +function! s:kind.action_table.preview.func(candidate) "{{{ let tabnr = tabpagenr() execute 'tabnext' a:candidate.action__tab_nr redraw @@ -73,7 +73,7 @@ \ 'description' : 'create new tab', \ 'is_invalidate_cache' : 1, \ } -function! s:kind.action_table.unite__new_candidate.func(candidate) abort "{{{ +function! s:kind.action_table.unite__new_candidate.func(candidate) "{{{ let title = input('Please input tab title: ', '', \ 'customlist,' . s:SID_PREFIX() . 'history_complete') @@ -84,11 +84,11 @@ endfunction"}}} " Anywhere SID. -function! s:SID_PREFIX() abort +function! s:SID_PREFIX() return matchstr(expand(''), '\d\+_\zeSID_PREFIX$') endfunction -function! s:history_complete(arglead, cmdline, cursorpos) abort +function! s:history_complete(arglead, cmdline, cursorpos) return filter(map(reverse(range(1, histnr('input'))), \ 'histget("input", v:val)'), \ 'v:val != "" && stridx(v:val, a:arglead) == 0') @@ -104,7 +104,7 @@ \ 'is_invalidate_cache' : 1, \ 'is_quit' : 0, \ } - function! s:kind.action_table.rename.func(candidates) abort "{{{ + function! s:kind.action_table.rename.func(candidates) "{{{ for candidate in a:candidates let old_title = gettabvar(candidate.action__tab_nr, 'title') let title = input(printf('New title: %s -> ', old_title), old_title) @@ -117,7 +117,7 @@ "}}} " Misc -function! s:compare(candidate_a, candidate_b) abort "{{{ +function! s:compare(candidate_a, candidate_b) "{{{ return a:candidate_b.action__tab_nr - a:candidate_a.action__tab_nr endfunction"}}} === modified file 'vim/bundle/unite.vim/autoload/unite/kinds/uri.vim' --- vim/bundle/unite.vim/autoload/unite/kinds/uri.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/kinds/uri.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#kinds#uri#define() abort "{{{ +function! unite#kinds#uri#define() "{{{ return s:kind endfunction"}}} @@ -42,9 +42,8 @@ let s:kind.action_table.start = { \ 'description' : 'open uri by browser', \ 'is_selectable' : 1, - \ 'is_quit' : 0, \ } -function! s:kind.action_table.start.func(candidates) abort "{{{ +function! s:kind.action_table.start.func(candidates) "{{{ for candidate in a:candidates let path = has_key(candidate, 'action__uri') ? \ candidate.action__uri : candidate.action__path === modified file 'vim/bundle/unite.vim/autoload/unite/kinds/window.vim' --- vim/bundle/unite.vim/autoload/unite/kinds/window.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/kinds/window.vim 2015-08-25 11:01:00 +0000 @@ -26,35 +26,22 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#kinds#window#define() abort "{{{ +function! unite#kinds#window#define() "{{{ return s:kind endfunction"}}} let s:kind = { \ 'name' : 'window', - \ 'default_action' : 'jump', + \ 'default_action' : 'open', \ 'action_table': {}, - \ 'parents' : ['common', 'openable', 'cdable'], + \ 'parents' : ['cdable'], \} " Actions "{{{ let s:kind.action_table.open = { - \ 'description' : 'open this window buffer', - \ 'is_selectable' : 1, - \ } -function! s:kind.action_table.open.func(candidates) abort "{{{ - for candidate in a:candidates - execute 'buffer' (has_key(candidate, 'action__tab_nr') ? - \ tabpagebuflist(candidate.action__tab_nr)[ - \ candidate.action__window_nr - 1] : - \ winbufnr(candidate.action__window_nr)) - endfor -endfunction"}}} - -let s:kind.action_table.jump = { \ 'description' : 'move to this window', \ } -function! s:kind.action_table.jump.func(candidate) abort "{{{ +function! s:kind.action_table.open.func(candidate) "{{{ if has_key(a:candidate, 'action__tab_nr') execute 'tabnext' a:candidate.action__tab_nr endif @@ -64,7 +51,7 @@ let s:kind.action_table.only = { \ 'description' : 'only this window', \ } -function! s:kind.action_table.only.func(candidate) abort "{{{ +function! s:kind.action_table.only.func(candidate) "{{{ if has_key(a:candidate, 'action__tab_nr') execute 'tabnext' a:candidate.action__tab_nr endif @@ -78,7 +65,7 @@ \ 'is_invalidate_cache' : 1, \ 'is_quit' : 0, \ } -function! s:kind.action_table.delete.func(candidates) abort "{{{ +function! s:kind.action_table.delete.func(candidates) "{{{ let tabnr = tabpagenr() for candidate in sort(a:candidates, 's:compare') if has_key(candidate, 'action__tab_nr') @@ -97,26 +84,19 @@ \ 'description' : 'preview window', \ 'is_quit' : 0, \ } -function! s:kind.action_table.preview.func(candidate) abort "{{{ +function! s:kind.action_table.preview.func(candidate) "{{{ let tabnr = tabpagenr() if has_key(a:candidate, 'action__tab_nr') execute 'tabnext' a:candidate.action__tab_nr endif if !has_key(a:candidate, 'action__buffer_nr') - \ && !has_key(a:candidate, 'action__window_nr') return endif let winnr = winnr() try - let unite_winnr = unite#get_current_unite().winnr - let prevwinnr = has_key(a:candidate, 'action__window_nr') ? - \ (a:candidate.action__window_nr >= unite_winnr ? - \ a:candidate.action__window_nr + 1 : - \ a:candidate.action__window_nr) : - \ bufwinnr(a:candidate.action__buffer_nr) - execute prevwinnr.'wincmd w' + execute bufwinnr(a:candidate.action__buffer_nr).'wincmd w' execute 'match Search /\%'.line('.').'l/' redraw sleep 500m @@ -132,7 +112,7 @@ "}}} " Misc -function! s:compare(candidate_a, candidate_b) abort "{{{ +function! s:compare(candidate_a, candidate_b) "{{{ return a:candidate_b.action__window_nr - a:candidate_a.action__window_nr endfunction"}}} === modified file 'vim/bundle/unite.vim/autoload/unite/kinds/word.vim' --- vim/bundle/unite.vim/autoload/unite/kinds/word.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/kinds/word.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#kinds#word#define() abort "{{{ +function! unite#kinds#word#define() "{{{ return s:kind endfunction"}}} === modified file 'vim/bundle/unite.vim/autoload/unite/mappings.vim' --- vim/bundle/unite.vim/autoload/unite/mappings.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/mappings.vim 2015-08-25 11:01:00 +0000 @@ -27,7 +27,7 @@ set cpo&vim " Define default mappings. -function! unite#mappings#define_default_mappings() abort "{{{ +function! unite#mappings#define_default_mappings() "{{{ " Plugin keymappings "{{{ nnoremap (unite_exit) \ :call exit() @@ -318,19 +318,19 @@ \ unite#do_action('open') endfunction"}}} -function! s:nowait_map(mode) abort "{{{ +function! s:nowait_map(mode) "{{{ return a:mode.'map ' \ . ((v:version > 703 || (v:version == 703 && has('patch1261'))) ? \ '' : '') endfunction "}}} -function! s:nowait_expr(map) abort "{{{ +function! s:nowait_expr(map) "{{{ return a:map . ' ' \ . ((v:version > 703 || (v:version == 703 && has('patch1261'))) ? \ '' : '') endfunction "}}} -function! unite#mappings#narrowing(word, ...) abort "{{{ +function! unite#mappings#narrowing(word, ...) "{{{ let is_escape = get(a:000, 0, 1) setlocal modifiable @@ -346,39 +346,39 @@ startinsert! endfunction"}}} -function! unite#mappings#do_action(...) abort "{{{ +function! unite#mappings#do_action(...) "{{{ return call('unite#action#do', a:000) endfunction"}}} -function! unite#mappings#set_current_matchers(matchers) abort "{{{ +function! unite#mappings#set_current_matchers(matchers) "{{{ let unite = unite#get_current_unite() let unite.current_matchers = a:matchers let unite.context.is_redraw = 1 - return mode() ==# 'i' ? "a\" : "g\" + return mode() ==# 'i' ? "\\" : "g\" endfunction"}}} -function! unite#mappings#set_current_sorters(sorters) abort "{{{ +function! unite#mappings#set_current_sorters(sorters) "{{{ let unite = unite#get_current_unite() let unite.current_sorters = a:sorters let unite.context.is_redraw = 1 - return mode() ==# 'i' ? "a\" : "g\" + return mode() ==# 'i' ? "\\" : "g\" endfunction"}}} -function! unite#mappings#set_current_converters(converters) abort "{{{ +function! unite#mappings#set_current_converters(converters) "{{{ let unite = unite#get_current_unite() let unite.current_converters = a:converters let unite.context.is_redraw = 1 - return mode() ==# 'i' ? "a\" : "g\" + return mode() ==# 'i' ? "\\" : "g\" endfunction"}}} -function! unite#mappings#get_current_matchers() abort "{{{ +function! unite#mappings#get_current_matchers() "{{{ return unite#get_current_unite().current_matchers endfunction"}}} -function! unite#mappings#get_current_sorters() abort "{{{ +function! unite#mappings#get_current_sorters() "{{{ return unite#get_current_unite().current_sorters endfunction"}}} -function! unite#mappings#get_current_converters() abort "{{{ +function! unite#mappings#get_current_converters() "{{{ return unite#get_current_unite().current_converters endfunction"}}} -function! s:smart_imap(map) abort "{{{ +function! s:smart_imap(map) "{{{ call s:clear_complete() if line('.') == b:unite.prompt_linenr \ && col('.') <= len(b:unite.context.prompt) @@ -388,7 +388,7 @@ \ "\" . b:unite.prompt_linenr . 'Gzb$a' : '') . a:map endif endfunction"}}} -function! s:smart_imap2(map) abort "{{{ +function! s:smart_imap2(map) "{{{ call s:clear_complete() if line('.') == b:unite.prompt_linenr \ && col('.') >= col('$') @@ -399,7 +399,7 @@ endif endfunction"}}} -function! s:do_new_candidate_action() abort "{{{ +function! s:do_new_candidate_action() "{{{ if empty(unite#helper#get_current_candidate()) " Get source name. if len(unite#get_sources()) != 1 @@ -418,7 +418,7 @@ endfunction"}}} " key-mappings functions. -function! s:exit() abort "{{{ +function! s:exit() "{{{ let context = unite#get_context() call unite#force_quit_session() @@ -428,10 +428,10 @@ close endif endfunction"}}} -function! s:all_exit() abort "{{{ +function! s:all_exit() "{{{ call unite#all_quit_session() endfunction"}}} -function! s:restart() abort "{{{ +function! s:restart() "{{{ let unite = unite#get_current_unite() let context = unite.context let context.resume = 0 @@ -441,7 +441,7 @@ call unite#force_quit_session() call unite#start(sources, context) endfunction"}}} -function! s:delete_backward_path() abort "{{{ +function! s:delete_backward_path() "{{{ let context = unite#get_context() if context.input != '' call unite#mappings#narrowing( @@ -451,17 +451,13 @@ call unite#redraw() endif endfunction"}}} -function! s:toggle_mark(map) abort "{{{ +function! s:toggle_mark(map) "{{{ call unite#helper#skip_prompt() let candidate = unite#helper#get_current_candidate() - if empty(candidate) - return - endif if !get(candidate, 'is_dummy', 0) let candidate.unite__is_marked = !candidate.unite__is_marked - let candidate.unite__marked_time = has('reltime') && has('float') ? - \ str2float(reltimestr(reltime())) : localtime() + let candidate.unite__marked_time = localtime() call unite#view#_redraw_line() endif @@ -471,11 +467,11 @@ \ || a:map ==# 'k' && context.prompt_direction ==# 'below') ? \ unite#mappings#cursor_down(1) : unite#mappings#cursor_up(1) endfunction"}}} -function! s:toggle_mark_all_candidates() abort "{{{ +function! s:toggle_mark_all_candidates() "{{{ call unite#view#_redraw_all_candidates() call s:toggle_mark_candidates(1, line('$')) endfunction"}}} -function! s:toggle_mark_candidates(start, end) abort "{{{ +function! s:toggle_mark_candidates(start, end) "{{{ if a:start < 0 " Ignore. return @@ -486,12 +482,7 @@ let pos = getpos('.') try call cursor(a:start, 1) - let prev = -1 for _ in range(a:start, a:end) - if line('.') == prev || line('.') < a:start || line('.') > a:end - break - endif - let prev = line('.') if line('.') == unite.prompt_linenr call unite#helper#skip_prompt() else @@ -508,10 +499,10 @@ call unite#view#_bottom_cursor() endtry endfunction"}}} -function! s:quick_help() abort "{{{ +function! s:quick_help() "{{{ call unite#start_temporary([['mapping', bufnr('%')]], {}, 'mapping-help') endfunction"}}} -function! s:choose_action() abort "{{{ +function! s:choose_action() "{{{ let candidates = unite#helper#get_marked_candidates() if empty(candidates) if empty(unite#helper#get_current_candidate()) @@ -523,42 +514,38 @@ call unite#mappings#_choose_action(candidates) endfunction"}}} -function! unite#mappings#_choose_action(candidates, ...) abort "{{{ +function! unite#mappings#_choose_action(candidates, ...) "{{{ call filter(a:candidates, \ '!has_key(v:val, "is_dummy") || !v:val.is_dummy') if empty(a:candidates) return endif + let unite = unite#get_current_unite() let context = deepcopy(get(a:000, 0, {})) - let context.source__sources = unite#init#_loaded_sources( - \ unite#util#uniq(map(copy(a:candidates), - \ 'v:val.source')), context) + let context.source__sources = unite.sources let context.buffer_name = 'action' let context.profile_name = 'action' - let context.default_action = 'default' let context.start_insert = 1 let context.truncate = 1 - call call((has_key(context, 'vimfiler__current_directory') - \ || &filetype !=# 'unite' ? + call call((has_key(context, 'vimfiler__current_directory') ? \ 'unite#start' : 'unite#start_temporary'), \ [[[unite#sources#action#define(), a:candidates]], context]) endfunction"}}} -function! s:insert_enter(key) abort "{{{ +function! s:insert_enter(key) "{{{ setlocal modifiable let unite = unite#get_current_unite() return (line('.') != unite.prompt_linenr) ? - \ (unite.context.prompt_focus ? - \ unite.prompt_linenr.'GA' : 'gI') : + \ '0i' : \ (a:key == 'i' && col('.') <= 1 \ || a:key == 'a' && col('.') < 1) ? \ 'A' : \ a:key endfunction"}}} -function! s:insert_enter2() abort "{{{ +function! s:insert_enter2() "{{{ nnoremap (unite_insert_enter) \ insert_enter('i') nnoremap (unite_insert_head) @@ -580,14 +567,14 @@ call unite#view#_bottom_cursor() startinsert! endfunction"}}} -function! s:insert_leave() abort "{{{ +function! s:insert_leave() "{{{ call unite#helper#skip_prompt() endfunction"}}} -function! s:redraw() abort "{{{ +function! s:redraw() "{{{ call unite#clear_message() call unite#force_redraw() endfunction"}}} -function! s:rotate_source(is_next) abort "{{{ +function! s:rotate_source(is_next) "{{{ let unite = unite#get_current_unite() for _ in unite#loaded_sources_list() @@ -605,7 +592,7 @@ call unite#view#_redraw_candidates() endfunction"}}} -function! s:print_candidate() abort "{{{ +function! s:print_candidate() "{{{ let candidate = unite#helper#get_current_candidate() if empty(candidate) " Ignore. @@ -615,7 +602,7 @@ echo 'abbr: ' . candidate.unite__abbr echo 'word: ' . candidate.word endfunction"}}} -function! s:print_message_log() abort "{{{ +function! s:print_message_log() "{{{ for msg in unite#get_current_unite().msgs echohl Comment | echo msg | echohl None endfor @@ -623,7 +610,7 @@ echohl WarningMsg | echo msg | echohl None endfor endfunction"}}} -function! s:cursor_top() abort "{{{ +function! s:cursor_top() "{{{ let unite = unite#get_current_unite() if v:count == 0 execute 'normal!' (unite.prompt_linenr == 1 ? '2' : '') . 'gg0z.' @@ -634,7 +621,7 @@ execute 'normal!' v:count . 'gg0z.' endif endfunction"}}} -function! s:cursor_bottom() abort "{{{ +function! s:cursor_bottom() "{{{ if v:count == 0 call unite#view#_redraw_all_candidates() normal! G @@ -646,7 +633,7 @@ execute 'normal!' v:count . 'G' endif endfunction"}}} -function! s:insert_selected_candidate() abort "{{{ +function! s:insert_selected_candidate() "{{{ let candidate = unite#helper#get_current_candidate() if empty(candidate) " Ignore. @@ -655,7 +642,7 @@ call unite#mappings#narrowing(candidate.word) endfunction"}}} -function! unite#mappings#_quick_match(is_jump) abort "{{{ +function! unite#mappings#_quick_match(is_jump) "{{{ if !empty(unite#helper#get_marked_candidates()) call unite#util#print_error('Marked candidates is detected.') return @@ -693,7 +680,7 @@ endif if candidate.is_dummy - call unite#util#print_error('Dummy.') + call unite#util#print_error('Canceled.') return endif @@ -704,14 +691,14 @@ \ unite.context.default_action, [candidate]) endif endfunction"}}} -function! s:input_directory() abort "{{{ +function! s:input_directory() "{{{ let path = unite#util#substitute_path_separator( \ input('Input narrowing directory: ', \ unite#helper#get_input(), 'dir')) let path = path.(path == '' || path =~ '/$' ? '' : '/') call unite#mappings#narrowing(path) endfunction"}}} -function! unite#mappings#loop_cursor_up(mode) abort "{{{ +function! unite#mappings#loop_cursor_up(mode) "{{{ " Loop. call unite#view#_redraw_all_candidates() @@ -721,7 +708,7 @@ call cursor(line('$'), 1) endfunction"}}} -function! unite#mappings#loop_cursor_down(mode) abort "{{{ +function! unite#mappings#loop_cursor_down(mode) "{{{ " Loop. call unite#view#_redraw_all_candidates() @@ -731,7 +718,7 @@ call cursor(1, 1) endfunction"}}} -function! unite#mappings#cursor_up(is_skip_not_matched) abort "{{{ +function! unite#mappings#cursor_up(is_skip_not_matched) "{{{ let is_insert = mode() ==# 'i' let prompt_linenr = unite#get_current_unite().prompt_linenr @@ -760,7 +747,7 @@ return cnt == 1 ? 'k' : cnt.'k' endif endfunction"}}} -function! unite#mappings#cursor_down(is_skip_not_matched) abort "{{{ +function! unite#mappings#cursor_down(is_skip_not_matched) "{{{ let is_insert = mode() ==# 'i' let prompt_linenr = unite#get_current_unite().prompt_linenr @@ -789,7 +776,7 @@ return cnt == 1 ? 'j' : cnt.'j' endif endfunction"}}} -function! s:smart_preview() abort "{{{ +function! s:smart_preview() "{{{ if b:unite.preview_candidate !=# \ unite#helper#get_current_candidate() call unite#view#_do_auto_preview() @@ -799,7 +786,7 @@ call unite#view#_resize_window() endfunction"}}} -function! s:toggle_transpose_window() abort "{{{ +function! s:toggle_transpose_window() "{{{ " Toggle vertical/horizontal view. let context = unite#get_context() let direction = context.vertical ? @@ -810,7 +797,7 @@ let context.vertical = !context.vertical endfunction"}}} -function! s:toggle_auto_preview() abort "{{{ +function! s:toggle_auto_preview() "{{{ let unite = unite#get_current_unite() let context = unite#get_context() let context.auto_preview = !context.auto_preview @@ -826,27 +813,27 @@ call unite#view#_resize_window() endfunction"}}} -function! s:toggle_auto_highlight() abort "{{{ +function! s:toggle_auto_highlight() "{{{ let context = unite#get_context() let context.auto_highlight = !context.auto_highlight endfunction"}}} -function! s:disable_max_candidates() abort "{{{ +function! s:disable_max_candidates() "{{{ let unite = unite#get_current_unite() let unite.disabled_max_candidates = 1 call unite#force_redraw() call unite#view#_redraw_all_candidates() endfunction"}}} -function! s:narrowing_input_history() abort "{{{ +function! s:narrowing_input_history() "{{{ call unite#start_temporary( \ [unite#sources#history_input#define()], \ { 'old_source_names_string' : unite#loaded_source_names_string() }, \ 'history/input') endfunction"}}} -function! s:narrowing_dot() abort "{{{ +function! s:narrowing_dot() "{{{ call unite#mappings#narrowing(unite#helper#get_input().'.') endfunction"}}} -function! s:get_quick_match_table() abort "{{{ +function! s:get_quick_match_table() "{{{ let unite = unite#get_current_unite() let offset = unite.context.prompt_direction ==# 'below' ? \ (unite.prompt_linenr == 0 ? @@ -863,18 +850,16 @@ let table = deepcopy(g:unite_quick_match_table) if unite.context.prompt_direction ==# 'below' let max = len(unite.current_candidates) - call map(table, 'max - v:val + offset') - else - for key in keys(table) - let table[key] = unite#helper#get_current_candidate_linenr( - \ table[key]+offset-1) - endfor + call map(table, 'max - v:val') endif + for key in keys(table) + let table[key] += offset + endfor return table endfunction"}}} -function! s:complete() abort "{{{ +function! s:complete() "{{{ let unite = unite#get_current_unite() let input = matchstr(unite#get_input(), '\h\w*$') let cur_text = unite#get_input()[: -len(input)-1] @@ -907,7 +892,7 @@ return repeat("\", unite#util#strchars(input)) . candidate endfunction"}}} -function! s:clear_complete() abort "{{{ +function! s:clear_complete() "{{{ let unite = unite#get_current_unite() if has_key(unite, 'complete_cur_text') call remove(unite, 'complete_cur_text') === modified file 'vim/bundle/unite.vim/autoload/unite/sources/action.vim' --- vim/bundle/unite.vim/autoload/unite/sources/action.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/action.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#sources#action#define() abort +function! unite#sources#action#define() return s:source endfunction @@ -40,7 +40,7 @@ \ 'is_listed' : 0, \} -function! s:source.hooks.on_syntax(args, context) abort "{{{ +function! s:source.hooks.on_syntax(args, context) "{{{ syntax match uniteSource__ActionDescriptionLine / -- .*$/ \ contained containedin=uniteSource__Action syntax match uniteSource__ActionDescription /.*$/ @@ -55,7 +55,7 @@ endfunction"}}} " @vimlint(EVL102, 1, l:sources) -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ if empty(a:args) return [] endif @@ -64,9 +64,7 @@ " Print candidates. call unite#print_source_message(map(copy(candidates), - \ "'candidates: '.get(v:val, 'unite__abbr', - \ get(v:val, 'abbr', v:val.word)) - \ .'('.v:val.source.')'"), self.name) + \ "'candidates: '.v:val.unite__abbr.'('.v:val.source.')'"), self.name) " Print default action. let default_actions = [] @@ -112,7 +110,7 @@ endfunction"}}} " @vimlint(EVL102, 0, l:sources) -function! s:compare_word(i1, i2) abort +function! s:compare_word(i1, i2) return (a:i1.word ># a:i2.word) ? 1 : -1 endfunction @@ -120,7 +118,7 @@ let s:source.action_table.do = { \ 'description' : 'do action', \ } -function! s:source.action_table.do.func(candidate) abort "{{{ +function! s:source.action_table.do.func(candidate) "{{{ let context = a:candidate.source__context if !empty(context.unite__old_buffer_info) @@ -169,7 +167,7 @@ endfunction"}}} "}}} -function! s:get_actions(candidates, sources) abort "{{{ +function! s:get_actions(candidates, sources) "{{{ let actions = unite#action#_get_candidate_action_table( \ a:candidates[0], a:sources) === modified file 'vim/bundle/unite.vim/autoload/unite/sources/alias.vim' --- vim/bundle/unite.vim/autoload/unite/sources/alias.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/alias.vim 2015-08-25 11:01:00 +0000 @@ -29,11 +29,11 @@ call unite#util#set_default('g:unite_source_alias_aliases', {}) -function! unite#sources#alias#define() abort +function! unite#sources#alias#define() return s:make_aliases() endfunction -function! s:make_aliases() abort +function! s:make_aliases() let aliases = [] let user_aliases = map(copy(g:unite_source_alias_aliases), @@ -52,7 +52,7 @@ let alias.source__args = args let alias.hooks = {} - function! alias.hooks.on_pre_init(args, context) abort + function! alias.hooks.on_pre_init(args, context) let config = a:context.source.source__config let original_source = \ (!has_key(config, 'source') || @@ -120,7 +120,7 @@ return aliases endfunction -function! s:make_default_description(source_name, args) abort +function! s:make_default_description(source_name, args) let desc = 'alias for "' . a:source_name if empty(a:args) return desc . '"' === modified file 'vim/bundle/unite.vim/autoload/unite/sources/bookmark.vim' --- vim/bundle/unite.vim/autoload/unite/sources/bookmark.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/bookmark.vim 2015-08-25 11:01:00 +0000 @@ -36,10 +36,10 @@ \ unite#get_data_directory() . '/bookmark') "}}} -function! unite#sources#bookmark#define() abort "{{{ +function! unite#sources#bookmark#define() "{{{ return s:source endfunction"}}} -function! unite#sources#bookmark#_append(filename) abort "{{{ +function! unite#sources#bookmark#_append(filename) "{{{ if !isdirectory(g:unite_source_bookmark_directory) \ && !unite#util#is_sudo() call mkdir(g:unite_source_bookmark_directory, 'p') @@ -97,8 +97,18 @@ \ 'hooks' : {}, \} -function! s:source.gather_candidates(args, context) abort "{{{ - let bookmark_name = s:get_bookmark_name(a:args) +function! s:source.gather_candidates(args, context) "{{{ + let bookmark_name = get(a:args, 0, '') + if bookmark_name =~ '/$' + let bookmark_name = bookmark_name[: -2] + endif + if bookmark_name == '' + let bookmark_name = 'default' + endif + + if bookmark_name == '_' + let bookmark_name = '*' + endif if stridx(bookmark_name, '*') != -1 let bookmarks = map(filter( @@ -128,26 +138,32 @@ endfor return candidates endfunction"}}} -function! s:source.hooks.on_syntax(args, context) abort "{{{ +function! s:source.hooks.on_syntax(args, context) "{{{ syntax match uniteSource__Bookmark_Name /\[.\{-}\] / \ contained containedin=uniteSource__Bookmark highlight default link uniteSource__Bookmark_Name Statement endfunction"}}} -function! s:source.complete(args, context, arglead, cmdline, cursorpos) abort "{{{ +function! s:source.complete(args, context, arglead, cmdline, cursorpos) "{{{ return ['_', '*', 'default'] + map(split(glob( \ g:unite_source_bookmark_directory . '/' . a:arglead . '*'), '\n'), \ "fnamemodify(v:val, ':t')") endfunction"}}} -function! s:source.vimfiler_complete(args, context, arglead, cmdline, cursorpos) abort "{{{ +function! s:source.vimfiler_complete(args, context, arglead, cmdline, cursorpos) "{{{ return self.complete(a:args, a:context, a:arglead, a:cmdline, a:cursorpos) endfunction"}}} -function! s:source.vimfiler_check_filetype(args, context) abort "{{{ - return ['directory', s:get_bookmark_name(a:args)] +function! s:source.vimfiler_check_filetype(args, context) "{{{ + return ['directory', get(a:args, 0, 'default')] endfunction"}}} -function! s:source.vimfiler_gather_candidates(args, context) abort "{{{ +function! s:source.vimfiler_gather_candidates(args, context) "{{{ let exts = unite#util#is_windows() ? \ escape(substitute($PATHEXT . ';.LNK', ';', '\\|', 'g'), '.') : '' + if join(a:args, ':') =~ '^/.\|^\a:' + " Fall back to file source. + return unite#sources#file#get_file_source().vimfiler_gather_candidates( + \ a:args, a:context) + endif + let candidates = self.gather_candidates(a:args, a:context) for candidate in candidates let candidate.vimfiler__is_directory = @@ -167,7 +183,7 @@ \ 'is_quit' : 0, \ 'is_selectable' : 1, \ } -function! s:source.action_table.delete.func(candidates) abort "{{{ +function! s:source.action_table.delete.func(candidates) "{{{ for candidate in a:candidates let bookmark = get(s:bookmarks, candidate.source__bookmark_name, []) call filter(bookmark.files, 'v:val !=# ' . @@ -181,7 +197,7 @@ \ 'is_invalidate_cache' : 1, \ 'is_quit' : 0, \ } -function! s:source.action_table.unite__new_candidate.func(candidates) abort "{{{ +function! s:source.action_table.unite__new_candidate.func(candidates) "{{{ let filename = input('Please input bookmark filename: ', '', 'file') if filename == '' redraw @@ -194,7 +210,7 @@ "}}} " Misc -function! s:save(filename, bookmark) abort "{{{ +function! s:save(filename, bookmark) "{{{ if unite#util#is_sudo() return endif @@ -204,14 +220,14 @@ \ filename) let a:bookmark.file_mtime = getftime(filename) endfunction"}}} -function! s:load(filename) abort "{{{ +function! s:load(filename) "{{{ let filename = g:unite_source_bookmark_directory . '/' . a:filename call s:init_bookmark(a:filename) let bookmark = s:bookmarks[a:filename] if filereadable(filename) - \ && bookmark.file_mtime != getftime(filename) + \ && bookmark.file_mtime != getftime(filename) let [ver; bookmark.files] = readfile(filename) if ver !=# s:VERSION echohl WarningMsg @@ -230,35 +246,20 @@ return bookmark endfunction"}}} -function! s:init_bookmark(filename) abort "{{{ +function! s:init_bookmark(filename) "{{{ if !has_key(s:bookmarks, a:filename) " file_mtime: the last modified time of the bookmark file. " files: [ [ name, full_path, linenr, search pattern ], ... ] let s:bookmarks[a:filename] = { 'file_mtime' : 0, 'files' : [] } endif endfunction"}}} -function! s:complete_bookmark_filename(arglead, cmdline, cursorpos) abort "{{{ +function! s:complete_bookmark_filename(arglead, cmdline, cursorpos) "{{{ return sort(filter(map(split(glob(g:unite_source_bookmark_directory . '/*'), '\n'), \ 'fnamemodify(v:val, ":t")'), 'stridx(v:val, a:arglead) == 0')) endfunction"}}} -function! s:SID_PREFIX() abort +function! s:SID_PREFIX() return matchstr(expand(''), '\d\+_\zeSID_PREFIX$') endfunction -function! s:get_bookmark_name(args) abort "{{{ - let bookmark_name = get(a:args, 0, '') - if bookmark_name =~ '/$' - let bookmark_name = bookmark_name[: -2] - endif - if bookmark_name == '' - let bookmark_name = 'default' - endif - - if bookmark_name == '_' - let bookmark_name = '*' - endif - - return bookmark_name -endfunction"}}} let &cpo = s:save_cpo unlet s:save_cpo === modified file 'vim/bundle/unite.vim/autoload/unite/sources/buffer.vim' --- vim/bundle/unite.vim/autoload/unite/sources/buffer.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/buffer.vim 2015-08-25 11:01:00 +0000 @@ -32,7 +32,7 @@ \ '(%Y/%m/%d %H:%M:%S) ') "}}} -function! unite#sources#buffer#define() abort "{{{ +function! unite#sources#buffer#define() "{{{ return [s:source_buffer_all, s:source_buffer_tab] endfunction"}}} @@ -44,7 +44,7 @@ \ 'default_kind' : 'buffer', \} -function! s:source_buffer_all.hooks.on_init(args, context) abort "{{{ +function! s:source_buffer_all.hooks.on_init(args, context) "{{{ let a:context.source__is_bang = \ (get(a:args, 0, '') ==# '!') let a:context.source__is_question = @@ -53,16 +53,13 @@ \ (get(a:args, 0, '') ==# '+') let a:context.source__is_minus = \ (get(a:args, 0, '') ==# '-') - let a:context.source__is_terminal = - \ (get(a:args, 0, '') ==# 't') let a:context.source__buffer_list = \ s:get_buffer_list(a:context.source__is_bang, \ a:context.source__is_question, \ a:context.source__is_plus, - \ a:context.source__is_minus, - \ a:context.source__is_terminal) + \ a:context.source__is_minus) endfunction"}}} -function! s:source_buffer_all.hooks.on_syntax(args, context) abort "{{{ +function! s:source_buffer_all.hooks.on_syntax(args, context) "{{{ syntax match uniteSource__Buffer_Name /[^/ \[\]]\+\s/ \ contained containedin=uniteSource__Buffer highlight default link uniteSource__Buffer_Name Function @@ -82,7 +79,7 @@ \ contained containedin=uniteSource__Buffer highlight default link uniteSource__Buffer_Time Statement endfunction"}}} -function! s:source_buffer_all.hooks.on_post_filter(args, context) abort "{{{ +function! s:source_buffer_all.hooks.on_post_filter(args, context) "{{{ for candidate in a:context.candidates let candidate.action__path = \ unite#util#substitute_path_separator( @@ -92,15 +89,14 @@ endfor endfunction"}}} -function! s:source_buffer_all.gather_candidates(args, context) abort "{{{ +function! s:source_buffer_all.gather_candidates(args, context) "{{{ if a:context.is_redraw " Recaching. let a:context.source__buffer_list = \ s:get_buffer_list(a:context.source__is_bang, \ a:context.source__is_question, \ a:context.source__is_plus, - \ a:context.source__is_minus, - \ a:context.source__is_terminal) + \ a:context.source__is_minus) endif let candidates = map(a:context.source__buffer_list, "{ @@ -113,8 +109,8 @@ return candidates endfunction"}}} -function! s:source_buffer_all.complete(args, context, arglead, cmdline, cursorpos) abort "{{{ - return ['!', '?', '+', '-', 't'] +function! s:source_buffer_all.complete(args, context, arglead, cmdline, cursorpos) "{{{ + return ['!', '?', '+', '-'] endfunction"}}} let s:source_buffer_tab = deepcopy(s:source_buffer_all) @@ -122,15 +118,14 @@ let s:source_buffer_tab.description = \ 'candidates from buffer list in current tab' -function! s:source_buffer_tab.gather_candidates(args, context) abort "{{{ +function! s:source_buffer_tab.gather_candidates(args, context) "{{{ if a:context.is_redraw " Recaching. let a:context.source__buffer_list = \ s:get_buffer_list(a:context.source__is_bang, \ a:context.source__is_question, \ a:context.source__is_plus, - \ a:context.source__is_minus, - \ a:context.source__is_terminal) + \ a:context.source__is_minus) endif if !exists('g:loaded_tabpagebuffer') && !exists('g:CtrlSpaceLoaded') @@ -162,26 +157,23 @@ endfunction"}}} " Misc -function! s:make_word(bufnr) abort "{{{ +function! s:make_word(bufnr) "{{{ let filetype = getbufvar(a:bufnr, '&filetype') if filetype ==# 'vimfiler' - let path = unite#util#substitute_path_separator( - \ simplify(getbufvar(a:bufnr, 'vimfiler').current_dir)) - let path = unite#util#substitute_path_separator( - \ simplify(bufname(a:bufnr))) . ' ' . path . '/' + let path = getbufvar(a:bufnr, 'vimfiler').current_dir + let path = printf('*vimfiler* [%s]', + \ unite#util#substitute_path_separator(simplify(path))) elseif filetype ==# 'vimshell' - let path = unite#util#substitute_path_separator( - \ simplify(getbufvar(a:bufnr, 'vimshell').current_dir)) - let path = unite#util#substitute_path_separator( - \ simplify(bufname(a:bufnr))) . ' ' . path . '/' + let vimshell = getbufvar(a:bufnr, 'vimshell') + let path = printf('*vimshell*: [%s]', + \ unite#util#substitute_path_separator(simplify(vimshell.current_dir))) else - let path = unite#util#substitute_path_separator( - \ simplify(bufname(a:bufnr))) + let path = unite#util#substitute_path_separator(simplify(bufname(a:bufnr))) endif return path endfunction"}}} -function! s:make_abbr(bufnr, flags) abort "{{{ +function! s:make_abbr(bufnr, flags) "{{{ let bufname = fnamemodify(bufname(a:bufnr), ':t') if bufname == '' let bufname = bufname(a:bufnr) @@ -221,15 +213,19 @@ return (getbufvar(a:bufnr, '&buftype') =~# 'nofile' ? '[nofile] ' : '' ) . \ unite#util#substitute_path_separator(path) . ' ' endfunction"}}} -function! s:compare(candidate_a, candidate_b) abort "{{{ +function! s:compare(candidate_a, candidate_b) "{{{ return a:candidate_a.action__buffer_nr == unite#get_current_unite().prev_bufnr ? 1 : \ (a:candidate_b.action__buffer_nr == unite#get_current_unite().prev_bufnr ? -1 : \ a:candidate_b.source__time - a:candidate_a.source__time) endfunction"}}} -function! s:get_buffer_list(is_bang, is_question, is_plus, is_minus, is_terminal) abort "{{{ +function! s:get_buffer_list(is_bang, is_question, is_plus, is_minus) "{{{ " Get :ls flags. + redir => output + silent! ls + redir END + let flag_dict = {} - for out in map(split(unite#util#redir('ls'), '\n'), 'split(v:val)') + for out in map(split(output, '\n'), 'split(v:val)') let flag_dict[out[0]] = matchstr(join(out), '^.*\ze\s\+"') endfor @@ -238,7 +234,7 @@ let bufnr = 1 let buffer_list = unite#sources#buffer#variables#get_buffer_list() while bufnr <= bufnr('$') - if s:is_listed(a:is_bang, a:is_question, a:is_plus, a:is_minus, a:is_terminal, bufnr) + if s:is_listed(a:is_bang, a:is_question, a:is_plus, a:is_minus, bufnr) let dict = get(buffer_list, bufnr, { \ 'action__buffer_nr' : bufnr, \ 'source__time' : 0, @@ -255,23 +251,18 @@ return list endfunction"}}} -function! s:is_listed(is_bang, is_question, is_plus, is_minus, is_terminal, bufnr) abort "{{{ - let bufname = bufname(a:bufnr) - let buftype = getbufvar(a:bufnr, '&buftype') +function! s:is_listed(is_bang, is_question, is_plus, is_minus, bufnr) "{{{ return bufexists(a:bufnr) && \ (a:is_question ? !buflisted(a:bufnr) : \ (a:is_bang || buflisted(a:bufnr))) \ && (!a:is_plus || getbufvar(a:bufnr, '&mod')) - \ && (!a:is_minus || buftype == '' - \ && bufname != '' - \ && !isdirectory(bufname)) - \ && (!a:is_terminal || buftype ==# 'terminal' ) + \ && (!a:is_minus || getbufvar(a:bufnr, '&buftype') !~# 'nofile') \ && (getbufvar(a:bufnr, '&filetype') !=# 'unite' \ || getbufvar(a:bufnr, 'unite').buffer_name !=# \ unite#get_current_unite().buffer_name) endfunction"}}} -function! s:format_time(time) abort "{{{ +function! s:format_time(time) "{{{ if empty(a:time) return '' endif === modified file 'vim/bundle/unite.vim/autoload/unite/sources/buffer/variables.vim' --- vim/bundle/unite.vim/autoload/unite/sources/buffer/variables.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/buffer/variables.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ let s:buffer_list = {} -function! unite#sources#buffer#variables#append(bufnr) abort "{{{ +function! unite#sources#buffer#variables#append(bufnr) "{{{ " Append the current buffer. let s:buffer_list[a:bufnr] = { \ 'action__buffer_nr' : a:bufnr, @@ -36,7 +36,7 @@ \ } endfunction"}}} -function! unite#sources#buffer#variables#get_buffer_list() abort "{{{ +function! unite#sources#buffer#variables#get_buffer_list() "{{{ return s:buffer_list endfunction"}}} === modified file 'vim/bundle/unite.vim/autoload/unite/sources/change.vim' --- vim/bundle/unite.vim/autoload/unite/sources/change.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/change.vim 2015-08-25 11:01:00 +0000 @@ -29,7 +29,7 @@ " Variables "{{{ "}}} -function! unite#sources#change#define() abort "{{{ +function! unite#sources#change#define() "{{{ return s:source endfunction"}}} @@ -40,9 +40,14 @@ \ } let s:cached_result = [] -function! s:source.hooks.on_init(args, context) abort "{{{ +function! s:source.hooks.on_init(args, context) "{{{ + " Get changes list. + redir => redir + silent! changes + redir END + let result = [] - for change in split(unite#util#redir('changes'), '\n')[1:] + for change in split(redir, '\n')[1:] let list = split(change) if len(list) < 4 continue @@ -63,7 +68,7 @@ let a:context.source__result = reverse(result) endfunction"}}} -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ return a:context.source__result endfunction"}}} === modified file 'vim/bundle/unite.vim/autoload/unite/sources/command.vim' --- vim/bundle/unite.vim/autoload/unite/sources/command.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/command.vim 2015-08-25 11:01:00 +0000 @@ -29,7 +29,7 @@ " Variables "{{{ "}}} -function! unite#sources#command#define() abort "{{{ +function! unite#sources#command#define() "{{{ return s:source endfunction"}}} @@ -44,11 +44,7 @@ \ 'syntax' : 'uniteSource__Command', \ } -function! s:source.hooks.on_init(args, context) abort "{{{ - " Get command list. - let a:context.source__command = unite#util#redir('command') -endfunction"}}} -function! s:source.hooks.on_syntax(args, context) abort "{{{ +function! s:source.hooks.on_syntax(args, context) "{{{ syntax match uniteSource__Command_DescriptionLine \ / -- .*$/ \ contained containedin=uniteSource__Command @@ -64,12 +60,17 @@ endfunction"}}} let s:cached_result = [] -function! s:source.gather_candidates(args, context) abort "{{{ - if a:context.is_redraw || empty(s:cached_result) - let s:cached_result = s:make_cache_commands() +function! s:source.gather_candidates(args, context) "{{{ + if !a:context.is_redraw && !empty(s:cached_result) + return s:cached_result endif - let result = copy(s:cached_result) + " Get command list. + redir => result + silent! command + redir END + + let s:cached_result = [] let completions = [ 'augroup', 'buffer', 'behave', \ 'color', 'command', 'compiler', 'cscope', \ 'dir', 'environment', 'event', 'expression', @@ -78,14 +79,14 @@ \ 'mapping', 'menu', 'option', 'shellcmd', 'sign', \ 'syntax', 'tag', 'tag_listfiles', \ 'var', 'custom', 'customlist' ] - for line in split(a:context.source__command, '\n')[1:] - let word = matchstr(line, '\u\w*') + for line in split(result, '\n')[1:] + let word = matchstr(line, '\a\w*') " Analyze prototype. - let end = matchend(line, '\u\w*') + let end = matchend(line, '\a\w*') let args = matchstr(line, '[[:digit:]?+*]', end) if args != '0' - let prototype = matchstr(line, '\u\w*', end) + let prototype = matchstr(line, '\a\w*', end) if index(completions, prototype) < 0 let prototype = 'arg' @@ -112,12 +113,16 @@ \ } let dict.action__description = dict.abbr - call add(result, dict) + call add(s:cached_result, dict) endfor - - return unite#util#sort_by(result, 'tolower(v:val.word)') + let s:cached_result += s:make_cache_commands() + + let s:cached_result = unite#util#sort_by( + \ s:cached_result, 'tolower(v:val.word)') + + return s:cached_result endfunction"}}} -function! s:source.change_candidates(args, context) abort "{{{ +function! s:source.change_candidates(args, context) "{{{ let dummy = substitute(a:context.input, '[*\\]', '', 'g') if len(split(dummy)) > 1 " Add dummy result. @@ -133,7 +138,32 @@ return [] endfunction"}}} -function! s:make_cache_commands() abort "{{{ +function! s:caching_from_neocomplcache_dict() "{{{ + let dict_files = split(globpath(&runtimepath, + \ 'autoload/neocomplcache/sources/vim_complete/commands.dict'), '\n') + if empty(dict_files) + return [] + endif + + let keyword_pattern = + \'^\%(-\h\w*\%(=\%(\h\w*\|[01*?+%]\)\?\)\?\|' + \'<\h[[:alnum:]_-]*>\?\|\h[[:alnum:]_:#\[]*\%([!\]]\+\|()\?\)\?\)' + let keyword_list = [] + for line in readfile(dict_files[0]) + let word = substitute( + \ matchstr(line, keyword_pattern), '[\[\]]', '', 'g') + call add(keyword_list, { + \ 'word' : line, + \ 'action__command' : word . ' ', + \ 'action__description' : line, + \ 'source__command' : ':'.word, + \ 'action__histadd' : 1, + \}) + endfor + + return keyword_list +endfunction"}}} +function! s:make_cache_commands() "{{{ let helpfile = expand(findfile('doc/index.txt', &runtimepath)) if !filereadable(helpfile) return [] @@ -148,7 +178,8 @@ let _ = matchlist(desc, '^|:\(.\{-}\)|\s\+:\S\+\s\+\(.*\)') if !empty(_) call add(commands, { - \ 'word' : printf('%-16s -- %s', _[1], _[2]), + \ 'word' : _[1], + \ 'abbr' : printf('%-16s -- %s', _[1], _[2]), \ 'action__command' : _[1] . ' ', \ 'source__command' : ':'._[1], \ 'action__histadd' : 1, @@ -164,7 +195,7 @@ \ 'description' : 'view the help documentation', \ 'is_quit' : 0, \ } -function! s:source.action_table.preview.func(candidate) abort "{{{ +function! s:source.action_table.preview.func(candidate) "{{{ let winnr = winnr() try @@ -172,6 +203,7 @@ normal! zv normal! zt setlocal previewwindow + setlocal winfixheight catch /^Vim\%((\a\+)\)\?:E149/ " Ignore endtry === modified file 'vim/bundle/unite.vim/autoload/unite/sources/directory.vim' --- vim/bundle/unite.vim/autoload/unite/sources/directory.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/directory.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ let s:is_windows = unite#util#is_windows() -function! unite#sources#directory#define() abort "{{{ +function! unite#sources#directory#define() "{{{ return [s:source_directory, s:source_directory_new] endfunction"}}} @@ -41,20 +41,20 @@ \ 'hooks' : {}, \} -function! s:source_directory.change_candidates(args, context) abort "{{{ +function! s:source_directory.change_candidates(args, context) "{{{ let path = unite#sources#file#_get_path(a:args, a:context) let input = unite#sources#file#_get_input(path, a:context) return map(sort(filter(unite#sources#file#_get_files(input, a:context), \ "isdirectory(v:val) && v:val !~ \ '^\\%(/\\|\\a\\+:/\\)$\\|\\%(^\\|/\\)\\.$'"), 1), - \ "unite#sources#file#create_file_dict(v:val, '')") + \ 'unite#sources#file#create_file_dict(v:val, 0)') endfunction"}}} -function! s:source_directory.complete(args, context, arglead, cmdline, cursorpos) abort "{{{ +function! s:source_directory.complete(args, context, arglead, cmdline, cursorpos) "{{{ return map(filter(split(glob(a:arglead . '*'), '\n'), \ 'isdirectory(v:val)'), "v:val.'/'") endfunction"}}} -function! s:source_directory.hooks.on_close(args, context) abort "{{{ +function! s:source_directory.hooks.on_close(args, context) "{{{ call unite#sources#file#_clear_cache() endfunction "}}} @@ -65,7 +65,7 @@ \ 'alias_table' : { 'unite__new_candidate' : 'vimfiler__mkdir' }, \ } -function! s:source_directory_new.change_candidates(args, context) abort "{{{ +function! s:source_directory_new.change_candidates(args, context) "{{{ let path = unite#sources#file#_get_path(a:args, a:context) let input = unite#sources#file#_get_input(path, a:context) let input = substitute(input, '\*', '', 'g') @@ -74,7 +74,7 @@ return [] endif - return [unite#sources#file#create_file_dict(input, a:context.input, 2)] + return [unite#sources#file#create_file_dict(input, 0, 2)] endfunction"}}} let &cpo = s:save_cpo === modified file 'vim/bundle/unite.vim/autoload/unite/sources/file.vim' --- vim/bundle/unite.vim/autoload/unite/sources/file.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/file.vim 2015-08-25 11:01:00 +0000 @@ -35,11 +35,11 @@ let s:cache_files = {} "}}} -function! unite#sources#file#define() abort "{{{ +function! unite#sources#file#define() "{{{ return [s:source_file, s:source_file_new, s:source_file_async] endfunction"}}} -function! unite#sources#file#get_file_source() abort "{{{ +function! unite#sources#file#get_file_source() "{{{ return s:source_file endfunction"}}} @@ -56,19 +56,19 @@ \ 'hooks' : {}, \} -function! s:source_file.change_candidates(args, context) abort "{{{ +function! s:source_file.change_candidates(args, context) "{{{ let path = unite#sources#file#_get_path(a:args, a:context) if !isdirectory(path) && filereadable(path) return [ unite#sources#file#create_file_dict( - \ path, a:context.input) ] + \ path, path !~ '^\%(/\|\a\+:/\)') ] endif let input = unite#sources#file#_get_input(path, a:context) return map(unite#sources#file#_get_files(input, a:context), - \ 'unite#sources#file#create_file_dict(v:val, a:context.input)') + \ 'unite#sources#file#create_file_dict(v:val, 0)') endfunction"}}} -function! s:source_file.vimfiler_check_filetype(args, context) abort "{{{ +function! s:source_file.vimfiler_check_filetype(args, context) "{{{ let path = s:parse_path(a:args) if isdirectory(path) @@ -77,7 +77,7 @@ elseif filereadable(path) let type = 'file' let info = [readfile(path), - \ unite#sources#file#create_file_dict(path, '')] + \ unite#sources#file#create_file_dict(path, 0)] else " Ignore. return [] @@ -85,7 +85,7 @@ return [type, info] endfunction"}}} -function! s:source_file.vimfiler_gather_candidates(args, context) abort "{{{ +function! s:source_file.vimfiler_gather_candidates(args, context) "{{{ let path = s:parse_path(a:args) if isdirectory(path) @@ -99,7 +99,7 @@ " echomsg reltimestr(reltime(start)) elseif filereadable(path) - let candidates = [ unite#sources#file#create_file_dict(path, '') ] + let candidates = [ unite#sources#file#create_file_dict(path, 0) ] else let candidates = [] endif @@ -109,6 +109,7 @@ let old_dir = getcwd() if path !=# old_dir + \ && isdirectory(path) try call unite#util#lcd(path) catch @@ -123,12 +124,13 @@ endfor if path !=# old_dir + \ && isdirectory(path) call unite#util#lcd(old_dir) endif return candidates endfunction"}}} -function! s:source_file.vimfiler_dummy_candidates(args, context) abort "{{{ +function! s:source_file.vimfiler_dummy_candidates(args, context) "{{{ let path = s:parse_path(a:args) if path == '' @@ -137,34 +139,38 @@ let old_dir = getcwd() if path !=# old_dir + \ && isdirectory(path) call unite#util#lcd(path) endif let exts = s:is_windows ? \ escape(substitute($PATHEXT . ';.LNK', ';', '\\|', 'g'), '.') : '' + let is_relative_path = path !~ '^\%(/\|\a\+:/\)' + " Set vimfiler property. - let candidates = [ unite#sources#file#create_file_dict(path, '') ] + let candidates = [ unite#sources#file#create_file_dict(path, is_relative_path) ] for candidate in candidates call unite#sources#file#create_vimfiler_dict(candidate, exts) endfor if path !=# old_dir + \ && isdirectory(path) call unite#util#lcd(old_dir) endif return candidates endfunction"}}} -function! s:source_file.complete(args, context, arglead, cmdline, cursorpos) abort "{{{ +function! s:source_file.complete(args, context, arglead, cmdline, cursorpos) "{{{ return unite#sources#file#complete_file( \ a:args, a:context, a:arglead, a:cmdline, a:cursorpos) endfunction"}}} -function! s:source_file.vimfiler_complete(args, context, arglead, cmdline, cursorpos) abort "{{{ +function! s:source_file.vimfiler_complete(args, context, arglead, cmdline, cursorpos) "{{{ return self.complete( \ a:args, a:context, a:arglead, a:cmdline, a:cursorpos) endfunction"}}} -function! s:source_file.hooks.on_close(args, context) abort "{{{ +function! s:source_file.hooks.on_close(args, context) "{{{ call unite#sources#file#_clear_cache() endfunction "}}} @@ -174,7 +180,7 @@ \ 'default_kind' : 'file', \ } -function! s:source_file_new.change_candidates(args, context) abort "{{{ +function! s:source_file_new.change_candidates(args, context) "{{{ let path = unite#sources#file#_get_path(a:args, a:context) let input = unite#sources#file#_get_input(path, a:context) let input = substitute(input, '\*', '', 'g') @@ -183,21 +189,20 @@ return [] endif - return [unite#sources#file#create_file_dict( - \ input, a:context.input, 1)] + return [unite#sources#file#create_file_dict(input, 0, 1)] endfunction"}}} let s:source_file_async = deepcopy(s:source_file) let s:source_file_async.name = 'file/async' let s:source_file_async.description = 'asynchronous candidates from file list' -function! s:source_file_async.hooks.on_close(args, context) abort "{{{ +function! s:source_file_async.hooks.on_close(args, context) "{{{ if has_key(a:context, 'source__proc') call a:context.source__proc.kill() endif endfunction "}}} -function! s:source_file_async.change_candidates(args, context) abort "{{{ +function! s:source_file_async.change_candidates(args, context) "{{{ if !has_key(a:context, 'source__cache') || a:context.is_redraw \ || a:context.is_invalidate " Initialize cache. @@ -247,7 +252,7 @@ return [] endfunction"}}} -function! s:source_file_async.async_gather_candidates(args, context) abort "{{{ +function! s:source_file_async.async_gather_candidates(args, context) "{{{ let stderr = a:context.source__proc.stderr if !stderr.eof " Print error. @@ -286,7 +291,7 @@ return deepcopy(candidates) endfunction"}}} -function! unite#sources#file#_get_path(args, context) abort "{{{ +function! unite#sources#file#_get_path(args, context) "{{{ let path = unite#util#substitute_path_separator( \ unite#util#expand(join(a:args, ':'))) if path == '' @@ -299,7 +304,7 @@ return path endfunction"}}} -function! unite#sources#file#_get_input(path, context) abort "{{{ +function! unite#sources#file#_get_input(path, context) "{{{ let input = unite#util#expand(a:context.input) if input !~ '^\%(/\|\a\+:/\)' && a:path != '' let input = a:path . input @@ -313,7 +318,7 @@ return input endfunction"}}} -function! unite#sources#file#_get_files(input, context) abort "{{{ +function! unite#sources#file#_get_files(input, context) "{{{ " Glob by directory name. let input = substitute(a:input, '[^/]*$', '', '') @@ -340,8 +345,7 @@ if !is_vimfiler let files = sort(filter(copy(files), - \ "v:val != '.' && (a:input =~ '/\\.' || v:val !~ '/\\.') - \ && isdirectory(v:val)"), 1) + + \ "v:val != '.' && isdirectory(v:val)"), 1) + \ sort(filter(copy(files), "!isdirectory(v:val)"), 1) let s:cache_files[directory] = { @@ -353,12 +357,12 @@ return copy(files) endfunction"}}} -function! unite#sources#file#_clear_cache() abort "{{{ +function! unite#sources#file#_clear_cache() "{{{ " Don't save cache when using glob call filter(s:cache_files, "stridx(v:val.input, '*') < 0") endfunction"}}} -function! s:parse_path(args) abort "{{{ +function! s:parse_path(args) "{{{ let path = unite#util#substitute_path_separator( \ unite#util#expand(join(a:args, ':'))) let path = unite#util#substitute_path_separator( @@ -367,20 +371,18 @@ return path endfunction"}}} -function! unite#sources#file#create_file_dict(file, input, ...) abort "{{{ +function! unite#sources#file#create_file_dict(file, is_relative_path, ...) "{{{ let is_newfile = get(a:000, 0, 0) let dict = { - \ 'word' : a:file, + \ 'word' : a:file, 'abbr' : a:file, \ 'action__path' : a:file, \} - if a:input !~ '/' - let dict.word = fnamemodify(a:file, ':t') - endif - let dict.abbr = dict.word - let dict.vimfiler__is_directory = isdirectory(dict.action__path) - - if a:file !~ '^\%(/\|\a\+:/\)' + + let dict.vimfiler__is_directory = + \ isdirectory(dict.action__path) + + if a:is_relative_path let dict.action__path = unite#util#substitute_path_separator( \ fnamemodify(a:file, ':p')) endif @@ -410,7 +412,7 @@ return dict endfunction"}}} -function! unite#sources#file#create_vimfiler_dict(candidate, exts) abort "{{{ +function! unite#sources#file#create_vimfiler_dict(candidate, exts) "{{{ try if len(a:candidate.action__path) > 200 " Convert to relative path. @@ -456,7 +458,7 @@ \ s:get_filetime(a:candidate.action__path) endfunction"}}} -function! unite#sources#file#complete_file(args, context, arglead, cmdline, cursorpos) abort "{{{ +function! unite#sources#file#complete_file(args, context, arglead, cmdline, cursorpos) "{{{ let files = filter(unite#util#glob(a:arglead . '*'), \ "stridx(tolower(v:val), tolower(a:arglead)) == 0") if a:arglead =~ '^\~' @@ -468,7 +470,7 @@ call map(files, "escape(v:val, ' \\')") return files endfunction"}}} -function! unite#sources#file#complete_directory(args, context, arglead, cmdline, cursorpos) abort "{{{ +function! unite#sources#file#complete_directory(args, context, arglead, cmdline, cursorpos) "{{{ let files = unite#util#glob(a:arglead . '*') let files = filter(files, 'isdirectory(v:val)') if a:arglead =~ '^\~' @@ -480,13 +482,13 @@ return files endfunction"}}} -function! unite#sources#file#copy_files(dest, srcs) abort "{{{ +function! unite#sources#file#copy_files(dest, srcs) "{{{ return unite#kinds#file#do_action(a:srcs, a:dest, 'copy') endfunction"}}} -function! unite#sources#file#move_files(dest, srcs) abort "{{{ +function! unite#sources#file#move_files(dest, srcs) "{{{ return unite#kinds#file#do_action(a:srcs, a:dest, 'move') endfunction"}}} -function! unite#sources#file#delete_files(srcs) abort "{{{ +function! unite#sources#file#delete_files(srcs) "{{{ return unite#kinds#file#do_action(a:srcs, '', 'delete') endfunction"}}} @@ -496,7 +498,7 @@ \ 'is_start' : 1, \} -function! s:cdable_action_file.func(candidate) abort +function! s:cdable_action_file.func(candidate) call unite#start_script([['file', \ unite#helper#get_candidate_directory(a:candidate)]]) endfunction @@ -505,7 +507,7 @@ unlet! s:cdable_action_file "}}} -function! s:get_filetime(filename) abort "{{{ +function! s:get_filetime(filename) "{{{ let filetime = getftime(a:filename) if !has('python3') return filetime === modified file 'vim/bundle/unite.vim/autoload/unite/sources/file_list.vim' --- vim/bundle/unite.vim/autoload/unite/sources/file_list.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/file_list.vim 2015-08-25 11:01:00 +0000 @@ -29,7 +29,7 @@ " Variables "{{{ "}}} -function! unite#sources#file_list#define() abort "{{{ +function! unite#sources#file_list#define() "{{{ return s:source endfunction"}}} @@ -39,12 +39,12 @@ \ 'default_kind' : 'file', \ } -function! s:source.complete(args, context, arglead, cmdline, cursorpos) abort "{{{ +function! s:source.complete(args, context, arglead, cmdline, cursorpos) "{{{ return unite#sources#file#complete_file( \ a:args, a:context, a:arglead, a:cmdline, a:cursorpos) endfunction"}}} -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ let args = unite#helper#parse_source_args(a:args) if empty(args) === modified file 'vim/bundle/unite.vim/autoload/unite/sources/file_point.vim' --- vim/bundle/unite.vim/autoload/unite/sources/file_point.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/file_point.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#sources#file_point#define() abort "{{{ +function! unite#sources#file_point#define() "{{{ return s:source endfunction"}}} @@ -35,7 +35,7 @@ \ 'description' : 'file candidate from cursor point', \ 'hooks' : {}, \} -function! s:source.hooks.on_init(args, context) abort "{{{ +function! s:source.hooks.on_init(args, context) "{{{ let filename_pattern = '[[:alnum:];/?:@&=+$_.!~|()#-]\+' let filename = unite#util#expand( \ matchstr(getline('.')[: col('.')-1], filename_pattern . '$') @@ -45,7 +45,7 @@ \ filename : fnamemodify(filename, ':p') endfunction"}}} -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ if a:context.source__filename =~ '^\%(https\?\|ftp\)://' if exists('*vimproc#host_exists') && \ !vimproc#host_exists(a:context.source__filename) === modified file 'vim/bundle/unite.vim/autoload/unite/sources/find.vim' --- vim/bundle/unite.vim/autoload/unite/sources/find.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/find.vim 2015-08-25 11:01:00 +0000 @@ -29,7 +29,7 @@ call unite#util#set_default('g:unite_source_find_default_expr', '-name ') "}}} -function! unite#sources#find#define() abort "{{{ +function! unite#sources#find#define() "{{{ return executable(g:unite_source_find_command) && unite#util#has_vimproc() ? \ s:source : [] endfunction "}}} @@ -46,7 +46,7 @@ \ ], \ } -function! s:source.hooks.on_init(args, context) abort "{{{ +function! s:source.hooks.on_init(args, context) "{{{ let target = get(a:args, 0, '') if target == '' let target = isdirectory(a:context.path) ? @@ -68,13 +68,13 @@ \ g:unite_source_find_default_expr) endif endfunction"}}} -function! s:source.hooks.on_close(args, context) abort "{{{ +function! s:source.hooks.on_close(args, context) "{{{ if has_key(a:context, 'source__proc') call a:context.source__proc.waitpid() endif endfunction "}}} -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ if empty(a:context.source__targets) \ || a:context.source__input == '' let a:context.is_async = 0 @@ -109,7 +109,7 @@ return [] endfunction "}}} -function! s:source.async_gather_candidates(args, context) abort "{{{ +function! s:source.async_gather_candidates(args, context) "{{{ let stdout = a:context.source__proc.stdout if stdout.eof " Disable async. @@ -121,7 +121,9 @@ \ "fnamemodify(unite#util#iconv(v:val, 'char', &encoding), ':p')") let cwd = getcwd() - call unite#util#lcd(a:context.source__targets[0]) + if isdirectory(a:context.source__targets[0]) + call unite#util#lcd(a:context.source__targets[0]) + endif call map(candidates, "{ \ 'word' : unite#util#substitute_path_separator(v:val), @@ -134,7 +136,7 @@ return candidates endfunction "}}} -function! s:source.complete(args, context, arglead, cmdline, cursorpos) abort "{{{ +function! s:source.complete(args, context, arglead, cmdline, cursorpos) "{{{ return unite#sources#file#complete_directory( \ a:args, a:context, a:arglead, a:cmdline, a:cursorpos) endfunction"}}} === modified file 'vim/bundle/unite.vim/autoload/unite/sources/function.vim' --- vim/bundle/unite.vim/autoload/unite/sources/function.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/function.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#sources#function#define() abort "{{{ +function! unite#sources#function#define() "{{{ return s:source endfunction"}}} @@ -40,16 +40,18 @@ \ } let s:cached_result = [] -function! s:source.gather_candidates(args, context) abort "{{{ - if a:context.is_redraw || empty(s:cached_result) - let s:cached_result = s:make_cache_functions() +function! s:source.gather_candidates(args, context) "{{{ + if !a:context.is_redraw && !empty(s:cached_result) + return s:cached_result endif " Get command list. - let cmd = unite#util#redir('function') + redir => result + silent! function + redir END - let result = [] - for line in split(cmd, '\n')[1:] + let s:cached_result = [] + for line in split(result, '\n')[1:] let line = line[9:] if line =~ '^' continue @@ -68,38 +70,36 @@ \ } let dict.action__description = dict.abbr - call add(result, dict) + call add(s:cached_result, dict) endfor - - return unite#util#sort_by( - \ s:cached_result + result, 'tolower(v:val.word)') + let s:cached_result += s:caching_from_neocomplcache_dict() + + let s:cached_result = unite#util#sort_by( + \ s:cached_result, 'tolower(v:val.word)') + + return s:cached_result endfunction"}}} -function! s:make_cache_functions() abort "{{{ - let helpfile = expand(findfile('doc/eval.txt', &runtimepath)) - if !filereadable(helpfile) +function! s:caching_from_neocomplcache_dict() "{{{ + let dict_files = split(globpath(&runtimepath, + \ 'autoload/neocomplcache/sources/vim_complete/functions.dict'), '\n') + if empty(dict_files) return [] endif - let lines = readfile(helpfile) - let functions = [] - let start = match(lines, '^abs') - let end = match(lines, '^abs', start, 2) - for i in range(end-1, start, -1) - let func = matchstr(lines[i], '^\s*\zs\w\+(.\{-})') - if func != '' - let word = substitute(func, '(.\+)', '', '') - call insert(functions, { - \ 'word' : word . '(', - \ 'abbr' : lines[i], - \ 'action__description' : lines[i], - \ 'action__function' : word, - \ 'action__text' : word . '(', - \ }) - endif + let keyword_pattern = '^[[:alnum:]_]\+' + let keyword_list = [] + for line in readfile(dict_files[0]) + let word = matchstr(line, keyword_pattern) + call add(keyword_list, { + \ 'word' : line, + \ 'action__description' : line, + \ 'action__function' : word, + \ 'action__text' : word . '(', + \}) endfor - return functions + return keyword_list endfunction"}}} " Actions "{{{ @@ -107,7 +107,7 @@ \ 'description' : 'view the help documentation', \ 'is_quit' : 0, \ } -function! s:source.action_table.preview.func(candidate) abort "{{{ +function! s:source.action_table.preview.func(candidate) "{{{ let winnr = winnr() try @@ -115,6 +115,7 @@ normal! zv normal! zt setlocal previewwindow + setlocal winfixheight catch /^Vim\%((\a\+)\)\?:E149/ " Ignore endtry @@ -124,7 +125,7 @@ let s:source.action_table.call = { \ 'description' : 'call the function and print result', \ } -function! s:source.action_table.call.func(candidate) abort "{{{ +function! s:source.action_table.call.func(candidate) "{{{ if has_key(a:candidate, 'action__description') " Print description. @@ -150,9 +151,10 @@ let s:source.action_table.edit = { \ 'description' : 'edit the function from the source', \ } -function! s:source.action_table.edit.func(candidates) abort "{{{ - let func = unite#util#redir( - \ 'verbose function '.a:candidates.action__function) +function! s:source.action_table.edit.func(candidates) "{{{ + redir => func + silent execute 'verbose function '.a:candidates.action__function + redir END let path = matchstr(split(func,'\n')[1], 'Last set from \zs.*$') execute 'edit' fnameescape(path) execute search('^[ \t]*fu\%(nction\)\?[ !]*'. === modified file 'vim/bundle/unite.vim/autoload/unite/sources/grep.vim' --- vim/bundle/unite.vim/autoload/unite/sources/grep.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/grep.vim 2015-08-25 11:01:00 +0000 @@ -36,7 +36,7 @@ call unite#util#set_default('g:unite_source_grep_encoding', 'char') "}}} -function! unite#sources#grep#define() abort "{{{ +function! unite#sources#grep#define() "{{{ return s:source endfunction "}}} @@ -55,7 +55,7 @@ \ ], \ } -function! s:source.hooks.on_init(args, context) abort "{{{ +function! s:source.hooks.on_init(args, context) "{{{ if !unite#util#has_vimproc() call unite#print_source_error( \ 'vimproc is not installed.', s:source.name) @@ -97,8 +97,7 @@ let a:context.source__input = get(a:args, 2, a:context.input) if a:context.source__input == '' || a:context.unite__is_restart let a:context.source__input = unite#util#input('Pattern: ', - \ a:context.source__input, - \ 'customlist,unite#helper#complete_search_history') + \ a:context.source__input) endif call unite#print_source_message('Pattern: ' @@ -109,19 +108,17 @@ \ unite#util#substitute_path_separator( \ unite#util#expand(a:context.source__targets[0])) : '' endfunction"}}} -function! s:source.hooks.on_syntax(args, context) abort "{{{ +function! s:source.hooks.on_syntax(args, context) "{{{ if !unite#util#has_vimproc() return endif syntax case ignore - syntax match uniteSource__GrepHeader /[^:]*: \d\+: \(\d\+: \)\?/ contained - \ containedin=uniteSource__Grep syntax match uniteSource__GrepFile /[^:]*: / contained - \ containedin=uniteSource__GrepHeader + \ containedin=uniteSource__Grep \ nextgroup=uniteSource__GrepLineNR syntax match uniteSource__GrepLineNR /\d\+: / contained - \ containedin=uniteSource__GrepHeader + \ containedin=uniteSource__Grep \ nextgroup=uniteSource__GrepPattern execute 'syntax match uniteSource__GrepPattern /' \ . substitute(a:context.source__input, '\([/\\]\)', '\\\1', 'g') @@ -134,12 +131,12 @@ \ get(a:context, 'custom_grep_search_word_highlight', \ g:unite_source_grep_search_word_highlight) endfunction"}}} -function! s:source.hooks.on_close(args, context) abort "{{{ +function! s:source.hooks.on_close(args, context) "{{{ if has_key(a:context, 'source__proc') call a:context.source__proc.kill() endif endfunction "}}} -function! s:source.hooks.on_post_filter(args, context) abort "{{{ +function! s:source.hooks.on_post_filter(args, context) "{{{ for candidate in a:context.candidates let candidate.kind = ['file', 'jump_list'] let candidate.action__col_pattern = a:context.source__input @@ -149,7 +146,7 @@ endfor endfunction"}}} -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ let command = get(a:context, 'custom_grep_command', \ g:unite_source_grep_command) let default_opts = get(a:context, 'custom_grep_default_opts', @@ -182,7 +179,7 @@ let a:context.is_async = 1 endif - let cmdline = printf('"%s" %s %s %s -- %s %s', + let cmdline = printf('"%s" %s %s %s %s %s', \ unite#util#substitute_path_separator(command), \ default_opts, \ recursive_opt, @@ -209,7 +206,7 @@ return self.async_gather_candidates(a:args, a:context) endfunction "}}} -function! s:source.async_gather_candidates(args, context) abort "{{{ +function! s:source.async_gather_candidates(args, context) "{{{ let default_opts = get(a:context, 'custom_grep_default_opts', \ g:unite_source_grep_default_opts) @@ -291,7 +288,7 @@ return candidates endfunction "}}} -function! s:source.complete(args, context, arglead, cmdline, cursorpos) abort "{{{ +function! s:source.complete(args, context, arglead, cmdline, cursorpos) "{{{ return ['%', '#', '$buffers'] + unite#sources#file#complete_directory( \ a:args, a:context, a:arglead, a:cmdline, a:cursorpos) endfunction"}}} === removed file 'vim/bundle/unite.vim/autoload/unite/sources/grep_git.vim' --- vim/bundle/unite.vim/autoload/unite/sources/grep_git.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/grep_git.vim 1970-01-01 00:00:00 +0000 @@ -1,114 +0,0 @@ -"============================================================================= -" FILE: grep_git.vim -" AUTHOR: Alisue -" License: MIT license {{{ -" Permission is hereby granted, free of charge, to any person obtaining -" a copy of this software and associated documentation files (the -" "Software"), to deal in the Software without restriction, including -" without limitation the rights to use, copy, modify, merge, publish, -" distribute, sublicense, and/or sell copies of the Software, and to -" permit persons to whom the Software is furnished to do so, subject to -" the following conditions: -" -" The above copyright notice and this permission notice shall be included -" in all copies or substantial portions of the Software. -" -" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -" IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -" }}} -"============================================================================= - -function! unite#sources#grep_git#define() abort "{{{ - return s:source -endfunction "}}} - -function! unite#sources#grep_git#is_available() abort "{{{ - if !executable('git') - return 0 - endif - call unite#util#system('git rev-parse') - return (unite#util#get_last_status() == 0) ? 1 : 0 -endfunction "}}} -function! unite#sources#grep_git#repository_root() abort "{{{ - if !executable('git') - return '' - endif - let stdout = unite#util#system('git rev-parse --show-toplevel') - return (unite#util#get_last_status() == 0) - \ ? substitute(stdout, '\v\r?\n$', '', '') - \ : '' -endfunction "}}} - -" Inherit from 'grep' source -let s:origin = unite#sources#grep#define() -let s:source = deepcopy(s:origin) -let s:source['name'] = 'grep/git' -let s:source['description'] = 'candidates from git grep' - -function! s:source.gather_candidates(args, context) abort "{{{ - " - " Note: - " Most of code in this function was copied from unite.vim - " - if !executable('git') - call unite#print_source_message( - \ 'command "git" is not executable.', s:source.name) - let a:context.is_async = 0 - return [] - elseif !unite#sources#grep_git#is_available() - call unite#print_source_message( - \ 'the current working directory is not in a git repository.', s:source.name) - let a:context.is_async = 0 - return [] - endif - - if !unite#util#has_vimproc() - call unite#print_source_message( - \ 'vimproc plugin is not installed.', self.name) - let a:context.is_async = 0 - return [] - endif - - if empty(a:context.source__targets) - \ || a:context.source__input == '' - call unite#print_source_message('Canceled.', s:source.name) - let a:context.is_async = 0 - return [] - endif - - " replace ^/ into the repository root - let root = unite#sources#grep_git#repository_root() - call map(a:context.source__targets, 'substitute(v:val, "^/", root . "/", "")') - - if a:context.is_redraw - let a:context.is_async = 1 - endif - - let cmdline = printf('git grep -n --no-color %s %s -- %s', - \ a:context.source__extra_opts, - \ string(a:context.source__input), - \ unite#helper#join_targets(a:context.source__targets), - \) - call unite#print_source_message('Command-line: ' . cmdline, s:source.name) - - " Note: - " --no-color is specified thus $TERM='dumb' is not required (actually git - " will blame if the $TERM value is not properly configured thus it should - " not be 'dumb'). - " - " Note: - " 'git grep' does not work properly with PTY - " - let a:context.source__proc = vimproc#plineopen3( - \ vimproc#util#iconv(cmdline, &encoding, 'char'), 0) - - return self.async_gather_candidates(a:args, a:context) -endfunction "}}} - - -" vim: foldmethod=marker === modified file 'vim/bundle/unite.vim/autoload/unite/sources/history_input.vim' --- vim/bundle/unite.vim/autoload/unite/sources/history_input.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/history_input.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#sources#history_input#define() abort +function! unite#sources#history_input#define() return s:source endfunction @@ -38,7 +38,7 @@ \ 'is_listed' : 0, \} -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ let context = unite#get_context() let inputs = unite#get_profile( \ context.unite__old_buffer_info[0].profile_name, 'unite__inputs') @@ -57,7 +57,7 @@ \ 'description' : 'narrow by history', \ 'is_quit' : 0, \ } -function! s:source.action_table.narrow.func(candidate) abort "{{{ +function! s:source.action_table.narrow.func(candidate) "{{{ call unite#force_quit_session() call unite#mappings#narrowing(a:candidate.word, 0) endfunction"}}} @@ -68,7 +68,7 @@ \ 'is_quit' : 0, \ 'is_invalidate_cache' : 1, \ } -function! s:source.action_table.delete.func(candidates) abort "{{{ +function! s:source.action_table.delete.func(candidates) "{{{ let context = unite#get_context() let inputs = unite#get_profile( \ context.unite__old_buffer_info[0].profile_name, 'unite__inputs') === modified file 'vim/bundle/unite.vim/autoload/unite/sources/history_unite.vim' --- vim/bundle/unite.vim/autoload/unite/sources/history_unite.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/history_unite.vim 2015-08-25 11:01:00 +0000 @@ -38,7 +38,7 @@ call unite#util#set_default('g:unite_source_history_unite_limit', 100) "}}} -function! unite#sources#history_unite#add(unite) abort"{{{ +function! unite#sources#history_unite#add(unite)"{{{ let s:unite_histories = filter(s:unite_histories, \ 'v:val.sources !=# a:unite.sources \ && v:val.context.input !=# a:unite.context.input') @@ -62,7 +62,7 @@ \ }) endfunction"}}} -function! unite#sources#history_unite#define() abort +function! unite#sources#history_unite#define() return s:source endfunction @@ -73,7 +73,7 @@ \ 'default_action' : 'start', \} -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ return map(copy(s:unite_histories), "{ \ 'word' : v:val.source_args, \ 'abbr' : v:val.source_args . ' -- ' . v:val.context.input, @@ -86,7 +86,7 @@ \ 'description' : 'start sources', \ 'is_start' : 1, \ } -function! s:source.action_table.start.func(candidate) abort "{{{ +function! s:source.action_table.start.func(candidate) "{{{ let history = a:candidate.source__history let history.context.split = unite#get_context().split let history.context.no_split = 0 === added file 'vim/bundle/unite.vim/autoload/unite/sources/history_yank.vim' --- vim/bundle/unite.vim/autoload/unite/sources/history_yank.vim 1970-01-01 00:00:00 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/history_yank.vim 2015-08-25 11:01:00 +0000 @@ -0,0 +1,175 @@ +"============================================================================= +" FILE: history_yank.vim +" AUTHOR: Shougo Matsushita +" License: MIT license {{{ +" Permission is hereby granted, free of charge, to any person obtaining +" a copy of this software and associated documentation files (the +" "Software"), to deal in the Software without restriction, including +" without limitation the rights to use, copy, modify, merge, publish, +" distribute, sublicense, and/or sell copies of the Software, and to +" permit persons to whom the Software is furnished to do so, subject to +" the following conditions: +" +" The above copyright notice and this permission notice shall be included +" in all copies or substantial portions of the Software. +" +" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +" IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +" }}} +"============================================================================= + +let s:save_cpo = &cpo +set cpo&vim + +" Variables "{{{ +let s:yank_histories = [] + +" the last modified time of the yank histories file. +let s:yank_histories_file_mtime = 0 + +let s:prev_registers = {} + +call unite#util#set_default('g:unite_source_history_yank_file', + \ unite#get_data_directory() . '/history_yank') + +call unite#util#set_default('g:unite_source_history_yank_limit', 100) + +call unite#util#set_default( + \ 'g:unite_source_history_yank_save_clipboard', 0) +"}}} + +function! unite#sources#history_yank#define() "{{{ + return s:source +endfunction"}}} +function! unite#sources#history_yank#_append() "{{{ + let prev_histories = copy(s:yank_histories) + + call s:add_register('"') + + if g:unite_source_history_yank_save_clipboard + " Skip if registers are identical. + if @" !=# @+ + call s:add_register('+') + endif + endif + + if prev_histories !=# s:yank_histories + " Updated. + call s:save() + endif +endfunction"}}} + +let s:source = { + \ 'name' : 'history/yank', + \ 'description' : 'candidates from yank history', + \ 'action_table' : {}, + \ 'default_kind' : 'word', + \} + +function! s:source.gather_candidates(args, context) "{{{ + call s:load() + + return map(copy(s:yank_histories), "{ + \ 'word' : v:val[0], + \ 'abbr' : printf('%-2d - %s', v:key, v:val[0]), + \ 'is_multiline' : 1, + \ 'action__regtype' : v:val[1], + \ }") +endfunction"}}} + +" Actions "{{{ +let s:source.action_table.delete = { + \ 'description' : 'delete from yank history', + \ 'is_invalidate_cache' : 1, + \ 'is_quit' : 0, + \ 'is_selectable' : 1, + \ } +function! s:source.action_table.delete.func(candidates) "{{{ + for candidate in a:candidates + call filter(s:yank_histories, 'v:val[0] !=# candidate.word') + endfor + + call s:save() +endfunction"}}} +"}}} + +function! s:save() "{{{ + if g:unite_source_history_yank_file == '' + \ || unite#util#is_sudo() + return + endif + + call s:load() + + let s:yank_histories = unite#util#uniq(s:yank_histories) + + if g:unite_source_history_yank_limit < len(s:yank_histories) + let s:yank_histories = + \ s:yank_histories[ : g:unite_source_history_yank_limit - 1] + endif + + call writefile([string(s:yank_histories)], + \ g:unite_source_history_yank_file) + let s:yank_histories_file_mtime = getftime(g:unite_source_history_yank_file) +endfunction"}}} +function! s:load() "{{{ + if !filereadable(g:unite_source_history_yank_file) + \ || s:yank_histories_file_mtime == getftime(g:unite_source_history_yank_file) + return + endif + + let file = readfile(g:unite_source_history_yank_file) + if empty(file) + return + endif + + try + sandbox let yank_histories = eval(file[0]) + + " Type check. + let history = yank_histories[0] + let history[0] = history[0] + catch + let yank_histories = [] + endtry + + let s:yank_histories += yank_histories + let s:yank_histories = unite#util#uniq(s:yank_histories) + + if g:unite_source_history_yank_limit < len(s:yank_histories) + let s:yank_histories = + \ s:yank_histories[ : g:unite_source_history_yank_limit - 1] + endif + + let s:yank_histories_file_mtime = getftime(g:unite_source_history_yank_file) +endfunction"}}} + +function! s:add_register(name) "{{{ + let reg = [getreg(a:name), getregtype(a:name)] + if get(s:prev_registers, a:name, []) ==# reg + " Skip same register value. + return + endif + + let len_history = len(reg[0]) + " Ignore too long yank. + if len_history < 2 || len_history > 100000 + \ || reg[0] =~ '[\x00-\x09\x10-\x1a\x1c-\x1f]\{3,}' + return + endif + + let s:prev_registers[a:name] = reg + + " Append register value. + call insert(s:yank_histories, reg) +endfunction"}}} + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: foldmethod=marker === modified file 'vim/bundle/unite.vim/autoload/unite/sources/interactive.vim' --- vim/bundle/unite.vim/autoload/unite/sources/interactive.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/interactive.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#sources#interactive#define() abort +function! unite#sources#interactive#define() return s:source endfunction @@ -40,7 +40,7 @@ \ 'syntax' : 'uniteSource__Interactive', \} -function! s:source.hooks.on_syntax(args, context) abort "{{{ +function! s:source.hooks.on_syntax(args, context) "{{{ syntax match uniteSource__InteractiveDescriptionLine / -- .*$/ \ contained containedin=uniteSource__Interactive syntax match uniteSource__InteractiveDescription /.*$/ @@ -51,7 +51,7 @@ highlight default link uniteSource__InteractiveDescription Comment endfunction"}}} -function! s:source.change_candidates(args, context) abort "{{{ +function! s:source.change_candidates(args, context) "{{{ let _ = [] if a:context.input !~ '\s' let _ += map(filter(values(unite#init#_sources([], a:context.input)), @@ -61,6 +61,12 @@ \ (v:val.description != '' ? ' -- ' . v:val.description : ''), \ 'source__word' : v:val.name . ' ', \ }") + if exists('*neobundle#get_unite_sources') + let _ += map(neobundle#get_unite_sources(), "{ + \ 'word' : v:val, + \ 'source__word' : v:val . ' ', + \ }") + endif if exists('g:unite_source_menu_menus') " Add menu sources let _ += values(map(copy(g:unite_source_menu_menus), "{ @@ -87,7 +93,7 @@ \ 'description' : 'narrow source', \ 'is_quit' : 0, \ } -function! s:source.action_table.narrow.func(candidate) abort "{{{ +function! s:source.action_table.narrow.func(candidate) "{{{ call unite#mappings#narrowing(a:candidate.source__word, 0) endfunction"}}} "}}} === modified file 'vim/bundle/unite.vim/autoload/unite/sources/jump.vim' --- vim/bundle/unite.vim/autoload/unite/sources/jump.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/jump.vim 2015-08-25 11:01:00 +0000 @@ -29,7 +29,7 @@ " Variables "{{{ "}}} -function! unite#sources#jump#define() abort "{{{ +function! unite#sources#jump#define() "{{{ return s:source endfunction"}}} @@ -40,10 +40,14 @@ \ } let s:cached_result = [] -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ " Get jumps list. + redir => redir + silent! jumps + redir END + let result = [] - for jump in split(unite#util#redir('jumps'), '\n')[1:] + for jump in split(redir, '\n')[1:] let list = split(jump) if len(list) < 4 continue === modified file 'vim/bundle/unite.vim/autoload/unite/sources/jump_point.vim' --- vim/bundle/unite.vim/autoload/unite/sources/jump_point.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/jump_point.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#sources#jump_point#define() abort "{{{ +function! unite#sources#jump_point#define() "{{{ return s:source endfunction"}}} @@ -36,13 +36,13 @@ \ 'hooks' : {}, \ 'default_kind' : 'jump_list', \} -function! s:source.hooks.on_init(args, context) abort "{{{ +function! s:source.hooks.on_init(args, context) "{{{ let line = substitute(getline('.'), '^!!!\|!!!$', '', 'g') let a:context.source__line = \ (line =~ '^\f\+:') ? line : '' endfunction"}}} -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ if a:context.source__line == '' return [] endif === modified file 'vim/bundle/unite.vim/autoload/unite/sources/launcher.vim' --- vim/bundle/unite.vim/autoload/unite/sources/launcher.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/launcher.vim 2015-08-25 11:01:00 +0000 @@ -29,7 +29,7 @@ " Variables "{{{ "}}} -function! unite#sources#launcher#define() abort "{{{ +function! unite#sources#launcher#define() "{{{ return s:source endfunction"}}} @@ -42,7 +42,7 @@ \ } let s:cached_result = {} -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ let path = get(a:args, 0, '') if path == '' " Use $PATH. @@ -61,7 +61,7 @@ return s:cached_result[path] endfunction"}}} -function! unite#sources#launcher#get_executables(path) abort "{{{ +function! unite#sources#launcher#get_executables(path) "{{{ " Search executable files from $PATH. let files = unite#util#uniq(split(globpath(a:path, '*'), '\n')) === modified file 'vim/bundle/unite.vim/autoload/unite/sources/line.vim' --- vim/bundle/unite.vim/autoload/unite/sources/line.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/line.vim 2015-08-25 11:01:00 +0000 @@ -32,7 +32,7 @@ let s:supported_search_direction = \ ['forward', 'backward', 'all', 'buffers', 'args'] -function! unite#sources#line#define() abort "{{{ +function! unite#sources#line#define() "{{{ return s:source_line endfunction "}}} @@ -47,7 +47,7 @@ \ 'sorters' : 'sorter_nothing', \ } -function! s:source_line.hooks.on_init(args, context) abort "{{{ +function! s:source_line.hooks.on_init(args, context) "{{{ let a:context.source__linenr = line('.') let a:context.source__linemax = line('$') let a:context.source__is_bang = @@ -71,9 +71,6 @@ \ (direction ==# 'args') ? \ filter(map(argv(), "bufnr(v:val)"), 'v:val > 0') : \ [bufnr('%')] - " Dummy loading - call s:dummy_loading(a:context.source__bufnrs) - if len(a:context.source__bufnrs) == 1 let a:context.source__syntax = \ getbufvar(a:context.source__bufnrs[0], '&l:syntax') @@ -99,7 +96,7 @@ let a:context.source__direction = direction endfunction"}}} -function! s:source_line.hooks.on_syntax(args, context) abort "{{{ +function! s:source_line.hooks.on_syntax(args, context) "{{{ let highlight = get(a:context, 'custom_line_enable_highlight', \ g:unite_source_line_enable_highlight) @@ -134,7 +131,7 @@ endtry endfunction"}}} -function! s:source_line.hooks.on_post_filter(args, context) abort "{{{ +function! s:source_line.hooks.on_post_filter(args, context) "{{{ for candidate in a:context.candidates let candidate.is_multiline = 1 let candidate.action__col_pattern = a:context.source__input @@ -144,7 +141,7 @@ endfor endfunction"}}} -function! s:source_line.gather_candidates(args, context) abort "{{{ +function! s:source_line.gather_candidates(args, context) "{{{ let direction = a:context.source__direction let start = a:context.source__linenr @@ -158,11 +155,11 @@ return direction ==# 'backward' ? reverse(_) : _ endfunction"}}} -function! s:source_line.complete(args, context, arglead, cmdline, cursorpos) abort "{{{ +function! s:source_line.complete(args, context, arglead, cmdline, cursorpos) "{{{ return s:supported_search_direction endfunction"}}} -function! s:source_line.source__converter(candidates, context) abort "{{{ +function! s:source_line.source__converter(candidates, context) "{{{ if len(a:context.source__bufnrs) > 1 for candidate in a:candidates let candidate.abbr = printf(a:context.source__format, @@ -186,7 +183,7 @@ "}}} " Misc. "{{{ -function! s:on_gather_candidates(direction, context, start, max) abort "{{{ +function! s:on_gather_candidates(direction, context, start, max) "{{{ let candidates = [] for bufnr in a:context.source__bufnrs " source__info = [bufnr, [line, text]] @@ -199,7 +196,7 @@ return candidates endfunction"}}} -function! s:get_lines(context, direction, bufnr, start, max) abort "{{{ +function! s:get_lines(context, direction, bufnr, start, max) "{{{ let [start, end] = \ a:direction ==# 'forward' ? \ [a:start, (a:max == 0 ? '$' : a:start + a:max - 1)] : @@ -213,7 +210,7 @@ for line in getbufline(a:bufnr, start, end) if input == '' \ || (!is_expr && stridx(tolower(line), input) >= 0) - \ || line =~? input + \ || line =~ input call add(_, [linenr, line]) endif @@ -223,7 +220,7 @@ return _ endfunction"}}} -function! s:get_context_lines(context, direction, start) abort "{{{ +function! s:get_context_lines(context, direction, start) "{{{ if a:direction !=# 'forward' && a:direction !=# 'backward' let lines = s:on_gather_candidates('forward', a:context, 1, 0) else @@ -243,19 +240,6 @@ return lines endfunction"}}} -function! s:dummy_loading(bufnrs) abort "{{{ - let load_bufnrs = filter(copy(a:bufnrs), '!bufloaded(v:val)') - if empty(load_bufnrs) - return - endif - - let prev_bufnr = bufnr('%') - try - silent bufdo echo - finally - execute 'buffer' prev_bufnr - endtry -endfunction"}}} "}}} " vim: foldmethod=marker === modified file 'vim/bundle/unite.vim/autoload/unite/sources/mapping.vim' --- vim/bundle/unite.vim/autoload/unite/sources/mapping.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/mapping.vim 2015-08-25 11:01:00 +0000 @@ -29,7 +29,7 @@ " Variables "{{{ "}}} -function! unite#sources#mapping#define() abort "{{{ +function! unite#sources#mapping#define() "{{{ return s:source endfunction"}}} @@ -42,7 +42,7 @@ \ } let s:cached_result = [] -function! s:source.hooks.on_init(args, context) abort "{{{ +function! s:source.hooks.on_init(args, context) "{{{ " Get buffer number. let bufnr = get(a:args, 0, bufnr('%')) let oldnr = bufnr('%') @@ -52,7 +52,9 @@ endif " Get mapping list. - let redir = unite#util#redir('nmap') + redir => redir + silent! nmap + redir END if oldnr != bufnr('%') execute 'buffer' oldnr @@ -81,10 +83,10 @@ \ }) endfor endfunction"}}} -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ return s:cached_result endfunction"}}} -function! s:source.complete(args, context, arglead, cmdline, cursorpos) abort "{{{ +function! s:source.complete(args, context, arglead, cmdline, cursorpos) "{{{ return filter(range(1, bufnr('$')), 'buflisted(v:val)') endfunction"}}} @@ -93,7 +95,7 @@ \ 'description' : 'view the help documentation', \ 'is_quit' : 0, \ } -function! s:source.action_table.preview.func(candidate) abort "{{{ +function! s:source.action_table.preview.func(candidate) "{{{ let winnr = winnr() try @@ -102,6 +104,7 @@ normal! zv normal! zt setlocal previewwindow + setlocal winfixheight catch /^Vim\%((\a\+)\)\?:E149/ " Ignore endtry === modified file 'vim/bundle/unite.vim/autoload/unite/sources/menu.vim' --- vim/bundle/unite.vim/autoload/unite/sources/menu.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/menu.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ call unite#util#set_default('g:unite_source_menu_menus', {}) -function! unite#sources#menu#define() abort +function! unite#sources#menu#define() return s:source endfunction @@ -38,7 +38,7 @@ \ 'sorters' : 'sorter_nothing', \} -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ let menu_name = get(a:args, 0, '') if menu_name == '' " All menus. @@ -66,22 +66,19 @@ \ menu.description, s:source.name) endif - if has_key(menu, 'file_candidates') - let candidates = map(copy(menu.file_candidates), "{ - \ 'word' : v:val[0], - \ 'kind' : (isdirectory(unite#util#expand(v:val[1])) ? - \ 'directory' : 'file'), - \ 'action__path' : unite#util#expand(v:val[1]), - \ }") - elseif has_key(menu, 'command_candidates') + if has_key(menu, 'command_candidates') " Use default map(). - let command_candidates = type(menu.command_candidates) == type({}) ? - \ map(copy(menu.command_candidates), '[v:key, v:val]') : - \ copy(menu.command_candidates) - let candidates = map(command_candidates, "{ - \ 'word' : v:val[0], 'kind' : 'command', - \ 'action__command' : v:val[1], - \ }") + if type(menu.command_candidates) == type([]) + let candidates = map(copy(menu.command_candidates), "{ + \ 'word' : v:val[0], 'kind' : 'command', + \ 'action__command' : v:val[1], + \ }") + else + let candidates = map(copy(menu.command_candidates), "{ + \ 'word' : v:key, 'kind' : 'command', + \ 'action__command' : v:val, + \ }") + endif elseif has_key(menu, 'candidates') if !has_key(menu, 'map') let candidates = menu.candidates @@ -109,7 +106,7 @@ return candidates endfunction"}}} -function! s:source.complete(args, context, arglead, cmdline, cursorpos) abort "{{{ +function! s:source.complete(args, context, arglead, cmdline, cursorpos) "{{{ return a:arglead =~ ':' ? [] : keys(g:unite_source_menu_menus) endfunction"}}} === modified file 'vim/bundle/unite.vim/autoload/unite/sources/output.vim' --- vim/bundle/unite.vim/autoload/unite/sources/output.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/output.vim 2015-08-25 11:01:00 +0000 @@ -29,7 +29,7 @@ " Variables "{{{ "}}} -function! unite#sources#output#define() abort "{{{ +function! unite#sources#output#define() "{{{ return s:source endfunction"}}} @@ -42,7 +42,7 @@ \ 'hooks' : {}, \ } -function! s:source.hooks.on_init(args, context) abort "{{{ +function! s:source.hooks.on_init(args, context) "{{{ if type(get(a:args, 0, '')) == type([]) " Use args directly. let a:context.source__is_dummy = 0 @@ -63,7 +63,7 @@ call unite#print_source_message('command: ' . command, s:source.name) endif endfunction"}}} -function! s:source.hooks.on_syntax(args, context) abort "{{{ +function! s:source.hooks.on_syntax(args, context) "{{{ let save_current_syntax = get(b:, 'current_syntax', '') unlet! b:current_syntax @@ -75,12 +75,14 @@ let b:current_syntax = save_current_syntax endtry endfunction"}}} -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ if type(get(a:args, 0, '')) == type([]) " Use args directly. let result = a:args[0] else - let output = unite#util#redir(a:context.source__command) + redir => output + silent! execute a:context.source__command + redir END let result = split(output, '\r\n\|\n') endif @@ -91,6 +93,17 @@ \ 'is_dummy' : a:context.source__is_dummy, \ }") endfunction"}}} +function! s:source.complete(args, context, arglead, cmdline, cursorpos) "{{{ + if !exists('*neocomplete#initialize') + return [] + endif + + let pattern = '\.\%(\h\w*\)\?$\|' . + \ neocomplete#get_keyword_pattern_end('vim') + let cur_keyword_str = neocomplete#match_word(a:arglead, pattern)[1] + return map(neocomplete#sources#vim#helper#command( + \ a:arglead, cur_keyword_str), 'v:val.word') +endfunction"}}} let &cpo = s:save_cpo unlet s:save_cpo === removed file 'vim/bundle/unite.vim/autoload/unite/sources/output_shellcmd.vim' --- vim/bundle/unite.vim/autoload/unite/sources/output_shellcmd.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/output_shellcmd.vim 1970-01-01 00:00:00 +0000 @@ -1,184 +0,0 @@ -"============================================================================= -" FILE: output_shellcmd.vim -" AUTHOR: Shougo Matsushita -" License: MIT license {{{ -" Permission is hereby granted, free of charge, to any person obtaining -" a copy of this software and associated documentation files (the -" "Software"), to deal in the Software without restriction, including -" without limitation the rights to use, copy, modify, merge, publish, -" distribute, sublicense, and/or sell copies of the Software, and to -" permit persons to whom the Software is furnished to do so, subject to -" the following conditions: -" -" The above copyright notice and this permission notice shall be included -" in all copies or substantial portions of the Software. -" -" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -" IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -" }}} -"============================================================================= - -let s:save_cpo = &cpo -set cpo&vim - -" Variables "{{{ -let g:unite_source_output_shellcmd_colors = - \ get(g:, 'unite_source_output_shellcmd_colors', [ - \ '#6c6c6c', '#ff6666', '#66ff66', '#ffd30a', - \ '#1e95fd', '#ff13ff', '#1bc8c8', '#c0c0c0', - \ '#383838', '#ff4444', '#44ff44', '#ffb30a', - \ '#6699ff', '#f820ff', '#4ae2e2', '#ffffff', - \]) -"}}} - -function! unite#sources#output_shellcmd#define() abort "{{{ - return s:source -endfunction"}}} - -let s:source = { - \ 'name' : 'output/shellcmd', - \ 'description' : 'candidates from shell command output', - \ 'default_action' : 'yank', - \ 'default_kind' : 'word', - \ 'syntax' : 'uniteSource__Output_Shellcmd', - \ 'hooks' : {}, - \ } - -function! s:source.hooks.on_init(args, context) abort "{{{ - let command = join(filter(copy(a:args), "v:val !=# '!'")) - if command == '' - let command = unite#util#input( - \ 'Please input shell command: ', '', 'shellcmd') - redraw - endif - let a:context.source__command = command - let a:context.source__is_dummy = - \ (get(a:args, -1, '') ==# '!') - - if !a:context.source__is_dummy - call unite#print_source_message( - \ 'command: ' . command, s:source.name) - endif -endfunction"}}} -function! s:source.hooks.on_syntax(args, context) abort "{{{ - let highlight_table = { - \ '0' : ' cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE', - \ '1' : ' cterm=BOLD gui=BOLD', - \ '3' : ' cterm=ITALIC gui=ITALIC', - \ '4' : ' cterm=UNDERLINE gui=UNDERLINE', - \ '7' : ' cterm=REVERSE gui=REVERSE', - \ '8' : ' ctermfg=0 ctermbg=0 guifg=#000000 guibg=#000000', - \ '9' : ' gui=UNDERCURL', - \ '21' : ' cterm=UNDERLINE gui=UNDERLINE', - \ '22' : ' gui=NONE', - \ '23' : ' gui=NONE', - \ '24' : ' gui=NONE', - \ '25' : ' gui=NONE', - \ '27' : ' gui=NONE', - \ '28' : ' ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE', - \ '29' : ' gui=NONE', - \ '39' : ' ctermfg=NONE guifg=NONE', - \ '49' : ' ctermbg=NONE guibg=NONE', - \} - for color in range(30, 37) - " Foreground color pattern. - let highlight_table[color] = printf(' ctermfg=%d guifg=%s', - \ color - 30, g:unite_source_output_shellcmd_colors[color - 30]) - for color2 in [1, 3, 4, 7] - " Type;Foreground color pattern - let highlight_table[color2 . ';' . color] = - \ highlight_table[color2] . highlight_table[color] - endfor - endfor - for color in range(40, 47) - " Background color pattern. - let highlight_table[color] = printf(' ctermbg=%d guibg=%s', - \ color - 40, g:unite_source_output_shellcmd_colors[color - 40]) - for color2 in range(30, 37) - " Foreground;Background color pattern. - let highlight_table[color2 . ';' . color] = - \ highlight_table[color2] . highlight_table[color] - endfor - endfor - - syntax match uniteSource__Output_Shellcmd_Conceal - \ contained conceal '\e\[[0-9;]*m' - \ containedin=uniteSource__Output_Shellcmd - - syntax match uniteSource__Output_Shellcmd_Conceal - \ contained conceal '\e\[?1h' - \ containedin=uniteSource__Output_Shellcmd - - syntax match uniteSource__Output_Shellcmd_Ignore - \ contained conceal '\e\[?\d[hl]\|\e=\r\|\r\|\e>' - \ containedin=uniteSource__Output_Shellcmd - - for [key, highlight] in items(highlight_table) - let syntax_name = 'uniteSource__Output_Shellcmd_Color' - \ . substitute(key, ';', '_', 'g') - let syntax_command = printf('start=+\e\[0\?%sm+ end=+\ze\e[\[0*m]\|$+ ' . - \ 'contains=uniteSource__Output_Shellcmd_Conceal ' . - \ 'containedin=uniteSource__Output_Shellcmd oneline', key) - - execute 'syntax region' syntax_name syntax_command - execute 'highlight' syntax_name highlight - endfor -endfunction"}}} -function! s:source.gather_candidates(args, context) abort "{{{ - if !unite#util#has_vimproc() - call unite#print_source_message( - \ 'vimproc plugin is not installed.', self.name) - let a:context.is_async = 0 - return [] - endif - - if a:context.is_redraw - let a:context.is_async = 1 - endif - - try - let a:context.source__proc = vimproc#plineopen2( - \ vimproc#util#iconv( - \ a:context.source__command, &encoding, 'char'), 1) - catch - call unite#print_error(v:exception) - let a:context.is_async = 0 - return [] - endtry - - return self.async_gather_candidates(a:args, a:context) -endfunction"}}} -function! s:source.async_gather_candidates(args, context) abort "{{{ - let stdout = a:context.source__proc.stdout - if stdout.eof - " Disable async. - let a:context.is_async = 0 - call a:context.source__proc.waitpid() - endif - - let lines = map(unite#util#read_lines(stdout, 1000), - \ "substitute(unite#util#iconv(v:val, 'char', &encoding), - \ '\\e\\[\\u', '', 'g')") - " echomsg string(lines) - - return map(lines, "{ - \ 'word' : substitute(v:val, '\\e\\[[0-9;]*m', '', 'g'), - \ 'abbr' : v:val, - \ 'is_dummy' : a:context.source__is_dummy, - \ }") -endfunction"}}} -function! s:source.hooks.on_close(args, context) abort "{{{ - if has_key(a:context, 'source__proc') - call a:context.source__proc.kill() - endif -endfunction "}}} - -let &cpo = s:save_cpo -unlet s:save_cpo - -" vim: foldmethod=marker === modified file 'vim/bundle/unite.vim/autoload/unite/sources/process.vim' --- vim/bundle/unite.vim/autoload/unite/sources/process.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/process.vim 2015-08-25 11:01:00 +0000 @@ -31,7 +31,7 @@ \ 'g:unite_source_process_enable_confirm', 1) "}}} -function! unite#sources#process#define() abort "{{{ +function! unite#sources#process#define() "{{{ return executable('ps') || (unite#util#is_windows() && executable('tasklist')) ? \ s:source : {} endfunction"}}} @@ -44,7 +44,7 @@ \ 'alias_table' : { 'delete' : 'sigkill' }, \ } -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ " Get process list. let _ = [] @@ -91,7 +91,7 @@ \ 'is_quit' : 0, \ 'is_selectable' : 1, \ } -function! s:source.action_table.sigkill.func(candidates) abort "{{{ +function! s:source.action_table.sigkill.func(candidates) "{{{ call s:kill('KILL', a:candidates) endfunction"}}} @@ -101,7 +101,7 @@ \ 'is_quit' : 0, \ 'is_selectable' : 1, \ } -function! s:source.action_table.sigterm.func(candidates) abort "{{{ +function! s:source.action_table.sigterm.func(candidates) "{{{ call s:kill('TERM', a:candidates) endfunction"}}} @@ -111,7 +111,7 @@ \ 'is_quit' : 0, \ 'is_selectable' : 1, \ } -function! s:source.action_table.sigint.func(candidates) abort "{{{ +function! s:source.action_table.sigint.func(candidates) "{{{ call s:kill('INT', a:candidates) endfunction"}}} @@ -120,7 +120,7 @@ \ 'is_invalidate_cache' : 1, \ 'is_quit' : 0, \ } -function! s:source.action_table.unite__new_candidate.func(candidate) abort "{{{ +function! s:source.action_table.unite__new_candidate.func(candidate) "{{{ let cmdline = unite#util#input( \ 'Please input command args : ', '', 'shellcmd') @@ -131,7 +131,7 @@ endif endfunction"}}} -function! s:kill(signal, candidates) abort "{{{ +function! s:kill(signal, candidates) "{{{ if g:unite_source_process_enable_confirm if !unite#util#input_yesno( \ 'Really send the ' . a:signal .' signal to the processes?') === modified file 'vim/bundle/unite.vim/autoload/unite/sources/rec.vim' --- vim/bundle/unite.vim/autoload/unite/sources/rec.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/rec.vim 2015-08-25 11:01:00 +0000 @@ -54,7 +54,7 @@ \ 'g:unite_source_rec_git_command', 'git') "}}} -let s:Cache = unite#util#get_vital_cache() +let s:Cache = unite#util#get_vital().import('System.Cache') let s:continuation = { 'directory' : {}, 'file' : {} } @@ -74,7 +74,7 @@ \ 'matchers' : [ 'converter_relative_word', 'matcher_default' ], \ } -function! s:source_file_rec.gather_candidates(args, context) abort "{{{ +function! s:source_file_rec.gather_candidates(args, context) "{{{ let a:context.source__directory = \ get(s:get_paths(a:args, a:context), 0, '') @@ -103,7 +103,7 @@ return deepcopy(continuation.files) endfunction"}}} -function! s:source_file_rec.async_gather_candidates(args, context) abort "{{{ +function! s:source_file_rec.async_gather_candidates(args, context) "{{{ let continuation = a:context.source__continuation let ignore_dir = get(a:context, 'custom_rec_ignore_directory_pattern', @@ -127,8 +127,7 @@ let continuation.end = 1 endif - let candidates = unite#helper#ignore_candidates( - \ unite#helper#paths2candidates(files), a:context) + let candidates = unite#helper#paths2candidates(files) let continuation.files += candidates if empty(continuation.rest) @@ -139,12 +138,12 @@ return deepcopy(candidates) endfunction"}}} -function! s:source_file_rec.hooks.on_init(args, context) abort "{{{ +function! s:source_file_rec.hooks.on_init(args, context) "{{{ let a:context.source__is_directory = 0 - call s:on_init(a:args, a:context, s:source_file_rec.name) + call s:on_init(a:args, a:context) endfunction"}}} -function! s:source_file_rec.vimfiler_check_filetype(args, context) abort "{{{ +function! s:source_file_rec.vimfiler_check_filetype(args, context) "{{{ let path = unite#util#substitute_path_separator( \ unite#util#expand(join(a:args, ':'))) let path = unite#util#substitute_path_separator( @@ -160,7 +159,7 @@ return [type, lines, dict] endfunction"}}} -function! s:source_file_rec.vimfiler_gather_candidates(args, context) abort "{{{ +function! s:source_file_rec.vimfiler_gather_candidates(args, context) "{{{ let path = get(s:get_paths(a:args, a:context), 0, '') if !isdirectory(path) @@ -187,6 +186,7 @@ let old_dir = getcwd() if path !=# old_dir + \ && isdirectory(path) call unite#util#lcd(path) endif @@ -199,12 +199,13 @@ endfor if path !=# old_dir + \ && isdirectory(path) call unite#util#lcd(old_dir) endif return deepcopy(candidates) endfunction"}}} -function! s:source_file_rec.vimfiler_dummy_candidates(args, context) abort "{{{ +function! s:source_file_rec.vimfiler_dummy_candidates(args, context) "{{{ let path = unite#util#substitute_path_separator( \ unite#util#expand(join(a:args, ':'))) let path = unite#util#substitute_path_separator( @@ -216,29 +217,33 @@ let old_dir = getcwd() if path !=# old_dir + \ && isdirectory(path) call unite#util#lcd(path) endif let exts = unite#util#is_windows() ? \ escape(substitute($PATHEXT . ';.LNK', ';', '\\|', 'g'), '.') : '' + let is_relative_path = path !~ '^\%(/\|\a\+:/\)' + " Set vimfiler property. - let candidates = [ unite#sources#file#create_file_dict(path, '') ] + let candidates = [ unite#sources#file#create_file_dict(path, is_relative_path) ] for candidate in candidates call unite#sources#file#create_vimfiler_dict(candidate, exts) endfor if path !=# old_dir + \ && isdirectory(path) call unite#util#lcd(old_dir) endif return deepcopy(candidates) endfunction"}}} -function! s:source_file_rec.vimfiler_complete(args, context, arglead, cmdline, cursorpos) abort "{{{ +function! s:source_file_rec.vimfiler_complete(args, context, arglead, cmdline, cursorpos) "{{{ return unite#sources#file#complete_directory( \ a:args, a:context, a:arglead, a:cmdline, a:cursorpos) endfunction"}}} -function! s:source_file_rec.complete(args, context, arglead, cmdline, cursorpos) abort "{{{ +function! s:source_file_rec.complete(args, context, arglead, cmdline, cursorpos) "{{{ return unite#sources#file#complete_directory( \ a:args, a:context, a:arglead, a:cmdline, a:cursorpos) endfunction"}}} @@ -249,7 +254,7 @@ let s:source_file_async.description = \ 'asynchronous candidates from directory by recursive' -function! s:source_file_async.gather_candidates(args, context) abort "{{{ +function! s:source_file_async.gather_candidates(args, context) "{{{ let paths = s:get_paths(a:args, a:context) let a:context.source__directory = join(paths, "\n") @@ -314,9 +319,6 @@ \ (a:context.source__is_directory ? 'd' : 'f'), '-print'] endif - call unite#add_source_message( - \ 'Command-line: ' . string(commands), self.name) - let a:context.source__proc = vimproc#popen3(commands, \ unite#helper#is_pty(args[0])) @@ -326,7 +328,7 @@ return [] endfunction"}}} -function! s:source_file_async.async_gather_candidates(args, context) abort "{{{ +function! s:source_file_async.async_gather_candidates(args, context) "{{{ let stderr = a:context.source__proc.stderr if !stderr.eof " Print error. @@ -347,8 +349,7 @@ let paths = map(paths, 'unite#util#substitute_path_separator(v:val)') endif - let candidates = unite#helper#ignore_candidates( - \ unite#helper#paths2candidates(paths), a:context) + let candidates = unite#helper#paths2candidates(paths) if stdout.eof || ( \ g:unite_source_rec_max_cache_files > 0 && @@ -374,11 +375,11 @@ return deepcopy(candidates) endfunction"}}} -function! s:source_file_async.hooks.on_init(args, context) abort "{{{ +function! s:source_file_async.hooks.on_init(args, context) "{{{ let a:context.source__is_directory = 0 - call s:on_init(a:args, a:context, s:source_file_async.name) + call s:on_init(a:args, a:context) endfunction"}}} -function! s:source_file_async.hooks.on_close(args, context) abort "{{{ +function! s:source_file_async.hooks.on_close(args, context) "{{{ if has_key(a:context, 'source__proc') call a:context.source__proc.kill() endif @@ -410,16 +411,14 @@ let lines = a:data let candidates = (a:event ==# 'stdout') ? job.candidates : job.errors - if !empty(lines) && !empty(candidates) - \ && !filereadable(candidates[-1]) && candidates[-1] !~ '\r$' + if !empty(lines) && lines[0] != "\n" && !empty(job.candidates) " Join to the previous line let candidates[-1] .= lines[0] call remove(lines, 0) endif call map(filter(lines, 'v:val != ""'), - \ "substitute(unite#util#iconv( - \ v:val, 'char', &encoding), '\\r$', '', '')") + \ "unite#util#iconv(v:val, 'char', &encoding)") if unite#util#is_windows() call map(lines, @@ -429,7 +428,7 @@ let candidates += lines endfunction"}}} -function! s:source_file_neovim.gather_candidates(args, context) abort "{{{ +function! s:source_file_neovim.gather_candidates(args, context) "{{{ let paths = s:get_paths(a:args, a:context) let a:context.source__directory = join(paths, "\n") @@ -494,9 +493,6 @@ \ (a:context.source__is_directory ? 'd' : 'f'), '-print'] endif - call unite#add_source_message( - \ 'Command-line: ' . string(commands), self.name) - let a:context.source__job = jobstart(commands, { \ 'on_stdout' : function('s:job_handler'), \ 'on_stderr' : function('s:job_handler'), @@ -507,7 +503,7 @@ return [] endfunction"}}} -function! s:source_file_neovim.async_gather_candidates(args, context) abort "{{{ +function! s:source_file_neovim.async_gather_candidates(args, context) "{{{ if !has_key(s:job_info, a:context.source__job) return [] endif @@ -521,10 +517,8 @@ endif let continuation = a:context.source__continuation - let candidates = job.eof ? job.candidates : job.candidates[: -2] - let candidates = unite#helper#ignore_candidates( - \ unite#helper#paths2candidates(candidates), a:context) - let job.candidates = job.eof ? [] : job.candidates[-1:] + let candidates = unite#helper#paths2candidates(job.candidates[: -2]) + let job.candidates = job.candidates[-1:] if job.eof " Disable async. @@ -542,11 +536,11 @@ return deepcopy(candidates) endfunction"}}} -function! s:source_file_neovim.hooks.on_init(args, context) abort "{{{ +function! s:source_file_neovim.hooks.on_init(args, context) "{{{ let a:context.source__is_directory = 0 - call s:on_init(a:args, a:context, s:source_file_neovim.name) + call s:on_init(a:args, a:context) endfunction"}}} -function! s:source_file_neovim.hooks.on_close(args, context) abort "{{{ +function! s:source_file_neovim.hooks.on_close(args, context) "{{{ if has_key(a:context, 'source__job') \ && has_key(s:job_info, a:context.source__job) silent! call jobstop(a:context.source__job) @@ -559,7 +553,7 @@ let s:source_file_git.name = 'file_rec/git' let s:source_file_git.description = \ 'git candidates from directory by recursive' -function! s:source_file_git.gather_candidates(args, context) abort "{{{ +function! s:source_file_git.gather_candidates(args, context) "{{{ if !unite#util#has_vimproc() call unite#print_source_message( \ 'vimproc plugin is not installed.', self.name) @@ -567,12 +561,7 @@ return [] endif - let directory = fnamemodify(finddir('.git', ';'), ':p:h:h') - if directory == '' - let directory = fnamemodify(findfile('.git', ';'), ':p:h') - endif - let directory = unite#util#substitute_path_separator(directory) - if directory == '' + if finddir('.git', ';') == '' " Not in git directory. call unite#print_source_message( \ 'Not in git directory.', self.name) @@ -582,6 +571,8 @@ let a:context.source__directory = \ unite#util#substitute_path_separator(getcwd()) . '/' + let directory = unite#util#substitute_path_separator( + \ fnamemodify(finddir('.git', ';'), ':p:h:h')) call unite#print_source_message( \ 'directory: ' . directory, self.name) @@ -608,9 +599,6 @@ return [] endif - call unite#add_source_message( - \ 'Command-line: ' . command, self.name) - let a:context.source__proc = vimproc#popen3(command) " Close handles. @@ -618,14 +606,14 @@ return [] endfunction"}}} -function! s:source_file_git.async_gather_candidates(args, context) abort "{{{ +function! s:source_file_git.async_gather_candidates(args, context) "{{{ return map(s:source_file_async.async_gather_candidates( \ a:args, a:context), "{ \ 'word' : a:context.source__directory . v:val.word, \ 'action__path' : a:context.source__directory . v:val.word, \}") endfunction"}}} -function! s:source_file_git.complete(args, context, arglead, cmdline, cursorpos) abort "{{{ +function! s:source_file_git.complete(args, context, arglead, cmdline, cursorpos) "{{{ return [] endfunction"}}} @@ -636,11 +624,11 @@ \ 'candidates from directory by recursive' let s:source_directory_rec.default_kind = 'directory' -function! s:source_directory_rec.hooks.on_init(args, context) abort "{{{ +function! s:source_directory_rec.hooks.on_init(args, context) "{{{ let a:context.source__is_directory = 1 - call s:on_init(a:args, a:context, s:source_directory_rec.name) + call s:on_init(a:args, a:context) endfunction"}}} -function! s:source_directory_rec.hooks.on_post_filter(args, context) abort "{{{ +function! s:source_directory_rec.hooks.on_post_filter(args, context) "{{{ for candidate in filter(copy(a:context.candidates), \ "v:val.word[-1:] != '/'") let candidate.abbr = candidate.word . '/' @@ -654,11 +642,11 @@ \ 'asynchronous candidates from directory by recursive' let s:source_directory_async.default_kind = 'directory' -function! s:source_directory_async.hooks.on_init(args, context) abort "{{{ +function! s:source_directory_async.hooks.on_init(args, context) "{{{ let a:context.source__is_directory = 1 - call s:on_init(a:args, a:context, s:source_directory_async.name) + call s:on_init(a:args, a:context) endfunction"}}} -function! s:source_directory_async.hooks.on_post_filter(args, context) abort "{{{ +function! s:source_directory_async.hooks.on_post_filter(args, context) "{{{ for candidate in filter(copy(a:context.candidates), \ "v:val.word[-1:] != '/'") let candidate.abbr = candidate.word . '/' @@ -666,7 +654,7 @@ endfunction"}}} " Misc. -function! s:get_paths(args, context) abort "{{{ +function! s:get_paths(args, context) "{{{ let args = unite#helper#parse_source_args(a:args) let directory = get(args, 0, '') if directory == '' @@ -688,7 +676,7 @@ return paths endfunction"}}} -function! s:get_files(context, files, level, max_unit, ignore_dir) abort "{{{ +function! s:get_files(context, files, level, max_unit, ignore_dir) "{{{ let continuation_files = [] let ret_files = [] let files_index = 0 @@ -780,20 +768,16 @@ return [continuation_files, map(ret_files, \ "unite#util#substitute_path_separator(fnamemodify(v:val, ':p'))")] endfunction"}}} -function! s:on_init(args, context, name) abort "{{{ +function! s:on_init(args, context) "{{{ augroup plugin-unite-source-file_rec autocmd! autocmd BufEnter,BufWinEnter,BufFilePost,BufWritePost * \ call unite#sources#rec#_append() augroup END - - let a:context.source__name = a:name endfunction"}}} -function! s:init_continuation(context, directory) abort "{{{ - let cache_dir = printf('%s/%s/%s', - \ unite#get_data_directory(), - \ a:context.source__name, - \ (a:context.source__is_directory ? 'directory' : 'file')) +function! s:init_continuation(context, directory) "{{{ + let cache_dir = unite#get_data_directory() . '/rec/' . + \ (a:context.source__is_directory ? 'directory' : 'file') let continuation = (a:context.source__is_directory) ? \ s:continuation.directory : s:continuation.file @@ -829,11 +813,9 @@ \ 'isdirectory(v:val.action__path)' : \ 'filereadable(v:val.action__path)') endfunction"}}} -function! s:write_cache(context, directory, files) abort "{{{ - let cache_dir = printf('%s/%s/%s', - \ unite#get_data_directory(), - \ a:context.source__name, - \ (a:context.source__is_directory ? 'directory' : 'file')) +function! s:write_cache(context, directory, files) "{{{ + let cache_dir = unite#get_data_directory() . '/rec/' . + \ (a:context.source__is_directory ? 'directory' : 'file') if g:unite_source_rec_min_cache_files >= 0 \ && !unite#util#is_sudo() @@ -847,7 +829,7 @@ endif endfunction"}}} -function! unite#sources#rec#_append() abort "{{{ +function! unite#sources#rec#_append() "{{{ let path = expand('%:p') if path !~ '\a\+:' let path = simplify(resolve(path)) @@ -872,7 +854,7 @@ endfor endfunction"}}} -function! unite#sources#rec#define() abort "{{{ +function! unite#sources#rec#define() "{{{ let sources = [ s:source_file_rec, s:source_directory_rec ] let sources += [ s:source_file_async, s:source_directory_async] let sources += [ s:source_file_git ] @@ -880,7 +862,7 @@ return sources endfunction"}}} -function! s:resolve(file) abort "{{{ +function! s:resolve(file) "{{{ " Detect symbolic link loop. let file_link = unite#util#substitute_path_separator( \ resolve(a:file)) === modified file 'vim/bundle/unite.vim/autoload/unite/sources/register.vim' --- vim/bundle/unite.vim/autoload/unite/sources/register.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/register.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#sources#register#define() abort "{{{ +function! unite#sources#register#define() "{{{ return s:source endfunction"}}} @@ -37,23 +37,21 @@ \ 'default_kind' : 'word', \} -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ let candidates = [] - let registers = split(get(a:args, 0, ''), '\zs') - - for reg in (has('clipboard') ? ['+', '*'] : []) + [ - \ '"', - \ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', - \ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', - \ 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', - \ 'u', 'v', 'w', 'x', 'y', 'z', - \ '-', '.', ':', '#', '%', '/', '=', + let registers = [ + \ '"', '+', '*', + \ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + \ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', + \ 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', + \ 'u', 'v', 'w', 'x', 'y', 'z', + \ '-', '.', ':', '#', '%', '/', '=', \ ] + + for reg in registers let register = getreg(reg, 1) - if (empty(registers) && register != '' - \ && register !~ '[\x01-\x08\x10-\x1a\x1c-\x1f]\{3,}') - \ || index(registers, reg) >= 0 + if register != '' && register !~ '[\x01-\x08\x10-\x1a\x1c-\x1f]\{3,}' call add(candidates, { \ 'word' : register, \ 'abbr' : printf('%-3s - %s', reg, @@ -75,7 +73,7 @@ \ 'is_quit' : 0, \ 'is_selectable' : 1, \ } -function! s:source.action_table.delete.func(candidates) abort "{{{ +function! s:source.action_table.delete.func(candidates) "{{{ for candidate in a:candidates silent! call setreg(candidate.action__register, '') endfor @@ -86,7 +84,7 @@ \ 'is_invalidate_cache' : 1, \ 'is_quit' : 0, \ } -function! s:source.action_table.edit.func(candidate) abort "{{{ +function! s:source.action_table.edit.func(candidate) "{{{ let register = getreg(a:candidate.action__register, 1) let register = substitute(register, '\r\?\n', '\\n', 'g') let new_value = substitute(input('', register), '\\n', '\n', 'g') === modified file 'vim/bundle/unite.vim/autoload/unite/sources/resume.vim' --- vim/bundle/unite.vim/autoload/unite/sources/resume.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/resume.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#sources#resume#define() abort "{{{ +function! unite#sources#resume#define() "{{{ return s:source endfunction"}}} @@ -36,17 +36,13 @@ \ 'default_kind' : 'command', \} -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ let a:context.source__unite_list = map(filter(range(1, bufnr('$')), " \ getbufvar(v:val, '&filetype') ==# 'unite' \ && getbufvar(v:val, 'unite').sources[0].name != 'resume'"), \ "getbufvar(v:val, 'unite')") let unite = unite#get_current_unite() - let new_context = copy(unite.original_context) - " Disable the input - call remove(new_context, 'input') - let max_width = max(map(copy(a:context.source__unite_list), \ 'len(v:val.buffer_name)')) let candidates = map(copy(a:context.source__unite_list), "{ @@ -60,7 +56,7 @@ \ v:val.buffer_name), \ 'action__command' : printf('call unite#resume(%s, %s)', \ string(v:val.buffer_name), - \ string(new_context)), + \ string(unite.original_context)), \ 'source__time' : v:val.access_time, \}") @@ -68,7 +64,7 @@ endfunction"}}} " Misc. -function! s:compare(candidate_a, candidate_b) abort "{{{ +function! s:compare(candidate_a, candidate_b) "{{{ return a:candidate_b.source__time - a:candidate_a.source__time endfunction"}}} === modified file 'vim/bundle/unite.vim/autoload/unite/sources/runtimepath.vim' --- vim/bundle/unite.vim/autoload/unite/sources/runtimepath.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/runtimepath.vim 2015-08-25 11:01:00 +0000 @@ -29,7 +29,7 @@ " Variables "{{{ "}}} -function! unite#sources#runtimepath#define() abort "{{{ +function! unite#sources#runtimepath#define() "{{{ return s:source endfunction"}}} @@ -41,7 +41,7 @@ \ 'action_table' : {}, \ } -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ return map(map(s:split_rtp(), 'unite#util#expand(v:val)'), "{ \ 'word' : unite#util#expand(v:val), \ 'abbr' : unite#util#substitute_path_separator( @@ -58,14 +58,14 @@ \ 'is_quit' : 0, \ 'is_selectable' : 1, \ } -function! s:source.action_table.delete.func(candidates) abort "{{{ +function! s:source.action_table.delete.func(candidates) "{{{ for candidate in a:candidates execute 'set runtimepath-=' . fnameescape(candidate.action__path) endfor endfunction"}}} "}}} -function! s:split_rtp(...) abort "{{{ +function! s:split_rtp(...) "{{{ let rtp = a:0 ? a:1 : &runtimepath if type(rtp) == type([]) return rtp === modified file 'vim/bundle/unite.vim/autoload/unite/sources/script.vim' --- vim/bundle/unite.vim/autoload/unite/sources/script.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/script.vim 2015-08-25 11:01:00 +0000 @@ -32,16 +32,16 @@ \ 'default_kind' : 'command', \ } -function! s:source.hooks.on_init(args, context) abort "{{{ +function! s:source.hooks.on_init(args, context) "{{{ let a:context.source__path = expand('%') endfunction"}}} -function! s:source.hooks.on_close(args, context) abort "{{{ +function! s:source.hooks.on_close(args, context) "{{{ if has_key(a:context, 'source__proc') call a:context.source__proc.kill() endif endfunction "}}} -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ if len(a:args) < 2 call unite#print_source_error( \ ':Unite script:command:path', s:source.name) @@ -81,7 +81,7 @@ return [] endfunction"}}} -function! s:source.async_gather_candidates(args, context) abort "{{{ +function! s:source.async_gather_candidates(args, context) "{{{ if !has_key(a:context, 'source__proc') let a:context.is_async = 0 return [] @@ -109,7 +109,7 @@ \ v:val, 'char', &encoding))") endfunction"}}} -function! s:source.complete(args, context, arglead, cmdline, cursorpos) abort "{{{ +function! s:source.complete(args, context, arglead, cmdline, cursorpos) "{{{ if len(a:args) < 1 let path = substitute($PATH, \ (unite#util#is_windows() ? ';' : ':'), ',', 'g') @@ -123,7 +123,7 @@ endif endfunction"}}} -function! s:create_candidate(val) abort "{{{ +function! s:create_candidate(val) "{{{ let matches = matchlist(a:val, '^\(.*\)\t\(.*\)$') if empty(matches) @@ -136,7 +136,7 @@ \ } endfunction"}}} -function! unite#sources#script#define() abort +function! unite#sources#script#define() return s:source endfunction === modified file 'vim/bundle/unite.vim/autoload/unite/sources/source.vim' --- vim/bundle/unite.vim/autoload/unite/sources/source.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/source.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#sources#source#define() abort "{{{ +function! unite#sources#source#define() "{{{ return s:source endfunction"}}} @@ -39,7 +39,7 @@ \ 'syntax' : 'uniteSource__Source', \} -function! s:source.hooks.on_syntax(args, context) abort "{{{ +function! s:source.hooks.on_syntax(args, context) "{{{ syntax match uniteSource__SourceDescriptionLine / -- .*$/ \ contained containedin=uniteSource__Source syntax match uniteSource__SourceDescription /.*$/ @@ -50,7 +50,7 @@ highlight default link uniteSource__SourceDescription Comment endfunction"}}} -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ let sources = filter(values(unite#get_all_sources()), \ 'v:val.is_listed && (empty(a:args) || \ index(a:args, v:val.name) >= 0)') @@ -63,7 +63,7 @@ \}") endfunction"}}} -function! s:source.complete(args, context, arglead, cmdline, cursorpos) abort "{{{ +function! s:source.complete(args, context, arglead, cmdline, cursorpos) "{{{ return keys(filter(unite#init#_sources([], a:arglead), \ 'v:val.is_listed')) endfunction"}}} === modified file 'vim/bundle/unite.vim/autoload/unite/sources/tab.vim' --- vim/bundle/unite.vim/autoload/unite/sources/tab.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/tab.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#sources#tab#define() abort "{{{ +function! unite#sources#tab#define() "{{{ return s:source endfunction"}}} @@ -38,7 +38,7 @@ \ 'default_kind' : 'tab', \} -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ let list = range(1, tabpagenr('$')) let arg = get(a:args, 0, '') if arg ==# 'no-current' @@ -97,10 +97,13 @@ if len(tabpagebuflist(i)) > 1 " Get tab windows list. - for [winnr, bufnr] in map(tabpagebuflist(i), "[v:key, v:val]") - let abbr .= "\n" . printf('%s %d: %s', repeat(' ', 1), (winnr+1), - \ (bufname(bufnr) == '' ? '[No Name]' : bufname(bufnr))) - endfor + let tabnr = tabpagenr() + execute 'tabnext' i + let abbr .= "\n" . join(map(range(1, winnr('$')), + \ "printf('%s %d: %s', repeat(' ', 1), v:val, + \ (bufname(winbufnr(v:val)) == '' ? + \ '[No Name]' : bufname(winbufnr(v:val))))"), "\n") + execute 'tabnext' tabnr endif call add(candidates, { @@ -113,10 +116,10 @@ return candidates endfunction"}}} -function! s:source.complete(args, context, arglead, cmdline, cursorpos) abort "{{{ +function! s:source.complete(args, context, arglead, cmdline, cursorpos) "{{{ return ['no-current'] endfunction"}}} -function! s:source.hooks.on_syntax(args, context) abort "{{{ +function! s:source.hooks.on_syntax(args, context) "{{{ syntax match uniteSource__Tab_title /\[.\{-}\]/ \ contained containedin=uniteSource__Tab highlight default link uniteSource__Tab_title Function === modified file 'vim/bundle/unite.vim/autoload/unite/sources/vimgrep.vim' --- vim/bundle/unite.vim/autoload/unite/sources/vimgrep.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/vimgrep.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'g:unite_source_vimgrep_search_word_highlight', 'Search') "}}} -function! unite#sources#vimgrep#define() abort "{{{ +function! unite#sources#vimgrep#define() "{{{ return s:source endfunction "}}} @@ -45,7 +45,7 @@ \ ], \ } -function! s:source.hooks.on_init(args, context) abort "{{{ +function! s:source.hooks.on_init(args, context) "{{{ let args = unite#helper#parse_source_args(a:args) let target = get(args, 0, '') @@ -65,8 +65,7 @@ let a:context.source__input = get(args, 1, '') if a:context.source__input == '' || a:context.unite__is_restart let a:context.source__input = unite#util#input('Pattern: ', - \ a:context.source__input, - \ 'customlist,unite#helper#complete_search_history') + \ a:context.source__input) endif let a:context.source__directory = @@ -74,7 +73,7 @@ \ unite#util#substitute_path_separator( \ unite#util#expand(a:context.source__targets[0])) : '' endfunction"}}} -function! s:source.hooks.on_syntax(args, context) abort "{{{ +function! s:source.hooks.on_syntax(args, context) "{{{ syntax case ignore syntax region uniteSource__VimgrepLine \ start=' ' end='$' @@ -96,7 +95,7 @@ execute 'highlight default link uniteSource__VimgrepPattern' \ g:unite_source_vimgrep_search_word_highlight endfunction"}}} -function! s:source.hooks.on_post_filter(args, context) abort "{{{ +function! s:source.hooks.on_post_filter(args, context) "{{{ for candidate in a:context.candidates let candidate.kind = ['file', 'jump_list'] let candidate.action__col_pattern = a:context.source__input @@ -104,7 +103,7 @@ endfor endfunction"}}} -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ if empty(a:context.source__targets) \ || a:context.source__input == '' return [] @@ -125,7 +124,9 @@ let qflist = getqflist() let cwd = getcwd() - call unite#util#lcd(a:context.source__directory) + if isdirectory(a:context.source__directory) + call unite#util#lcd(a:context.source__directory) + endif for qf in filter(qflist, \ "v:val.bufnr != '' && bufname(v:val.bufnr) != ''") @@ -166,7 +167,7 @@ return _ endfunction "}}} -function! s:source.complete(args, context, arglead, cmdline, cursorpos) abort "{{{ +function! s:source.complete(args, context, arglead, cmdline, cursorpos) "{{{ return unite#sources#file#complete_directory( \ a:args, a:context, a:arglead, a:cmdline, a:cursorpos) endfunction"}}} === modified file 'vim/bundle/unite.vim/autoload/unite/sources/window.vim' --- vim/bundle/unite.vim/autoload/unite/sources/window.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/window.vim 2015-08-25 11:01:00 +0000 @@ -26,43 +26,29 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#sources#window#define() abort "{{{ +function! unite#sources#window#define() "{{{ return s:source endfunction"}}} -function! unite#sources#window#sorter(candidates, context) abort "{{{ - return unite#util#sort_by(a:candidates, ' - \ -get( - \ gettabwinvar( - \ v:val.action__tab_nr, v:val.action__window_nr, - \ "unite_window", {}), - \ "time", 0) - \ ') -endfunction"}}} - let s:source = { \ 'name' : 'window', \ 'description' : 'candidates from window list', \ 'syntax' : 'uniteSource__Window', \ 'hooks' : {}, \ 'default_kind' : 'window', - \ 'sorters': function('unite#sources#window#sorter'), \} -function! s:source.hooks.on_init(args, context) abort "{{{ - let no_current = index(a:args, 'no-current') >= 0 +function! s:source.hooks.on_init(args, context) "{{{ if index(a:args, 'all') >= 0 let a:context.source__candidates = [] - let cur_tabnr = tabpagenr() for tabnr in range(1, tabpagenr('$')) - let a:context.source__candidates += - \ s:get_windows(tabnr == cur_tabnr && no_current, tabnr) + let a:context.source__candidates += s:get_windows(a:args, tabnr) endfor else - let a:context.source__candidates = s:get_windows(no_current, tabpagenr()) + let a:context.source__candidates = s:get_windows(a:args, tabpagenr()) endif endfunction"}}} -function! s:source.hooks.on_syntax(args, context) abort "{{{ +function! s:source.hooks.on_syntax(args, context) "{{{ syntax match uniteSource__Window_prefix /\d\+: \[.\{-}\]/ \ contained containedin=uniteSource__Window highlight default link uniteSource__Window_prefix Constant @@ -73,42 +59,67 @@ \ contained containedin=uniteSource__Window highlight default link uniteSource__Window_directory PreProc endfunction"}}} -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ return a:context.source__candidates endfunction"}}} -function! s:source.complete(args, context, arglead, cmdline, cursorpos) abort "{{{ +function! s:source.complete(args, context, arglead, cmdline, cursorpos) "{{{ return ['no-current', 'all'] endfunction"}}} " Misc -function! s:get_windows(no_current, tabnr) abort "{{{ - let list = range(1, tabpagewinnr(a:tabnr, '$')) - unlet list[tabpagewinnr(a:tabnr)-1] - if !a:no_current +function! s:compare(candidate_a, candidate_b) "{{{ + return getwinvar(a:candidate_b, 'unite_window').time - getwinvar(a:candidate_a, 'unite_window').time +endfunction"}}} + +function! s:get_windows(args, tabnr) abort "{{{ + let current = tabpagenr() + if a:tabnr != tabpagenr() + execute 'tabnext' a:tabnr + endif + + let list = range(1, winnr('$')) + for i in list + " Set default value. + if type(getwinvar(i, 'unite_window')) == type('') + call setwinvar(i, 'unite_window', { + \ 'time' : 0, + \ 'cwd' : getcwd(), + \ }) + endif + endfor + + unlet list[winnr()-1] + call sort(list, 's:compare') + if index(a:args, 'no-current') < 0 || current != tabpagenr() " Add current window. - call add(list, tabpagewinnr(a:tabnr)) + call add(list, winnr()) endif - let buffers = tabpagebuflist(a:tabnr) let candidates = [] for i in list - let bufname = bufname(buffers[i-1]) + let window = getwinvar(i, 'unite_window') + let bufname = bufname(winbufnr(i)) if empty(bufname) let bufname = '[No Name]' endif call add(candidates, { \ 'word' : bufname, - \ 'abbr' : printf('%d: [%d/%d] %s %s', - \ a:tabnr, i, tabpagewinnr(a:tabnr, '$'), - \ (i == tabpagewinnr(a:tabnr) ? '%' : - \ i == tabpagewinnr(a:tabnr, '#') ? '#' : ' '), - \ bufname), + \ 'abbr' : printf('%d: [%d/%d] %s %s(%s)', + \ a:tabnr, i, winnr('$'), + \ (i == winnr() ? '%' : i == winnr('#') ? '#' : ' '), + \ bufname, window.cwd), \ 'action__tab_nr' : a:tabnr, \ 'action__window_nr' : i, + \ 'action__buffer_nr' : winbufnr(i), + \ 'action__directory' : window.cwd, \ }) endfor + if current != tabpagenr() + execute 'tabnext' current + endif + return candidates endfunction"}}} === modified file 'vim/bundle/unite.vim/autoload/unite/sources/window_gui.vim' --- vim/bundle/unite.vim/autoload/unite/sources/window_gui.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/sources/window_gui.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#sources#window_gui#define() abort "{{{ +function! unite#sources#window_gui#define() "{{{ return executable('wmctrl') ? s:source : {} endfunction"}}} @@ -40,12 +40,12 @@ \ 'default_action' : 'open', \} -function! s:source.hooks.on_syntax(args, context) abort "{{{ +function! s:source.hooks.on_syntax(args, context) "{{{ syntax match uniteSource__WindowGUI_Class /\[\S\+\]/ \ contained containedin=uniteSource__WindowGUI highlight default link uniteSource__WindowGUI_Class Type endfunction"}}} -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ let current = getpid() let _ = [] let classes = [] @@ -79,7 +79,7 @@ \ 'action__title' : v:val.title, \ }") endfunction"}}} -function! s:source.complete(args, context, arglead, cmdline, cursorpos) abort "{{{ +function! s:source.complete(args, context, arglead, cmdline, cursorpos) "{{{ return ['no-current'] endfunction"}}} @@ -87,7 +87,7 @@ let s:source.action_table.open = { \ 'description' : 'move to this window', \ } -function! s:source.action_table.open.func(candidate) abort "{{{ +function! s:source.action_table.open.func(candidate) "{{{ call unite#util#system(printf('wmctrl -i -a %s', \ a:candidate.action__id)) endfunction"}}} @@ -98,7 +98,7 @@ \ 'is_invalidate_cache' : 1, \ 'is_quit' : 0, \ } -function! s:source.action_table.delete.func(candidates) abort "{{{ +function! s:source.action_table.delete.func(candidates) "{{{ for candidate in a:candidates call unite#util#system(printf('wmctrl -i -c %s', \ candidate.action__id)) @@ -111,7 +111,7 @@ \ 'is_invalidate_cache' : 1, \ 'is_quit' : 0, \ } -function! s:source.action_table.rename.func(candidate) abort "{{{ +function! s:source.action_table.rename.func(candidate) "{{{ let old_title = a:candidate.action__title let title = input(printf('New title: %s -> ', old_title), old_title) if title != '' && title !=# old_title === modified file 'vim/bundle/unite.vim/autoload/unite/start.vim' --- vim/bundle/unite.vim/autoload/unite/start.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/start.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#start#standard(sources, ...) abort "{{{ +function! unite#start#standard(sources, ...) "{{{ " Check command line window. if unite#util#is_cmdwin() call unite#print_error( @@ -39,6 +39,13 @@ let context = unite#init#_context(context, \ unite#helper#get_source_names(a:sources)) + if empty(a:sources) + echohl Comment + call unite#view#_redraw_echo( + \ '[unite.vim] interactive mode: Please input source name') + echohl None + endif + if context.resume " Check resume buffer. let resume_bufnr = s:get_resume_buffer(context.buffer_name) @@ -57,13 +64,6 @@ endif endif"}}} - if empty(a:sources) - echohl Comment - call unite#view#_redraw_echo( - \ '[unite.vim] interactive mode: Please input source name') - echohl None - endif - try call unite#init#_current_unite(a:sources, context) catch /^unite.vim: Invalid / @@ -90,9 +90,6 @@ if empty(candidates) " Ignore. - call unite#view#_print_warning( - \ 'unite buffer "' - \ . current_unite.buffer_name.'" candidates are empty') call unite#variables#disable_current_unite() return elseif (context.immediately && len(candidates) == 1) @@ -122,7 +119,7 @@ call unite#view#_init_cursor() endfunction"}}} -function! unite#start#script(sources, ...) abort "{{{ +function! unite#start#script(sources, ...) "{{{ " Start unite from script. let context = get(a:000, 0, {}) @@ -134,7 +131,7 @@ \ unite#start#standard(a:sources, context) endfunction"}}} -function! unite#start#temporary(sources, ...) abort "{{{ +function! unite#start#temporary(sources, ...) "{{{ " Get current context. let old_context = unite#get_context() let unite = unite#get_current_unite() @@ -170,6 +167,7 @@ let context.auto_preview = 0 let context.auto_highlight = 0 let context.unite__is_vimfiler = 0 + let context.default_action = 'default' let context.unite__old_winwidth = 0 let context.unite__old_winheight = 0 let context.unite__is_resize = 0 @@ -205,14 +203,12 @@ endif let unite.winnr = unite_save.winnr let unite.has_preview_window = unite_save.has_preview_window - let unite.prev_winsaveview = unite_save.prev_winsaveview - let unite.win_rest_cmd = unite_save.win_rest_cmd " Restore current directory. execute 'lcd' fnameescape(cwd) endfunction"}}} -function! unite#start#vimfiler_check_filetype(sources, ...) abort "{{{ +function! unite#start#vimfiler_check_filetype(sources, ...) "{{{ let context = get(a:000, 0, {}) let context = unite#init#_context(context, \ unite#helper#get_source_names(a:sources)) @@ -254,7 +250,7 @@ return [] endfunction"}}} -function! unite#start#get_candidates(sources, ...) abort "{{{ +function! unite#start#get_candidates(sources, ...) "{{{ let unite_save = unite#get_current_unite() try @@ -278,7 +274,7 @@ return candidates endfunction"}}} -function! unite#start#get_vimfiler_candidates(sources, ...) abort "{{{ +function! unite#start#get_vimfiler_candidates(sources, ...) "{{{ let unite_save = unite#get_current_unite() try @@ -315,7 +311,7 @@ return candidates endfunction"}}} -function! unite#start#resume(buffer_name, ...) abort "{{{ +function! unite#start#resume(buffer_name, ...) "{{{ " Check command line window. if unite#util#is_cmdwin() call unite#print_error( @@ -333,7 +329,6 @@ let prev_bufnr = bufnr('%') let winnr = winnr() - let prev_winsaveview = winsaveview() let win_rest_cmd = context.unite__direct_switch || \ unite#helper#get_unite_winnr(context.buffer_name) > 0 ? \ '' : winrestcmd() @@ -353,7 +348,6 @@ let unite.winnr = winnr let unite.prev_bufnr = prev_bufnr let unite.prev_winnr = winnr - let unite.prev_winsaveview = prev_winsaveview if !context.unite__direct_switch let unite.win_rest_cmd = win_rest_cmd endif @@ -364,8 +358,6 @@ let unite.preview_candidate = {} let unite.highlight_candidate = {} let unite.context.resume = 1 - let unite.context.buffer_name = - \ (a:buffer_name == '' ? 'default' : a:buffer_name) if context.winwidth != 0 let unite.context.unite__old_winwidth = 0 endif @@ -388,7 +380,7 @@ call unite#view#_init_cursor() endfunction"}}} -function! unite#start#resume_from_temporary(context) abort "{{{ +function! unite#start#resume_from_temporary(context) "{{{ if empty(a:context.unite__old_buffer_info) return endif @@ -401,6 +393,7 @@ let buffer_info = a:context.unite__old_buffer_info[0] call unite#start#resume(buffer_info.buffer_name, \ {'unite__direct_switch' : 1}) + call setpos('.', buffer_info.pos) let a:context.unite__old_buffer_info = a:context.unite__old_buffer_info[1:] " Overwrite unite. @@ -408,16 +401,10 @@ let unite.prev_bufnr = unite_save.prev_bufnr let unite.prev_winnr = unite_save.prev_winnr - " Restore the previous position - call setpos('.', buffer_info.pos) - if line('.') == unite.prompt_linenr && unite.context.start_insert - startinsert! - endif - call unite#redraw() endfunction"}}} -function! unite#start#complete(sources, ...) abort "{{{ +function! unite#start#complete(sources, ...) "{{{ let sources = type(a:sources) == type('') ? \ [a:sources] : a:sources let context = { @@ -433,7 +420,7 @@ \ string(sources), string(context)) endfunction "}}} -function! unite#start#_pos(buffer_name, direction, count) abort "{{{ +function! unite#start#_pos(buffer_name, direction, count) "{{{ let bufnr = s:get_unite_buffer(a:buffer_name) if bufnr < 0 return @@ -481,30 +468,7 @@ endtry endfunction"}}} -function! unite#start#_do_command(cmd) - let bufnr = s:get_unite_buffer('') - if bufnr < 0 - return - endif - - let unite = getbufvar(bufnr, 'unite') - if empty(unite.candidates) - return - endif - - " The step by step is done backwards because, if the command happens to - " include or exclude lines in the file, the remaining candidates don't have - " its position changed when the default action is applied. - - silent! UniteLast - silent! execute a:cmd - while unite.candidate_cursor > 0 - silent! UnitePrevious - silent! execute a:cmd - endwhile -endfunction - -function! s:get_candidates(sources, context) abort "{{{ +function! s:get_candidates(sources, context) "{{{ try let current_unite = unite#init#_current_unite(a:sources, a:context) catch /^unite.vim: Invalid / @@ -532,7 +496,7 @@ return candidates endfunction"}}} -function! s:get_unite_buffer(buffer_name) abort "{{{ +function! s:get_unite_buffer(buffer_name) "{{{ if a:buffer_name == '' " Use last unite buffer. if !exists('t:unite') || @@ -555,7 +519,7 @@ return bufnr endfunction"}}} -function! s:get_resume_buffer(buffer_name) abort "{{{ +function! s:get_resume_buffer(buffer_name) "{{{ let buffer_name = a:buffer_name if buffer_name !~ '@\d\+$' " Add postfix. === modified file 'vim/bundle/unite.vim/autoload/unite/util.vim' --- vim/bundle/unite.vim/autoload/unite/util.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/util.vim 2015-08-25 11:01:00 +0000 @@ -26,50 +26,44 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#util#get_vital() abort "{{{ +function! unite#util#get_vital() "{{{ if !exists('s:V') - let s:V = vital#unite#of() + let s:V = vital#of('unite') endif return s:V endfunction"}}} -function! unite#util#get_vital_cache() abort "{{{ - if !exists('s:Cache') - let s:Cache = unite#util#get_vital().import('System.Cache.Deprecated') - endif - return s:Cache -endfunction"}}} -function! s:get_prelude() abort "{{{ +function! s:get_prelude() "{{{ if !exists('s:Prelude') let s:Prelude = unite#util#get_vital().import('Prelude') endif return s:Prelude endfunction"}}} -function! s:get_list() abort "{{{ +function! s:get_list() "{{{ if !exists('s:List') let s:List = unite#util#get_vital().import('Data.List') endif return s:List endfunction"}}} -function! s:get_string() abort "{{{ +function! s:get_string() "{{{ if !exists('s:String') let s:String = unite#util#get_vital().import('Data.String') endif return s:String endfunction"}}} -function! s:get_message() abort "{{{ +function! s:get_message() "{{{ if !exists('s:Message') let s:Message = unite#util#get_vital().import('Vim.Message') endif return s:Message endfunction"}}} -function! s:get_system() abort "{{{ +function! s:get_system() "{{{ if !exists('s:System') let s:System = unite#util#get_vital().import('System.File') endif return s:System endfunction"}}} -function! s:get_process() abort "{{{ +function! s:get_process() "{{{ if !exists('s:Process') let s:Process = unite#util#get_vital().import('Process') endif @@ -79,60 +73,55 @@ " TODO use vital's let s:is_windows = has('win16') || has('win32') || has('win64') -function! unite#util#truncate_smart(...) abort +function! unite#util#truncate_smart(...) return call(s:get_string().truncate_skipping, a:000) endfunction -function! unite#util#truncate(...) abort +function! unite#util#truncate(...) return call(s:get_string().truncate, a:000) endfunction -function! unite#util#strchars(...) abort +function! unite#util#strchars(...) return call(s:get_string().strchars, a:000) endfunction -function! unite#util#strwidthpart(...) abort +function! unite#util#strwidthpart(...) return call(s:get_string().strwidthpart, a:000) endfunction -function! unite#util#strwidthpart_reverse(...) abort +function! unite#util#strwidthpart_reverse(...) return call(s:get_string().strwidthpart_reverse, a:000) endfunction -function! unite#util#wcswidth(string) abort +function! unite#util#wcswidth(string) return strwidth(a:string) endfunction -function! unite#util#is_win(...) abort +function! unite#util#is_win(...) echoerr 'unite#util#is_win() is deprecated. use unite#util#is_windows() instead.' return call(s:get_prelude().is_windows, a:000) endfunction -function! unite#util#is_windows(...) abort +function! unite#util#is_windows(...) return call(s:get_prelude().is_windows, a:000) endfunction -function! unite#util#is_mac(...) abort +function! unite#util#is_mac(...) return call(s:get_prelude().is_mac, a:000) endfunction -function! unite#util#print_error(msg) abort +function! unite#util#print_error(msg) let msg = '[unite.vim] ' . a:msg - return call(s:get_message().error, [msg]) + return call(s:get_message().error, msg) endfunction -function! unite#util#smart_execute_command(action, word) abort +function! unite#util#smart_execute_command(action, word) execute a:action . ' ' . fnameescape(a:word) endfunction -function! unite#util#smart_open_command(action, word) abort +function! unite#util#smart_open_command(action, word) call unite#util#smart_execute_command(a:action, a:word) call unite#remove_previewed_buffer_list(bufnr(a:word)) endfunction -function! unite#util#escape_file_searching(buffer_name) abort +function! unite#util#escape_file_searching(buffer_name) " You should not escape for buflisted() or bufnr() return a:buffer_name endfunction -function! unite#util#escape_pattern(...) abort - return call(s:get_string().escape_pattern, a:000) +function! unite#util#escape_pattern(...) + return call(s:get_prelude().escape_pattern, a:000) endfunction -function! unite#util#set_default(var, val, ...) abort "{{{ +function! unite#util#set_default(var, val, ...) "{{{ if !exists(a:var) || type({a:var}) != type(a:val) - if exists(a:var) && type({a:var}) != type(a:val) - call unite#print_error(printf( - \ 'Current %s is wrong type. Ignored your config.', a:var)) - endif - let alternate_var = get(a:000, 0, '') unlet! {a:var} @@ -142,25 +131,25 @@ endfunction"}}} if unite#util#is_windows() - function! unite#util#substitute_path_separator(...) abort + function! unite#util#substitute_path_separator(...) return call(s:get_prelude().substitute_path_separator, a:000) endfunction else - function! unite#util#substitute_path_separator(path) abort + function! unite#util#substitute_path_separator(path) return a:path endfunction endif -function! unite#util#path2directory(...) abort +function! unite#util#path2directory(...) return call(s:get_prelude().path2directory, a:000) endfunction -function! unite#util#path2project_directory(...) abort +function! unite#util#path2project_directory(...) return call(s:get_prelude().path2project_directory, a:000) endfunction -function! unite#util#has_vimproc(...) abort +function! unite#util#has_vimproc(...) return call(s:get_process().has_vimproc, a:000) endfunction -function! unite#util#has_lua() abort +function! unite#util#has_lua() " Note: Disabled if_lua feature if less than 7.3.885. " Because if_lua has double free problem. " Note: Cannot use lua interface in Windows environment if encoding is not utf-8. @@ -169,29 +158,29 @@ \ && (!unite#util#is_windows() || \ &encoding ==# 'utf-8' || &encoding ==# 'latin1') endfunction -function! unite#util#system(...) abort +function! unite#util#system(...) return call(s:get_process().system, a:000) endfunction -function! unite#util#system_passwd(...) abort +function! unite#util#system_passwd(...) return call((unite#util#has_vimproc() ? \ 'vimproc#system_passwd' : 'system'), a:000) endfunction -function! unite#util#get_last_status(...) abort +function! unite#util#get_last_status(...) return call(s:get_process().get_last_status, a:000) endfunction -function! unite#util#get_last_errmsg() abort +function! unite#util#get_last_errmsg() return unite#util#has_vimproc() ? vimproc#get_last_errmsg() : '' endfunction -function! unite#util#sort_by(...) abort +function! unite#util#sort_by(...) return call(s:get_list().sort_by, a:000) endfunction -function! unite#util#uniq(...) abort +function! unite#util#uniq(...) return call(s:get_list().uniq, a:000) endfunction -function! unite#util#uniq_by(...) abort +function! unite#util#uniq_by(...) return call(s:get_list().uniq_by, a:000) endfunction -function! unite#util#input(prompt, ...) abort "{{{ +function! unite#util#input(prompt, ...) "{{{ let context = unite#get_context() let prompt = a:prompt let default = get(a:000, 0, '') @@ -208,7 +197,7 @@ return context.unite__is_interactive ? call('input', args) : default endfunction"}}} -function! unite#util#input_yesno(message) abort "{{{ +function! unite#util#input_yesno(message) "{{{ let yesno = input(a:message . ' [yes/no]: ') while yesno !~? '^\%(y\%[es]\|n\%[o]\)$' redraw @@ -226,7 +215,7 @@ return yesno =~? 'y\%[es]' endfunction"}}} -function! unite#util#input_directory(message) abort "{{{ +function! unite#util#input_directory(message) "{{{ echo a:message let dir = unite#util#substitute_path_separator( \ unite#util#expand(input('', '', 'dir'))) @@ -246,16 +235,14 @@ return dir endfunction"}}} -function! unite#util#iconv(...) abort +function! unite#util#iconv(...) return call(s:get_process().iconv, a:000) endfunction -function! unite#util#alternate_buffer() abort "{{{ +function! unite#util#alternate_buffer() "{{{ let unite = unite#get_current_unite() if s:buflisted(unite.prev_bufnr) - \ && getbufvar(unite.prev_bufnr, '&filetype') !=# "unite" execute 'buffer' unite.prev_bufnr - keepjumps call winrestview(unite.prev_winsaveview) return endif @@ -287,17 +274,17 @@ bnext endif endfunction"}}} -function! unite#util#is_cmdwin() abort "{{{ +function! unite#util#is_cmdwin() "{{{ return bufname('%') ==# '[Command Line]' endfunction"}}} -function! s:buflisted(bufnr) abort "{{{ +function! s:buflisted(bufnr) "{{{ return (getbufvar(a:bufnr, '&bufhidden') == '' || buflisted(a:bufnr)) && \ (exists('t:tabpagebuffer') ? \ has_key(t:tabpagebuffer, a:bufnr) && buflisted(a:bufnr) : \ buflisted(a:bufnr)) endfunction"}}} -function! unite#util#glob(pattern, ...) abort "{{{ +function! unite#util#glob(pattern, ...) "{{{ let is_force_glob = get(a:000, 0, 1) if !is_force_glob && (a:pattern =~ '\*$' || a:pattern == '*') @@ -313,7 +300,7 @@ \ + split(unite#util#substitute_path_separator(glob(glob2)), '\n')) endif endfunction"}}} -function! unite#util#command_with_restore_cursor(command) abort "{{{ +function! unite#util#command_with_restore_cursor(command) "{{{ let pos = getpos('.') let current = winnr() @@ -326,31 +313,31 @@ execute next 'wincmd w' endfunction"}}} -function! unite#util#expand(path) abort "{{{ +function! unite#util#expand(path) "{{{ return s:get_prelude().substitute_path_separator( \ (a:path =~ '^\~') ? fnamemodify(a:path, ':p') : \ (a:path =~ '^\$\h\w*') ? substitute(a:path, \ '^\$\h\w*', '\=eval(submatch(0))', '') : \ a:path) endfunction"}}} -function! unite#util#set_default_dictionary_helper(variable, keys, value) abort "{{{ +function! unite#util#set_default_dictionary_helper(variable, keys, value) "{{{ for key in split(a:keys, '\s*,\s*') if !has_key(a:variable, key) let a:variable[key] = a:value endif endfor endfunction"}}} -function! unite#util#set_dictionary_helper(variable, keys, value) abort "{{{ +function! unite#util#set_dictionary_helper(variable, keys, value) "{{{ for key in split(a:keys, '\s*,\s*') let a:variable[key] = a:value endfor endfunction"}}} -function! unite#util#convert2list(expr) abort "{{{ +function! unite#util#convert2list(expr) "{{{ return type(a:expr) ==# type([]) ? a:expr : [a:expr] endfunction"}}} -function! unite#util#truncate_wrap(str, max, footer_width, separator) abort "{{{ +function! unite#util#truncate_wrap(str, max, footer_width, separator) "{{{ let width = strwidth(a:str) if width <= a:max return unite#util#truncate(a:str, a:max) @@ -363,31 +350,31 @@ \ . unite#util#strwidthpart_reverse(a:str, a:footer_width) endfunction"}}} -function! unite#util#index_name(list, name) abort "{{{ +function! unite#util#index_name(list, name) "{{{ return index(map(copy(a:list), 'v:val.name'), a:name) endfunction"}}} -function! unite#util#get_name(list, name, default) abort "{{{ +function! unite#util#get_name(list, name, default) "{{{ return get(a:list, unite#util#index_name(a:list, a:name), a:default) endfunction"}}} -function! unite#util#escape_match(str) abort "{{{ +function! unite#util#escape_match(str) "{{{ return substitute(substitute(escape(a:str, '~\.^$[]'), \ '\*\@ res - silent! execute a:cmd - redir END - let [&verbose, &verbosefile] = [save_verbose, save_verbosefile] - return res + execute 'lcd' fnameescape(a:dir) endif endfunction"}}} === modified file 'vim/bundle/unite.vim/autoload/unite/variables.vim' --- vim/bundle/unite.vim/autoload/unite/variables.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/variables.vim 2015-08-25 11:01:00 +0000 @@ -30,7 +30,7 @@ let s:use_current_unite = 1 endif -function! unite#variables#current_unite() abort "{{{ +function! unite#variables#current_unite() "{{{ if !exists('s:current_unite') let s:current_unite = {} endif @@ -38,23 +38,23 @@ return s:current_unite endfunction"}}} -function! unite#variables#set_current_unite(unite) abort "{{{ +function! unite#variables#set_current_unite(unite) "{{{ let s:current_unite = a:unite endfunction"}}} -function! unite#variables#use_current_unite() abort "{{{ +function! unite#variables#use_current_unite() "{{{ return s:use_current_unite endfunction"}}} -function! unite#variables#enable_current_unite() abort "{{{ +function! unite#variables#enable_current_unite() "{{{ let s:use_current_unite = 1 endfunction"}}} -function! unite#variables#disable_current_unite() abort "{{{ +function! unite#variables#disable_current_unite() "{{{ let s:use_current_unite = 0 endfunction"}}} -function! unite#variables#static() abort "{{{ +function! unite#variables#static() "{{{ if !exists('s:static') let s:static = {} let s:static.sources = {} @@ -65,7 +65,7 @@ return s:static endfunction"}}} -function! unite#variables#dynamic() abort "{{{ +function! unite#variables#dynamic() "{{{ if !exists('s:dynamic') let s:dynamic = {} let s:dynamic.sources = {} @@ -76,7 +76,7 @@ return s:dynamic endfunction"}}} -function! unite#variables#loaded_defaults() abort "{{{ +function! unite#variables#loaded_defaults() "{{{ if !exists('s:loaded_defaults') let s:loaded_defaults = {} endif @@ -84,7 +84,7 @@ return s:loaded_defaults endfunction"}}} -function! unite#variables#options() abort "{{{ +function! unite#variables#options() "{{{ if !exists('s:options') let s:options = map(filter(items(unite#variables#default_context()), \ "v:val[0] !~ '^unite__'"), @@ -100,7 +100,7 @@ return s:options endfunction"}}} -function! unite#variables#kinds(...) abort "{{{ +function! unite#variables#kinds(...) "{{{ if a:0 == 0 call unite#init#_default_scripts('kinds', []) else @@ -111,7 +111,7 @@ return (a:0 == 0) ? kinds : get(kinds, a:1, {}) endfunction"}}} -function! unite#variables#sources(...) abort "{{{ +function! unite#variables#sources(...) "{{{ let unite = unite#get_current_unite() if !has_key(unite, 'sources') return {} @@ -124,7 +124,7 @@ return unite#util#get_name(unite.sources, a:1, {}) endfunction"}}} -function! unite#variables#all_sources(...) abort "{{{ +function! unite#variables#all_sources(...) "{{{ if a:0 == 0 return unite#init#_sources() endif @@ -139,7 +139,7 @@ \ 'v:val.name ==# a:1'), 0, {}) : source endfunction"}}} -function! unite#variables#filters(...) abort "{{{ +function! unite#variables#filters(...) "{{{ if a:0 == 0 call unite#init#_default_scripts('filters', []) else @@ -155,14 +155,14 @@ return get(filters, a:1, {}) endfunction"}}} -function! unite#variables#loaded_sources(...) abort "{{{ +function! unite#variables#loaded_sources(...) "{{{ " Initialize load. let unite = unite#get_current_unite() return a:0 == 0 ? unite.sources : \ get(filter(copy(unite.sources), 'v:val.name ==# a:1'), 0, {}) endfunction"}}} -function! unite#variables#default_context() abort "{{{ +function! unite#variables#default_context() "{{{ if !exists('s:default_context') call s:initialize_default() endif @@ -170,7 +170,7 @@ return s:default_context endfunction"}}} -function! s:initialize_default() abort "{{{ +function! s:initialize_default() "{{{ let s:default_context = { \ 'input' : '', \ 'path' : '', @@ -180,7 +180,6 @@ \ 'script' : 0, \ 'col' : -1, \ 'quit' : 1, - \ 'file_quit' : 0, \ 'buffer_name' : 'default', \ 'profile_name' : '', \ 'default_action' : 'default', @@ -226,7 +225,6 @@ \ 'execute_command' : '', \ 'prompt_direction' : '', \ 'prompt_visible' : 0, - \ 'prompt_focus' : 0, \ 'short_source_names' : 0, \ 'candidate_icon' : ' ', \ 'marked_icon' : '*', === modified file 'vim/bundle/unite.vim/autoload/unite/view.vim' --- vim/bundle/unite.vim/autoload/unite/view.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/unite/view.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#view#_redraw_prompt() abort "{{{ +function! unite#view#_redraw_prompt() "{{{ let unite = unite#get_current_unite() if unite.prompt_linenr < 0 return @@ -35,7 +35,7 @@ let modifiable_save = &l:modifiable try setlocal modifiable - silent! call setline(unite.prompt_linenr, + call setline(unite.prompt_linenr, \ unite.context.prompt . unite.context.input) silent! syntax clear uniteInputLine @@ -49,7 +49,7 @@ let &l:modifiable = modifiable_save endtry endfunction"}}} -function! unite#view#_redraw_candidates(...) abort "{{{ +function! unite#view#_redraw_candidates(...) "{{{ let is_gather_all = get(a:000, 0, 0) call unite#view#_resize_window() @@ -105,7 +105,7 @@ " Set syntax. call s:set_syntax() endfunction"}}} -function! unite#view#_redraw_line(...) abort "{{{ +function! unite#view#_redraw_line(...) "{{{ let prompt_linenr = unite#get_current_unite().prompt_linenr let linenr = a:0 > 0 ? a:1 : line('.') if linenr ==# prompt_linenr @@ -125,7 +125,7 @@ let &l:modifiable = modifiable_save endfunction"}}} -function! unite#view#_quick_match_redraw(quick_match_table, is_define) abort "{{{ +function! unite#view#_quick_match_redraw(quick_match_table, is_define) "{{{ for [key, number] in items(a:quick_match_table) if a:is_define execute printf( @@ -141,7 +141,7 @@ endif endfor endfunction"}}} -function! unite#view#_set_candidates_lines(lines) abort "{{{ +function! unite#view#_set_candidates_lines(lines) "{{{ let unite = unite#get_current_unite() let modifiable_save = &l:modifiable try @@ -165,7 +165,7 @@ endtry endfunction"}}} -function! unite#view#_redraw(is_force, winnr, is_gather_all) abort "{{{ +function! unite#view#_redraw(is_force, winnr, is_gather_all) "{{{ if unite#util#is_cmdwin() return endif @@ -234,7 +234,7 @@ call cursor(line('$'), 0) call unite#view#_bottom_cursor() endif - elseif !context.log + else call unite#view#_search_cursor(current_candidate) endif @@ -245,14 +245,6 @@ endif endtry - if context.immediately && len(unite.current_candidates) == 1 - " Immediately action. - call unite#action#do( - \ context.default_action, [unite.current_candidates[0]]) - - " Note: It is workaround - stopinsert - endif if context.auto_preview call unite#view#_do_auto_preview() endif @@ -260,14 +252,14 @@ call unite#view#_do_auto_highlight() endif endfunction"}}} -function! unite#view#_redraw_all_candidates() abort "{{{ +function! unite#view#_redraw_all_candidates() "{{{ let unite = unite#get_current_unite() if len(unite.candidates) != len(unite.current_candidates) call unite#redraw(0, 1) endif endfunction"}}} -function! unite#view#_set_syntax() abort "{{{ +function! unite#view#_set_syntax() "{{{ syntax clear syntax match uniteInputCommand /\\\@= &lines \ && !context.vertical) \ || !context.resize - \ || !context.split " Cannot resize. let context.unite__is_resize = 0 return @@ -444,7 +437,7 @@ let context.unite__old_winwidth = winwidth(winnr()) endfunction"}}} -function! unite#view#_do_auto_preview() abort "{{{ +function! unite#view#_do_auto_preview() "{{{ let unite = unite#get_current_unite() if unite.preview_candidate == unite#helper#get_current_candidate() @@ -460,7 +453,7 @@ call unite#view#_resize_window() endif endfunction"}}} -function! unite#view#_do_auto_highlight() abort "{{{ +function! unite#view#_do_auto_highlight() "{{{ let unite = unite#get_current_unite() if unite.highlight_candidate == unite#helper#get_current_candidate() @@ -471,7 +464,7 @@ call unite#action#do('highlight', [], {}) endfunction"}}} -function! unite#view#_switch_unite_buffer(buffer_name, context) abort "{{{ +function! unite#view#_switch_unite_buffer(buffer_name, context) "{{{ " Search unite window. let winnr = unite#helper#get_unite_winnr(a:buffer_name) if a:context.split && winnr > 0 @@ -504,7 +497,7 @@ doautocmd BufWinEnter endfunction"}}} -function! unite#view#_close(buffer_name) abort "{{{ +function! unite#view#_close(buffer_name) "{{{ let buffer_name = a:buffer_name if buffer_name == '' @@ -539,7 +532,7 @@ return quit_winnr > 0 endfunction"}}} -function! unite#view#_init_cursor() abort "{{{ +function! unite#view#_init_cursor() "{{{ let unite = unite#get_current_unite() let context = unite.context @@ -582,6 +575,12 @@ call unite#view#_redraw_candidates(1) endif + if context.quick_match + call unite#helper#cursor_prompt() + + call unite#mappings#_quick_match(0) + endif + if !is_restore && \ (line('.') <= winheight(0) \ || (context.prompt_direction ==# 'below' @@ -600,16 +599,9 @@ let unite.prev_line = line('.') call unite#view#_set_cursor_line() call unite#handlers#_on_cursor_moved() - - if context.quick_match - call unite#helper#cursor_prompt() - call unite#view#_bottom_cursor() - - call unite#mappings#_quick_match(0) - endif endfunction"}}} -function! unite#view#_quit(is_force, ...) abort "{{{ +function! unite#view#_quit(is_force, ...) "{{{ if &filetype !=# 'unite' return endif @@ -652,13 +644,10 @@ call unite#view#_close_preview_window() - if winnr('$') != 1 && winnr('$') == unite.winmax - \ && !context.temporary + if winnr('$') != 1 && !unite.context.temporary + \ && winnr('$') == unite.winmax execute unite.win_rest_cmd - noautocmd execute unite.prev_winnr 'wincmd w' - endif - if context.quit - call setpos('.', unite.prev_pos) + execute unite.prev_winnr 'wincmd w' endif else call unite#view#_close_preview_window() @@ -684,30 +673,26 @@ endtry endif - if g:unite_restore_alternate_file - \ && bufexists(unite.alternate_bufnr) - \ && bufnr('%') != unite.alternate_bufnr - \ && unite.alternate_bufnr > 0 - silent! execute 'buffer!' unite.alternate_bufnr - silent! buffer! # - endif - if context.complete if context.col < col('$') startinsert else startinsert! endif + + " Skip next auto completion. + if exists('*neocomplcache#skip_next_complete') + call neocomplcache#skip_next_complete() + endif else redraw - stopinsert endif " Restore unite. call unite#set_current_unite(unite_save) endfunction"}}} -function! unite#view#_set_cursor_line() abort "{{{ +function! unite#view#_set_cursor_line() "{{{ if !exists('b:current_syntax') || &filetype !=# 'unite' return endif @@ -729,7 +714,7 @@ let unite.cursor_line_time = reltime() endfunction"}}} -function! unite#view#_bottom_cursor() abort "{{{ +function! unite#view#_bottom_cursor() "{{{ let pos = getpos('.') try normal! zb @@ -737,13 +722,13 @@ call setpos('.', pos) endtry endfunction"}}} -function! unite#view#_clear_match() abort "{{{ +function! unite#view#_clear_match() "{{{ if &filetype ==# 'unite' setlocal nocursorline endif endfunction"}}} -function! unite#view#_save_position() abort "{{{ +function! unite#view#_save_position() "{{{ let unite = b:unite let context = unite.context @@ -777,7 +762,7 @@ endfunction"}}} " Message output. -function! unite#view#_print_error(message) abort "{{{ +function! unite#view#_print_error(message) "{{{ let message = map(s:msg2list(a:message), '"[unite.vim] " . v:val') let unite = unite#get_current_unite() if !empty(unite) @@ -787,18 +772,12 @@ echohl WarningMsg | echomsg mes | echohl None endfor endfunction"}}} -function! unite#view#_print_warning(message) abort "{{{ - let message = map(s:msg2list(a:message), '"[unite.vim] " . v:val') - for mes in message - echohl WarningMsg | echon mes | echohl None - endfor -endfunction"}}} -function! unite#view#_print_source_error(message, source_name) abort "{{{ +function! unite#view#_print_source_error(message, source_name) "{{{ call unite#view#_print_error( \ map(copy(s:msg2list(a:message)), \ "printf('[%s] %s', a:source_name, v:val)")) endfunction"}}} -function! unite#view#_print_message(message, ...) abort "{{{ +function! unite#view#_print_message(message, ...) "{{{ let context = unite#get_context() let unite = unite#get_current_unite() let message = s:msg2list(a:message) @@ -811,22 +790,22 @@ echohl Comment | call unite#view#_redraw_echo(message[: &cmdheight-1]) | echohl None endif endfunction"}}} -function! unite#view#_print_source_message(message, source_name) abort "{{{ +function! unite#view#_print_source_message(message, source_name) "{{{ call unite#view#_print_message( \ map(copy(s:msg2list(a:message)), \ "printf('[%s] %s', a:source_name, v:val)")) endfunction"}}} -function! unite#view#_add_source_message(message, source_name) abort "{{{ +function! unite#view#_add_source_message(message, source_name) "{{{ call unite#view#_print_message( \ map(copy(s:msg2list(a:message)), \ "printf('[%s] %s', a:source_name, v:val)"), 1) endfunction"}}} -function! unite#view#_clear_message() abort "{{{ +function! unite#view#_clear_message() "{{{ let unite = unite#get_current_unite() let unite.msgs = [] redraw endfunction"}}} -function! unite#view#_redraw_echo(expr) abort "{{{ +function! unite#view#_redraw_echo(expr) "{{{ if has('vim_starting') echo join(s:msg2list(a:expr), "\n") return @@ -841,8 +820,7 @@ set noruler let msg = map(s:msg2list(a:expr), "unite#util#truncate_smart( - \ v:val, &columns - 1 + len(v:val) - strdisplaywidth(v:val), - \ &columns/2, '...')") + \ v:val, &columns-1, &columns/2, '...')") let height = max([1, &cmdheight]) for i in range(0, len(msg)-1, height) redraw @@ -855,7 +833,7 @@ endtry endfunction"}}} -function! unite#view#_match_line(highlight, line, id) abort "{{{ +function! unite#view#_match_line(highlight, line, id) "{{{ if &filetype ==# 'unite' setlocal cursorline return @@ -866,11 +844,8 @@ \ matchaddpos(a:highlight, [a:line], 10, a:id) : \ matchadd(a:highlight, '^\%'.a:line.'l.*', 10, a:id) endfunction"}}} -function! unite#view#_clear_match_highlight() abort "{{{ - silent! call matchdelete(10) -endfunction"}}} -function! unite#view#_get_status_plane_string() abort "{{{ +function! unite#view#_get_status_plane_string() "{{{ return (b:unite.is_async ? '[async] ' : '') . \ join(map(copy(unite#loaded_sources_list()), " \ (v:val.unite__len_candidates == 0) ? '_' : @@ -886,31 +861,31 @@ \ ")) endfunction"}}} -function! unite#view#_get_status_head_string() abort "{{{ +function! unite#view#_get_status_head_string() "{{{ if !exists('b:unite') return '' endif return b:unite.is_async ? '[async] ' : '' endfunction"}}} -function! unite#view#_get_status_tail_string() abort "{{{ +function! unite#view#_get_status_tail_string() "{{{ if !exists('b:unite') return '' endif return b:unite.context.path != '' ? '['. b:unite.context.path.']' : - \ (get(b:unite.msgs, 0, '') == '') ? '' : + \ (b:unite.is_async || get(b:unite.msgs, 0, '') == '') ? '' : \ substitute(get(b:unite.msgs, 0, ''), '^\[.\{-}\]\s*', '', '') endfunction"}}} -function! unite#view#_get_source_name_string(source) abort "{{{ - return (a:source.unite__orig_len_candidates == 0) ? '_' : +function! unite#view#_get_source_name_string(source) "{{{ + return (a:source.unite__len_candidates == 0) ? '_' : \ join(insert(filter(copy(a:source.args), \ 'type(v:val) <= 1'), \ unite#helper#convert_source_name(a:source.name)), ':') endfunction"}}} -function! unite#view#_get_source_candidates_string(source) abort "{{{ - return a:source.unite__orig_len_candidates == 0 ? '' : +function! unite#view#_get_source_candidates_string(source) "{{{ + return a:source.unite__len_candidates == 0 ? '' : \ a:source.unite__orig_len_candidates == \ a:source.unite__len_candidates ? \ '(' . a:source.unite__len_candidates . ')' : @@ -918,7 +893,7 @@ \ a:source.unite__orig_len_candidates) endfunction"}}} -function! unite#view#_get_status_string(unite) abort "{{{ +function! unite#view#_get_status_string(unite) "{{{ let statusline = "%#uniteStatusHead# %{unite#view#_get_status_head_string()}%*" let cnt = 0 if empty(a:unite.sources) @@ -944,22 +919,23 @@ return statusline endfunction"}}} -function! unite#view#_add_previewed_buffer_list(bufnr) abort "{{{ +function! unite#view#_add_previewed_buffer_list(bufnr) "{{{ call s:clear_previewed_buffer_list() let unite = unite#get_current_unite() call add(unite.previewed_buffer_list, a:bufnr) endfunction"}}} -function! unite#view#_remove_previewed_buffer_list(bufnr) abort "{{{ +function! unite#view#_remove_previewed_buffer_list(bufnr) "{{{ let unite = unite#get_current_unite() call filter(unite.previewed_buffer_list, 'v:val != a:bufnr') endfunction"}}} -function! unite#view#_preview_file(filename) abort "{{{ +function! unite#view#_preview_file(filename) "{{{ let context = unite#get_context() if context.vertical_preview let unite_winwidth = winwidth(0) - silent execute 'vertical pedit!' fnameescape(a:filename) + noautocmd silent execute 'vertical pedit!' + \ fnameescape(a:filename) wincmd P let target_winwidth = (unite_winwidth + winwidth(0)) / 2 execute 'wincmd p | vert resize ' . target_winwidth @@ -967,14 +943,15 @@ let previewheight_save = &previewheight try let &previewheight = context.previewheight - silent execute 'pedit!' fnameescape(a:filename) + noautocmd silent execute 'pedit!' + \ fnameescape(a:filename) finally let &previewheight = previewheight_save endtry endif endfunction"}}} -function! unite#view#_close_preview_window() abort "{{{ +function! unite#view#_close_preview_window() "{{{ let unite = unite#get_current_unite() if !unite.has_preview_window @@ -983,6 +960,7 @@ if !empty(preview_windows) " Close preview window. noautocmd pclose! + endif endif @@ -990,7 +968,7 @@ let unite.preview_candidate = {} endfunction"}}} -function! s:clear_previewed_buffer_list() abort "{{{ +function! s:clear_previewed_buffer_list() "{{{ let unite = unite#get_current_unite() " Clear previewed buffer list @@ -999,7 +977,7 @@ if bufnr == bufnr('%') call unite#util#alternate_buffer() endif - silent! execute 'bdelete!' bufnr + silent execute 'bdelete!' bufnr endif endfor @@ -1009,7 +987,7 @@ " @vimlint(EVL102, 1, l:max_source_name) " @vimlint(EVL102, 1, l:context) " @vimlint(EVL102, 1, l:padding) -function! unite#view#_convert_lines(candidates) abort "{{{ +function! unite#view#_convert_lines(candidates) "{{{ let unite = unite#get_current_unite() let context = unite#get_context() let [max_width, max_source_name] = unite#helper#adjustments( @@ -1039,7 +1017,7 @@ " @vimlint(EVL102, 0, l:context) " @vimlint(EVL102, 0, l:padding) -function! unite#view#_search_cursor(candidate) abort "{{{ +function! unite#view#_search_cursor(candidate) "{{{ " Optimized if empty(a:candidate) || \ unite#helper#get_current_candidate() ==# a:candidate @@ -1063,7 +1041,7 @@ endwhile endfunction"}}} -function! s:set_syntax() abort "{{{ +function! s:set_syntax() "{{{ let unite = unite#get_current_unite() " Set syntax. @@ -1076,16 +1054,16 @@ call unite#view#_change_highlight() endfunction"}}} -function! s:has_preview_window() abort "{{{ +function! s:has_preview_window() "{{{ return len(filter(range(1, winnr('$')), \ 'getwinvar(v:val, "&previewwindow")')) > 0 endfunction"}}} -function! s:msg2list(expr) abort "{{{ +function! s:msg2list(expr) "{{{ return type(a:expr) ==# type([]) ? a:expr : split(a:expr, '\n') endfunction"}}} -function! s:get_buffer_direction(context) abort "{{{ +function! s:get_buffer_direction(context) "{{{ let direction = a:context.direction if direction ==# 'dynamictop' || direction ==# 'dynamicbottom' " Use dynamic direction calculation @@ -1104,7 +1082,7 @@ return direction endfunction"}}} -function! s:restore_position(position) abort "{{{ +function! s:restore_position(position) "{{{ call setpos('.', a:position.pos) if winline() < a:position.winline execute 'normal!' (a:position.winline - winline())."\" === modified file 'vim/bundle/unite.vim/autoload/vital/_unite.vim' --- vim/bundle/unite.vim/autoload/vital/_unite.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/vital/_unite.vim 2015-08-25 11:01:00 +0000 @@ -1,5 +1,321 @@ -let s:_plugin_name = expand(':t:r') - -function! vital#{s:_plugin_name}#new() abort - return vital#{s:_plugin_name[1:]}#of() +let s:self_version = expand(':t:r') +let s:self_file = expand('') + +" Note: The extra argument to globpath() was added in Patch 7.2.051. +let s:globpath_third_arg = v:version > 702 || v:version == 702 && has('patch51') + +let s:loaded = {} +let s:cache_module_path = {} +let s:cache_sid = {} + +let s:_vital_files_cache_runtimepath = '' +let s:_vital_files_cache = [] +let s:_unify_path_cache = {} + +function! s:import(name, ...) abort + let target = {} + let functions = [] + for a in a:000 + if type(a) == type({}) + let target = a + elseif type(a) == type([]) + let functions = a + endif + unlet a + endfor + let module = s:_import(a:name) + if empty(functions) + call extend(target, module, 'keep') + else + for f in functions + if has_key(module, f) && !has_key(target, f) + let target[f] = module[f] + endif + endfor + endif + return target +endfunction + +function! s:load(...) dict abort + for arg in a:000 + let [name; as] = type(arg) == type([]) ? arg[: 1] : [arg, arg] + let target = split(join(as, ''), '\W\+') + let dict = self + let len_target = len(target) + let dict_type = type({}) + while 1 <= len_target + let ns = remove(target, 0) + let len_target -= 1 + if !has_key(dict, ns) + let dict[ns] = {} + endif + if type(dict[ns]) == dict_type + let dict = dict[ns] + else + unlet dict + break + endif + endwhile + + if exists('dict') + call extend(dict, s:_import(name)) + endif + unlet arg + endfor + return self +endfunction + +function! s:unload() abort + let s:loaded = {} + let s:cache_sid = {} + let s:cache_module_path = {} +endfunction + +function! s:exists(name) abort + return s:_get_module_path(a:name) !=# '' +endfunction + +function! s:search(pattern) abort + let paths = s:_vital_files(a:pattern) + let modules = sort(map(paths, 's:_file2module(v:val)')) + return s:_uniq(modules) +endfunction + +function! s:expand_modules(entry, all) abort + if type(a:entry) == type([]) + let candidates = s:_concat(map(copy(a:entry), 's:search(v:val)')) + if empty(candidates) + throw printf('vital: Any of module %s is not found', string(a:entry)) + endif + if eval(join(map(copy(candidates), 'has_key(a:all, v:val)'), '+')) + let modules = [] + else + let modules = [candidates[0]] + endif + else + let modules = s:search(a:entry) + if empty(modules) + throw printf('vital: Module %s is not found', a:entry) + endif + endif + call filter(modules, '!has_key(a:all, v:val)') + for module in modules + let a:all[module] = 1 + endfor + return modules +endfunction + +function! s:_import(name) abort + if type(a:name) == type(0) + return s:_build_module(a:name) + endif + let path = s:_get_module_path(a:name) + if path ==# '' + throw 'vital: module not found: ' . a:name + endif + let sid = s:_get_sid_by_script(path) + if !sid + try + execute 'source' fnameescape(path) + catch /^Vim\%((\a\+)\)\?:E484/ + throw 'vital: module not found: ' . a:name + catch /^Vim\%((\a\+)\)\?:E127/ + " Ignore. + endtry + + let sid = s:_get_sid_by_script(path) + endif + return s:_build_module(sid) +endfunction + +function! s:_get_module_path(name) abort + let key = a:name . '_' + if has_key(s:cache_module_path, key) + return s:cache_module_path[key] + endif + if s:_is_absolute_path(a:name) && filereadable(a:name) + return a:name + endif + if a:name ==# '' + let paths = [s:self_file] + elseif a:name =~# '\v^\u\w*%(\.\u\w*)*$' + let paths = s:_vital_files(a:name) + else + throw 'vital: Invalid module name: ' . a:name + endif + + call filter(paths, 'filereadable(expand(v:val, 1))') + let path = get(paths, 0, '') + let s:cache_module_path[key] = path + return path +endfunction + +function! s:_get_sid_by_script(path) abort + if has_key(s:cache_sid, a:path) + return s:cache_sid[a:path] + endif + + let path = s:_unify_path(a:path) + for line in filter(split(s:_redir('scriptnames'), "\n"), + \ 'stridx(v:val, s:self_version) > 0') + let list = matchlist(line, '^\s*\(\d\+\):\s\+\(.\+\)\s*$') + if !empty(list) && s:_unify_path(list[2]) ==# path + let s:cache_sid[a:path] = list[1] - 0 + return s:cache_sid[a:path] + endif + endfor + return 0 +endfunction + +function! s:_file2module(file) abort + let filename = fnamemodify(a:file, ':p:gs?[\\/]?/?') + let tail = matchstr(filename, 'autoload/vital/_\w\+/\zs.*\ze\.vim$') + return join(split(tail, '[\\/]\+'), '.') +endfunction + +if filereadable(expand(':r') . '.VIM') + " resolve() is slow, so we cache results. + " Note: On windows, vim can't expand path names from 8.3 formats. + " So if getting full path via and $HOME was set as 8.3 format, + " vital load duplicated scripts. Below's :~ avoid this issue. + function! s:_unify_path(path) abort + if has_key(s:_unify_path_cache, a:path) + return s:_unify_path_cache[a:path] + endif + let value = tolower(fnamemodify(resolve(fnamemodify( + \ a:path, ':p')), ':~:gs?[\\/]?/?')) + let s:_unify_path_cache[a:path] = value + return value + endfunction +else + function! s:_unify_path(path) abort + return resolve(fnamemodify(a:path, ':p:gs?[\\/]?/?')) + endfunction +endif + +if s:globpath_third_arg + function! s:_runtime_files(path) abort + return split(globpath(&runtimepath, a:path, 1), "\n") + endfunction +else + function! s:_runtime_files(path) abort + return split(globpath(&runtimepath, a:path), "\n") + endfunction +endif + +function! s:_vital_files(pattern) abort + if s:_vital_files_cache_runtimepath !=# &runtimepath + let path = printf('autoload/vital/%s/**/*.vim', s:self_version) + let s:_vital_files_cache = s:_runtime_files(path) + let mod = ':p:gs?[\\/]\+?/?' + call map(s:_vital_files_cache, 'fnamemodify(v:val, mod)') + let s:_vital_files_cache_runtimepath = &runtimepath + endif + let target = substitute(a:pattern, '\.', '/', 'g') + let target = substitute(target, '\*', '[^/]*', 'g') + let regexp = printf('autoload/vital/%s/%s.vim', s:self_version, target) + return filter(copy(s:_vital_files_cache), 'v:val =~# regexp') +endfunction + +" Copy from System.Filepath +if has('win16') || has('win32') || has('win64') + function! s:_is_absolute_path(path) abort + return a:path =~? '^[a-z]:[/\\]' + endfunction +else + function! s:_is_absolute_path(path) abort + return a:path[0] ==# '/' + endfunction +endif + +function! s:_build_module(sid) abort + if has_key(s:loaded, a:sid) + return copy(s:loaded[a:sid]) + endif + let functions = s:_get_functions(a:sid) + + let prefix = '' . a:sid . '_' + let module = {} + for func in functions + let module[func] = function(prefix . func) + endfor + if has_key(module, '_vital_loaded') + let V = vital#{s:self_version}#new() + if has_key(module, '_vital_depends') + let all = {} + let modules = + \ s:_concat(map(module._vital_depends(), + \ 's:expand_modules(v:val, all)')) + call call(V.load, modules, V) + endif + try + call module._vital_loaded(V) + catch + " FIXME: Show an error message for debug. + endtry + endif + if !get(g:, 'vital_debug', 0) + call filter(module, 'v:key =~# "^\\a"') + endif + let s:loaded[a:sid] = module + return copy(module) +endfunction + +if exists('+regexpengine') + function! s:_get_functions(sid) abort + let funcs = s:_redir(printf("function /\\%%#=2^\%d_", a:sid)) + let map_pat = '' . a:sid . '_\zs\w\+' + return map(split(funcs, "\n"), 'matchstr(v:val, map_pat)') + endfunction +else + function! s:_get_functions(sid) abort + let prefix = '' . a:sid . '_' + let funcs = s:_redir('function') + let filter_pat = '^\s*function ' . prefix + let map_pat = prefix . '\zs\w\+' + return map(filter(split(funcs, "\n"), + \ 'stridx(v:val, prefix) > 0 && v:val =~# filter_pat'), + \ 'matchstr(v:val, map_pat)') + endfunction +endif + +if exists('*uniq') + function! s:_uniq(list) abort + return uniq(a:list) + endfunction +else + function! s:_uniq(list) abort + let i = len(a:list) - 1 + while 0 < i + if a:list[i] ==# a:list[i - 1] + call remove(a:list, i) + let i -= 2 + else + let i -= 1 + endif + endwhile + return a:list + endfunction +endif + +function! s:_concat(lists) abort + let result_list = [] + for list in a:lists + let result_list += list + endfor + return result_list +endfunction + +function! s:_redir(cmd) abort + let [save_verbose, save_verbosefile] = [&verbose, &verbosefile] + set verbose=0 verbosefile= + redir => res + silent! execute a:cmd + redir END + let [&verbose, &verbosefile] = [save_verbose, save_verbosefile] + return res +endfunction + +function! vital#{s:self_version}#new() abort + return s:_import('') endfunction === modified file 'vim/bundle/unite.vim/autoload/vital/_unite/Data/List.vim' --- vim/bundle/unite.vim/autoload/vital/_unite/Data/List.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/vital/_unite/Data/List.vim 2015-08-25 11:01:00 +0000 @@ -1,18 +1,3 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_unite#Data#List#import() abort - return map({'combinations': '', 'and': '', 'sort_by': '', 'foldr1': '', 'sort': '', 'flatten': '', 'has_index': '', 'find_indices': '', 'any': '', 'unshift': '', 'span': '', 'pop': '', 'binary_search': '', 'uniq_by': '', 'or': '', 'all': '', 'zip': '', 'find_last_index': '', 'find': '', 'partition': '', 'map_accum': '', 'permutations': '', 'break': '', 'max_by': '', 'foldl': '', 'foldr': '', 'find_index': '', 'group_by': '', 'take_while': '', 'conj': '', 'push': '', 'char_range': '', 'cons': '', 'foldl1': '', 'intersect': '', 'concat': '', 'shift': '', 'clear': '', 'has_common_items': '', 'product': '', 'zip_fill': '', 'uniq': '', 'has': '', 'min_by': '', 'with_index': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_unite#Data#List#import() abort', printf("return map({'combinations': '', 'and': '', 'sort_by': '', 'foldr1': '', 'sort': '', 'flatten': '', 'has_index': '', 'find_indices': '', 'any': '', 'unshift': '', 'span': '', 'pop': '', 'binary_search': '', 'uniq_by': '', 'or': '', 'all': '', 'zip': '', 'find_last_index': '', 'find': '', 'partition': '', 'map_accum': '', 'permutations': '', 'break': '', 'max_by': '', 'foldl': '', 'foldr': '', 'find_index': '', 'group_by': '', 'take_while': '', 'conj': '', 'push': '', 'char_range': '', 'cons': '', 'foldl1': '', 'intersect': '', 'concat': '', 'shift': '', 'clear': '', 'has_common_items': '', 'product': '', 'zip_fill': '', 'uniq': '', 'has': '', 'min_by': '', 'with_index': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ " Utilities for list. let s:save_cpo = &cpo @@ -240,7 +225,7 @@ " similar to Haskell's Prelude.foldl1 function! s:foldl1(f, xs) abort if len(a:xs) == 0 - throw 'vital: Data.List: foldl1' + throw 'foldl1' endif return s:foldl(a:f, a:xs[0], a:xs[1:]) endfunction @@ -253,7 +238,7 @@ " similar to Haskell's Prelude.fold11 function! s:foldr1(f, xs) abort if len(a:xs) == 0 - throw 'vital: Data.List: foldr1' + throw 'foldr1' endif return s:foldr(a:f, a:xs[-1], a:xs[0:-2]) endfunction @@ -279,10 +264,11 @@ " Inspired by Ruby's with_index method. function! s:with_index(list, ...) abort let base = a:0 > 0 ? a:1 : 0 - return map(copy(a:list), '[v:val, v:key + base]') + return s:zip(a:list, range(base, len(a:list)+base-1)) endfunction " similar to Ruby's detect or Haskell's find. +" TODO spec and doc function! s:find(list, default, f) abort for x in a:list if eval(substitute(a:f, 'v:val', string(x), 'g')) === modified file 'vim/bundle/unite.vim/autoload/vital/_unite/Data/String.vim' --- vim/bundle/unite.vim/autoload/vital/_unite/Data/String.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/vital/_unite/Data/String.vim 2015-08-25 11:01:00 +0000 @@ -1,18 +1,3 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_unite#Data#String#import() abort - return map({'starts_with': '', 'split3': '', 'chop': '', 'unescape': '', 'split_posix_text': '', 'replace': '', 'scan': '', 'strchars': '', 'strwidthpart': '', 'common_head': '', 'reverse': '', 'escape_pattern': '', 'trim_end': '', '_vital_depends': '', 'wrap': '', 'join_posix_lines': '', 'contains_multibyte': '', 'truncate_skipping': '', 'split_leftright': '', 'ends_with': '', 'nsplit': '', 'substitute_last': '', 'strwidthpart_reverse': '', 'unescape_pattern': '', 'levenshtein_distance': '', 'trim_start': '', 'nr2hex': '', 'remove_ansi_sequences': '', 'iconv': '', 'pad_left': '', 'nr2enc_char': '', 'lines': '', 'repair_posix_text': '', 'nr2byte': '', 'trim': '', 'diffidx': '', 'truncate': '', 'split_by_displaywidth': '', 'padding_by_displaywidth': '', 'hash': '', 'chomp': '', 'pad_between_letters': '', 'wcswidth': '', 'dstring': '', 'pad_both_sides': '', 'justify_equal_spacing': '', 'pad_right': '', 'replace_first': '', '_vital_loaded': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_unite#Data#String#import() abort', printf("return map({'starts_with': '', 'split3': '', 'chop': '', 'unescape': '', 'split_posix_text': '', 'replace': '', 'scan': '', 'strchars': '', 'strwidthpart': '', 'common_head': '', 'reverse': '', 'escape_pattern': '', 'trim_end': '', '_vital_depends': '', 'wrap': '', 'join_posix_lines': '', 'contains_multibyte': '', 'truncate_skipping': '', 'split_leftright': '', 'ends_with': '', 'nsplit': '', 'substitute_last': '', 'strwidthpart_reverse': '', 'unescape_pattern': '', 'levenshtein_distance': '', 'trim_start': '', 'nr2hex': '', 'remove_ansi_sequences': '', 'iconv': '', 'pad_left': '', 'nr2enc_char': '', 'lines': '', 'repair_posix_text': '', 'nr2byte': '', 'trim': '', 'diffidx': '', 'truncate': '', 'split_by_displaywidth': '', 'padding_by_displaywidth': '', 'hash': '', 'chomp': '', 'pad_between_letters': '', 'wcswidth': '', 'dstring': '', 'pad_both_sides': '', 'justify_equal_spacing': '', 'pad_right': '', 'replace_first': '', '_vital_loaded': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ " Utilities for string. let s:save_cpo = &cpo @@ -20,11 +5,12 @@ function! s:_vital_loaded(V) abort let s:V = a:V + let s:P = s:V.import('Prelude') let s:L = s:V.import('Data.List') endfunction function! s:_vital_depends() abort - return ['Data.List'] + return ['Prelude', 'Data.List'] endfunction " Substitute a:from => a:to by string. @@ -54,15 +40,6 @@ return join(reverse(split(a:str, '.\zs')), '') endfunction -function! s:starts_with(str, prefix) abort - return stridx(a:str, a:prefix) == 0 -endfunction - -function! s:ends_with(str, suffix) abort - let idx = strridx(a:str, a:suffix) - return 0 <= idx && idx + len(a:suffix) == len(a:str) -endfunction - function! s:common_head(strs) abort if empty(a:strs) return '' @@ -73,7 +50,7 @@ endif let strs = len == 2 ? a:strs : sort(copy(a:strs)) let pat = substitute(strs[0], '.', '\="[" . escape(submatch(0), "^\\") . "]"', 'g') - return pat ==# '' ? '' : matchstr(strs[-1], '\C^\%[' . pat . ']') + return pat == '' ? '' : matchstr(strs[-1], '\C^\%[' . pat . ']') endfunction " Split to two elements of List. ([left, right]) @@ -177,15 +154,15 @@ " NOTE _concat() is just a copy of Data.List.concat(). " FIXME don't repeat yourself function! s:_split_by_wcswidth_once(body, x) abort - let fst = s:strwidthpart(a:body, a:x) - let snd = s:strwidthpart_reverse(a:body, s:wcswidth(a:body) - s:wcswidth(fst)) + let fst = s:P.strwidthpart(a:body, a:x) + let snd = s:P.strwidthpart_reverse(a:body, s:P.wcswidth(a:body) - s:P.wcswidth(fst)) return [fst, snd] endfunction function! s:_split_by_wcswidth(body, x) abort let memo = [] let body = a:body - while s:wcswidth(body) > a:x + while s:P.wcswidth(body) > a:x let [tmp, body] = s:_split_by_wcswidth_once(body, a:x) call add(memo, tmp) endwhile @@ -197,14 +174,6 @@ return matchstr(a:str,'^\s*\zs.\{-}\ze\s*$') endfunction -function! s:trim_start(str) abort - return matchstr(a:str,'^\s*\zs.\{-}$') -endfunction - -function! s:trim_end(str) abort - return matchstr(a:str,'^.\{-}\ze\s*$') -endfunction - function! s:wrap(str,...) abort let _columns = a:0 > 0 ? a:1 : &columns return s:L.concat( @@ -222,7 +191,7 @@ endfunction function! s:nr2enc_char(charcode) abort - if &encoding ==# 'utf-8' + if &encoding == 'utf-8' return nr2char(a:charcode) endif let char = s:nr2byte(a:charcode) @@ -234,7 +203,7 @@ function! s:nr2hex(nr) abort let n = a:nr - let r = '' + let r = "" while n let r = '0123456789ABCDEF'[n % 16] . r let n = n / 16 @@ -330,7 +299,7 @@ let letters2 = split(a:str2, '\zs') let length1 = len(letters1) let length2 = len(letters2) - let distances = map(range(1, length1 + 1), 'map(range(1, length2 + 1), ''0'')') + let distances = map(range(1, length1 + 1), 'map(range(1, length2 + 1), "0")') for i1 in range(0, length1) let distances[i1][0] = i1 @@ -385,7 +354,7 @@ let text = '' while cs_index < len(cs) - if cs[cs_index] is# "\n" + if cs[cs_index] is "\n" let text = s:padding_by_displaywidth(text, a:width, a:float) let lines += [text] let text = '' @@ -406,7 +375,7 @@ if a:is_wrap if a:width < w if a:width < strdisplaywidth(cs[cs_index]) - while get(cs, cs_index, "\n") isnot# "\n" + while get(cs, cs_index, "\n") isnot "\n" let cs_index += 1 endwhile continue @@ -415,7 +384,7 @@ endif endif else - while get(cs, cs_index, "\n") isnot# "\n" + while get(cs, cs_index, "\n") isnot "\n" let cs_index += 1 endwhile continue @@ -576,86 +545,7 @@ endfunction endif -function! s:remove_ansi_sequences(text) abort - return substitute(a:text, '\e\[\%(\%(\d;\)\?\d\{1,2}\)\?[mK]', '', 'g') -endfunction - -function! s:escape_pattern(str) abort - " escape characters for no-magic - return escape(a:str, '^$~.*[]\') -endfunction - -function! s:unescape_pattern(str) abort - " unescape characters for no-magic - return s:unescape(a:str, '^$~.*[]\') -endfunction - -function! s:unescape(str, chars) abort - let chars = map(split(a:chars, '\zs'), 'escape(v:val, ''^$~.*[]\'')') - return substitute(a:str, '\\\(' . join(chars, '\|') . '\)', '\1', 'g') -endfunction - -function! s:iconv(expr, from, to) abort - if a:from ==# '' || a:to ==# '' || a:from ==? a:to - return a:expr - endif - let result = iconv(a:expr, a:from, a:to) - return empty(result) ? a:expr : result -endfunction - -" NOTE: -" A definition of a TEXT file is "A file that contains characters organized -" into one or more lines." -" A definition of a LINE is "A sequence of zero or more non- s -" plus a terminating " -" That's why {stdin} always ends with ideally. However, there are -" some programs which does not follow the POSIX rule and a Vim's way to join -" List into TEXT; join({text}, "\n"); does not add to the end of -" the last line. -" That's why add a trailing if it does not exist. -" REF: -" http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_392 -" http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_205 -" :help split() -" NOTE: -" it does nothing if the text is a correct POSIX text -function! s:repair_posix_text(text, ...) abort - let newline = get(a:000, 0, "\n") - return a:text =~# '\n$' ? a:text : a:text . newline -endfunction - -" NOTE: -" A definition of a TEXT file is "A file that contains characters organized -" into one or more lines." -" A definition of a LINE is "A sequence of zero or more non- s -" plus a terminating " -" REF: -" http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_392 -" http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_205 -function! s:join_posix_lines(lines, ...) abort - let newline = get(a:000, 0, "\n") - return join(a:lines, newline) . newline -endfunction - -" NOTE: -" A definition of a TEXT file is "A file that contains characters organized -" into one or more lines." -" A definition of a LINE is "A sequence of zero or more non- s -" plus a terminating " -" TEXT into List; split({text}, '\r\?\n', 1); add an extra empty line at the -" end of List because the end of TEXT ends with and keepempty=1 is -" specified. (btw. keepempty=0 cannot be used because it will remove -" emptylines in the head and the tail). -" That's why removing a trailing before proceeding to 'split' is required -" REF: -" http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_392 -" http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_205 -function! s:split_posix_text(text, ...) abort - let newline = get(a:000, 0, '\r\?\n') - let text = substitute(a:text, newline . '$', '', '') - return split(text, newline, 1) -endfunction - let &cpo = s:save_cpo unlet s:save_cpo + " vim:set et ts=2 sts=2 sw=2 tw=0: === modified file 'vim/bundle/unite.vim/autoload/vital/_unite/Prelude.vim' --- vim/bundle/unite.vim/autoload/vital/_unite/Prelude.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/vital/_unite/Prelude.vim 2015-08-25 11:01:00 +0000 @@ -1,18 +1,3 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_unite#Prelude#import() abort - return map({'escape_pattern': '', 'is_funcref': '', 'path2directory': '', 'wcswidth': '', 'is_string': '', 'input_helper': '', 'is_number': '', 'is_cygwin': '', 'path2project_directory': '', 'strwidthpart_reverse': '', 'input_safe': '', 'is_list': '', 'truncate_skipping': '', 'glob': '', 'truncate': '', 'is_dict': '', 'set_default': '', 'is_numeric': '', 'getchar_safe': '', 'substitute_path_separator': '', 'is_mac': '', 'strwidthpart': '', 'getchar': '', 'is_unix': '', 'is_windows': '', 'globpath': '', 'escape_file_searching': '', 'is_float': '', 'smart_execute_command': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_unite#Prelude#import() abort', printf("return map({'escape_pattern': '', 'is_funcref': '', 'path2directory': '', 'wcswidth': '', 'is_string': '', 'input_helper': '', 'is_number': '', 'is_cygwin': '', 'path2project_directory': '', 'strwidthpart_reverse': '', 'input_safe': '', 'is_list': '', 'truncate_skipping': '', 'glob': '', 'truncate': '', 'is_dict': '', 'set_default': '', 'is_numeric': '', 'getchar_safe': '', 'substitute_path_separator': '', 'is_mac': '', 'strwidthpart': '', 'getchar': '', 'is_unix': '', 'is_windows': '', 'globpath': '', 'escape_file_searching': '', 'is_float': '', 'smart_execute_command': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ let s:save_cpo = &cpo set cpo&vim @@ -42,7 +27,7 @@ \ s:__TYPE_DICT, \ s:__TYPE_FLOAT] = [ \ type(3), - \ type(''), + \ type(""), \ type(function('tr')), \ type([]), \ type({}), @@ -83,9 +68,12 @@ return type(a:Value) ==# s:__TYPE_DICT endfunction +function! s:truncate_smart(str, max, footer_width, separator) abort + echoerr 'Prelude.truncate_smart() is obsolete. Use its truncate_skipping() instead; they are equivalent.' + return s:truncate_skipping(a:str, a:max, a:footer_width, a:separator) +endfunction + function! s:truncate_skipping(str, max, footer_width, separator) abort - call s:_warn_deprecated('truncate_skipping', 'Data.String.truncate_skipping') - let width = s:wcswidth(a:str) if width <= a:max let ret = a:str @@ -102,8 +90,6 @@ " Original function is from mattn. " http://github.com/mattn/googlereader-vim/tree/master - call s:_warn_deprecated('truncate', 'Data.String.truncate') - if a:str =~# '^[\x00-\x7f]*$' return len(a:str) < a:width ? \ printf('%-'.a:width.'s', a:str) : strpart(a:str, 0, a:width) @@ -124,8 +110,6 @@ endfunction function! s:strwidthpart(str, width) abort - call s:_warn_deprecated('strwidthpart', 'Data.String.strwidthpart') - if a:width <= 0 return '' endif @@ -140,8 +124,6 @@ return ret endfunction function! s:strwidthpart_reverse(str, width) abort - call s:_warn_deprecated('strwidthpart_reverse', 'Data.String.strwidthpart_reverse') - if a:width <= 0 return '' endif @@ -159,13 +141,10 @@ if v:version >= 703 " Use builtin function. function! s:wcswidth(str) abort - call s:_warn_deprecated('wcswidth', 'Data.String.wcswidth') return strwidth(a:str) endfunction else function! s:wcswidth(str) abort - call s:_warn_deprecated('wcswidth', 'Data.String.wcswidth') - if a:str =~# '^[\x00-\x7f]*$' return strlen(a:str) end @@ -230,17 +209,13 @@ return s:is_unix endfunction -function! s:_warn_deprecated(name, alternative) abort - try - echohl Error - echomsg 'Prelude.' . a:name . ' is deprecated! Please use ' . a:alternative . ' instead.' - finally - echohl None - endtry +function! s:_deprecated2(fname) abort + echomsg printf("Vital.Prelude.%s is deprecated!", + \ a:fname) endfunction function! s:smart_execute_command(action, word) abort - execute a:action . ' ' . (a:word ==# '' ? '' : '`=a:word`') + execute a:action . ' ' . (a:word == '' ? '' : '`=a:word`') endfunction function! s:escape_file_searching(buffer_name) abort @@ -248,10 +223,6 @@ endfunction function! s:escape_pattern(str) abort - call s:_warn_deprecated( - \ 'escape_pattern', - \ 'Data.String.escape_pattern', - \) return escape(a:str, '~"\.^$[]*') endfunction @@ -262,7 +233,7 @@ function! s:getchar_safe(...) abort let c = s:input_helper('getchar', a:000) - return type(c) == type('') ? c : nr2char(c) + return type(c) == type("") ? c : nr2char(c) endfunction function! s:input_safe(...) abort @@ -272,13 +243,13 @@ function! s:input_helper(funcname, args) abort let success = 0 if inputsave() !=# success - throw 'vital: Prelude: inputsave() failed' + throw 'inputsave() failed' endif try return call(a:funcname, a:args) finally if inputrestore() !=# success - throw 'vital: Prelude: inputrestore() failed' + throw 'inputrestore() failed' endif endtry endfunction @@ -289,6 +260,16 @@ endif endfunction +function! s:set_dictionary_helper(variable, keys, pattern) abort + call s:_deprecated2('set_dictionary_helper') + + for key in split(a:keys, '\s*,\s*') + if !has_key(a:variable, key) + let a:variable[key] = a:pattern + endif + endfor +endfunction + function! s:substitute_path_separator(path) abort return s:is_windows ? substitute(a:path, '\\', '/', 'g') : a:path endfunction @@ -319,7 +300,7 @@ let find_directory = s:escape_file_searching(search_directory) let d = finddir('.svn', find_directory . ';') - if d ==# '' + if d == '' return '' endif @@ -329,9 +310,9 @@ let parent_directory = s:path2directory( \ fnamemodify(directory, ':h')) - if parent_directory !=# '' + if parent_directory != '' let d = finddir('.svn', parent_directory . ';') - if d !=# '' + if d != '' let directory = s:_path2project_directory_svn(parent_directory) endif endif @@ -344,7 +325,7 @@ let find_directory = s:escape_file_searching(search_directory) let d = finddir(vcs, find_directory . ';') - if d ==# '' + if d == '' return '' endif return fnamemodify(d, ':p:h:h') @@ -364,25 +345,25 @@ else let directory = s:_path2project_directory_others(vcs, search_directory) endif - if directory !=# '' + if directory != '' break endif endfor " Search project file. - if directory ==# '' + if directory == '' for d in ['build.xml', 'prj.el', '.project', 'pom.xml', 'package.json', \ 'Makefile', 'configure', 'Rakefile', 'NAnt.build', \ 'P4CONFIG', 'tags', 'gtags'] let d = findfile(d, s:escape_file_searching(search_directory) . ';') - if d !=# '' + if d != '' let directory = fnamemodify(d, ':p:h') break endif endfor endif - if directory ==# '' + if directory == '' " Search /src/ directory. let base = s:substitute_path_separator(search_directory) if base =~# '/src/' @@ -390,7 +371,7 @@ endif endif - if directory ==# '' && !is_allow_empty + if directory == '' && !is_allow_empty " Use original path. let directory = search_directory endif === modified file 'vim/bundle/unite.vim/autoload/vital/_unite/Process.vim' --- vim/bundle/unite.vim/autoload/vital/_unite/Process.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/vital/_unite/Process.vim 2015-08-25 11:01:00 +0000 @@ -1,18 +1,3 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_unite#Process#import() abort - return map({'shellescape': '', 'has_vimproc': '', 'system': '', 'iconv': '', 'spawn': '', 'get_last_status': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_unite#Process#import() abort', printf("return map({'shellescape': '', 'has_vimproc': '', 'system': '', 'iconv': '', 'spawn': '', 'get_last_status': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ " TODO: move all comments to doc file. " " @@ -34,8 +19,23 @@ let s:TYPE_DICT = type({}) let s:TYPE_LIST = type([]) -let s:TYPE_STRING = type('') - +let s:TYPE_STRING = type("") + + +" Execute program in the background from Vim. +" Return an empty string always. +" +" If a:expr is a List, shellescape() each argument. +" If a:expr is a String, the arguments are passed as-is. +" +" Windows: +" Using :!start , execute program without via cmd.exe. +" Spawning 'expr' with 'noshellslash' +" keep special characters from unwanted expansion. +" (see :help shellescape()) +" +" Unix: +" using :! , execute program in the background by shell. function! s:spawn(expr, ...) abort let shellslash = 0 if s:is_windows @@ -70,11 +70,11 @@ " iconv() wrapper for safety. function! s:iconv(expr, from, to) abort - if a:from ==# '' || a:to ==# '' || a:from ==? a:to + if a:from == '' || a:to == '' || a:from ==? a:to return a:expr endif let result = iconv(a:expr, a:from, a:to) - return result !=# '' ? result : a:expr + return result != '' ? result : a:expr endfunction " Check vimproc. === removed directory 'vim/bundle/unite.vim/autoload/vital/_unite/System/Cache' === added file 'vim/bundle/unite.vim/autoload/vital/_unite/System/Cache.vim' --- vim/bundle/unite.vim/autoload/vital/_unite/System/Cache.vim 1970-01-01 00:00:00 +0000 +++ vim/bundle/unite.vim/autoload/vital/_unite/System/Cache.vim 2015-08-25 11:01:00 +0000 @@ -0,0 +1,85 @@ +" Utilities for output cache. + +let s:save_cpo = &cpo +set cpo&vim + +function! s:_vital_loaded(V) abort + let s:V = a:V + let s:S = s:V.import('Data.String') +endfunction + +function! s:_vital_depends() abort + return ['Data.String'] +endfunction + +function! s:getfilename(cache_dir, filename) abort + return s:_encode_name(a:cache_dir, a:filename) +endfunction + +function! s:filereadable(cache_dir, filename) abort + let cache_name = s:_encode_name(a:cache_dir, a:filename) + return filereadable(cache_name) +endfunction + +function! s:readfile(cache_dir, filename) abort + let cache_name = s:_encode_name(a:cache_dir, a:filename) + return filereadable(cache_name) ? readfile(cache_name) : [] +endfunction + +function! s:writefile(cache_dir, filename, list) abort + let cache_name = s:_encode_name(a:cache_dir, a:filename) + + call writefile(a:list, cache_name) +endfunction + +function! s:delete(cache_dir, filename) abort + echoerr 'System.Cache.delete() is obsolete. Use its deletefile() instead.' + return call('s:deletefile', a:cache_dir, a:filename) +endfunction + +function! s:deletefile(cache_dir, filename) abort + let cache_name = s:_encode_name(a:cache_dir, a:filename) + return delete(cache_name) +endfunction + +function! s:_encode_name(cache_dir, filename) abort + " Check cache directory. + if !isdirectory(a:cache_dir) + call mkdir(a:cache_dir, 'p') + endif + let cache_dir = a:cache_dir + if cache_dir !~ '/$' + let cache_dir .= '/' + endif + + return cache_dir . s:_create_hash(cache_dir, a:filename) +endfunction + +function! s:check_old_cache(cache_dir, filename) abort + " Check old cache file. + let cache_name = s:_encode_name(a:cache_dir, a:filename) + let ret = getftime(cache_name) == -1 + \ || getftime(cache_name) <= getftime(a:filename) + if ret && filereadable(cache_name) + " Delete old cache. + call delete(cache_name) + endif + + return ret +endfunction + +function! s:_create_hash(dir, str) abort + if len(a:dir) + len(a:str) < 150 + let hash = substitute(substitute( + \ a:str, ':', '=-', 'g'), '[/\\]', '=+', 'g') + else + let hash = s:S.hash(a:str) + endif + + return hash +endfunction + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim:set et ts=2 sts=2 sw=2 tw=0: === removed file 'vim/bundle/unite.vim/autoload/vital/_unite/System/Cache/Deprecated.vim' --- vim/bundle/unite.vim/autoload/vital/_unite/System/Cache/Deprecated.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/vital/_unite/System/Cache/Deprecated.vim 1970-01-01 00:00:00 +0000 @@ -1,101 +0,0 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_unite#System#Cache#Deprecated#import() abort - return map({'filereadable': '', '_vital_depends': '', 'delete': '', 'readfile': '', 'getfilename': '', 'deletefile': '', 'check_old_cache': '', 'writefile': '', '_vital_loaded': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_unite#System#Cache#Deprecated#import() abort', printf("return map({'filereadable': '', '_vital_depends': '', 'delete': '', 'readfile': '', 'getfilename': '', 'deletefile': '', 'check_old_cache': '', 'writefile': '', '_vital_loaded': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ -" Note: -" This module is deprecated. Use a new `Syste.Cache` instead. - -let s:save_cpo = &cpo -set cpo&vim - -function! s:_vital_loaded(V) abort - let s:V = a:V - let s:S = s:V.import('Data.String') -endfunction - -function! s:_vital_depends() abort - return ['Data.String'] -endfunction - -function! s:getfilename(cache_dir, filename) abort - return s:_encode_name(a:cache_dir, a:filename) -endfunction - -function! s:filereadable(cache_dir, filename) abort - let cache_name = s:_encode_name(a:cache_dir, a:filename) - return filereadable(cache_name) -endfunction - -function! s:readfile(cache_dir, filename) abort - let cache_name = s:_encode_name(a:cache_dir, a:filename) - return filereadable(cache_name) ? readfile(cache_name) : [] -endfunction - -function! s:writefile(cache_dir, filename, list) abort - let cache_name = s:_encode_name(a:cache_dir, a:filename) - - call writefile(a:list, cache_name) -endfunction - -function! s:delete(cache_dir, filename) abort - echoerr 'System.Cache.delete() is obsolete. Use its deletefile() instead.' - return call('s:deletefile', a:cache_dir, a:filename) -endfunction - -function! s:deletefile(cache_dir, filename) abort - let cache_name = s:_encode_name(a:cache_dir, a:filename) - return delete(cache_name) -endfunction - -function! s:_encode_name(cache_dir, filename) abort - " Check cache directory. - if !isdirectory(a:cache_dir) - call mkdir(a:cache_dir, 'p') - endif - let cache_dir = a:cache_dir - if cache_dir !~# '/$' - let cache_dir .= '/' - endif - - return cache_dir . s:_create_hash(cache_dir, a:filename) -endfunction - -function! s:check_old_cache(cache_dir, filename) abort - " Check old cache file. - let cache_name = s:_encode_name(a:cache_dir, a:filename) - let ret = getftime(cache_name) == -1 - \ || getftime(cache_name) <= getftime(a:filename) - if ret && filereadable(cache_name) - " Delete old cache. - call delete(cache_name) - endif - - return ret -endfunction - -function! s:_create_hash(dir, str) abort - if len(a:dir) + len(a:str) < 150 - let hash = substitute(substitute( - \ a:str, ':', '=-', 'g'), '[/\\]', '=+', 'g') - else - let hash = s:S.hash(a:str) - endif - - return hash -endfunction - -let &cpo = s:save_cpo -unlet s:save_cpo - -" vim:set et ts=2 sts=2 sw=2 tw=0: === modified file 'vim/bundle/unite.vim/autoload/vital/_unite/System/File.vim' --- vim/bundle/unite.vim/autoload/vital/_unite/System/File.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/vital/_unite/System/File.vim 2015-08-25 11:01:00 +0000 @@ -1,32 +1,8 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_unite#System#File#import() abort - return map({'copy_dir_vim': '', '_vital_depends': '', 'mkdir_nothrow': '', 'copy_exe': '', 'open': '', 'move_vim': '', 'copy': '', 'move': '', 'copy_dir_exe': '', 'copy_vim': '', 'move_exe': '', 'copy_dir': '', 'rmdir': '', '_vital_loaded': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_unite#System#File#import() abort', printf("return map({'copy_dir_vim': '', '_vital_depends': '', 'mkdir_nothrow': '', 'copy_exe': '', 'open': '', 'move_vim': '', 'copy': '', 'move': '', 'copy_dir_exe': '', 'copy_vim': '', 'move_exe': '', 'copy_dir': '', 'rmdir': '', '_vital_loaded': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ " Utilities for file copy/move/mkdir/etc. let s:save_cpo = &cpo set cpo&vim -function! s:_vital_loaded(V) abort - let s:Prelude = a:V.import('Prelude') - let s:Filepath = a:V.import('System.Filepath') -endfunction - -function! s:_vital_depends() abort - return ['Prelude', 'System.Filepath'] -endfunction - let s:is_unix = has('unix') let s:is_windows = has('win16') || has('win32') || has('win64') || has('win95') let s:is_cygwin = has('win32unix') @@ -39,7 +15,7 @@ let s:need_trans = v:version < 704 || (v:version == 704 && !has('patch122')) " Open a file. -function! s:open(filename) abort +function! s:open(filename) abort "{{{ let filename = fnamemodify(a:filename, ':p') " Detect desktop environment. @@ -48,12 +24,7 @@ if s:need_trans let filename = iconv(filename, &encoding, 'char') endif - " Note: - " # and % required to be escaped (:help cmdline-special) - silent execute printf( - \ '!start rundll32 url.dll,FileProtocolHandler %s', - \ escape(filename, '#%'), - \) + silent execute '!start rundll32 url.dll,FileProtocolHandler' filename elseif s:is_cygwin " Cygwin. call system(printf('%s %s', 'cygstart', @@ -62,9 +33,6 @@ " Linux. call system(printf('%s %s &', 'xdg-open', \ shellescape(filename))) - elseif executable('lemonade') - call system(printf('%s %s &', 'lemonade open', - \ shellescape(filename))) elseif exists('$KDE_FULL_SESSION') && $KDE_FULL_SESSION ==# 'true' " KDE. call system(printf('%s %s &', 'kioclient exec', @@ -83,22 +51,22 @@ \ shellescape(filename))) else " Give up. - throw 'vital: System.File: open(): Not supported.' + throw 'Not supported.' endif -endfunction +endfunction "}}} " Move a file. " Dispatch s:move_exe() or s:move_vim(). " FIXME: Currently s:move_vim() does not support " moving a directory. -function! s:move(src, dest) abort +function! s:move(src, dest) abort "{{{ if s:_has_move_exe() || isdirectory(a:src) return s:move_exe(a:src, a:dest) else return s:move_vim(a:src, a:dest) endif -endfunction +endfunction "}}} if s:is_unix function! s:_has_move_exe() abort @@ -110,7 +78,7 @@ endfunction else function! s:_has_move_exe() abort - throw 'vital: System.File: _has_move_exe(): your platform is not supported' + throw 'vital: System.File._has_move_exe(): your platform is not supported' endfunction endif @@ -118,18 +86,14 @@ " Implemented by external program. if s:is_unix function! s:move_exe(src, dest) abort - if !s:_has_move_exe() - return 0 - endif + if !s:_has_move_exe() | return 0 | endif let [src, dest] = [a:src, a:dest] call system('mv ' . shellescape(src) . ' ' . shellescape(dest)) return !v:shell_error endfunction elseif s:is_windows function! s:move_exe(src, dest) abort - if !s:_has_move_exe() - return 0 - endif + if !s:_has_move_exe() | return 0 | endif let [src, dest] = [a:src, a:dest] " Normalize successive slashes to one slash. let src = substitute(src, '[/\\]\+', '\', 'g') @@ -147,100 +111,25 @@ endfunction else function! s:move_exe() abort - throw 'vital: System.File: move_exe(): your platform is not supported' + throw 'vital: System.File.move_exe(): your platform is not supported' endfunction endif " Move a file. " Implemented by pure Vim script. -function! s:move_vim(src, dest) abort +function! s:move_vim(src, dest) abort "{{{ return !rename(a:src, a:dest) -endfunction - -function! s:copy_dir(src, dest) abort - if s:_has_copy_dir_exe() - return s:copy_dir_exe(a:src, a:dest) - else - return s:copy_dir_vim(a:src, a:dest) - endif -endfunction - -" Copy a directory. -" Implemented by external program. -if s:is_unix - function! s:copy_dir_exe(src, dest) abort - if !s:_has_copy_dir_exe() - return 0 - endif - let [src, dest] = [a:src, a:dest] - call system('cp -R ' . shellescape(src) . ' ' . shellescape(dest)) - return !v:shell_error - endfunction -elseif s:is_windows - function! s:copy_dir_exe(src, dest) abort - if !s:_has_copy_dir_exe() - return 0 - endif - let src = s:_shellescape_robocopy(a:src) - let dest = s:_shellescape_robocopy(a:dest) - call system('robocopy /e ' . src . ' ' . dest) - return v:shell_error <# 8 - endfunction - function! s:_shellescape_robocopy(path) abort - let path = tr(a:path, '/', '\') - let path = escape(path, '"') - return '"' . path . '"' - endfunction -else - function! s:copy_dir_exe() abort - throw 'vital: System.File: copy_dir_exe(): your platform is not supported' - endfunction -endif - -" Copy a file. -" Implemented by pure Vim script. -function! s:copy_dir_vim(src, dest) abort - if isdirectory(a:src) - for src in s:Prelude.glob(s:Filepath.join(a:src, '*')) - let basename = s:Filepath.basename(src) - let dest = s:Filepath.join(a:dest, basename) - if !s:copy_dir_vim(src, dest) - return 0 - endif - endfor - return 1 - elseif filereadable(a:src) - return s:copy_vim(a:src, a:dest) - else " XXX: ??? - return 0 - endif -endfunction - -if s:is_unix - function! s:_has_copy_dir_exe() abort - return executable('cp') - endfunction -elseif s:is_windows - function! s:_has_copy_dir_exe() abort - return executable('robocopy') - endfunction -else - function! s:_has_copy_dir_exe() abort - throw 'vital: System.File: copy_dir_exe(): ' - \ . 'your platform is not supported' - endfunction -endif - +endfunction "}}} " Copy a file. " Dispatch s:copy_exe() or s:copy_vim(). -function! s:copy(src, dest) abort +function! s:copy(src, dest) abort "{{{ if s:_has_copy_exe() return s:copy_exe(a:src, a:dest) else return s:copy_vim(a:src, a:dest) endif -endfunction +endfunction "}}} if s:is_unix function! s:_has_copy_exe() abort @@ -252,7 +141,7 @@ endfunction else function! s:_has_copy_exe() abort - throw 'vital: System.File: _has_copy_exe(): your platform is not supported' + throw 'vital: System.File._has_copy_exe(): your platform is not supported' endfunction endif @@ -260,18 +149,14 @@ " Implemented by external program. if s:is_unix function! s:copy_exe(src, dest) abort - if !s:_has_copy_exe() - return 0 - endif + if !s:_has_copy_exe() | return 0 | endif let [src, dest] = [a:src, a:dest] call system('cp ' . shellescape(src) . ' ' . shellescape(dest)) return !v:shell_error endfunction elseif s:is_windows function! s:copy_exe(src, dest) abort - if !s:_has_copy_exe() - return 0 - endif + if !s:_has_copy_exe() | return 0 | endif let [src, dest] = [a:src, a:dest] let src = substitute(src, '/', '\', 'g') let dest = substitute(dest, '/', '\', 'g') @@ -281,59 +166,51 @@ endfunction else function! s:copy_exe() abort - throw 'vital: System.File: copy_exe(): your platform is not supported' + throw 'vital: System.File.copy_exe(): your platform is not supported' endfunction endif " Copy a file. " Implemented by pure Vim script. -function! s:copy_vim(src, dest) abort - let ret = writefile(readfile(a:src, 'b'), a:dest, 'b') +function! s:copy_vim(src, dest) abort "{{{ + let ret = writefile(readfile(a:src, "b"), a:dest, "b") if ret == -1 return 0 endif return 1 -endfunction +endfunction "}}} " mkdir() but does not throw an exception. " Returns true if success. " Returns false if failure. -function! s:mkdir_nothrow(...) abort +function! s:mkdir_nothrow(...) abort "{{{ try return call('mkdir', a:000) catch return 0 endtry -endfunction +endfunction "}}} " Delete a file/directory. -if has('patch-7.4.1128') - function! s:rmdir(path, ...) abort - let flags = a:0 ? a:1 : '' - let delete_flags = flags =~# 'r' ? 'rf' : 'd' - let result = delete(a:path, delete_flags) - if result == -1 - throw 'vital: System.File: rmdir(): cannot delete "' . a:path . '"' - endif - endfunction - -elseif s:is_unix - function! s:rmdir(path, ...) abort - let flags = a:0 ? a:1 : '' - let cmd = flags =~# 'r' ? 'rm -rf' : 'rmdir' +if s:is_unix + function! s:rmdir(path, ...) abort + let flags = a:0 ? a:1 : '' + let cmd = flags =~# 'r' ? 'rm -r' : 'rmdir' + let cmd .= flags =~# 'f' && cmd ==# 'rm -r' ? ' -f' : '' let ret = system(cmd . ' ' . shellescape(a:path)) if v:shell_error let ret = iconv(ret, 'char', &encoding) - throw 'vital: System.File: rmdir(): ' . substitute(ret, '\n', '', 'g') + throw substitute(ret, '\n', '', 'g') endif endfunction elseif s:is_windows function! s:rmdir(path, ...) abort let flags = a:0 ? a:1 : '' - if &shell =~? 'sh$' - let cmd = flags =~# 'r' ? 'rm -rf' : 'rmdir' + if &shell =~? "sh$" + let cmd = flags =~# 'r' ? 'rm -r' : 'rmdir' + let cmd .= flags =~# 'f' && cmd ==# 'rm -r' ? ' -f' : '' let ret = system(cmd . ' ' . shellescape(a:path)) else " 'f' flag does not make sense. @@ -343,13 +220,13 @@ endif if v:shell_error let ret = iconv(ret, 'char', &encoding) - throw 'vital: System.File: rmdir(): ' . substitute(ret, '\n', '', 'g') + throw substitute(ret, '\n', '', 'g') endif endfunction else function! s:rmdir(...) abort - throw 'vital: System.File: rmdir(): your platform is not supported' + throw 'vital: System.File.rmdir(): your platform is not supported' endfunction endif === removed file 'vim/bundle/unite.vim/autoload/vital/_unite/System/Filepath.vim' --- vim/bundle/unite.vim/autoload/vital/_unite/System/Filepath.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/vital/_unite/System/Filepath.vim 1970-01-01 00:00:00 +0000 @@ -1,265 +0,0 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_unite#System#Filepath#import() abort - return map({'path_separator': '', 'is_case_tolerant': '', 'dirname': '', 'abspath': '', 'relpath': '', 'realpath': '', 'unify_separator': '', 'is_root_directory': '', 'split': '', 'path_extensions': '', 'unixpath': '', 'which': '', 'winpath': '', 'join': '', 'separator': '', 'is_relative': '', 'basename': '', 'remove_last_separator': '', 'is_absolute': '', 'contains': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_unite#System#Filepath#import() abort', printf("return map({'path_separator': '', 'is_case_tolerant': '', 'dirname': '', 'abspath': '', 'relpath': '', 'realpath': '', 'unify_separator': '', 'is_root_directory': '', 'split': '', 'path_extensions': '', 'unixpath': '', 'which': '', 'winpath': '', 'join': '', 'separator': '', 'is_relative': '', 'basename': '', 'remove_last_separator': '', 'is_absolute': '', 'contains': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ -" You should check the following related builtin functions. -" fnamemodify() -" resolve() -" simplify() - -let s:save_cpo = &cpo -set cpo&vim - -let s:path_sep_pattern = (exists('+shellslash') ? '[\\/]' : '/') . '\+' -let s:is_windows = has('win16') || has('win32') || has('win64') || has('win95') -let s:is_cygwin = has('win32unix') -let s:is_mac = !s:is_windows && !s:is_cygwin - \ && (has('mac') || has('macunix') || has('gui_macvim') || - \ (!isdirectory('/proc') && executable('sw_vers'))) -let s:is_case_tolerant = filereadable(expand(':r') . '.VIM') - -" Get the directory separator. -function! s:separator() abort - return fnamemodify('.', ':p')[-1 :] -endfunction - -" Get the path separator. -let s:path_separator = s:is_windows ? ';' : ':' -function! s:path_separator() abort - return s:path_separator -endfunction - -" Get the path extensions -function! s:path_extensions() abort - if !exists('s:path_extensions') - if s:is_windows - if exists('$PATHEXT') - let pathext = $PATHEXT - else - " get default PATHEXT - let pathext = matchstr(system('set pathext'), '\C^pathext=\zs.*\ze\n', 'i') - endif - let s:path_extensions = map(split(pathext, s:path_separator), 'tolower(v:val)') - elseif s:is_cygwin - " cygwin is not use $PATHEXT - let s:path_extensions = ['', '.exe'] - else - let s:path_extensions = [''] - endif - endif - return s:path_extensions -endfunction - -" Convert all directory separators to "/". -function! s:unify_separator(path) abort - return substitute(a:path, s:path_sep_pattern, '/', 'g') -endfunction - -" Get the full path of command. -if exists('*exepath') - function! s:which(str) abort - return exepath(a:str) - endfunction -else - function! s:which(command, ...) abort - let pathlist = a:command =~# s:path_sep_pattern ? [''] : - \ !a:0 ? split($PATH, s:path_separator) : - \ type(a:1) == type([]) ? copy(a:1) : - \ split(a:1, s:path_separator) - - let pathext = s:path_extensions() - if index(pathext, '.' . tolower(fnamemodify(a:command, ':e'))) != -1 - let pathext = [''] - endif - - let dirsep = s:separator() - for dir in pathlist - let head = dir ==# '' ? '' : dir . dirsep - for ext in pathext - let full = fnamemodify(head . a:command . ext, ':p') - if filereadable(full) - if s:is_case_tolerant() - let full = glob(substitute( - \ toupper(full), '\u:\@!', '[\0\L\0]', 'g'), 1) - endif - if full !=# '' - return full - endif - endif - endfor - endfor - - return '' - endfunction -endif - -" Split the path with directory separator. -" Note that this includes the drive letter of MS Windows. -function! s:split(path) abort - return split(a:path, s:path_sep_pattern) -endfunction - -" Join the paths. -" join('foo', 'bar') => 'foo/bar' -" join('foo/', 'bar') => 'foo/bar' -" join('/foo/', ['bar', 'buz/']) => '/foo/bar/buz/' -function! s:join(...) abort - let sep = s:separator() - let path = '' - for part in a:000 - let path .= sep . - \ (type(part) is type([]) ? call('s:join', part) : - \ part) - unlet part - endfor - return substitute(path[1 :], s:path_sep_pattern, sep, 'g') -endfunction - -" Check if the path is absolute path. -if s:is_windows - function! s:is_absolute(path) abort - return a:path =~? '^[a-z]:[/\\]' - endfunction -else - function! s:is_absolute(path) abort - return a:path[0] ==# '/' - endfunction -endif - -function! s:is_relative(path) abort - return !s:is_absolute(a:path) -endfunction - -" Return the parent directory of the path. -" NOTE: fnamemodify(path, ':h') does not return the parent directory -" when path[-1] is the separator. -function! s:dirname(path) abort - let path = a:path - let orig = a:path - - let path = s:remove_last_separator(path) - if path ==# '' - return orig " root directory - endif - - let path = fnamemodify(path, ':h') - return path -endfunction - -" Return the basename of the path. -" NOTE: fnamemodify(path, ':h') does not return basename -" when path[-1] is the separator. -function! s:basename(path) abort - let path = a:path - let orig = a:path - - let path = s:remove_last_separator(path) - if path ==# '' - return orig " root directory - endif - - let path = fnamemodify(path, ':t') - return path -endfunction - -" Remove the separator at the end of a:path. -function! s:remove_last_separator(path) abort - let sep = s:separator() - let pat = escape(sep, '\') . '\+$' - return substitute(a:path, pat, '', '') -endfunction - - -" Return true if filesystem ignores alphabetic case of a filename. -" Return false otherwise. -function! s:is_case_tolerant() abort - return s:is_case_tolerant -endfunction - - -function! s:abspath(path) abort - if s:is_absolute(a:path) - return a:path - endif - " Note: - " the behavior of ':p' for non existing file path is not defined - return filereadable(a:path) - \ ? fnamemodify(a:path, ':p') - \ : s:join(fnamemodify(getcwd(), ':p'), a:path) -endfunction - -function! s:relpath(path) abort - if s:is_relative(a:path) - return a:path - endif - return fnamemodify(a:path, ':~:.') -endfunction - -function! s:unixpath(path) abort - return fnamemodify(a:path, ':gs?\\?/?') -endfunction - -function! s:winpath(path) abort - return fnamemodify(a:path, ':gs?/?\\?') -endfunction - -if s:is_windows - function! s:realpath(path) abort - if exists('&shellslash') && &shellslash - return s:unixpath(a:path) - else - return s:winpath(a:path) - endif - endfunction -else - function! s:realpath(path) abort - return s:unixpath(a:path) - endfunction -endif - -if s:is_windows - function! s:is_root_directory(path) abort - return a:path =~# '^[a-zA-Z]:[/\\]$' - endfunction -else - function! s:is_root_directory(path) abort - return a:path ==# '/' - endfunction -endif - -function! s:contains(path, base) abort - if a:path ==# '' || a:base ==# '' - return 0 - endif - let pathlist = s:split(a:path) - let baselist = s:split(a:base) - let pathlistlen = len(pathlist) - let baselistlen = len(baselist) - if pathlistlen < baselistlen - return 0 - endif - if baselistlen == 0 - return 1 - endif - if s:is_case_tolerant - call map(pathlist, 'tolower(v:val)') - call map(baselist, 'tolower(v:val)') - endif - return pathlist[: baselistlen - 1] ==# baselist -endfunction - -let &cpo = s:save_cpo -unlet s:save_cpo - -" vim:set et ts=2 sts=2 sw=2 tw=0: === modified file 'vim/bundle/unite.vim/autoload/vital/_unite/Vim/Message.vim' --- vim/bundle/unite.vim/autoload/vital/_unite/Vim/Message.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/vital/_unite/Vim/Message.vim 2015-08-25 11:01:00 +0000 @@ -1,32 +1,8 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_unite#Vim#Message#import() abort - return map({'capture': '', 'echomsg': '', 'echo': '', 'warn': '', 'get_hit_enter_max_length': '', 'error': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_unite#Vim#Message#import() abort', printf("return map({'capture': '', 'echomsg': '', 'echo': '', 'warn': '', 'get_hit_enter_max_length': '', 'error': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ let s:save_cpo = &cpo set cpo&vim -function! s:echo(hl, msg) abort - execute 'echohl' a:hl - try - echo a:msg - finally - echohl None - endtry -endfunction - function! s:echomsg(hl, msg) abort execute 'echohl' a:hl try === removed file 'vim/bundle/unite.vim/autoload/vital/unite.vim' --- vim/bundle/unite.vim/autoload/vital/unite.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/vital/unite.vim 1970-01-01 00:00:00 +0000 @@ -1,305 +0,0 @@ -let s:plugin_name = expand(':t:r') -let s:vital_base_dir = expand(':h') -let s:project_root = expand(':h:h:h') -let s:has_latest_module = isdirectory(expand(':h') . '/__latest__') -let s:is_vital_vim = s:plugin_name is# '_latest__' - -let s:loaded = {} -let s:cache_sid = {} - -" function() wrapper -if v:version > 703 || v:version == 703 && has('patch1170') - function! s:_function(fstr) abort - return function(a:fstr) - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - let s:_s = '' . s:_SID() . '_' - function! s:_function(fstr) abort - return function(substitute(a:fstr, 's:', s:_s, 'g')) - endfunction -endif - -function! vital#{s:plugin_name}#of() abort - return s:new(s:plugin_name) -endfunction - -let s:Vital = {} - -function! s:new(plugin_name) abort - let base = deepcopy(s:Vital) - let base.plugin_name = a:plugin_name - return base -endfunction - -function! s:vital_files() abort - if !exists('s:vital_files') - let s:vital_files = map( - \ s:is_vital_vim ? s:_global_vital_files() : s:_self_vital_files(), - \ 'fnamemodify(v:val, ":p:gs?[\\\\/]?/?")') - endif - return copy(s:vital_files) -endfunction -let s:Vital.vital_files = s:_function('s:vital_files') - -function! s:import(name, ...) abort dict - let target = {} - let functions = [] - for a in a:000 - if type(a) == type({}) - let target = a - elseif type(a) == type([]) - let functions = a - endif - unlet a - endfor - let module = self._import(a:name) - if empty(functions) - call extend(target, module, 'keep') - else - for f in functions - if has_key(module, f) && !has_key(target, f) - let target[f] = module[f] - endif - endfor - endif - return target -endfunction -let s:Vital.import = s:_function('s:import') - -function! s:load(...) abort dict - for arg in a:000 - let [name; as] = type(arg) == type([]) ? arg[: 1] : [arg, arg] - let target = split(join(as, ''), '\W\+') - let dict = self - let dict_type = type({}) - while !empty(target) - let ns = remove(target, 0) - if !has_key(dict, ns) - let dict[ns] = {} - endif - if type(dict[ns]) == dict_type - let dict = dict[ns] - else - unlet dict - break - endif - endwhile - if exists('dict') - call extend(dict, self._import(name)) - endif - unlet arg - endfor - return self -endfunction -let s:Vital.load = s:_function('s:load') - -function! s:unload() abort dict - let s:loaded = {} - let s:cache_sid = {} - unlet! s:vital_files -endfunction -let s:Vital.unload = s:_function('s:unload') - -function! s:exists(name) abort dict - let b = exists(printf('*vital#_%s#%s#import', self.plugin_name, substitute(a:name, '\.', '#', 'g'))) - if b - return b - endif - let name_path = substitute(a:name, '\.', '/', 'g') - let path = printf('%s/_%s/%s.vim', s:vital_base_dir, self.plugin_name, name_path) - let b = filereadable(path) - if b - return b - endif - let path = printf('%s/_%s/%s.vim', s:vital_base_dir, '_latest__', name_path) - let b = filereadable(path) -endfunction -let s:Vital.exists = s:_function('s:exists') - -function! s:search(pattern) abort dict - let paths = s:_extract_files(a:pattern, self.vital_files()) - let modules = sort(map(paths, 's:_file2module(v:val)')) - return s:_uniq(modules) -endfunction -let s:Vital.search = s:_function('s:search') - -function! s:_self_vital_files() abort - let builtin = printf('%s/__%s__/', s:vital_base_dir, s:plugin_name) - let installed = printf('%s/_%s/', s:vital_base_dir, s:plugin_name) - let base = builtin . ',' . installed - return split(globpath(base, '**/*.vim', 1), "\n") -endfunction - -function! s:_global_vital_files() abort - let pattern = 'autoload/vital/__latest__/**/*.vim' - return split(globpath(&runtimepath, pattern, 1), "\n") -endfunction - -function! s:_extract_files(pattern, files) abort - let tr = {'.': '/', '*': '[^/]*', '**': '.*'} - let target = substitute(a:pattern, '\.\|\*\*\?', '\=tr[submatch(0)]', 'g') - let regexp = printf('autoload/vital/[^/]\+/%s.vim$', target) - return filter(a:files, 'v:val =~# regexp') -endfunction - -function! s:_file2module(file) abort - let filename = fnamemodify(a:file, ':p:gs?[\\/]?/?') - let tail = matchstr(filename, 'autoload/vital/_\w\+/\zs.*\ze\.vim$') - return join(split(tail, '[\\/]\+'), '.') -endfunction - -" @param {string} name e.g. Data.List -function! s:_import(name) abort dict - if has_key(s:loaded, a:name) - return copy(s:loaded[a:name]) - endif - let module = self._get_module(a:name) - if has_key(module, '_vital_created') - call module._vital_created(module) - endif - let export_module = filter(copy(module), 'v:key =~# "^\\a"') - " Cache module before calling module.vital_loaded() to avoid cyclic - " dependences but remove the cache if module._vital_loaded() fails. - " let s:loaded[a:name] = export_module - let s:loaded[a:name] = export_module - if has_key(module, '_vital_loaded') - try - call module._vital_loaded(vital#{s:plugin_name}#of()) - catch - unlet s:loaded[a:name] - throw 'vital: fail to call ._vital_loaded(): ' . v:exception - endtry - endif - return copy(s:loaded[a:name]) -endfunction -let s:Vital._import = s:_function('s:_import') - -" s:_get_module() returns module object wihch has all script local functions. -function! s:_get_module(name) abort dict - try - let module = vital#_{self.plugin_name}#{substitute(a:name, '\.', '#', 'g')}#import() - catch /E117: Unknown function:/ - if !s:has_latest_module - throw 'vital: module not found: ' . a:name - endif - " Retry to support loading self modules. - let module = s:_get_latest_module(a:name) - endtry - return module -endfunction -let s:Vital._get_module = s:_function('s:_get_module') - -function! s:_get_latest_module(name) abort - return s:sid2sfuncs(s:_module_sid(a:name)) -endfunction - -function! s:_module_sid(name) abort - let module_path = substitute(a:name, '\.', '/', 'g') . '.vim' - let module_rel_path = 'autoload/vital/__*__/' . module_path - let module_full_path = s:_unify_path(get(split(globpath(s:_module_sid_base_dir(), module_rel_path, 1), "\n"), 0, '')) - if !filereadable(module_full_path) - throw 'vital: module not found: ' . a:name - endif - let p = substitute('autoload/vital/__\w\+__/' . module_path, '/', '[/\\\\]\\+', 'g') - let sid = s:_sid(module_full_path, p) - if !sid - call s:_source(module_full_path) - let sid = s:_sid(module_full_path, p) - if !sid - throw 'vital: cannot get from path' - endif - endif - return sid -endfunction - -function! s:_module_sid_base_dir() abort - return s:is_vital_vim ? &rtp : s:project_root -endfunction - -function! s:_source(path) abort - execute 'source' fnameescape(a:path) -endfunction - -" @vimlint(EVL102, 1, l:_) -" @vimlint(EVL102, 1, l:__) -function! s:_sid(fullpath, filter_pattern) abort - if has_key(s:cache_sid, a:fullpath) - return s:cache_sid[a:fullpath] - endif - for line in filter(split(s:_redir(':scriptnames'), "\n"), 'v:val =~# a:filter_pattern') - let [_, sid, path; __] = matchlist(line, '^\s*\(\d\+\):\s\+\(.\+\)\s*$') - if s:_unify_path(path) is# a:fullpath - let s:cache_sid[a:fullpath] = sid - return s:cache_sid[a:fullpath] - endif - endfor - return 0 -endfunction - -function! s:_redir(cmd) abort - let [save_verbose, save_verbosefile] = [&verbose, &verbosefile] - set verbose=0 verbosefile= - redir => res - silent! execute a:cmd - redir END - let [&verbose, &verbosefile] = [save_verbose, save_verbosefile] - return res -endfunction - -if filereadable(expand(':r') . '.VIM') - let s:_unify_path_cache = {} - " resolve() is slow, so we cache results. - " Note: On windows, vim can't expand path names from 8.3 formats. - " So if getting full path via and $HOME was set as 8.3 format, - " vital load duplicated scripts. Below's :~ avoid this issue. - function! s:_unify_path(path) abort - if has_key(s:_unify_path_cache, a:path) - return s:_unify_path_cache[a:path] - endif - let value = tolower(fnamemodify(resolve(fnamemodify( - \ a:path, ':p')), ':~:gs?[\\/]?/?')) - let s:_unify_path_cache[a:path] = value - return value - endfunction -else - function! s:_unify_path(path) abort - return resolve(fnamemodify(a:path, ':p:gs?[\\/]?/?')) - endfunction -endif - -" copied and modified from Vim.ScriptLocal -let s:SNR = join(map(range(len("\")), '"[\\x" . printf("%0x", char2nr("\"[v:val])) . "]"'), '') -function! s:sid2sfuncs(sid) abort - let fs = split(s:_redir(printf(':function /^%s%s_', s:SNR, a:sid)), "\n") - let r = {} - let pattern = printf('\m^function\s%d_\zs\w\{-}\ze(', a:sid) - for fname in map(fs, 'matchstr(v:val, pattern)') - let r[fname] = function(s:_sfuncname(a:sid, fname)) - endfor - return r -endfunction - -"" Return funcname of script local functions with SID -function! s:_sfuncname(sid, funcname) abort - return printf('%s_%s', a:sid, a:funcname) -endfunction - -if exists('*uniq') - function! s:_uniq(list) abort - return uniq(a:list) - endfunction -else - function! s:_uniq(list) abort - let i = len(a:list) - 1 - while 0 < i - if a:list[i] ==# a:list[i - 1] - call remove(a:list, i) - endif - let i -= 1 - endwhile - return a:list - endfunction -endif === added file 'vim/bundle/unite.vim/autoload/vital/unite.vim.vital' --- vim/bundle/unite.vim/autoload/vital/unite.vim.vital 1970-01-01 00:00:00 +0000 +++ vim/bundle/unite.vim/autoload/vital/unite.vim.vital 2015-08-25 11:01:00 +0000 @@ -0,0 +1,10 @@ +unite +bb1d9cb + +Prelude +Data.List +System.Cache +Data.String +Vim.Message +Process +System.File === modified file 'vim/bundle/unite.vim/autoload/vital/unite.vital' --- vim/bundle/unite.vim/autoload/vital/unite.vital 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/autoload/vital/unite.vital 2015-08-25 11:01:00 +0000 @@ -1,9 +1,9 @@ unite -1a385f58a58571e4cb6309831ad4d7260180bc71 +bb1d9cb Prelude Data.List -System.Cache.Deprecated +System.Cache Data.String Vim.Message Process === modified file 'vim/bundle/unite.vim/doc/unite.txt' --- vim/bundle/unite.vim/doc/unite.txt 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/doc/unite.txt 2015-08-25 11:01:00 +0000 @@ -1,7 +1,7 @@ *unite.txt* Unite and create user interfaces. -Version: 6.3 -Author: Shougo +Version: 6.2 +Author : Shougo Documentation Author: ujihisa License: MIT license {{{ Permission is hereby granted, free of charge, to any person obtaining @@ -103,7 +103,7 @@ Enter will trigger the default action, which in the case of "file" is open, however alternate actions can be defined. These alternative actions can be -invoked with . See also |unite-actions| to read on about different +invoked with . See also |unite-action| to read on about different actions. You can also narrow down the list of candidates with a keyword. By entering @@ -123,8 +123,8 @@ < This example would match bar/foo or buzz/bar/foo. -Note: The unite action |unite-source-file_rec| (read: file recursive) does a -recursive file search by default without the need to set wildcards. +Note: The unite action |file_rec| (read: file recursive) does a recursive +file search by default without the need to set wildcards. Multiple keywords can be used to narrow down the candidates. They are separated by either a space " " or a pipe "|", and act like a logical AND. @@ -196,6 +196,12 @@ > nnoremap r :Unite -start-insert file_rec/async:! < +Search through yank history. First, this must be enabled to track yank +history, then the mapping set. +> + let g:unite_source_history_yank_enable = 1 + nnoremap y :Unite history/yank +< Since you can pass in multiple sources into unite you can easily create a mapping that will open up a unite pane with the sources you frequently use. To see buffers, recent files then bookmarks: @@ -260,6 +266,8 @@ nmap x (unite_quick_match_jump) nmap (unite_toggle_transpose_window) imap (unite_toggle_transpose_window) + imap (unite_narrowing_path) + nmap (unite_narrowing_path) nmap (unite_toggle_auto_preview) nmap (unite_narrowing_input_history) imap (unite_narrowing_input_history) @@ -274,8 +282,8 @@ endif nnoremap cd unite#do_action('lcd') - nnoremap S unite#mappings#set_current_sorters( - \ empty(unite#mappings#get_current_sorters()) ? + nnoremap S unite#mappings#set_current_filters( + \ empty(unite#mappings#get_current_filters()) ? \ ['sorter_reverse'] : []) " Runs "split" action by . @@ -289,11 +297,11 @@ COMMANDS *unite-commands* :Unite [{options}] {sources} *:Unite* - Unite can be invoked with one or more sources. This can be - done by specifying the list on the command line, separated by - spaces. The list of candidates (the matches found in the - source by your filter string) will be ordered in the same - order that you specify the {sources}. + Unite can be invoked with one or more sources. This can be done + by specifying the list on the command line, separated by + spaces. The list of candidates (the matches found in the source + by your filter string) will be ordered in the same order that + you specify the {sources}. If {sources} are empty, you can input source name and args manually. @@ -304,15 +312,15 @@ Will first list the files, then list the buffers. - See also |unite-sources| the available sources. + See also |unite-source| the available sources. In case you are already in a unite buffer, the narrowing text is stored. Unite can accept a list of strings, separated with ":", after the name of sources. You must escape ":" and "\" with "\" - in parameters themselves. "::" is an abbreviation argument. - It depends on the sources how the parameters are interpreted. + in parameters themselves. "::" is an abbreviation argument. It + depends on the sources how the parameters are interpreted. Examples: "file:foo:bar": the parameters of source file are @@ -383,58 +391,6 @@ buffer with {buffer-name}. You can use it like |:clast|. -:UniteDo {command} *:UniteDo* - Executes a {command} for each candidate's default action. - You can use it like |:argdo|. - - Example: - - Concider a JavaScript file with the code below. -> - /* jshint unused: true */ - var variable = 1; - function foo () { - console.log('Hello foo!') - } - function bar () { - console.log('Good bye bar!') - } -< - Apply JsHint (http://jshint.com/) linting tool to the - example. -> - test.js: line 6, col 30, Missing semicolon. - test.js: line 10, col 33, Missing semicolon. - test.js: line 3, col 5, 'variable' is defined but never used. - test.js: line 5, col 10, 'foo' is defined but never used. - test.js: line 9, col 10, 'bar' is defined but never used. -< - Syntastic (https://github.com/scrooloose/syntastic) can - use JsHint to populate the location list with those warnings. - So, use the quick fix external source to populate a Unite - buffer with those issues. -> - :Unite location_list -< - Use "semicolon" as narrowing text so there is only one type of - error. -> - test.js: line 6, col 30, Missing semicolon. - test.js: line 10, col 33, Missing semicolon. -< - Then, use UniteDo to apply a fix to these lines using a single - command. -> - :UniteDo normal! A; -< - Limitations: If the candidates are lines in a file, UniteDo - assumes that either: - - {command} doesn't change the number of lines; or - - candidates are sorted in ascending order by line. - - UniteDo might have unexpected behaviour if none of the - two conditions above are met. - The commands of source *:unite-sources-commands* :UniteBookmarkAdd [{file}] *:UniteBookmarkAdd* @@ -482,8 +438,8 @@ g:unite_no_default_keymappings *g:unite_no_default_keymappings* If this variable is 1, unite doesn't set any default key - mappings. Not recommended. You shouldn't set this to 1 - unless you have a specific reason. + mappings. Not recommended. You shouldn't set this to 1 unless + you have a specific reason. This variable doesn't exist unless you define it explicitly. @@ -500,13 +456,6 @@ The default value is 1. - *g:unite_restore_alternate_file* -g:unite_restore_alternate_file - Option to restore alternate file after open action. The - unite buffer does not become the alternate file by default. - - Default value is 1. - SOURCES VARIABLES *unite-sources-variables* *g:unite_source_buffer_time_format* @@ -575,7 +524,6 @@ Because, "find" command is fastest. Note: In windows environment, you must install file list command and specify the variable. - Note: "cmd.exe" is not supported. *g:unite_source_rec_find_args* g:unite_source_rec_find_args @@ -657,8 +605,8 @@ g:unite_source_alias_aliases *g:unite_source_alias_aliases* Set |unite-source-alias| settings. This variable is a dictionary. The key is an alias source name, and - the value is a dictionary with the following attributes. - Alias sources are copies of original sources. + the value is a dictionary with the following attributes. Alias + sources are copies of original sources. If the value items are a string, they will be used as the base source name. @@ -690,14 +638,7 @@ candidates (List or Dictionary) (Required) Menu candidates. If candidates type is a dictionary, keys are - ignored, but you can refer to the map attribute described - below. - - file_candidates - (List) (Optional) - Menu candidates for files. - The first item is used for word. The second item is file - path. + ignored, but you can refer to the map attribute described below. command_candidates (List or Dictionary) (Optional) @@ -745,20 +686,46 @@ \ ['python', 'VimShellInteractive python'], \ ] - let g:unite_source_menu_menus.zsh = { - \ 'description' : 'zsh files', - \ } - let g:unite_source_menu_menus.zsh.file_candidates = [ - \ ['zshenv' , '~/.zshenv'], - \ ['zshrc' , '~/.zshrc'], - \ ['zplug' , '~/.zplug'], - \ ] - nnoremap sm :Unite menu:test < The default value is "{}". - *g:unite_source_process_enable_confirm* + *g:unite_source_history_yank_enable* +g:unite_source_history_yank_enable + If defined and not 0, unite enables + |unite-source-history/yank|. + + Note: This value has to be set in .vimrc. + + This variable is not defined by default. + + *g:unite_source_history_yank_limit* +g:unite_source_history_yank_limit + The maximum number of |unite-source-history/yank| to save. + + The default value is 100. + + *g:unite_source_history_yank_file* +g:unite_source_history_yank_file + Specify the file to write the information of yank history. + If this variable is empty, saving history is disabled. + + + The default value is |g:unite_data_directory|; '/history_yank' + If you want to use another value than what's defined in + |g:unite_data_directory| you have to specify the full path. + + Example: +> + let g:unite_source_history_yank_file=$HOME.'/.vim/yankring.txt' + + *g:unite_source_history_save_clipboard* +g:unite_source_history_yank_save_clipboard + If defined and not 0, unite saves the clipboard register value. + + The default value is 0. + + *g:unite_source_process_enable_confirm* g:unite_source_process_enable_confirm When this variable is 1 and a signal is sent to a process via |unite-source-process| such as KILL, Vim will ask you if you @@ -766,11 +733,6 @@ The default value is 1. - *g:unite_source_output_shellcmd_colors* -g:unite_source_output_shellcmd_colors - A list of colors correspond to coloring in escape sequence. - 0-8 as normal colors, 9-15 as highlight colors. - KIND VARIABLES *unite-kind-variables* *g:unite_kind_jump_list_after_jump_scroll* @@ -788,7 +750,7 @@ The default value is 25. - *g:unite_kind_file_preview_max_filesize* + *g:unite_kind_file_preview_max_filesize* g:unite_kind_file_preview_max_filesize It is max file size of preview action in file kind. @@ -836,8 +798,8 @@ DEPRECATED VARIABLES *unite-deprecated-variables* g:unite_update_time *g:unite_update_time* - The time interval for updating the candidate list as the - filter text it typed in Msec. + The time interval for updating the candidate list as the filter + text it typed in Msec. If it is 0, this feature is disabled. Note: This variable is deprecated. Please use |unite#custom#profile()| and |unite-options-update-time| @@ -866,8 +828,7 @@ The height of unite window when split horizontally. Ignored when splitting vertically. Note: This variable is deprecated. Please use - |unite#custom#profile()| and |unite-options-winheight| - instead. + |unite#custom#profile()| and |unite-options-winheight| instead. g:unite_winwidth *g:unite_winwidth* The width of unite window when split vertically. Ignored @@ -927,13 +888,13 @@ (unite_do_default_action) *(unite_do_default_action)* Runs the default action of the default candidates. The kinds of each candidates have their own defined actions. See also - |unite-kinds| about kinds. Refer to |unite-default-action| - about default actions. + |unite-kind| about kinds. Refer to |unite-default-action| about + default actions. (unite_choose_action) *(unite_choose_action)* Runs the default action of the selected candidates. The kinds of each candidates have their own defined actions. Refer - to |unite-kinds| about kinds. + to |unite-kind| about kinds. (unite_insert_enter) *(unite_insert_enter)* Starts inputting narrowing text from the cursor position. In @@ -963,7 +924,7 @@ marking multiple candidates. (unite_toggle_mark_current_candidate_up) - *(unite_toggle_mark_current_candidate_up)* + *(unite_toggle_mark_current_candidate_up)* Toggles the mark of the candidates in the current line and moves the cursor up. @@ -1111,11 +1072,11 @@ (unite_do_default_action) *i_(unite_do_default_action)* The same as |(unite_do_default_action)|. - *i_(unite_toggle_mark_current_candidate)* + *i_(unite_toggle_mark_current_candidate)* (unite_toggle_mark_current_candidate) The same as |(unite_toggle_mark_current_candidate)|. - *i_(unite_toggle_mark_current_candidate_up)* + *i_(unite_toggle_mark_current_candidate_up)* (unite_toggle_mark_current_candidate_up) The same as |(unite_toggle_mark_current_candidate_up)|. (unite_choose_action) *i_(unite_choose_action)* @@ -1145,6 +1106,9 @@ (unite_toggle_selected_candidates) The same as |(unite_toggle_transpose_window)|. +(unite_narrowing_path) *i_(unite_narrowing_path)* + The same as |(unite_narrowing_path)|. + *i_(unite_narrowing_input_history)* (unite_narrowing_input_history) The same as |(unite_narrowing_input_history)|. @@ -1165,7 +1129,7 @@ (unite_print_message_log) *i_(unite_print_message_log)* The same as |(unite_print_message_log)|. -(unite_new_candidate) *i_(unite_new_candidate)* +(unite_new_candidate) *i_(unite_new_candidate)* The same as |(unite_new_candidate)|. (unite_complete) *i_(unite_complete)* @@ -1268,7 +1232,7 @@ Visual mode mappings. {lhs} {rhs} -------- ----------------------------- - |v_(unite_toggle_selected_candidates)| + |v_(unite_toggle_mark_selected_candidates)| ------------------------------------------------------------------------------ FUNCTIONS *unite-functions* @@ -1286,15 +1250,15 @@ unite#get_sources([{source-name}]) *unite#get_sources()* Gets the loaded source of {source-name}. Unless they exist, this returns an empty dictionary. This returns a dictionary - of keys that are source names and the values are the sources - when you skip giving {source-name}. If you give {source-name} - as a dictionary, unite.vim use this source temporary. + of keys that are source names and the values are the sources when + you skip giving {source-name}. If you give {source-name} as + a dictionary, unite.vim use this source temporary. Note: Changing the return value is not allowed. unite#get_unite_winnr({buffer-name}) *unite#get_unite_winnr()* - Returns the unite window number which has {buffer-name}. If - the window is not found, it will return -1. + Returns the unite window number which has {buffer-name}. If the + window is not found, it will return -1. unite#redraw([{winnr}]) *unite#redraw()* Redraw {winnr} unite window. If you omit {winnr}, current @@ -1307,8 +1271,8 @@ CUSTOMS *unite-functions-customs* unite#start({sources}, [, {context}]) *unite#start()* - Creates a new Unite buffer. In the case when you are already - on a Unite buffer, the narrowing text is preserved. + Creates a new Unite buffer. In the case when you are already on a + Unite buffer, the narrowing text is preserved. {sources} is a list of elements which are formatted as {source-name} or [{source-name}, {args}, ...]. You may @@ -1364,25 +1328,23 @@ This is usually used as inoremap or nnoremap . For example, > - nnoremap - \ unite#do_action('preview') + nnoremap unite#do_action('preview') > unite#smart_map({narrow-map}, {select-map}) *unite#smart_map()* - Returns the key sequence which works with both modes of - narrowing and selecting with respect to the given narrow-map - and select-map. Use this with |unite#do_action()|. This will - be used with inoremap or nnoremap - usually. + Returns the key sequence which works with both modes of narrowing + and selecting with respect to the given narrow-map and + select-map. Use this with |unite#do_action()|. This will be + used with inoremap or nnoremap + usually. Example: > - inoremap ' - \ unite#smart_map("'", unite#do_action('preview')) + inoremap ' unite#smart_map("'", unite#do_action('preview')) < unite#get_status_string() *unite#get_status_string()* Returns unite status string. It is useful to customize the statusline. - *unite#mappings#set_current_matchers()* + *unite#mappings#set_current_matchers()* unite#mappings#set_current_matchers({matchers}) Changes current unite buffer matchers. Example: @@ -1397,7 +1359,7 @@ Example: > nnoremap S unite#mappings#set_current_sorters( - \ empty(unite#mappings#get_current_sorters()) ? + \ empty(unite#mappings#get_current_matchers()) ? \ ['sorter_reverse'] : []) < *unite#mappings#set_current_converters()* @@ -1427,11 +1389,11 @@ Specify substitute patterns. The keys are "pattern", "subst" and "priority". "pattern" is the replace target regexp and "subst" is the - substitute string. If you specify the same "pattern" again, - then the setting is just updated. You may remove "pattern" by - giving "" to "subst". "priority" prioritizes how this - replaces. If you skipped giving "priority" it is 0. Give a - bigger number for a "pattern" which must be done earlier. + substitute string. If you specify the same "pattern" again, then + the setting is just updated. You may remove "pattern" by giving + "" to "subst". "priority" prioritizes how this replaces. If + you skipped giving "priority" it is 0. Give a bigger number for + a "pattern" which must be done earlier. Note: The initial text of Unite buffers is not replaced with these values. @@ -1534,8 +1496,7 @@ you can define a source-specific profile. > " Do not use log. - call unite#custom#profile('script/neobundle/update', - \ 'context', { + call unite#custom#profile('script/neobundle/update', 'context', { \ 'log' : 0 \ }) < @@ -1568,7 +1529,7 @@ call unite#take_action('tabopen', a:candidates) let dir = isdirectory(a:candidate.word) ? - \ a:candidate.word : fnamemodify(a:candidate.word, ':p:h') + \ a:candidate.word : fnamemodify(a:candidate.word, ':p:h') execute g:unite_kind_openable_lcd_command fnameescape(dir) endfunction call unite#custom#action('file,buffer', 'tabopen', my_tabopen) @@ -1649,7 +1610,7 @@ If it is empty string, the source syntax feature is disabled. Example: > call unite#custom#source('output', 'syntax', '') -< + *unite#take_action()* unite#take_action({action-name}, {candidate}) Runs an action {action-name} against {candidate}. This will @@ -1659,9 +1620,9 @@ *unite#take_parents_action()* unite#take_parents_action({action-name}, {candidate}, {extend-candidate}) - Similar to |unite#take_action()|, but searches the parents' - action table by combining {extend-candidate} with {candidate}. - This is handy for reusing parents' actions. + Similar to |unite#take_action()|, but searches the parents' action + table by combining {extend-candidate} with {candidate}. This + is handy for reusing parents' actions. unite#define_source({source}) *unite#define_source()* Adds {source} dynamically. See also |unite-create-source| @@ -1705,7 +1666,7 @@ |unite-filter-sorter_default| into {sorters}. {sorters} must be specified with a list of sorter names. - *unite#filters#converter_default#use()* + *unite#filters#converter_default#use()* unite#filters#converter_default#use({converters}) Changes the default converter used by |unite-filter-converter_default| into {converters}. @@ -1795,20 +1756,13 @@ Note: It is old prompt behavior. Default: no-prompt-visible - *unite-options-prompt-focus* - -prompt-focus - Move to prompt if unite enters insert mode. - Note: It is old prompt behavior. - Default: no-prompt-focus - - *unite-options-prompt-direction* + *unite-options-prompt-direction* -prompt-direction="top" or "below" Specify the prompt direction. Note: If it is "below", |unite-options-auto-resize| is used automatically. To disable it, you must set "-no-auto-resize" option. - Default: "below" (if |unite-options-direction| contains - "below") + Default: "below" (if |unite-options-direction| contains "below") *unite-options-candidate-icon* -candidate-icon={icon-text} @@ -1828,7 +1782,7 @@ *unite-options-default-action* -default-action={default-action} Specify a default action. - Default: "default" + Default: 'default' *unite-options-start-insert* -start-insert @@ -2000,8 +1954,8 @@ *unite-options-multi-line* -multi-line - Force use multi line. If candidate abbr is too long, - unite.vim will fold automatically. + Force use multi line. If candidate abbr is too long, unite.vim + will fold automatically. Default: no-multi-line *unite-options-resume* @@ -2058,7 +2012,7 @@ Unique candidates by word attribute. Default: no-unique - *unite-options-cursor-line-time* + *unite-options-cursor-line-time* -cursor-line-time={icon-text} Specify the cursor line highlight time. If you scroll cursor quickly less than it, unite will skip @@ -2088,12 +2042,12 @@ Don't restore the cursor in unite buffer. Default: restore - *unite-options-vertical-preview* + *unite-options-vertical-preview* -vertical-preview If it is on, Unite will open the preview window - (when executing the file preview action) vertically rather - than horizontally. It will take up half the width of the - current Unite buffer. + (when executing the file preview action) vertically rather than + horizontally. It will take up half the width of the current + Unite buffer. Default: no-vertical-preview *unite-options-force-redraw* @@ -2117,12 +2071,6 @@ Enable input keyword match highlight. Default: match-input - *unite-options-file-quit* - -file-quit - Jump to file buffer after firing an action. - - Default: no-file-quit - ============================================================================== SOURCES *unite-sources* @@ -2168,26 +2116,22 @@ -custom-grep-search-word-highlight : search word highlight *unite-source-file_rec/async* -file_rec/async Similar to |unite-source-file_rec|, but get files - asynchronously with |g:unite_source_rec_async_command|. +file_rec/async Similar to |unite-source-file_rec|, but get files asynchronously. Note: Requires |vimproc|. Note: Requires the "ag" or "find" command. Note: Windows "find" command is not supported. Note: If you edit one of the files in Vim, the source will update its cache. - Note: In windows environment, you must define - |g:unite_source_rec_async_command| variable. - Note: It is really slow in Windows. - "gtags/path" source is recommended. - https://github.com/hewes/unite-gtags + Note: If there are more than + |g:unite_source_file_rec_max_cache_files| candidates, + caching will be disabled. Source arguments: 1. the target directories splitted by newlines. *unite-source-file_rec/neovim* file_rec/neovim Similar to |unite-source-file_rec|, but get files - asynchronously by neovim job APIs with - |g:unite_source_rec_async_command|. + asynchronously by neovim job APIs. Note: Requires neovim and the "find" command. Note: Windows "find" command is not supported. Note: If you edit one of the files in Vim, the source will @@ -2235,10 +2179,9 @@ If argument 1 is "?", non-listed buffers are displayed. If argument 1 is "+", only modified buffers are displayed. If argument 1 is "-", only file buffers are displayed. - If argument 1 is "t", only terminal buffers are displayed. Source arguments: - 1. "!", "?", "+", "-", or "t" + 1. "!", "?", "+" or "-". *unite-source-buffer_tab* buffer_tab Nominates opened buffers only in the current tab as @@ -2269,13 +2212,6 @@ *unite-source-register* register Nominates the strings stored in registers as candidates. - Source arguments: - 1. register names - - Example: > - nnoremap ,ur :Unite - \ register:abcdef -< *unite-source-bookmark* bookmark Nominates files or directories you bookmarked as candidates. If source arguments are omitted, "default" bookmark file name @@ -2313,7 +2249,7 @@ Note: "wmctrl" command is needed. For Linux only. *unite-source-output* -output Nominates executed Vim command output as candidates. +output Nominates executed Vim command as candidates. Source arguments: 1. Vim command. @@ -2328,25 +2264,15 @@ " It outputs "foo bar" by dummy. :Unite output:echo:"foo:bar":! < - *unite-source-output/shellcmd* -output/shellcmd - Nominates executed shell command output as candidates. - - Source arguments: - 1. Shell command. - 2. command args (but you cannot use "!" by itself) - - If the last argument is "!", it prints by dummy candidates. - This behavior is useful for output message. -> - " It outputs "ls" output. - :Unite -log -wrap output/shellcmd:ls -< *unite-source-command* command Nominates Vim Ex commands as candidates. + Note: To gather Vim internal commands, unite.vim uses + |neocomplcache| functions. *unite-source-function* function Nominates functions as candidates. + Note: To gather Vim internal functions, unite.vim uses + |neocomplcache| functions. *unite-source-mapping* mapping Nominates Vim mappings as candidates. @@ -2364,9 +2290,9 @@ Source arguments: 1. the target directories splitted by newlines. 2. "grep" options. - 3. the narrowing pattern (if you omit it, - |unite-options-input| or input prompt is used). - Max candidates: 100 + 3. the narrowing pattern (if you omit it, |unite-options-input| + or input prompt is used). + Max candidates: |g:unite_source_grep_max_candidates| Special Target: % : Current buffer name @@ -2385,72 +2311,37 @@ < Settings Example: > - if executable('hw') - " Use hw (highway) - " https://github.com/tkengo/highway - let g:unite_source_grep_command = 'hw' - let g:unite_source_grep_default_opts = '--no-group --no-color' - let g:unite_source_grep_recursive_opt = '' - elseif executable('ag') - " Use ag (the silver searcher) - " https://github.com/ggreer/the_silver_searcher + let g:unite_source_grep_max_candidates = 200 + + if executable('ag') + " Use ag in unite grep source. let g:unite_source_grep_command = 'ag' let g:unite_source_grep_default_opts = \ '-i --vimgrep --hidden --ignore ' . \ '''.hg'' --ignore ''.svn'' --ignore ''.git'' --ignore ''.bzr''' let g:unite_source_grep_recursive_opt = '' elseif executable('pt') - " Use pt (the platinum searcher) + " Use pt in unite grep source. " https://github.com/monochromegane/the_platinum_searcher let g:unite_source_grep_command = 'pt' let g:unite_source_grep_default_opts = '--nogroup --nocolor' let g:unite_source_grep_recursive_opt = '' elseif executable('ack-grep') - " Use ack - " http://beyondgrep.com/ + " Use ack in unite grep source. let g:unite_source_grep_command = 'ack-grep' let g:unite_source_grep_default_opts = \ '-i --no-heading --no-color -k -H' let g:unite_source_grep_recursive_opt = '' elseif executable('jvgrep') - " Use jvgrep - " https://github.com/mattn/jvgrep + " For jvgrep. let g:unite_source_grep_command = 'jvgrep' let g:unite_source_grep_default_opts = \ '-i --exclude ''\.(git|svn|hg|bzr)''' let g:unite_source_grep_recursive_opt = '-R' endif < - *unite-source-grep-git* -grep/git Nominates "git grep" command output at the current - working directory as candidates. This source require to be - executed on a git repository. - - Note: This source requires |vimproc|. Please install. - http://github.com/Shougo/vimproc - - Source arguments: - 1. the target directories in the git repository splitted by - newlines. If the directory starts from "/", the "/" will - be substituted to the repository root path. - 2. "git grep" options. - 3. the narrowing pattern (if you omit it, - |unite-options-input| or input prompt is used). - Max candidates: 100 - - Special Target: - % : Current buffer name - # : Alternate buffer name - $buffers : All buffer names - / : Git repository root - - Example: -> - :Unite grep/git:/:--cached:file -< - *unite-source-vimgrep* -vimgrep Nominates |:vimgrep| command output as candidates. +vimgrep Nominates |vimgrep| command output as candidates. This source is slower than |unite-source-grep|, but it can recognize file encodings. Note: The source clears quickfix list. @@ -2471,6 +2362,7 @@ Source arguments: 1. the target directories splitted by newlines. 2. "find" options. + Max candidates: |g:unite_source_find_max_candidates| *unite-source-line* line Nominates current buffer lines as candidates. @@ -2481,11 +2373,11 @@ Max candidates: 100 Source arguments: 1. the search direction: - "all": Search from buffer top - "forward": Search from the current to the buffer top - "backward": Search from the current to the buffer bottom - "buffers": Search from all buffers - "args": Search from argument buffers + "all" : Search from buffer top + "forward" : Search from the current to the buffer top + "backward" : Search from the current to the buffer bottom + "buffers" : Search from all buffers + "args" : Search from argument buffers Note: If the direction is "all" or omitted, it searches from buffer top. 2. the wrap option. "wrap" or "nowrap". This is used when the @@ -2493,7 +2385,7 @@ 'wrapscan' option will be used. Source custom options: - -custom-line-enable-highlight: enable buffer highlight + -custom-line-enable-highlight : enable buffer highlight Example: > nnoremap / :Unite -buffer-name=search @@ -2534,6 +2426,14 @@ Source arguments: 1. menu name. + *unite-source-history/yank* +history/yank Nominates yanked words. + Note: Ignores yanked words which are too long. + To use this source, set + |g:unite_source_history_yank_enable| is 1. + Note: This source is disabled when + |g:unite_source_history_yank_enable| is 0 or not defined. + *unite-source-process* process Nominates processes. Note: This source is required "ps" command or "tasklist" @@ -2610,7 +2510,7 @@ action__path (String) (Required) The path of the target directory. - *unite-kind-file_vimfiler_base* + *unite-kind-file_vimfiler_base* file_vimfiler_base An interface for vimfiler file operations. Note: It doesn't extends "common" kind. @@ -2763,26 +2663,23 @@ FILTERS *unite-filters* *unite-filter-matcher_default* -matcher_default - The default matcher with ["matcher_context"] set initially. +matcher_default The default matcher used by |unite-filter-default| with + ["matcher_context"] set initially. This can be changed by calling |unite#filters#matcher_default#use()|. *unite-filter-matcher_glob* -matcher_glob - A matcher which filters the candidates with user given +matcher_glob A matcher which filters the candidates with user given glob pattern. This recognizes "*" as wild card and "!" as negative. Narrowing down can be done by word. *unite-filter-matcher_regexp* -matcher_regexp - A matcher which filters the candidates with user given +matcher_regexp A matcher which filters the candidates with user given regular expression. This recognizes "!" as negative. Narrowing down can be done by word. *unite-filter-matcher_fuzzy* -matcher_full_fuzzy - A matcher which filters the candidates with user given fuzzy +matcher_fuzzy A matcher which filters the candidates with user given fuzzy string. This recognizes "!" as negative. Narrowing down can be done by word. @@ -2802,8 +2699,7 @@ \ 'matchers', 'matcher_fuzzy') < *unite-filter-matcher_migemo* -matcher_migemo - For Japanese migemo filter. +matcher_migemo For Japanese migemo filter. > call unite#custom#source('line', 'matchers', 'matcher_migemo') < @@ -2822,8 +2718,7 @@ \ 'matcher_hide_current_file']) *unite-filter-matcher_context* -matcher_context - A matcher which filters the candidates with user given glob +matcher_context A matcher which filters the candidates with user given glob pattern or regexp pattern. In default, use glob pattern. If the pattern starts "^", will use regexp pattern (head match). Note: Created by hrsh7th. @@ -2845,31 +2740,26 @@ large projects. *unite-filter-sorter_default* -sorter_default - The default sorter ["sorter_nothing"] is set initially. +sorter_default The default sorter used by |unite-filter-default|. + ["sorter_nothing"] is set initially. This default sorter can be changed by calling |unite#filters#sorter_default#use()|. *unite-filter-sorter_nothing* -sorter_nothing - Nothing sorter. +sorter_nothing Nothing sorter. *unite-filter-sorter_word* -sorter_word - Compare word sorter. +sorter_word Compare word sorter. *unite-filter-sorter_length* -sorter_length - Compare length sorter. +sorter_length Compare length sorter. *unite-filter-sorter_ftime* -sorter_ftime - Compare |getftime()| sorter. +sorter_ftime Compare |getftime()| sorter. "action__path" or "action__directory" is need. *unite-filter-sorter_rank* -sorter_rank - Matched rank order sorter. The higher the matched word is or +sorter_rank Matched rank order sorter. The higher the matched word is or the longer the matched length is, the higher the rank is. This sorter is useful for file candidate source. Note: This sorter is slow. @@ -2877,24 +2767,23 @@ call unite#custom#source('buffer,file,file_rec', \ 'sorters', 'sorter_rank') < - *unite-filter-sorter_selecta* -sorter_selecta - Another matched rank order sorter. Uses the scoring algorithm + *unite-filter-sorter_selecta +sorter_selecta Another matched rank order sorter. Uses the scoring algorithm from selecta: https://github.com/garybernhardt/selecta. If the matched length is shorter, the rank is higher. This sorter is useful for file candidate source. - Note: This sorter requires |:python| support. + Note: This sorter requires |if_ruby| support. > call unite#custom#source('buffer,file,file_rec', \ 'sorters', 'sorter_selecta') < *unite-filter-sorter_reverse* -sorter_reverse - Reverse order sorter. +sorter_reverse Reverse order sorter. *unite-filter-converter_default* converter_default - The default converter ["converter_nothing"] is set initially. + The default converter used by |unite-filter-default|. + ["converter_nothing"] is set initially. This default converter can be changed by calling |unite#filters#converter_default#use()|. @@ -2922,14 +2811,6 @@ Specification of this term is similar to |unite-filter-converter_relative_word|. - *unite-filter-converter_abbr_word* -converter_abbr_word - A converter which converts a candidate's abbr into a word. - - *unite-filter-converter_word_abbr* -converter_word_abbr - A converter which converts a candidate's word into a abbr. - *unite-filter-converter_tail* converter_tail A converter which converts a candidate's word into the @@ -2940,7 +2821,7 @@ A converter which converts a candidate's abbr into the tail of the filename. - *unite-filter-converter_file_directory* + *unite-filter-converter_file_directory* converter_file_directory A converter which separates the file and directory. @@ -2954,11 +2835,6 @@ A converter which converts a candidate's word into the full path if you input full path. - *unite-filter-converter_uniq_word* -converter_uniq_word - A converter which converts a candidate's word into the - unique of the filenames. - ============================================================================== ACTIONS *unite-actions* @@ -2971,10 +2847,12 @@ yank Yank the candidate "word" or "action__text". yank_escape Yank the escaped candidate "word" or "action__text". ex Input the escaped candidate text into command line. - insert Insert the candidate word or text before the cursor. + insert Input the candidate word or text into the current + buffer. insert_directory - Insert the candidate directory before the cursor. - append Insert the candidate word or text after the cursor. + Input the candidate directory into the current buffer. + append Append the candidate word or text into the current + buffer. preview Preview the candidate text. echo Echo candidates for debug. @@ -3052,12 +2930,11 @@ dirdiff |:DirDiff| with the other candidate. (|DirDiff.vim| plugin is needed.) backup Simple backup files. - argadd Add to the argument list. buffer *unite-action-buffer* This kind extends |unite-action-file|. delete |:bdelete| the buffer. - fdelete |:bdelete|! the buffer. + fdelete |:bdelete!| the buffer. wipeout |:bwipeout| the buffer. unload |:bunload| the buffer. bookmark Add the candidate into your bookmark. @@ -3095,16 +2972,13 @@ command *unite-action-command* execute Execute the command. edit Input the command into the command line. - grep Grep the command. window *unite-action-window* -This kind extends actions of |unite-action-cdable| and -|unite-action-openable|. - jump Move to the window. +This kind extends actions of |unite-action-cdable|. + open Move to the window. delete Close the window. only Close all windows except the window. preview Preview the window. - open Open the window buffer. completion *unite-action-completion* insert Insert the candidate. @@ -3204,25 +3078,24 @@ This function is called once when the source in initialized, and again whenever the user invokes |(unite_redraw)| to reload the source. If the - source is registered as - |unite-source-attribute-is_volatile|, + source is registered as |unite-source-is_volatile|, gather_candidates() is called on _every_ change of the - input string. This function takes {args} and {context} - as parameters and returns a {candidate} list. {args} - is a list of parameters passed to source via the - |:Unite| command. {context} is the context information - when the source is called. + input string. This function takes {args} and {context} as + parameters and returns a {candidate} list. {args} is a + list of parameters passed to source via the |:Unite| + command. {context} is the context information when the + source is called. {args} and {context} default to "" if they are not provided, so gather_candidates() must handle that See also: |get()| |unite-notation-{context}| |unite-notation-{candidate}| - Unite caches the results of gather_candidates() until - the unite buffer is closed and is discarded (unless - you use |:UniteResume|). To cache persistently - regardless of the life of the unite buffer, a source - may implement logic to save the cache to disk. + Unite caches the results of gather_candidates() until the + unite buffer is closed and is discarded (unless you use + |:UniteResume|). To cache persistently regardless of + the life of the unite buffer, a source may implement + logic to save the cache to disk. *unite-source-attribute-change_candidates* change_candidates Function (Optional) @@ -3286,11 +3159,9 @@ Note: To get abbr head column, use: unite#get_current_unite().abbr_head Example: > - syntax match uniteSource__Buffer_Name - \ /[^/ \[\]]\+\s/ - \ contained containedin=uniteSource__Buffer - highlight default linkage - \ uniteSource__Buffer_Name Function + syntax match uniteSource__Buffer_Name /[^/ \[\]]\+\s/ + \ contained containedin=uniteSource__Buffer + highlight default link uniteSource__Buffer_Name Function < Note you must set "contained in" to the same syntax name as for |unite-source-attribute-syntax|. @@ -3371,7 +3242,7 @@ specification of alias table. If no key-value is set, this dictionary is left empty. - *unite-source-attribute-max_candidates* + *unite-source-attribute-max_candidates* max_candidates Number (Optional) The maximum number of candidates. Defaults to 0, which means no limit (infinity). @@ -3401,10 +3272,19 @@ If the source is internal, it must be set to 0. Defaults to 1. + *unite-source-attribute-is_grouped* +is_grouped Number (Optional) + Whether the source candidates are grouped. + Defaults to 0. + Grouped candidates must have "group" attribute; see + |unite-notation-{candidate}| + *unite-source-attribute-description* description String (Optional) User-friendly description of the source. Defaults to "". + Appears in the list shown by the |unite-source-source|: + |:Unite| source *unite-source-attribute-syntax* syntax String (Optional) @@ -3529,6 +3409,13 @@ overwritten by "command" action. You should use source default action instead of kind. + group (String) (Optional) + The candidate group name. + It is inserted in candidates automatically. + Note: Required and used when + |unite-source-attribute-is_grouped| is non + zero. + is_dummy (Number) (Optional) If the candidate is dummy. The default value is 0. @@ -3551,7 +3438,7 @@ Attributes added by actions. For example, "action__path" attribute is file path. If you learn standard action - attributes, please refer to |unite-kinds|. + attributes, please refer to |unite-kind|. ============================================================================== CREATE KIND *unite-create-kind* @@ -3586,8 +3473,8 @@ default_action String (Required) Specify default action name when executing |(unite_do_default_action)|. If this attribute - is omitted, an error occurs. However, this hack is - used only in parent actions. + is omitted, an error occurs. However, this hack is used + only in parent actions. *unite-kind-attribute-action_table* action_table Dictionary (Required) @@ -3654,8 +3541,8 @@ parents List (Optional) Specify parent list. If this attribute is omitted, ["common"] is used. - Unite searches actions from list tail (head actions - are overwritten). + Unite searches actions from list tail (head actions are + overwritten). Note: Unite searches actions from parent list recursively. You must check infinity loop. @@ -3672,7 +3559,7 @@ call unite#custom#action('source/file/*', 'delete', function('...')) < ------------------------------------------------------------------------------ -ACTION RESOLUTION ORDER *unite-action-resolution-order* +ACTION RESOLUTION ORDER *unite-action-resolution-order* For example, if you fire actions from kind "file" candidate gathered by source "file", unite searches actions using the order below. @@ -3711,7 +3598,7 @@ name String (Required) The filter name. - *unite-filter-attribute-filter* + *unite-filter-attribute-filter* filter Function (Required) This function is called after gathering candidates by unite. @@ -3725,7 +3612,7 @@ description String (Optional) The filter description string. - *unite-filter-attribute-pattern* + *unite-filter-attribute-pattern* pattern Function (Optional) Returns highlight pattern for input. Note: Only available for matchers. @@ -3733,44 +3620,23 @@ ============================================================================== EXTERNAL SOURCES *unite-external-sources* -history/yank source: -https://github.com/Shougo/neoyank.vim - -MRU sources: - -https://github.com/Shougo/neomru.vim - -tag source: +tag source : https://github.com/tsukkee/unite-tag -Quick Fix source: +Quick Fix source : https://github.com/osyo-manga/unite-quickfix -Outline source: +Outline source : https://github.com/Shougo/unite-outline (newer) https://github.com/h1mesuke/unite-outline (original) -Help source: +Help source : https://github.com/Shougo/unite-help (newer/vimproc required) -https://github.com/tsukkee/unite-help (original) > - - " Execute help. - nnoremap :Unite -start-insert help - " Execute help by cursor keyword. - nnoremap g :UniteWithCursorWord help - -BibBTex source: - -https://github.com/termoshtt/unite-bibtex (faster, configurable) -https://github.com/msprev/unite-bibtex - -Vim history sources: - -https://github.com/thinca/vim-unite-history +https://github.com/tsukkee/unite-help (original) And so on... @@ -3782,8 +3648,8 @@ Q: I want to delete files in unite buffer. -A: You can use the setting below; however, this setting is dangerous. You may -delete files by mistake. +A: You can use the setting below; however, this setting is dangerous. You may delete +files by mistake. > call unite#custom#alias('file', 'delete', 'vimfiler__delete') < @@ -3887,7 +3753,7 @@ Q: Unite adds unite buffer to jumplist automatically. https://github.com/Shougo/unite.vim/issues/278 -A: You can use |unite-options-wipe| option. But if it is used, you cannot use +A: You can use |unite-options-wipe| option. But it is used, you cannot use the |:UniteResume| feature. Q: unite.vim is too slow. @@ -3942,8 +3808,8 @@ call unite#custom#source('file_rec,file_rec/async', \ 'max_candidates', 0) -Also, you must clear previous cache in file_rec sources and wait until the -cache is completed. +Also, you must clear previous cache in file_rec sources and wait until the cache +is completed. In a directory including large file, making the cache is slow. Thus, I don't recommend it. To clear cache, you must execute |(unite_redraw)| in unite @@ -4025,36 +3891,5 @@ A: Please check |unite-source-grep| example. -Q: How can I specify source args split by newlines for grep or file_rec -sources? - -A: You can use eval arguments feature. -> - Unite grep:`=glob('/dir1/*.txt')."\n".glob('/dir2/*.txt')` -< -Q: Unite's cursor does not move to prompt line automatically. - -A: You can use |unite-options-prompt-focus| option for it. - -Q: I want to specify file pattern in grep source. - -A: You cannot. Because original grep does not support the feature. -But if you use "ag" command, you can use it like below. > - Unite grep::-G\ \\.txt$ - - -Q: I want to change "file_rec" source highlight. - -A: > - function! s:rec_on_syntax(args, context) - syntax match uniteSource__FileRecFileName /\[.\+\]/ contained - \ containedin=uniteSource__FileRec - highlight default link uniteSource__FileRecFileName Type - endfunction - call unite#custom#source('file_rec', 'syntax', - \ 'uniteSource__FileRec') - call unite#custom#source('file_rec', 'on_syntax', - \ function('s:rec_on_syntax')) -< ============================================================================== vim:tw=78:ts=8:ft=help:norl:noet:fen: === modified file 'vim/bundle/unite.vim/plugin/unite.vim' --- vim/bundle/unite.vim/plugin/unite.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/plugin/unite.vim 2015-08-25 11:01:00 +0000 @@ -66,19 +66,17 @@ \ UniteResume \ call s:call_unite_resume() -command! -nargs=? -bar -complete=customlist,unite#complete#buffer_name +command! -nargs=? -complete=customlist,unite#complete#buffer_name \ UniteClose call unite#view#_close() -command! -count=1 -bar -nargs=? -complete=customlist,unite#complete#buffer_name +command! -count=1 -nargs=? -complete=customlist,unite#complete#buffer_name \ UniteNext call unite#start#_pos(, 'next', expand('')) -command! -count=1 -bar -nargs=? -complete=customlist,unite#complete#buffer_name +command! -count=1 -nargs=? -complete=customlist,unite#complete#buffer_name \ UnitePrevious call unite#start#_pos(, 'previous', expand('')) -command! -nargs=? -bar -complete=customlist,unite#complete#buffer_name +command! -nargs=? -complete=customlist,unite#complete#buffer_name \ UniteFirst call unite#start#_pos(, 'first', 1) -command! -nargs=? -bar -complete=customlist,unite#complete#buffer_name +command! -nargs=? -complete=customlist,unite#complete#buffer_name \ UniteLast call unite#start#_pos(, 'last', 1) -command! -nargs=1 -complete=command - \ UniteDo call unite#start#_do_command() function! s:call_unite(command, args, line1, line2) abort "{{{ let [args, context] = unite#helper#parse_options_user(a:args) @@ -115,7 +113,7 @@ call unite#start(args, context) endfunction"}}} -function! s:call_unite_resume(args) abort "{{{ +function! s:call_unite_resume(args) "{{{ let [args, context] = unite#helper#parse_options(a:args) call unite#resume(join(args), context) === modified file 'vim/bundle/unite.vim/plugin/unite/bookmark.vim' --- vim/bundle/unite.vim/plugin/unite/bookmark.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/plugin/unite/bookmark.vim 2015-08-25 11:01:00 +0000 @@ -40,7 +40,7 @@ let s:file_bookmark_action = { \ 'description' : 'append files to bookmark list', \ } -function! s:file_bookmark_action.func(candidate) abort "{{{ +function! s:file_bookmark_action.func(candidate) "{{{ " Add to bookmark. call unite#sources#bookmark#_append(a:candidate.action__path) endfunction"}}} @@ -48,7 +48,7 @@ let s:buffer_bookmark_action = { \ 'description' : 'append buffers to bookmark list', \ } -function! s:buffer_bookmark_action.func(candidate) abort "{{{ +function! s:buffer_bookmark_action.func(candidate) "{{{ let filetype = getbufvar( \ a:candidate.action__buffer_nr, '&filetype') if filetype ==# 'vimfiler' === modified file 'vim/bundle/unite.vim/plugin/unite/buffer.vim' --- vim/bundle/unite.vim/plugin/unite/buffer.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/plugin/unite/buffer.vim 2015-08-25 11:01:00 +0000 @@ -38,7 +38,7 @@ let g:loaded_unite_source_buffer = 1 -function! s:append(path) abort "{{{ +function! s:append(path) "{{{ if bufnr('%') != expand('') return endif === added file 'vim/bundle/unite.vim/plugin/unite/history_yank.vim' --- vim/bundle/unite.vim/plugin/unite/history_yank.vim 1970-01-01 00:00:00 +0000 +++ vim/bundle/unite.vim/plugin/unite/history_yank.vim 2015-08-25 11:01:00 +0000 @@ -0,0 +1,56 @@ +"============================================================================= +" FILE: history_yank.vim +" AUTHOR: Shougo Matsushita +" License: MIT license {{{ +" Permission is hereby granted, free of charge, to any person obtaining +" a copy of this software and associated documentation files (the +" "Software"), to deal in the Software without restriction, including +" without limitation the rights to use, copy, modify, merge, publish, +" distribute, sublicense, and/or sell copies of the Software, and to +" permit persons to whom the Software is furnished to do so, subject to +" the following conditions: +" +" The above copyright notice and this permission notice shall be included +" in all copies or substantial portions of the Software. +" +" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +" IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +" }}} +"============================================================================= + +if exists('g:loaded_unite_source_history_yank') + \ || ($SUDO_USER != '' && $USER !=# $SUDO_USER + \ && $HOME !=# expand('~'.$USER) + \ && $HOME ==# expand('~'.$SUDO_USER)) + finish +endif + +let s:save_cpo = &cpo +set cpo&vim + +if exists('g:unite_source_history_yank_enable') + \ && g:unite_source_history_yank_enable + augroup plugin-unite-history-yank + autocmd! + autocmd CursorMoved,FocusGained * silent + \ call unite#sources#history_yank#_append() + augroup END + + if v:version > 703 || v:version == 703 && has('patch867') + autocmd plugin-unite-history-yank TextChanged * silent + \ call unite#sources#history_yank#_append() + endif +endif + +let g:loaded_unite_source_history_yank = 1 + +let &cpo = s:save_cpo +unlet s:save_cpo + +" __END__ +" vim: foldmethod=marker === modified file 'vim/bundle/unite.vim/plugin/unite/window.vim' --- vim/bundle/unite.vim/plugin/unite/window.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/plugin/unite/window.vim 2015-08-25 11:01:00 +0000 @@ -40,7 +40,7 @@ let g:loaded_unite_source_window = 1 -function! s:append() abort "{{{ +function! s:append() "{{{ if &filetype == 'unite' " Ignore unite window. return === removed file 'vim/bundle/unite.vim/test/converter.vim' --- vim/bundle/unite.vim/test/converter.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/test/converter.vim 1970-01-01 00:00:00 +0000 @@ -1,38 +0,0 @@ -let s:suite = themis#suite('parser') -let s:assert = themis#helper('assert') - -function! s:suite.common_string() abort - call s:assert.equals(unite#filters#common_string([]), '') - call s:assert.equals(unite#filters#common_string( - \ [ '/foo/bar' ]), '/foo/') - call s:assert.equals(unite#filters#common_string( - \ [ '/foo/bar', '/bar/bar' ]), '/') - call s:assert.equals(unite#filters#common_string( - \ [ '/foo/bar', '/foo/bar' ]), '/foo/') - call s:assert.equals(unite#filters#common_string( - \ [ '/bar', '/bar' ]), '/') - call s:assert.equals(unite#filters#common_string( - \ [ '/foo/baz/bar/', '/foo/bar/bar/' ]), '/foo/') -endfunction - -function! s:suite.uniq() abort - call s:assert.equals(unite#filters#uniq( - \ [ '/foo/bar' ]), ['bar']) - call s:assert.equals(unite#filters#uniq( - \ [ '/foo/bar', '/bar/bar' ]), ['/foo/bar', '/bar/bar']) - call s:assert.equals(unite#filters#uniq( - \ [ '/foo/baz/bar', '/foo/bar/bar' ]), - \ ['.../baz/bar', '.../bar/bar']) - call s:assert.equals(unite#filters#uniq( - \ [ '/Users/Pedro/OneDrive/queries.py', - \ '/Users/Pedro/Desktop/queries.py' ]), - \ ['.../OneDrive/queries.py', '.../Desktop/queries.py']) - call s:assert.equals(unite#filters#uniq( - \ [ '/foo/baz/bar/', '/foo/bar/bar/' ]), - \ ['.../baz/bar/', '.../bar/bar/']) - call s:assert.equals(unite#filters#uniq( - \ [ '/foo/bar/bar', '/foo/bar/bar' ]), - \ ['.../bar', '.../bar']) -endfunction - -" vim:foldmethod=marker:fen: === modified file 'vim/bundle/unite.vim/test/matcher.vim' --- vim/bundle/unite.vim/test/matcher.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/test/matcher.vim 2015-08-25 11:01:00 +0000 @@ -1,14 +1,14 @@ let s:suite = themis#suite('parser') let s:assert = themis#helper('assert') -function! s:suite.before_each() abort +function! s:suite.before_each() let g:fuzzy_save = 20 endfunction -function! s:suite.after_each() abort +function! s:suite.after_each() let g:unite_matcher_fuzzy_max_input_length = g:fuzzy_save endfunction -function! s:suite.lua() abort +function! s:suite.lua() if !has('lua') return endif @@ -16,41 +16,41 @@ let g:unite_matcher_fuzzy_max_input_length = 20 call s:assert.equals(unite#filters#lua_matcher( - \ [{'word' : 'foo'}], 'foo', 0), [{'word' : 'foo'}]) - call s:assert.equals(unite#filters#lua_matcher( - \ [{'word' : 'foo'}], 'bar', 0), []) - call s:assert.equals(unite#filters#lua_matcher( - \ [{'word' : 'Foo'}], 'foo', 0), []) - call s:assert.equals(unite#filters#lua_matcher( - \ [{'word' : 'Foo'}], 'foo', 1), [{'word' : 'Foo'}]) + \ [{'word' : 'foo'}], { 'input' : 'foo' }, 0), [{'word' : 'foo'}]) + call s:assert.equals(unite#filters#lua_matcher( + \ [{'word' : 'foo'}], { 'input' : 'bar' }, 0), []) + call s:assert.equals(unite#filters#lua_matcher( + \ [{'word' : 'Foo'}], { 'input' : 'foo'}, 0), []) + call s:assert.equals(unite#filters#lua_matcher( + \ [{'word' : 'Foo'}], { 'input' : 'foo'}, 1), [{'word' : 'Foo'}]) call s:assert.equals(unite#filters#lua_matcher( \ [{'word' : 'Foo'}, {'word' : 'Bar'}], - \ 'foo', 1), [{'word' : 'Foo'}]) + \ {'input' : 'foo'}, 1), [{'word' : 'Foo'}]) call s:assert.equals(unite#filters#lua_matcher( \ [{'word' : 'foo'}, {'word' : 'bar'}, \ {'word' : 'foobar'}, {'word' : 'baz'}], - \ 'foo', 0), [{'word' : 'foo'}, {'word' : 'foobar'}]) - call s:assert.equals(unite#filters#lua_fuzzy_matcher( - \ [{'word' : '/Users/core.cljs'}, {'word' : '/Users/core.js'}], - \ 'cl', 0), [{'word' : '/Users/core.cljs'}]) - call s:assert.equals(unite#filters#lua_fuzzy_matcher( - \ [{'word' : '/Users/core.cljs'}, {'word' : '/Users/core.js'}], - \ 'co', 0), - \ [{'word' : '/Users/core.cljs'}, {'word' : '/Users/core.js'}]) - call s:assert.equals(unite#filters#lua_fuzzy_matcher( - \ [{'word' : '/Users/core.cljs'}, {'word' : '/Users/core.js'}], - \ '/U', 0), - \ [{'word' : '/Users/core.cljs'}, {'word' : '/Users/core.js'}]) - call s:assert.equals(unite#filters#lua_fuzzy_matcher( - \ [{'word' : '/Users/core.cljs'}, {'word' : '/Users/core.js'}], - \ '/Us', 0), + \ {'input' : 'foo'}, 0), [{'word' : 'foo'}, {'word' : 'foobar'}]) + call s:assert.equals(unite#filters#lua_fuzzy_matcher( + \ [{'word' : '/Users/core.cljs'}, {'word' : '/Users/core.js'}], + \ { 'input' : 'cl' }, 0), [{'word' : '/Users/core.cljs'}]) + call s:assert.equals(unite#filters#lua_fuzzy_matcher( + \ [{'word' : '/Users/core.cljs'}, {'word' : '/Users/core.js'}], + \ { 'input' : 'co' }, 0), + \ [{'word' : '/Users/core.cljs'}, {'word' : '/Users/core.js'}]) + call s:assert.equals(unite#filters#lua_fuzzy_matcher( + \ [{'word' : '/Users/core.cljs'}, {'word' : '/Users/core.js'}], + \ { 'input' : '/U' }, 0), + \ [{'word' : '/Users/core.cljs'}, {'word' : '/Users/core.js'}]) + call s:assert.equals(unite#filters#lua_fuzzy_matcher( + \ [{'word' : '/Users/core.cljs'}, {'word' : '/Users/core.js'}], + \ { 'input' : '/Us' }, 0), \ [{'word' : '/Users/core.cljs'}, {'word' : '/Users/core.js'}]) call s:assert.equals(unite#filters#lua_fuzzy_matcher( \ [{'word' : '/unite/sources/find.vim'}], - \ '/u/s/f', 0), [{'word' : '/unite/sources/find.vim'}]) + \ { 'input' : '/u/s/f' }, 0), [{'word' : '/unite/sources/find.vim'}]) call s:assert.equals(unite#filters#lua_fuzzy_matcher( \ [{'word' : 'app/code/local/Tbuy/Utils/Block/LocalCurrency.php'}], - \ 'apcoltbuyutilsblockl', 1), + \ { 'input' : 'apcoltbuyutilsblockl' }, 1), \ [{'word' : 'app/code/local/Tbuy/Utils/Block/LocalCurrency.php'}]) call s:assert.equals(unite#filters#matcher_fuzzy#get_fuzzy_input( === modified file 'vim/bundle/unite.vim/test/sorter.vim' --- vim/bundle/unite.vim/test/sorter.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/test/sorter.vim 2015-08-25 11:01:00 +0000 @@ -1,7 +1,7 @@ let s:suite = themis#suite('parser') let s:assert = themis#helper('assert') -function! s:suite.sorter_rank() abort +function! s:suite.sorter_rank() if !has('lua') return endif @@ -9,23 +9,36 @@ for has_lua in range(2) call s:assert.equals(map(unite#filters#sorter_rank#_sort( \ [{'word' : 'g/vimrc.ln'}, {'word' : 'gvimrc.ln'}], - \ ['gvimr'], has_lua), 'v:val.word'), ['gvimrc.ln', 'g/vimrc.ln']) + \ 'gvimr', has_lua), 'v:val.word'), ['gvimrc.ln', 'g/vimrc.ln']) call s:assert.equals(map(unite#filters#sorter_rank#_sort( \ [{'word' : 'g/vimrc.ln'}, {'word' : 'gvimrc.ln'}], - \ ['gvimrc'], has_lua), 'v:val.word'), ['gvimrc.ln', 'g/vimrc.ln']) + \ 'gvimrc', has_lua), 'v:val.word'), ['gvimrc.ln', 'g/vimrc.ln']) call s:assert.equals(map(unite#filters#sorter_rank#_sort( \ [{'word' : 'ab12345js12345tt'}, {'word' : 'ab.js.tt'}], - \ ['abjstt'], has_lua), 'v:val.word'), ['ab.js.tt', 'ab12345js12345tt']) + \ 'abjstt', has_lua), 'v:val.word'), ['ab.js.tt', 'ab12345js12345tt']) call s:assert.equals(map(unite#filters#sorter_rank#_sort( \ [{'word' : 'source/r', 'action__path' : ''}, \ {'word' : 'sort.vim', 'action__path' : ''}], - \ ['so'], has_lua), 'v:val.word'), ['sort.vim', 'source/r']) + \ 'so', has_lua), 'v:val.word'), ['sort.vim', 'source/r']) call s:assert.equals(map(unite#filters#sorter_rank#_sort( \ [{'word' : 'spammers.txt', 'action__path' : ''}, \ {'word' : 'thread_parsing.py', 'action__path' : ''}], - \ ['pars'], has_lua), 'v:val.word'), + \ 'pars', has_lua), 'v:val.word'), \ ['thread_parsing.py', 'spammers.txt']) endfor endfunction +function! s:suite.sorter_rank() + call s:assert.equals(unite#candidates#_group_post_filters([ + \ {'word' : 'foo', 'group' : 'bar'}, + \ {'word' : 'bar', 'group' : 'baz'}, + \ {'word' : 'qux', 'group' : 'baz'}]), [ + \ {'word' : 'bar', 'is_dummy' : 1}, + \ {'word' : 'foo', 'group' : 'bar'}, + \ {'word' : 'baz', 'is_dummy' : 1}, + \ {'word' : 'bar', 'group' : 'baz'}, + \ {'word' : 'qux', 'group' : 'baz'}, + \]) +endfunction + " vim:foldmethod=marker:fen: === modified file 'vim/bundle/unite.vim/test/source.vim' --- vim/bundle/unite.vim/test/source.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/unite.vim/test/source.vim 2015-08-25 11:01:00 +0000 @@ -9,7 +9,7 @@ let g:kind.action_table.open = { \ 'is_selectable' : 1, \ } -function! g:kind.action_table.open.func(candidate) abort +function! g:kind.action_table.open.func(candidate) echo 'hoge' endfunction @@ -18,7 +18,7 @@ \ 'is_volatile' : 1, \ 'variables' : {'foo' : 'foo'} \} -function! g:source.gather_candidates(args, context) abort "{{{ +function! g:source.gather_candidates(args, context) "{{{ " Add dummy candidate. let g:candidates = [ a:context.input ] @@ -31,7 +31,7 @@ return g:candidates endfunction"}}} -function! s:suite.source() abort +function! s:suite.source() call s:assert.equals(unite#define_kind(g:kind), 0) call s:assert.equals(unite#define_source(g:source), 0) === modified file 'vim/bundle/vimfiler.vim/.git/config' (properties changed: -x to +x) === modified file 'vim/bundle/vimfiler.vim/.git/hooks/applypatch-msg.sample' --- vim/bundle/vimfiler.vim/.git/hooks/applypatch-msg.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/.git/hooks/applypatch-msg.sample 2015-08-25 11:01:00 +0000 @@ -10,6 +10,6 @@ # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup -commitmsg="$(git rev-parse --git-path hooks/commit-msg)" -test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} +test -x "$GIT_DIR/hooks/commit-msg" && + exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} : === modified file 'vim/bundle/vimfiler.vim/.git/hooks/pre-applypatch.sample' --- vim/bundle/vimfiler.vim/.git/hooks/pre-applypatch.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/.git/hooks/pre-applypatch.sample 2015-08-25 11:01:00 +0000 @@ -9,6 +9,6 @@ # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup -precommit="$(git rev-parse --git-path hooks/pre-commit)" -test -x "$precommit" && exec "$precommit" ${1+"$@"} +test -x "$GIT_DIR/hooks/pre-commit" && + exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} : === modified file 'vim/bundle/vimfiler.vim/.git/hooks/pre-push.sample' --- vim/bundle/vimfiler.vim/.git/hooks/pre-push.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/.git/hooks/pre-push.sample 2015-08-25 11:01:00 +0000 @@ -24,6 +24,7 @@ z40=0000000000000000000000000000000000000000 +IFS=' ' while read local_ref local_sha remote_ref remote_sha do if [ "$local_sha" = $z40 ] === modified file 'vim/bundle/vimfiler.vim/.git/hooks/update.sample' --- vim/bundle/vimfiler.vim/.git/hooks/update.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/.git/hooks/update.sample 2015-08-25 11:01:00 +0000 @@ -1,6 +1,6 @@ #!/bin/sh # -# An example hook script to block unannotated tags from entering. +# An example hook script to blocks unannotated tags from entering. # Called by "git receive-pack" with arguments: refname sha1-old sha1-new # # To enable this hook, rename this file to "update". === modified file 'vim/bundle/vimfiler.vim/.git/index' Binary files vim/bundle/vimfiler.vim/.git/index 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/index 2015-08-25 11:01:00 +0000 differ === modified file 'vim/bundle/vimfiler.vim/.git/logs/HEAD' --- vim/bundle/vimfiler.vim/.git/logs/HEAD 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/.git/logs/HEAD 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 b6fdab3b6633e597d77385422ff47a673ff6d25b Jan Pobrislo 1470298388 +0200 clone: from https://github.com/Shougo/vimfiler.vim +0000000000000000000000000000000000000000 299f27e0cce6ba98c8c37e9361f4492c2bdae2a7 Jan Pobrislo 1440500318 +0200 clone: from https://github.com/Shougo/vimfiler.vim === modified file 'vim/bundle/vimfiler.vim/.git/logs/refs/heads/master' --- vim/bundle/vimfiler.vim/.git/logs/refs/heads/master 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/.git/logs/refs/heads/master 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 b6fdab3b6633e597d77385422ff47a673ff6d25b Jan Pobrislo 1470298388 +0200 clone: from https://github.com/Shougo/vimfiler.vim +0000000000000000000000000000000000000000 299f27e0cce6ba98c8c37e9361f4492c2bdae2a7 Jan Pobrislo 1440500318 +0200 clone: from https://github.com/Shougo/vimfiler.vim === modified file 'vim/bundle/vimfiler.vim/.git/logs/refs/remotes/origin/HEAD' --- vim/bundle/vimfiler.vim/.git/logs/refs/remotes/origin/HEAD 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/.git/logs/refs/remotes/origin/HEAD 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 b6fdab3b6633e597d77385422ff47a673ff6d25b Jan Pobrislo 1470298388 +0200 clone: from https://github.com/Shougo/vimfiler.vim +0000000000000000000000000000000000000000 299f27e0cce6ba98c8c37e9361f4492c2bdae2a7 Jan Pobrislo 1440500318 +0200 clone: from https://github.com/Shougo/vimfiler.vim === added directory 'vim/bundle/vimfiler.vim/.git/objects/00' === added file 'vim/bundle/vimfiler.vim/.git/objects/00/3549236bc2c243bc6169947ee30039b6e5bcf7' Binary files vim/bundle/vimfiler.vim/.git/objects/00/3549236bc2c243bc6169947ee30039b6e5bcf7 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/00/3549236bc2c243bc6169947ee30039b6e5bcf7 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/vimfiler.vim/.git/objects/08' === added file 'vim/bundle/vimfiler.vim/.git/objects/08/38e06b09aebc0aae675c49cd55f94ac4c1fa6f' --- vim/bundle/vimfiler.vim/.git/objects/08/38e06b09aebc0aae675c49cd55f94ac4c1fa6f 1970-01-01 00:00:00 +0000 +++ vim/bundle/vimfiler.vim/.git/objects/08/38e06b09aebc0aae675c49cd55f94ac4c1fa6f 2015-08-25 11:01:00 +0000 @@ -0,0 +1,1 @@ +xTn 9_ᵇ)zFWE4q4iӴԭ%lV-NS[{n$i:͒щgٓWbsKA֖+y) %Y)j&0Ƒ7nU8p ],;8g!5 9r-$1VEZwYP6.BV3xBYw=/3 ˂C!h0+/ꆞIR$,.֝\ji`;ܟ\}?T!=eXJ~je˻LC^^8T|GVl :6m+_1XMS?e|~ƳO \ No newline at end of file === added directory 'vim/bundle/vimfiler.vim/.git/objects/0e' === added file 'vim/bundle/vimfiler.vim/.git/objects/0e/e54b15841822abf2eb11528e87376d5370326c' Binary files vim/bundle/vimfiler.vim/.git/objects/0e/e54b15841822abf2eb11528e87376d5370326c 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/0e/e54b15841822abf2eb11528e87376d5370326c 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/19' === removed file 'vim/bundle/vimfiler.vim/.git/objects/19/150dd323188c3f41b8c1b94dcef30120f8bc38' Binary files vim/bundle/vimfiler.vim/.git/objects/19/150dd323188c3f41b8c1b94dcef30120f8bc38 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/19/150dd323188c3f41b8c1b94dcef30120f8bc38 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/1a' === removed file 'vim/bundle/vimfiler.vim/.git/objects/1a/c31ff45c79e16955282ce8246a3756ede7f575' --- vim/bundle/vimfiler.vim/.git/objects/1a/c31ff45c79e16955282ce8246a3756ede7f575 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/.git/objects/1a/c31ff45c79e16955282ce8246a3756ede7f575 1970-01-01 00:00:00 +0000 @@ -1,5 +0,0 @@ -xXkoH؉EJA.c-18*<SUez~*@z-V[1su8[oڙ]zUs ץ&2%s^11C\',;A i/[F`YLQ -LN"+(\*EA>բ8J`%#MhQRK9)h(͗q$7Si1\aSƨm XDh`j@V ˁKi@aɒt\ceF/ #4+2{FI7{%èrJnYҞ<,=Q Tf\΁̍M?lr4=p6;;Mi>пw&3ϞK2Sı1㸣qvS&|-{F72r&F.C =Mtn^{eڮL9.f! '#HXh4=xn.%h2tn4kMgLol3CնM]*jݦ̵)hccwv5()ڜw0ƞNfZMӧZ"Q6u7XEU(VPPtx,9>vQtO?y 䚬j y]&>ڄl%Ts!ޱd!VZɮd|l395Qhޚ(=ic_Ggu 2UZqPwǨ.FI&HEjEy|5*r9yn2T2E62(Rߚa'ԋKGQVAL[~3!z*=0Eݬ -($:հ:lOk}A,HBBڸ6/q}6c Ñ;@Y[N ?xiNe7+BMt0yKkrѻWZʶ6:haL#Ӧ%6Y._o4\e ׼+E çymӣ/]婹}a[6-}hSgGAJ{{D߉u5h^, q'eVp4DMF]+Z%nb^T2Ύ֘ =zA%xi7I*e /-4ZЧAFGhО-ŖsR޴ -8<@#WQ(fTeڠ@n,#Ei%tAH(J&tT Wrt կ9„OOEORFf \ No newline at end of file === added file 'vim/bundle/vimfiler.vim/.git/objects/1e/5f0ae7f5e7a9ee8adef639a7fc5e576dcc2be8' Binary files vim/bundle/vimfiler.vim/.git/objects/1e/5f0ae7f5e7a9ee8adef639a7fc5e576dcc2be8 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/1e/5f0ae7f5e7a9ee8adef639a7fc5e576dcc2be8 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/vimfiler.vim/.git/objects/1e/714474a209ca849c6341986d95c31b0aaa2cfc' Binary files vim/bundle/vimfiler.vim/.git/objects/1e/714474a209ca849c6341986d95c31b0aaa2cfc 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/1e/714474a209ca849c6341986d95c31b0aaa2cfc 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/vimfiler.vim/.git/objects/1e/a1ca39de10c978c53a4c4af9c268fafa3d29b2' Binary files vim/bundle/vimfiler.vim/.git/objects/1e/a1ca39de10c978c53a4c4af9c268fafa3d29b2 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/1e/a1ca39de10c978c53a4c4af9c268fafa3d29b2 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/20' === removed file 'vim/bundle/vimfiler.vim/.git/objects/20/3d94541868201c4c93afa6e41e6be1bd892495' Binary files vim/bundle/vimfiler.vim/.git/objects/20/3d94541868201c4c93afa6e41e6be1bd892495 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/20/3d94541868201c4c93afa6e41e6be1bd892495 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/23' === removed file 'vim/bundle/vimfiler.vim/.git/objects/23/797cad5b648f624e8ac590e93d5e4e11411360' Binary files vim/bundle/vimfiler.vim/.git/objects/23/797cad5b648f624e8ac590e93d5e4e11411360 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/23/797cad5b648f624e8ac590e93d5e4e11411360 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimfiler.vim/.git/objects/26' === added file 'vim/bundle/vimfiler.vim/.git/objects/26/5c44b2ec8162017b614b69ed5e113cc93308d7' Binary files vim/bundle/vimfiler.vim/.git/objects/26/5c44b2ec8162017b614b69ed5e113cc93308d7 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/26/5c44b2ec8162017b614b69ed5e113cc93308d7 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/vimfiler.vim/.git/objects/27' === added file 'vim/bundle/vimfiler.vim/.git/objects/27/231446a53743c9edfc64616977921fc4f916c9' Binary files vim/bundle/vimfiler.vim/.git/objects/27/231446a53743c9edfc64616977921fc4f916c9 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/27/231446a53743c9edfc64616977921fc4f916c9 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/vimfiler.vim/.git/objects/29' === added file 'vim/bundle/vimfiler.vim/.git/objects/29/9f27e0cce6ba98c8c37e9361f4492c2bdae2a7' Binary files vim/bundle/vimfiler.vim/.git/objects/29/9f27e0cce6ba98c8c37e9361f4492c2bdae2a7 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/29/9f27e0cce6ba98c8c37e9361f4492c2bdae2a7 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/vimfiler.vim/.git/objects/2b' === added file 'vim/bundle/vimfiler.vim/.git/objects/2b/23b10c8039290c2268aef675f535422cf38212' Binary files vim/bundle/vimfiler.vim/.git/objects/2b/23b10c8039290c2268aef675f535422cf38212 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/2b/23b10c8039290c2268aef675f535422cf38212 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/2d' === removed file 'vim/bundle/vimfiler.vim/.git/objects/2d/a088a88d2bc295552a5dc63204361b6f4f208d' Binary files vim/bundle/vimfiler.vim/.git/objects/2d/a088a88d2bc295552a5dc63204361b6f4f208d 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/2d/a088a88d2bc295552a5dc63204361b6f4f208d 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimfiler.vim/.git/objects/2e' === added file 'vim/bundle/vimfiler.vim/.git/objects/2e/653a4543f81f00e1503e7faf0d8a55cf87cea8' Binary files vim/bundle/vimfiler.vim/.git/objects/2e/653a4543f81f00e1503e7faf0d8a55cf87cea8 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/2e/653a4543f81f00e1503e7faf0d8a55cf87cea8 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/2f' === removed file 'vim/bundle/vimfiler.vim/.git/objects/2f/f05aa2ecf7e8f67e761ffd4eff94bf084db117' Binary files vim/bundle/vimfiler.vim/.git/objects/2f/f05aa2ecf7e8f67e761ffd4eff94bf084db117 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/2f/f05aa2ecf7e8f67e761ffd4eff94bf084db117 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimfiler.vim/.git/objects/3a' === added file 'vim/bundle/vimfiler.vim/.git/objects/3a/1cd4f52de6b5c1d5cd1c8ff52f9c0924cf7673' Binary files vim/bundle/vimfiler.vim/.git/objects/3a/1cd4f52de6b5c1d5cd1c8ff52f9c0924cf7673 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/3a/1cd4f52de6b5c1d5cd1c8ff52f9c0924cf7673 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/40' === removed file 'vim/bundle/vimfiler.vim/.git/objects/40/f8b662d106893251a89935c902f6139f4459a2' Binary files vim/bundle/vimfiler.vim/.git/objects/40/f8b662d106893251a89935c902f6139f4459a2 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/40/f8b662d106893251a89935c902f6139f4459a2 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimfiler.vim/.git/objects/44' === added file 'vim/bundle/vimfiler.vim/.git/objects/44/149a3a4e6db38d9aa94b242f4d94477340d558' Binary files vim/bundle/vimfiler.vim/.git/objects/44/149a3a4e6db38d9aa94b242f4d94477340d558 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/44/149a3a4e6db38d9aa94b242f4d94477340d558 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/47' === removed file 'vim/bundle/vimfiler.vim/.git/objects/47/1db10bec4ca51a5c15f08747490616907ffaa8' Binary files vim/bundle/vimfiler.vim/.git/objects/47/1db10bec4ca51a5c15f08747490616907ffaa8 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/47/1db10bec4ca51a5c15f08747490616907ffaa8 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/4a' === removed file 'vim/bundle/vimfiler.vim/.git/objects/4a/3e4fcce20ef999e65dcae48c43d7dafd324e3f' Binary files vim/bundle/vimfiler.vim/.git/objects/4a/3e4fcce20ef999e65dcae48c43d7dafd324e3f 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/4a/3e4fcce20ef999e65dcae48c43d7dafd324e3f 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimfiler.vim/.git/objects/4e' === added file 'vim/bundle/vimfiler.vim/.git/objects/4e/5401485889d027edb9e0953f506c49587b97af' Binary files vim/bundle/vimfiler.vim/.git/objects/4e/5401485889d027edb9e0953f506c49587b97af 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/4e/5401485889d027edb9e0953f506c49587b97af 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/vimfiler.vim/.git/objects/50' === added file 'vim/bundle/vimfiler.vim/.git/objects/50/e4ebae15e6d17ea3029855dc3fb264b50275e0' Binary files vim/bundle/vimfiler.vim/.git/objects/50/e4ebae15e6d17ea3029855dc3fb264b50275e0 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/50/e4ebae15e6d17ea3029855dc3fb264b50275e0 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/vimfiler.vim/.git/objects/51' === added file 'vim/bundle/vimfiler.vim/.git/objects/51/7ced2e112ba1d5635134e95f46439fd465b467' Binary files vim/bundle/vimfiler.vim/.git/objects/51/7ced2e112ba1d5635134e95f46439fd465b467 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/51/7ced2e112ba1d5635134e95f46439fd465b467 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/vimfiler.vim/.git/objects/52/b82ecbce7a9dda7d82f99c39364f9fc85cc09c' Binary files vim/bundle/vimfiler.vim/.git/objects/52/b82ecbce7a9dda7d82f99c39364f9fc85cc09c 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/52/b82ecbce7a9dda7d82f99c39364f9fc85cc09c 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/vimfiler.vim/.git/objects/52/feefb8242357c17576cb7ac845bd24c07e6f2c' Binary files vim/bundle/vimfiler.vim/.git/objects/52/feefb8242357c17576cb7ac845bd24c07e6f2c 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/52/feefb8242357c17576cb7ac845bd24c07e6f2c 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/vimfiler.vim/.git/objects/58' === added file 'vim/bundle/vimfiler.vim/.git/objects/58/9f0b449f3dd9517fd70f63828bedf7f8a621a3' Binary files vim/bundle/vimfiler.vim/.git/objects/58/9f0b449f3dd9517fd70f63828bedf7f8a621a3 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/58/9f0b449f3dd9517fd70f63828bedf7f8a621a3 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/5d' === removed file 'vim/bundle/vimfiler.vim/.git/objects/5d/f072a375615b74e0b40f30534852449c609546' Binary files vim/bundle/vimfiler.vim/.git/objects/5d/f072a375615b74e0b40f30534852449c609546 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/5d/f072a375615b74e0b40f30534852449c609546 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/5e' === removed file 'vim/bundle/vimfiler.vim/.git/objects/5e/0e218790709912f6b1932d1bba3658800abfb0' Binary files vim/bundle/vimfiler.vim/.git/objects/5e/0e218790709912f6b1932d1bba3658800abfb0 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/5e/0e218790709912f6b1932d1bba3658800abfb0 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/vimfiler.vim/.git/objects/60/5b3a6be0e1b4196c9c59d83e10669f392e5d03' Binary files vim/bundle/vimfiler.vim/.git/objects/60/5b3a6be0e1b4196c9c59d83e10669f392e5d03 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/60/5b3a6be0e1b4196c9c59d83e10669f392e5d03 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/vimfiler.vim/.git/objects/60/8b6f0e5de1d1b3cd53e2aa0d8cc76a3bf7662c' Binary files vim/bundle/vimfiler.vim/.git/objects/60/8b6f0e5de1d1b3cd53e2aa0d8cc76a3bf7662c 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/60/8b6f0e5de1d1b3cd53e2aa0d8cc76a3bf7662c 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimfiler.vim/.git/objects/64' === added file 'vim/bundle/vimfiler.vim/.git/objects/64/e8adf6672f83fa21dc8306ead92d834a15a120' Binary files vim/bundle/vimfiler.vim/.git/objects/64/e8adf6672f83fa21dc8306ead92d834a15a120 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/64/e8adf6672f83fa21dc8306ead92d834a15a120 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/65' === removed file 'vim/bundle/vimfiler.vim/.git/objects/65/277bc9708a9abe8bc75bc93c7b5aae1675a5f3' Binary files vim/bundle/vimfiler.vim/.git/objects/65/277bc9708a9abe8bc75bc93c7b5aae1675a5f3 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/65/277bc9708a9abe8bc75bc93c7b5aae1675a5f3 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/67' === removed file 'vim/bundle/vimfiler.vim/.git/objects/67/e3496f2bda21d914e8408da33b88ec90c6c5ad' --- vim/bundle/vimfiler.vim/.git/objects/67/e3496f2bda21d914e8408da33b88ec90c6c5ad 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/.git/objects/67/e3496f2bda21d914e8408da33b88ec90c6c5ad 1970-01-01 00:00:00 +0000 @@ -1,3 +0,0 @@ -xN WI c]#HH`RݨK-YHrsGz0MO4 ' &h1%g]4A9qύ%i?2;w6 -фcCלl/ǹE)_cO;np:Ve5o M՜Iu -Nj% \ No newline at end of file === removed directory 'vim/bundle/vimfiler.vim/.git/objects/68' === removed file 'vim/bundle/vimfiler.vim/.git/objects/68/4f1fb5843499917deba879ba068b50014e1071' Binary files vim/bundle/vimfiler.vim/.git/objects/68/4f1fb5843499917deba879ba068b50014e1071 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/68/4f1fb5843499917deba879ba068b50014e1071 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/vimfiler.vim/.git/objects/68/b494638dafd4b126d141b93028fda3fa3f9d0a' Binary files vim/bundle/vimfiler.vim/.git/objects/68/b494638dafd4b126d141b93028fda3fa3f9d0a 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/68/b494638dafd4b126d141b93028fda3fa3f9d0a 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/6c' === removed file 'vim/bundle/vimfiler.vim/.git/objects/6c/e8833fa132bbdc9ed6d12c49d91627b5a36264' Binary files vim/bundle/vimfiler.vim/.git/objects/6c/e8833fa132bbdc9ed6d12c49d91627b5a36264 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/6c/e8833fa132bbdc9ed6d12c49d91627b5a36264 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimfiler.vim/.git/objects/71' === added file 'vim/bundle/vimfiler.vim/.git/objects/71/d3a7cf9206213e4263b7ff3fbab8b57eaacddd' Binary files vim/bundle/vimfiler.vim/.git/objects/71/d3a7cf9206213e4263b7ff3fbab8b57eaacddd 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/71/d3a7cf9206213e4263b7ff3fbab8b57eaacddd 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/vimfiler.vim/.git/objects/74/16d81ac46a0ffe2f027ea0840b189439c88538' Binary files vim/bundle/vimfiler.vim/.git/objects/74/16d81ac46a0ffe2f027ea0840b189439c88538 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/74/16d81ac46a0ffe2f027ea0840b189439c88538 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/vimfiler.vim/.git/objects/74/ee0ff5a7ef46c222efb43576e672194e02a1b9' Binary files vim/bundle/vimfiler.vim/.git/objects/74/ee0ff5a7ef46c222efb43576e672194e02a1b9 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/74/ee0ff5a7ef46c222efb43576e672194e02a1b9 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimfiler.vim/.git/objects/77' === added file 'vim/bundle/vimfiler.vim/.git/objects/77/76346d8d889b887c12d872ebae380a05a46b7e' Binary files vim/bundle/vimfiler.vim/.git/objects/77/76346d8d889b887c12d872ebae380a05a46b7e 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/77/76346d8d889b887c12d872ebae380a05a46b7e 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/vimfiler.vim/.git/objects/78/e1c828ed839c103ce95f26203d36486b1dbce3' Binary files vim/bundle/vimfiler.vim/.git/objects/78/e1c828ed839c103ce95f26203d36486b1dbce3 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/78/e1c828ed839c103ce95f26203d36486b1dbce3 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/vimfiler.vim/.git/objects/78/e7395179c6bd90fdccd613d5d7ddc4e55ff68e' Binary files vim/bundle/vimfiler.vim/.git/objects/78/e7395179c6bd90fdccd613d5d7ddc4e55ff68e 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/78/e7395179c6bd90fdccd613d5d7ddc4e55ff68e 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/79' === removed file 'vim/bundle/vimfiler.vim/.git/objects/79/84530a6fc5e33e1c55c45c3d791e2a3077dc22' Binary files vim/bundle/vimfiler.vim/.git/objects/79/84530a6fc5e33e1c55c45c3d791e2a3077dc22 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/79/84530a6fc5e33e1c55c45c3d791e2a3077dc22 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/7d' === removed file 'vim/bundle/vimfiler.vim/.git/objects/7d/2b3150169ca485cdc9bceefc6c5687b9672e9a' Binary files vim/bundle/vimfiler.vim/.git/objects/7d/2b3150169ca485cdc9bceefc6c5687b9672e9a 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/7d/2b3150169ca485cdc9bceefc6c5687b9672e9a 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/7e' === removed file 'vim/bundle/vimfiler.vim/.git/objects/7e/19991b5c82deac7f71871005e3b6e3776ebf40' Binary files vim/bundle/vimfiler.vim/.git/objects/7e/19991b5c82deac7f71871005e3b6e3776ebf40 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/7e/19991b5c82deac7f71871005e3b6e3776ebf40 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/85' === removed file 'vim/bundle/vimfiler.vim/.git/objects/85/2be381f560b7cb8530d55cf8256635ba05583c' Binary files vim/bundle/vimfiler.vim/.git/objects/85/2be381f560b7cb8530d55cf8256635ba05583c 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/85/2be381f560b7cb8530d55cf8256635ba05583c 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimfiler.vim/.git/objects/89' === added file 'vim/bundle/vimfiler.vim/.git/objects/89/40493ae5c4804728c7f6cb1938203a5a59cbab' Binary files vim/bundle/vimfiler.vim/.git/objects/89/40493ae5c4804728c7f6cb1938203a5a59cbab 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/89/40493ae5c4804728c7f6cb1938203a5a59cbab 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/8c' === removed file 'vim/bundle/vimfiler.vim/.git/objects/8c/292b69277fdaafe9493d0b128b47b2506ee7c6' Binary files vim/bundle/vimfiler.vim/.git/objects/8c/292b69277fdaafe9493d0b128b47b2506ee7c6 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/8c/292b69277fdaafe9493d0b128b47b2506ee7c6 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/96' === removed file 'vim/bundle/vimfiler.vim/.git/objects/96/8ed26e716bc1d97b5a898d17bafd939bd105d6' Binary files vim/bundle/vimfiler.vim/.git/objects/96/8ed26e716bc1d97b5a898d17bafd939bd105d6 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/96/8ed26e716bc1d97b5a898d17bafd939bd105d6 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimfiler.vim/.git/objects/97' === added file 'vim/bundle/vimfiler.vim/.git/objects/97/dcd096c2d7554be04c7752efb0ca34dc6d611b' --- vim/bundle/vimfiler.vim/.git/objects/97/dcd096c2d7554be04c7752efb0ca34dc6d611b 1970-01-01 00:00:00 +0000 +++ vim/bundle/vimfiler.vim/.git/objects/97/dcd096c2d7554be04c7752efb0ca34dc6d611b 2015-08-25 11:01:00 +0000 @@ -0,0 +1,1 @@ +x =tƘ4ͳW I^J^還v>elA%P.x (3FjG^YO4o/M(R֩vz2>8dSkJ(zɺWE4ߖ.C2N_XUOqpWkaҁS4\#*1D| \ No newline at end of file === added directory 'vim/bundle/vimfiler.vim/.git/objects/a0' === added file 'vim/bundle/vimfiler.vim/.git/objects/a0/2b4f543d42a44db7d5dea17a48b9514ba79741' Binary files vim/bundle/vimfiler.vim/.git/objects/a0/2b4f543d42a44db7d5dea17a48b9514ba79741 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/a0/2b4f543d42a44db7d5dea17a48b9514ba79741 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/vimfiler.vim/.git/objects/a0/2c7fa4c76da49782adb3f36eb283414ea22332' Binary files vim/bundle/vimfiler.vim/.git/objects/a0/2c7fa4c76da49782adb3f36eb283414ea22332 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/a0/2c7fa4c76da49782adb3f36eb283414ea22332 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/vimfiler.vim/.git/objects/a2' === added file 'vim/bundle/vimfiler.vim/.git/objects/a2/9cc8d8b155351853eece4a31e81c0ce2049038' Binary files vim/bundle/vimfiler.vim/.git/objects/a2/9cc8d8b155351853eece4a31e81c0ce2049038 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/a2/9cc8d8b155351853eece4a31e81c0ce2049038 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/a4' === removed file 'vim/bundle/vimfiler.vim/.git/objects/a4/dbb3d11da3310e0a30f98b8115f309ea69bb61' Binary files vim/bundle/vimfiler.vim/.git/objects/a4/dbb3d11da3310e0a30f98b8115f309ea69bb61 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/a4/dbb3d11da3310e0a30f98b8115f309ea69bb61 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/a5' === removed file 'vim/bundle/vimfiler.vim/.git/objects/a5/99032a8fb95f2ee2a88b34308585c6f0429823' Binary files vim/bundle/vimfiler.vim/.git/objects/a5/99032a8fb95f2ee2a88b34308585c6f0429823 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/a5/99032a8fb95f2ee2a88b34308585c6f0429823 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/a6' === removed file 'vim/bundle/vimfiler.vim/.git/objects/a6/cf5d3026d213830f85cfa2a98e2ba6bac52216' Binary files vim/bundle/vimfiler.vim/.git/objects/a6/cf5d3026d213830f85cfa2a98e2ba6bac52216 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/a6/cf5d3026d213830f85cfa2a98e2ba6bac52216 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimfiler.vim/.git/objects/aa' === added file 'vim/bundle/vimfiler.vim/.git/objects/aa/7591ffbbc2b7d8028ffbd7f1f75360733809dc' Binary files vim/bundle/vimfiler.vim/.git/objects/aa/7591ffbbc2b7d8028ffbd7f1f75360733809dc 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/aa/7591ffbbc2b7d8028ffbd7f1f75360733809dc 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/vimfiler.vim/.git/objects/ad' === added file 'vim/bundle/vimfiler.vim/.git/objects/ad/12c0817096f1eb4b6072d85112a5589454c915' Binary files vim/bundle/vimfiler.vim/.git/objects/ad/12c0817096f1eb4b6072d85112a5589454c915 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/ad/12c0817096f1eb4b6072d85112a5589454c915 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/vimfiler.vim/.git/objects/ae/19f5bad87c9b04427f12fc149c00ff57618745' Binary files vim/bundle/vimfiler.vim/.git/objects/ae/19f5bad87c9b04427f12fc149c00ff57618745 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/ae/19f5bad87c9b04427f12fc149c00ff57618745 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/vimfiler.vim/.git/objects/ae/2d78ad979c1c19d9ba3661d6711577bfeac291' Binary files vim/bundle/vimfiler.vim/.git/objects/ae/2d78ad979c1c19d9ba3661d6711577bfeac291 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/ae/2d78ad979c1c19d9ba3661d6711577bfeac291 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/vimfiler.vim/.git/objects/ae/722d0f35ce61e2b0084969fa7d12b07d9d3a0d' Binary files vim/bundle/vimfiler.vim/.git/objects/ae/722d0f35ce61e2b0084969fa7d12b07d9d3a0d 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/ae/722d0f35ce61e2b0084969fa7d12b07d9d3a0d 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/vimfiler.vim/.git/objects/ae/c5dfdcbcb309cb478d1ede0169fecab39f7486' Binary files vim/bundle/vimfiler.vim/.git/objects/ae/c5dfdcbcb309cb478d1ede0169fecab39f7486 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/ae/c5dfdcbcb309cb478d1ede0169fecab39f7486 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/af' === removed file 'vim/bundle/vimfiler.vim/.git/objects/af/a027d92b115f3db2bd05cd05bb4a9e83ca66b6' Binary files vim/bundle/vimfiler.vim/.git/objects/af/a027d92b115f3db2bd05cd05bb4a9e83ca66b6 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/af/a027d92b115f3db2bd05cd05bb4a9e83ca66b6 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/b2' === removed file 'vim/bundle/vimfiler.vim/.git/objects/b2/b6f3ea4110aec32c795382035499483bb7fef4' Binary files vim/bundle/vimfiler.vim/.git/objects/b2/b6f3ea4110aec32c795382035499483bb7fef4 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/b2/b6f3ea4110aec32c795382035499483bb7fef4 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimfiler.vim/.git/objects/b3' === added file 'vim/bundle/vimfiler.vim/.git/objects/b3/2ec8e5ad6001e29206a4c96d78b902e93d77e7' Binary files vim/bundle/vimfiler.vim/.git/objects/b3/2ec8e5ad6001e29206a4c96d78b902e93d77e7 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/b3/2ec8e5ad6001e29206a4c96d78b902e93d77e7 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/vimfiler.vim/.git/objects/b3/4798ecbad2e0bbda53d3653e7d23920acecad8' Binary files vim/bundle/vimfiler.vim/.git/objects/b3/4798ecbad2e0bbda53d3653e7d23920acecad8 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/b3/4798ecbad2e0bbda53d3653e7d23920acecad8 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/vimfiler.vim/.git/objects/b6/a62724e6adbe10ed149aacfd880a78dede3e45' Binary files vim/bundle/vimfiler.vim/.git/objects/b6/a62724e6adbe10ed149aacfd880a78dede3e45 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/b6/a62724e6adbe10ed149aacfd880a78dede3e45 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/vimfiler.vim/.git/objects/b6/fdab3b6633e597d77385422ff47a673ff6d25b' Binary files vim/bundle/vimfiler.vim/.git/objects/b6/fdab3b6633e597d77385422ff47a673ff6d25b 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/b6/fdab3b6633e597d77385422ff47a673ff6d25b 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimfiler.vim/.git/objects/b7' === added file 'vim/bundle/vimfiler.vim/.git/objects/b7/c11adcb4909ca1df9a6b306501ffc0bc924870' Binary files vim/bundle/vimfiler.vim/.git/objects/b7/c11adcb4909ca1df9a6b306501ffc0bc924870 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/b7/c11adcb4909ca1df9a6b306501ffc0bc924870 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/vimfiler.vim/.git/objects/b8/07a3f53b35533a93983db9f3a42870bbd6d4e3' Binary files vim/bundle/vimfiler.vim/.git/objects/b8/07a3f53b35533a93983db9f3a42870bbd6d4e3 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/b8/07a3f53b35533a93983db9f3a42870bbd6d4e3 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/vimfiler.vim/.git/objects/b8/aa0cc95c33781eeebef8ea9798c6efccfe21ac' Binary files vim/bundle/vimfiler.vim/.git/objects/b8/aa0cc95c33781eeebef8ea9798c6efccfe21ac 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/b8/aa0cc95c33781eeebef8ea9798c6efccfe21ac 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimfiler.vim/.git/objects/bb' === added file 'vim/bundle/vimfiler.vim/.git/objects/bb/c9a3d4d3f4a0aba0d944f56e9101e62d6f5b57' Binary files vim/bundle/vimfiler.vim/.git/objects/bb/c9a3d4d3f4a0aba0d944f56e9101e62d6f5b57 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/bb/c9a3d4d3f4a0aba0d944f56e9101e62d6f5b57 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/bf' === removed file 'vim/bundle/vimfiler.vim/.git/objects/bf/fc88c0d926c043de30afc6432fb67072ebe489' Binary files vim/bundle/vimfiler.vim/.git/objects/bf/fc88c0d926c043de30afc6432fb67072ebe489 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/bf/fc88c0d926c043de30afc6432fb67072ebe489 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/c0' === removed file 'vim/bundle/vimfiler.vim/.git/objects/c0/252b8b71df4be1f6dfdf7122668ecbc15c56d7' Binary files vim/bundle/vimfiler.vim/.git/objects/c0/252b8b71df4be1f6dfdf7122668ecbc15c56d7 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/c0/252b8b71df4be1f6dfdf7122668ecbc15c56d7 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/vimfiler.vim/.git/objects/c0/491e58cc52f7a426c253764e80c79c295fbd6a' Binary files vim/bundle/vimfiler.vim/.git/objects/c0/491e58cc52f7a426c253764e80c79c295fbd6a 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/c0/491e58cc52f7a426c253764e80c79c295fbd6a 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimfiler.vim/.git/objects/c1' === added file 'vim/bundle/vimfiler.vim/.git/objects/c1/e97cac34bd6e9af7cffc4b6930141c461f5d90' Binary files vim/bundle/vimfiler.vim/.git/objects/c1/e97cac34bd6e9af7cffc4b6930141c461f5d90 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/c1/e97cac34bd6e9af7cffc4b6930141c461f5d90 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/vimfiler.vim/.git/objects/c2/0d854a5c652b2505e945acdf9cd665247094c0' Binary files vim/bundle/vimfiler.vim/.git/objects/c2/0d854a5c652b2505e945acdf9cd665247094c0 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/c2/0d854a5c652b2505e945acdf9cd665247094c0 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/vimfiler.vim/.git/objects/c2/2a14bbafa6fa062bb1e2cae324dddeb91cb0ea' Binary files vim/bundle/vimfiler.vim/.git/objects/c2/2a14bbafa6fa062bb1e2cae324dddeb91cb0ea 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/c2/2a14bbafa6fa062bb1e2cae324dddeb91cb0ea 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/c7' === removed file 'vim/bundle/vimfiler.vim/.git/objects/c7/85bae341e2024cf4322dbf41d901c08c195485' Binary files vim/bundle/vimfiler.vim/.git/objects/c7/85bae341e2024cf4322dbf41d901c08c195485 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/c7/85bae341e2024cf4322dbf41d901c08c195485 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimfiler.vim/.git/objects/d1' === added file 'vim/bundle/vimfiler.vim/.git/objects/d1/252f6fa1f7f226d24e29ce8cc7b704d6fc95b3' Binary files vim/bundle/vimfiler.vim/.git/objects/d1/252f6fa1f7f226d24e29ce8cc7b704d6fc95b3 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/d1/252f6fa1f7f226d24e29ce8cc7b704d6fc95b3 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/vimfiler.vim/.git/objects/d3' === added file 'vim/bundle/vimfiler.vim/.git/objects/d3/277b67bd421845ca6219d00d4aa690d7b7792b' Binary files vim/bundle/vimfiler.vim/.git/objects/d3/277b67bd421845ca6219d00d4aa690d7b7792b 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/d3/277b67bd421845ca6219d00d4aa690d7b7792b 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/vimfiler.vim/.git/objects/d4' === added file 'vim/bundle/vimfiler.vim/.git/objects/d4/84d41317b3419e28ba3330c701c004a71f5c65' Binary files vim/bundle/vimfiler.vim/.git/objects/d4/84d41317b3419e28ba3330c701c004a71f5c65 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/d4/84d41317b3419e28ba3330c701c004a71f5c65 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/dc' === removed file 'vim/bundle/vimfiler.vim/.git/objects/dc/f8368f489a88c5eba60be0c2b23af7a6f57520' Binary files vim/bundle/vimfiler.vim/.git/objects/dc/f8368f489a88c5eba60be0c2b23af7a6f57520 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/dc/f8368f489a88c5eba60be0c2b23af7a6f57520 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/dd' === removed file 'vim/bundle/vimfiler.vim/.git/objects/dd/a71f9812128fd81763f82057a45c2459fa94b5' Binary files vim/bundle/vimfiler.vim/.git/objects/dd/a71f9812128fd81763f82057a45c2459fa94b5 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/dd/a71f9812128fd81763f82057a45c2459fa94b5 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/vimfiler.vim/.git/objects/e0/31c3e0108d5a064aecc3b17ed430f8b5525f92' Binary files vim/bundle/vimfiler.vim/.git/objects/e0/31c3e0108d5a064aecc3b17ed430f8b5525f92 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/e0/31c3e0108d5a064aecc3b17ed430f8b5525f92 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/vimfiler.vim/.git/objects/e0/932a17f9645e759236414547d91d8e7bcb672e' Binary files vim/bundle/vimfiler.vim/.git/objects/e0/932a17f9645e759236414547d91d8e7bcb672e 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/e0/932a17f9645e759236414547d91d8e7bcb672e 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/e2' === removed file 'vim/bundle/vimfiler.vim/.git/objects/e2/77aea28dca857695e20ab762727cb2b850a56c' Binary files vim/bundle/vimfiler.vim/.git/objects/e2/77aea28dca857695e20ab762727cb2b850a56c 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/e2/77aea28dca857695e20ab762727cb2b850a56c 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/vimfiler.vim/.git/objects/e2/d7acb5baf0393218e82fa4584ab17825329d34' Binary files vim/bundle/vimfiler.vim/.git/objects/e2/d7acb5baf0393218e82fa4584ab17825329d34 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/e2/d7acb5baf0393218e82fa4584ab17825329d34 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/vimfiler.vim/.git/objects/e3/aea756475705dbc55334ae72829a0dfe7b22c0' Binary files vim/bundle/vimfiler.vim/.git/objects/e3/aea756475705dbc55334ae72829a0dfe7b22c0 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/e3/aea756475705dbc55334ae72829a0dfe7b22c0 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/vimfiler.vim/.git/objects/e3/d54e474a11fa035236ad56447efa2e97b9eafb' Binary files vim/bundle/vimfiler.vim/.git/objects/e3/d54e474a11fa035236ad56447efa2e97b9eafb 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/e3/d54e474a11fa035236ad56447efa2e97b9eafb 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/vimfiler.vim/.git/objects/e4' === added file 'vim/bundle/vimfiler.vim/.git/objects/e4/61fbbe020f704eeba0de92cba309ed821995e3' Binary files vim/bundle/vimfiler.vim/.git/objects/e4/61fbbe020f704eeba0de92cba309ed821995e3 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/e4/61fbbe020f704eeba0de92cba309ed821995e3 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/vimfiler.vim/.git/objects/e4/daebe7dadc23adc4cf73d94c7e7248882ac9dc' Binary files vim/bundle/vimfiler.vim/.git/objects/e4/daebe7dadc23adc4cf73d94c7e7248882ac9dc 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/e4/daebe7dadc23adc4cf73d94c7e7248882ac9dc 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/vimfiler.vim/.git/objects/eb/5461a8c0887c8b31fc1ce9a112bf46eb5b393b' Binary files vim/bundle/vimfiler.vim/.git/objects/eb/5461a8c0887c8b31fc1ce9a112bf46eb5b393b 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/eb/5461a8c0887c8b31fc1ce9a112bf46eb5b393b 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/vimfiler.vim/.git/objects/eb/cf3e8d685cdee1de6934465c7578dc0a277889' Binary files vim/bundle/vimfiler.vim/.git/objects/eb/cf3e8d685cdee1de6934465c7578dc0a277889 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/eb/cf3e8d685cdee1de6934465c7578dc0a277889 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/ed' === removed file 'vim/bundle/vimfiler.vim/.git/objects/ed/a9e6affdec380d13daa07164b6e0e5d6219983' Binary files vim/bundle/vimfiler.vim/.git/objects/ed/a9e6affdec380d13daa07164b6e0e5d6219983 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/ed/a9e6affdec380d13daa07164b6e0e5d6219983 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/ef' === removed file 'vim/bundle/vimfiler.vim/.git/objects/ef/cfbf65080026fadb138cad9c87c17cfd59f0ff' Binary files vim/bundle/vimfiler.vim/.git/objects/ef/cfbf65080026fadb138cad9c87c17cfd59f0ff 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/ef/cfbf65080026fadb138cad9c87c17cfd59f0ff 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimfiler.vim/.git/objects/f0' === added file 'vim/bundle/vimfiler.vim/.git/objects/f0/4699b48bab2c2a2ff317b7331c57237d82e131' Binary files vim/bundle/vimfiler.vim/.git/objects/f0/4699b48bab2c2a2ff317b7331c57237d82e131 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/f0/4699b48bab2c2a2ff317b7331c57237d82e131 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/vimfiler.vim/.git/objects/f4' === added file 'vim/bundle/vimfiler.vim/.git/objects/f4/0180b345ffbbe801624188f3dbea2660c80649' Binary files vim/bundle/vimfiler.vim/.git/objects/f4/0180b345ffbbe801624188f3dbea2660c80649 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/f4/0180b345ffbbe801624188f3dbea2660c80649 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/f5' === removed file 'vim/bundle/vimfiler.vim/.git/objects/f5/66b3f9b4f37d13454d8f37c4965457569ac5a0' Binary files vim/bundle/vimfiler.vim/.git/objects/f5/66b3f9b4f37d13454d8f37c4965457569ac5a0 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/f5/66b3f9b4f37d13454d8f37c4965457569ac5a0 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/vimfiler.vim/.git/objects/f5/e886646f6362ec7a6a821b9018621b93811316' Binary files vim/bundle/vimfiler.vim/.git/objects/f5/e886646f6362ec7a6a821b9018621b93811316 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/f5/e886646f6362ec7a6a821b9018621b93811316 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/f7' === removed file 'vim/bundle/vimfiler.vim/.git/objects/f7/1edfdffc7fd42962fcd0dbc8d66ea29f8cc90c' Binary files vim/bundle/vimfiler.vim/.git/objects/f7/1edfdffc7fd42962fcd0dbc8d66ea29f8cc90c 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/f7/1edfdffc7fd42962fcd0dbc8d66ea29f8cc90c 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimfiler.vim/.git/objects/fb' === removed file 'vim/bundle/vimfiler.vim/.git/objects/fb/f51c5eda8cfae251d6912ac08e2f5a3333360c' Binary files vim/bundle/vimfiler.vim/.git/objects/fb/f51c5eda8cfae251d6912ac08e2f5a3333360c 2016-08-04 08:15:51 +0000 and vim/bundle/vimfiler.vim/.git/objects/fb/f51c5eda8cfae251d6912ac08e2f5a3333360c 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimfiler.vim/.git/objects/fd' === added file 'vim/bundle/vimfiler.vim/.git/objects/fd/2aa3a01575a4f8a52627070c448b8089b8fd90' Binary files vim/bundle/vimfiler.vim/.git/objects/fd/2aa3a01575a4f8a52627070c448b8089b8fd90 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/fd/2aa3a01575a4f8a52627070c448b8089b8fd90 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/vimfiler.vim/.git/objects/fd/4d3b5780cd1ee8afe2f91703ae7b06f497f996' Binary files vim/bundle/vimfiler.vim/.git/objects/fd/4d3b5780cd1ee8afe2f91703ae7b06f497f996 1970-01-01 00:00:00 +0000 and vim/bundle/vimfiler.vim/.git/objects/fd/4d3b5780cd1ee8afe2f91703ae7b06f497f996 2015-08-25 11:01:00 +0000 differ === modified file 'vim/bundle/vimfiler.vim/.git/packed-refs' --- vim/bundle/vimfiler.vim/.git/packed-refs 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/.git/packed-refs 2015-08-25 11:01:00 +0000 @@ -1,2 +1,2 @@ # pack-refs with: peeled fully-peeled -b6fdab3b6633e597d77385422ff47a673ff6d25b refs/remotes/origin/master +299f27e0cce6ba98c8c37e9361f4492c2bdae2a7 refs/remotes/origin/master === modified file 'vim/bundle/vimfiler.vim/.git/refs/heads/master' --- vim/bundle/vimfiler.vim/.git/refs/heads/master 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/.git/refs/heads/master 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -b6fdab3b6633e597d77385422ff47a673ff6d25b +299f27e0cce6ba98c8c37e9361f4492c2bdae2a7 === modified file 'vim/bundle/vimfiler.vim/.git/shallow' --- vim/bundle/vimfiler.vim/.git/shallow 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/.git/shallow 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -b6fdab3b6633e597d77385422ff47a673ff6d25b +299f27e0cce6ba98c8c37e9361f4492c2bdae2a7 === modified file 'vim/bundle/vimfiler.vim/.travis.yml' --- vim/bundle/vimfiler.vim/.travis.yml 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/.travis.yml 2015-08-25 11:01:00 +0000 @@ -1,8 +1,6 @@ -sudo: false - before_script: - git clone https://github.com/syngan/vim-vimlint /tmp/vim-vimlint - git clone https://github.com/ynkdir/vim-vimlparser /tmp/vim-vimlparser script: - - sh /tmp/vim-vimlint/bin/vimlint.sh -l /tmp/vim-vimlint -p /tmp/vim-vimlparser -e EVL103=1 -e EVL102.l:_=1 autoload + - sh /tmp/vim-vimlint/bin/vimlint.sh -l /tmp/vim-vimlint -p /tmp/vim-vimlparser -e EVL103=1 autoload === modified file 'vim/bundle/vimfiler.vim/autoload/unite/filters/matcher_vimfiler_mask.vim' --- vim/bundle/vimfiler.vim/autoload/unite/filters/matcher_vimfiler_mask.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/unite/filters/matcher_vimfiler_mask.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#filters#matcher_vimfiler_mask#define() abort "{{{ +function! unite#filters#matcher_vimfiler_mask#define() "{{{ return s:matcher endfunction"}}} @@ -35,7 +35,7 @@ \ 'description' : 'vimfiler mask matcher', \} -function! s:matcher.filter(candidates, context) abort "{{{ +function! s:matcher.filter(candidates, context) "{{{ if a:context.input == '' return a:candidates endif === modified file 'vim/bundle/vimfiler.vim/autoload/unite/sources/vimfiler_drive.vim' --- vim/bundle/vimfiler.vim/autoload/unite/sources/vimfiler_drive.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/unite/sources/vimfiler_drive.vim 2015-08-25 11:01:00 +0000 @@ -34,7 +34,7 @@ \ 'V:/', 'W:/', 'X:/', 'Y:/', 'Z:/' \ ] : [expand('~'), expand('~/Downloads/')]) -function! unite#sources#vimfiler_drive#define() abort "{{{ +function! unite#sources#vimfiler_drive#define() "{{{ return s:source endfunction"}}} @@ -45,7 +45,7 @@ \ 'is_listed' : 0, \ } -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ if !exists('s:drives') || a:context.is_redraw " Detect mounted drive. let s:drives = copy(g:vimfiler_detect_drives) === modified file 'vim/bundle/vimfiler.vim/autoload/unite/sources/vimfiler_execute.vim' --- vim/bundle/vimfiler.vim/autoload/unite/sources/vimfiler_execute.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/unite/sources/vimfiler_execute.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#sources#vimfiler_execute#define() abort "{{{ +function! unite#sources#vimfiler_execute#define() "{{{ return s:source endfunction"}}} @@ -37,25 +37,25 @@ \ 'is_listed' : 0, \ } -function! s:source.hooks.on_init(args, context) abort "{{{ +function! s:source.hooks.on_init(args, context) "{{{ let winnr = winnr() try - call vimfiler#util#winmove(a:context.vimfiler__winnr) + execute a:context.vimfiler__winnr.'wincmd w' if &filetype !=# 'vimfiler' return [] endif - let a:context.source__file = vimfiler#get_file(b:vimfiler, line('.')) + let a:context.source__file = vimfiler#get_file(line('.')) finally - call vimfiler#util#winmove(winnr) + execute winnr.'wincmd w' endtry if &filetype !=# 'vimfiler' return endif endfunction"}}} -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ if !has_key(a:context, 'source__file') return [] endif === modified file 'vim/bundle/vimfiler.vim/autoload/unite/sources/vimfiler_history.vim' --- vim/bundle/vimfiler.vim/autoload/unite/sources/vimfiler_history.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/unite/sources/vimfiler_history.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#sources#vimfiler_history#define() abort "{{{ +function! unite#sources#vimfiler_history#define() "{{{ return s:source endfunction"}}} @@ -39,13 +39,13 @@ \ 'is_listed' : 0, \ } -function! s:source.hooks.on_init(args, context) abort "{{{ +function! s:source.hooks.on_init(args, context) "{{{ if &filetype !=# 'vimfiler' return endif endfunction"}}} -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ let num = 0 let candidates = [] for [bufname, history] in reverse(vimfiler#get_histories()) @@ -75,7 +75,7 @@ \ 'is_invalidate_cache' : 1, \ 'is_quit' : 0, \ } -function! s:action_table.delete.func(candidates) abort "{{{ +function! s:action_table.delete.func(candidates) "{{{ let histories = vimfiler#get_histories() for candidate in sort(a:candidates, 's:compare') call remove(histories, candidate.action__nr) @@ -88,7 +88,7 @@ unlet! s:action_table "}}} -function! s:compare(candidate_a, candidate_b) abort "{{{ +function! s:compare(candidate_a, candidate_b) "{{{ return a:candidate_b.action__nr - a:candidate_a.action__nr endfunction"}}} === modified file 'vim/bundle/vimfiler.vim/autoload/unite/sources/vimfiler_mask.vim' --- vim/bundle/vimfiler.vim/autoload/unite/sources/vimfiler_mask.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/unite/sources/vimfiler_mask.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#sources#vimfiler_mask#define() abort "{{{ +function! unite#sources#vimfiler_mask#define() "{{{ return s:source endfunction"}}} @@ -40,7 +40,7 @@ \ 'filters' : [ 'matcher_vimfiler/mask' ], \ } -function! s:source.hooks.on_init(args, context) abort "{{{ +function! s:source.hooks.on_init(args, context) "{{{ if &filetype !=# 'vimfiler' return endif @@ -52,7 +52,7 @@ \ '[vimfiler/mask] Current mask: ' . a:context.source__mask) endfunction"}}} -function! s:source.change_candidates(args, context) abort "{{{ +function! s:source.change_candidates(args, context) "{{{ if !has_key(a:context, 'source__mask') return [] endif @@ -77,7 +77,7 @@ let s:action_table.change = { \ 'description' : 'change current mask', \ } -function! s:action_table.change.func(candidate) abort "{{{ +function! s:action_table.change.func(candidate) "{{{ let b:vimfiler.current_mask = unite#get_context().input call vimfiler#redraw_screen() endfunction"}}} === modified file 'vim/bundle/vimfiler.vim/autoload/unite/sources/vimfiler_popd.vim' --- vim/bundle/vimfiler.vim/autoload/unite/sources/vimfiler_popd.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/unite/sources/vimfiler_popd.vim 2015-08-25 11:01:00 +0000 @@ -26,11 +26,11 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#sources#vimfiler_popd#define() abort "{{{ +function! unite#sources#vimfiler_popd#define() "{{{ return s:source endfunction"}}} -function! unite#sources#vimfiler_popd#pushd() abort "{{{ +function! unite#sources#vimfiler_popd#pushd() "{{{ if &filetype !=# 'vimfiler' return endif @@ -53,7 +53,7 @@ \ 'alias_table' : { 'cd' : 'lcd' }, \ } -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ let num = 0 let _ = [] for stack in s:directory_stack @@ -81,21 +81,21 @@ \ 'is_invalidate_cache' : 1, \ 'is_quit' : 0, \ } -function! s:action_table.delete.func(candidates) abort "{{{ +function! s:action_table.delete.func(candidates) "{{{ for candidate in sort(a:candidates, 's:compare') call remove(s:directory_stack, \ candidate.action__nr) endfor endfunction"}}} -function! s:compare(candidate_a, candidate_b) abort "{{{ +function! s:compare(candidate_a, candidate_b) "{{{ return a:candidate_b.action__nr - a:candidate_a.action__nr endfunction"}}} let s:action_table.cd = { \ 'description' : 'cd vimfiler directory from directory stack', \ } -function! s:action_table.cd.func(candidate) abort "{{{ +function! s:action_table.cd.func(candidate) "{{{ if &filetype != 'vimfiler' return endif @@ -116,7 +116,7 @@ unlet! s:action_table "}}} -function! s:compare(candidate_a, candidate_b) abort "{{{ +function! s:compare(candidate_a, candidate_b) "{{{ return a:candidate_b.action__nr - a:candidate_a.action__nr endfunction"}}} === modified file 'vim/bundle/vimfiler.vim/autoload/unite/sources/vimfiler_sort.vim' --- vim/bundle/vimfiler.vim/autoload/unite/sources/vimfiler_sort.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/unite/sources/vimfiler_sort.vim 2015-08-25 11:01:00 +0000 @@ -26,11 +26,11 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#sources#vimfiler_sort#define() abort "{{{ +function! unite#sources#vimfiler_sort#define() "{{{ return s:source endfunction"}}} -let s:Cache = vimfiler#util#get_vital_cache() +let s:Cache = vimfiler#util#get_vital().import('System.Cache') let s:source = { \ 'name' : 'vimfiler/sort', @@ -41,7 +41,7 @@ \ 'is_listed' : 0, \ } -function! s:source.hooks.on_init(args, context) abort "{{{ +function! s:source.hooks.on_init(args, context) "{{{ if &filetype !=# 'vimfiler' return endif @@ -49,7 +49,7 @@ let a:context.source__sort = b:vimfiler.local_sort_type endfunction"}}} -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ if !has_key(a:context, 'source__sort') return [] endif @@ -77,7 +77,7 @@ let s:action_table.sort = { \ 'description' : 'sort vimfiler items', \ } -function! s:action_table.sort.func(candidate) abort "{{{ +function! s:action_table.sort.func(candidate) "{{{ if &filetype != 'vimfiler' call unite#print_error('Current vimfiler is not found.') return === modified file 'vim/bundle/vimfiler.vim/autoload/vimfiler.vim' --- vim/bundle/vimfiler.vim/autoload/vimfiler.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/vimfiler.vim 2015-08-25 11:01:00 +0000 @@ -46,16 +46,16 @@ "}}} " User utility functions. "{{{ -function! vimfiler#default_settings() abort "{{{ +function! vimfiler#default_settings() "{{{ return vimfiler#init#_default_settings() endfunction"}}} -function! vimfiler#set_execute_file(exts, command) abort "{{{ +function! vimfiler#set_execute_file(exts, command) "{{{ let g:vimfiler_execute_file_list = \ get(g:, 'vimfiler_execute_file_list', {}) return vimfiler#util#set_dictionary_helper(g:vimfiler_execute_file_list, \ a:exts, a:command) endfunction"}}} -function! vimfiler#set_extensions(kind, exts) abort "{{{ +function! vimfiler#set_extensions(kind, exts) "{{{ let g:vimfiler_extensions = \ get(g:, 'vimfiler_extensions', {}) @@ -64,124 +64,145 @@ let g:vimfiler_extensions[a:kind][ext] = 1 endfor endfunction"}}} -function! vimfiler#do_action(action) abort "{{{ - return printf(":\call vimfiler#mappings#do_action(b:vimfiler,%s)\", - \ string(a:action)) -endfunction"}}} -function! vimfiler#do_switch_action(action) abort "{{{ - return printf(":\call vimfiler#mappings#do_switch_action( - \ b:vimfiler, %s)\", string(a:action)) -endfunction"}}} -function! vimfiler#smart_cursor_map(directory_map, file_map) abort "{{{ +function! vimfiler#do_action(action) "{{{ + return printf(":\call vimfiler#mappings#do_action(%s)\", + \ string(a:action)) +endfunction"}}} +function! vimfiler#do_switch_action(action) "{{{ + return printf(":\call vimfiler#mappings#do_switch_action(%s)\", + \ string(a:action)) +endfunction"}}} +function! vimfiler#smart_cursor_map(directory_map, file_map) "{{{ return vimfiler#mappings#smart_cursor_map(a:directory_map, a:file_map) endfunction"}}} -function! vimfiler#get_status_string() abort "{{{ +function! vimfiler#get_status_string() "{{{ return !exists('b:vimfiler') ? '' : b:vimfiler.status endfunction"}}} "}}} " vimfiler plugin utility functions. "{{{ -function! vimfiler#start(path, ...) abort "{{{ +function! vimfiler#get_current_vimfiler() "{{{ + return exists('b:vimfiler') ? b:vimfiler : s:current_vimfiler +endfunction"}}} +function! vimfiler#set_current_vimfiler(vimfiler) "{{{ + let s:current_vimfiler = a:vimfiler + call unite#set_current_unite(a:vimfiler.unite) +endfunction"}}} +function! vimfiler#get_context() "{{{ + return vimfiler#get_current_vimfiler().context +endfunction"}}} +function! vimfiler#set_context(context) "{{{ + let old_context = vimfiler#get_context() + + if exists('b:vimfiler') + let b:vimfiler.context = a:context + else + let s:current_vimfiler.context = a:context + endif + + return old_context +endfunction"}}} +function! vimfiler#start(path, ...) "{{{ return call('vimfiler#init#_start', [a:path] + a:000) endfunction"}}} -function! vimfiler#get_directory_files(directory, ...) abort "{{{ +function! vimfiler#get_directory_files(directory, ...) "{{{ return call('vimfiler#helper#_get_directory_files', \ [a:directory] + a:000) endfunction"}}} -function! vimfiler#force_redraw_screen(...) abort "{{{ +function! vimfiler#force_redraw_screen(...) "{{{ return call('vimfiler#view#_force_redraw_screen', a:000) endfunction"}}} -function! vimfiler#redraw_screen() abort "{{{ +function! vimfiler#redraw_screen() "{{{ return vimfiler#view#_redraw_screen() endfunction"}}} -function! vimfiler#get_marked_files(vimfiler) abort "{{{ - return filter(copy(a:vimfiler.current_files), +function! vimfiler#get_marked_files() "{{{ + return filter(copy(vimfiler#get_current_vimfiler().current_files), \ 'v:val.vimfiler__is_marked') endfunction"}}} -function! vimfiler#get_marked_filenames(vimfiler) abort "{{{ - return map(vimfiler#get_marked_files(a:vimfiler), 'v:val.action__path') +function! vimfiler#get_marked_filenames() "{{{ + return map(vimfiler#get_marked_files(), 'v:val.action__path') endfunction"}}} -function! vimfiler#get_escaped_marked_files(vimfiler) abort "{{{ - return map(vimfiler#get_marked_filenames(a:vimfiler), +function! vimfiler#get_escaped_marked_files() "{{{ + return map(vimfiler#get_marked_filenames(), \ '"\"" . v:val . "\""') endfunction"}}} -function! vimfiler#get_filename(...) abort "{{{ +function! vimfiler#get_filename(...) "{{{ let line_num = get(a:000, 0, line('.')) return getline(line_num) == '..' ? '..' : \ (line_num < b:vimfiler.prompt_linenr || \ empty(b:vimfiler.current_files)) ? '' : - \ b:vimfiler.current_files[ - \ vimfiler#get_file_index(b:vimfiler, line_num)].action__path + \ b:vimfiler.current_files[vimfiler#get_file_index(line_num)].action__path endfunction"}}} -function! vimfiler#get_file(vimfiler, ...) abort "{{{ +function! vimfiler#get_file(...) "{{{ let line_num = get(a:000, 0, line('.')) - let index = vimfiler#get_file_index(a:vimfiler, line_num) + let vimfiler = vimfiler#get_current_vimfiler() + let index = vimfiler#get_file_index(line_num) return index < 0 ? {} : - \ get(a:vimfiler.current_files, index, {}) + \ get(vimfiler.current_files, index, {}) endfunction"}}} -function! vimfiler#get_file_directory(...) abort "{{{ +function! vimfiler#get_file_directory(...) "{{{ return call('vimfiler#helper#_get_file_directory', a:000) endfunction"}}} -function! vimfiler#get_file_index(vimfiler, line_num) abort "{{{ - return a:line_num - vimfiler#get_file_offset(a:vimfiler) - 1 -endfunction"}}} -function! vimfiler#get_original_file_index(line_num) abort "{{{ - return index(b:vimfiler.original_files, - \ vimfiler#get_file(b:vimfiler, a:line_num)) -endfunction"}}} -function! vimfiler#get_line_number(vimfiler, index) abort "{{{ - return a:index + vimfiler#get_file_offset(a:vimfiler) + 1 -endfunction"}}} -function! vimfiler#get_file_offset(vimfiler) abort "{{{ - return a:vimfiler.prompt_linenr -endfunction"}}} -function! vimfiler#force_redraw_all_vimfiler(...) abort "{{{ +function! vimfiler#get_file_index(line_num) "{{{ + return a:line_num - vimfiler#get_file_offset() - 1 +endfunction"}}} +function! vimfiler#get_original_file_index(line_num) "{{{ + return index(b:vimfiler.original_files, vimfiler#get_file(a:line_num)) +endfunction"}}} +function! vimfiler#get_line_number(index) "{{{ + return a:index + vimfiler#get_file_offset() + 1 +endfunction"}}} +function! vimfiler#get_file_offset() "{{{ + let vimfiler = vimfiler#get_current_vimfiler() + return vimfiler.prompt_linenr +endfunction"}}} +function! vimfiler#force_redraw_all_vimfiler(...) "{{{ return call('vimfiler#view#_force_redraw_all_vimfiler', a:000) endfunction"}}} -function! vimfiler#redraw_all_vimfiler() abort "{{{ +function! vimfiler#redraw_all_vimfiler() "{{{ return vimfiler#view#_redraw_all_vimfiler() endfunction"}}} -function! vimfiler#get_datemark(file) abort "{{{ +function! vimfiler#get_datemark(file) "{{{ return vimfiler#init#_get_datemark(a:file) endfunction"}}} -function! vimfiler#get_filetype(file) abort "{{{ +function! vimfiler#get_filetype(file) "{{{ return vimfiler#init#_get_filetype(a:file) endfunction"}}} -function! vimfiler#exists_another_vimfiler() abort "{{{ +function! vimfiler#exists_another_vimfiler() "{{{ return exists('b:vimfiler') \ && bufnr('%') != b:vimfiler.another_vimfiler_bufnr \ && getbufvar(b:vimfiler.another_vimfiler_bufnr, \ '&filetype') ==# 'vimfiler' \ && bufloaded(b:vimfiler.another_vimfiler_bufnr) > 0 endfunction"}}} -function! vimfiler#winnr_another_vimfiler() abort "{{{ +function! vimfiler#winnr_another_vimfiler() "{{{ return (!exists('b:vimfiler') \ || winnr() == bufwinnr(b:vimfiler.another_vimfiler_bufnr)) ? \ -1 : bufwinnr(b:vimfiler.another_vimfiler_bufnr) endfunction"}}} -function! vimfiler#get_another_vimfiler() abort "{{{ +function! vimfiler#get_another_vimfiler() "{{{ return vimfiler#exists_another_vimfiler() ? \ getbufvar(b:vimfiler.another_vimfiler_bufnr, 'vimfiler') : '' endfunction"}}} -function! vimfiler#parse_path(path) abort "{{{ +function! vimfiler#parse_path(path) "{{{ return vimfiler#helper#_parse_path(a:path) endfunction"}}} -function! vimfiler#initialize_context(context) abort "{{{ +function! vimfiler#initialize_context(context) "{{{ return vimfiler#init#_context(a:context) endfunction"}}} -function! vimfiler#get_histories() abort "{{{ +function! vimfiler#get_histories() "{{{ if !exists('s:vimfiler_current_histories') let s:vimfiler_current_histories = [] endif return copy(s:vimfiler_current_histories) endfunction"}}} -function! vimfiler#set_histories(histories) abort "{{{ +function! vimfiler#set_histories(histories) "{{{ let s:vimfiler_current_histories = a:histories endfunction"}}} -function! vimfiler#complete(arglead, cmdline, cursorpos) abort "{{{ +function! vimfiler#complete(arglead, cmdline, cursorpos) "{{{ return vimfiler#helper#_complete(a:arglead, a:cmdline, a:cursorpos) endfunction"}}} -function! vimfiler#complete_path(arglead, cmdline, cursorpos) abort "{{{ +function! vimfiler#complete_path(arglead, cmdline, cursorpos) "{{{ return vimfiler#helper#_complete_path(a:arglead, a:cmdline, a:cursorpos) endfunction"}}} "}}} === modified file 'vim/bundle/vimfiler.vim/autoload/vimfiler/columns/size.vim' --- vim/bundle/vimfiler.vim/autoload/vimfiler/columns/size.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/vimfiler/columns/size.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! vimfiler#columns#size#define() abort +function! vimfiler#columns#size#define() return s:column endfunction"}}} @@ -36,17 +36,17 @@ \ 'syntax' : 'vimfilerColumn__Size', \ } -function! s:column.length(files, context) abort "{{{ +function! s:column.length(files, context) "{{{ return 6 endfunction"}}} -function! s:column.define_syntax(context) abort "{{{ +function! s:column.define_syntax(context) "{{{ syntax match vimfilerColumn__SizeLine \ '.*' contained containedin=vimfilerColumn__Size highlight def link vimfilerColumn__SizeLine Constant endfunction"}}} -function! s:column.get(file, context) abort "{{{ +function! s:column.get(file, context) "{{{ if a:file.vimfiler__is_directory return ' ' endif @@ -97,7 +97,7 @@ endfunction"}}} " @vimlint(EVL101, 1, l:pattern) -function! s:get_lua_file_size(filename) abort "{{{ +function! s:get_lua_file_size(filename) "{{{ lua << EOF do local file = io.open(vim.eval('iconv(a:filename, &encoding, "char")')) === modified file 'vim/bundle/vimfiler.vim/autoload/vimfiler/columns/time.vim' --- vim/bundle/vimfiler.vim/autoload/vimfiler/columns/time.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/vimfiler/columns/time.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! vimfiler#columns#time#define() abort +function! vimfiler#columns#time#define() return s:column endfunction"}}} @@ -36,11 +36,11 @@ \ 'syntax' : 'vimfilerColumn__Time', \ } -function! s:column.length(files, context) abort "{{{ +function! s:column.length(files, context) "{{{ return len(strftime(g:vimfiler_time_format, 0)) + 1 endfunction"}}} -function! s:column.define_syntax(context) abort "{{{ +function! s:column.define_syntax(context) "{{{ syntax match vimfilerColumn__TimeNormal \ '#[^#]\+' contained \ containedin=vimfilerColumn__Time @@ -66,7 +66,7 @@ highlight def link vimfilerColumn__TimeIgnore Ignore endfunction"}}} -function! s:column.get(file, context) abort "{{{ +function! s:column.get(file, context) "{{{ let datemark = s:get_datemark(a:file) return (a:file.vimfiler__filetime =~ '^-\?\d\+$' ? \ (a:file.vimfiler__filetime == -1 ? '' : @@ -74,7 +74,7 @@ \ : datemark . a:file.vimfiler__filetime) endfunction"}}} -function! s:get_datemark(file) abort "{{{ +function! s:get_datemark(file) "{{{ if a:file.vimfiler__filetime !~ '^\d\+$' return '~' endif === modified file 'vim/bundle/vimfiler.vim/autoload/vimfiler/columns/type.vim' --- vim/bundle/vimfiler.vim/autoload/vimfiler/columns/type.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/vimfiler/columns/type.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! vimfiler#columns#type#define() abort +function! vimfiler#columns#type#define() return s:column endfunction"}}} @@ -36,11 +36,11 @@ \ 'syntax' : 'vimfilerColumn__Type', \ } -function! s:column.length(files, context) abort "{{{ +function! s:column.length(files, context) "{{{ return 3 endfunction"}}} -function! s:column.define_syntax(context) abort "{{{ +function! s:column.define_syntax(context) "{{{ syntax match vimfilerColumn__TypeText '\[T\]' \ contained containedin=vimfilerColumn__Type syntax match vimfilerColumn__TypeImage '\[I\]' @@ -68,7 +68,7 @@ highlight def link vimfilerColumn__TypeLink Comment endfunction"}}} -function! s:column.get(file, context) abort "{{{ +function! s:column.get(file, context) "{{{ let ext = tolower(a:file.vimfiler__extension) if (vimfiler#util#is_windows() && ext ==? 'LNK') === modified file 'vim/bundle/vimfiler.vim/autoload/vimfiler/custom.vim' --- vim/bundle/vimfiler.vim/autoload/vimfiler/custom.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/vimfiler/custom.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! vimfiler#custom#get() abort "{{{ +function! vimfiler#custom#get() "{{{ if !exists('s:custom') let s:custom = {} let s:custom.profiles = {} @@ -35,7 +35,7 @@ return s:custom endfunction"}}} -function! vimfiler#custom#profile(profile_name, option_name, value) abort "{{{ +function! vimfiler#custom#profile(profile_name, option_name, value) "{{{ let custom = vimfiler#custom#get() let profile_name = \ has_key(custom.profiles, a:profile_name) ? @@ -49,7 +49,7 @@ let custom.profiles[key][a:option_name] = a:value endfor endfunction"}}} -function! vimfiler#custom#get_profile(profile_name, option_name) abort "{{{ +function! vimfiler#custom#get_profile(profile_name, option_name) "{{{ let custom = vimfiler#custom#get() let profile_name = \ has_key(custom.profiles, a:profile_name) ? @@ -62,7 +62,7 @@ return custom.profiles[profile_name][a:option_name] endfunction"}}} -function! s:init_profile() abort "{{{ +function! s:init_profile() "{{{ return { \ 'context' : {}, \ } === modified file 'vim/bundle/vimfiler.vim/autoload/vimfiler/exrename.vim' --- vim/bundle/vimfiler.vim/autoload/vimfiler/exrename.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/vimfiler/exrename.vim 2015-08-25 11:01:00 +0000 @@ -3,7 +3,7 @@ " Original 'exrename.vim' has been moved into 'unite.vim' " This 'exrename.vim' exists for backward-compatibility " -function! s:post_rename_callback(exrename) abort +function! s:post_rename_callback(exrename) call vimfiler#force_redraw_all_vimfiler() endfunction === modified file 'vim/bundle/vimfiler.vim/autoload/vimfiler/filters/matcher_ignore_files.vim' --- vim/bundle/vimfiler.vim/autoload/vimfiler/filters/matcher_ignore_files.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/vimfiler/filters/matcher_ignore_files.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! vimfiler#filters#matcher_ignore_files#define() abort +function! vimfiler#filters#matcher_ignore_files#define() return s:filter endfunction"}}} @@ -35,7 +35,7 @@ \ 'description' : 'ignore project ignore files', \ } -function! s:filter.filter(files, context) abort "{{{ +function! s:filter.filter(files, context) "{{{ let path = b:vimfiler.current_dir let project = unite#util#path2project_directory(path) . '/' === modified file 'vim/bundle/vimfiler.vim/autoload/vimfiler/filters/matcher_ignore_pattern.vim' --- vim/bundle/vimfiler.vim/autoload/vimfiler/filters/matcher_ignore_pattern.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/vimfiler/filters/matcher_ignore_pattern.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! vimfiler#filters#matcher_ignore_pattern#define() abort +function! vimfiler#filters#matcher_ignore_pattern#define() return s:filter endfunction"}}} @@ -35,9 +35,9 @@ \ 'description' : 'ignore g:vimfiler_ignore_pattern matched files', \ } -function! s:filter.filter(files, context) abort "{{{ - for pattern in filter(vimfiler#util#convert2list( - \ g:vimfiler_ignore_pattern), "v:val != ''") +function! s:filter.filter(files, context) "{{{ + for pattern in vimfiler#util#convert2list( + \ g:vimfiler_ignore_pattern) call filter(a:files, \ "v:val.vimfiler__filename !~? pattern") endfor === modified file 'vim/bundle/vimfiler.vim/autoload/vimfiler/filters/matcher_ignore_wildignore.vim' --- vim/bundle/vimfiler.vim/autoload/vimfiler/filters/matcher_ignore_wildignore.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/vimfiler/filters/matcher_ignore_wildignore.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! vimfiler#filters#matcher_ignore_wildignore#define() abort +function! vimfiler#filters#matcher_ignore_wildignore#define() return s:filter endfunction"}}} @@ -35,7 +35,7 @@ \ 'description' : 'ignore wildignore matched files', \ } -function! s:filter.filter(files, context) abort "{{{ +function! s:filter.filter(files, context) "{{{ for pattern in unite#filters#globs2vim_patterns(split(&wildignore, ',')) call filter(a:files, \ "v:val.action__path !~? pattern") === modified file 'vim/bundle/vimfiler.vim/autoload/vimfiler/handler.vim' --- vim/bundle/vimfiler.vim/autoload/vimfiler/handler.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/vimfiler/handler.vim 2015-08-25 11:01:00 +0000 @@ -77,8 +77,10 @@ if bufnr('%') != bufnr " Restore window. - call vimfiler#util#winmove(bufwinnr(bufnr)) + execute bufwinnr(bufnr).'wincmd w' endif + + call vimfiler#set_current_vimfiler(b:vimfiler) endfunction"}}} function! s:on_BufWriteCmd(source_name, source_args, context) "{{{1 @@ -117,13 +119,13 @@ endfunction"}}} -function! s:on_FileWriteCmd(source_name, source_args, context) abort "{{{ +function! s:on_FileWriteCmd(source_name, source_args, context) "{{{ " FileWriteCmd is published by :write or other commands with partial range " such as 1,2 where 2 < line('$'). return s:write(a:source_name, a:source_args, line("'["), line("']"), 'FileWriteCmd') endfunction"}}} -function! s:write(source_name, source_args, line1, line2, event_name) abort "{{{ +function! s:write(source_name, source_args, line1, line2, event_name) "{{{ if !exists('b:vimfiler') || !has_key(b:vimfiler, 'current_file') || !&l:modified return endif @@ -144,10 +146,10 @@ endfunction"}}} " Event functions. -function! vimfiler#handler#_event_bufwin_enter(bufnr) abort "{{{ +function! vimfiler#handler#_event_bufwin_enter(bufnr) "{{{ if a:bufnr != bufnr('%') && bufwinnr(a:bufnr) > 0 let winnr = winnr() - call vimfiler#util#winmove(bufwinnr(a:bufnr)) + execute bufwinnr(a:bufnr) 'wincmd w' endif try @@ -157,12 +159,12 @@ return endif - let vimfiler = b:vimfiler + let vimfiler = vimfiler#get_current_vimfiler() if !has_key(vimfiler, 'context') return endif - let context = b:vimfiler.context + let context = vimfiler#get_context() if context.winwidth > 0 execute 'vertical resize' context.winwidth @@ -190,12 +192,12 @@ endif finally if exists('winnr') - call vimfiler#util#winmove(winnr) + execute winnr.'wincmd w' endif endtry endfunction"}}} -function! vimfiler#handler#_event_bufwin_leave(bufnr) abort "{{{ +function! vimfiler#handler#_event_bufwin_leave(bufnr) "{{{ let vimfiler = getbufvar(str2nr(a:bufnr), 'vimfiler') if type(vimfiler) != type({}) @@ -211,7 +213,7 @@ endif endfunction"}}} -function! vimfiler#handler#_event_cursor_moved() abort "{{{ +function! vimfiler#handler#_event_cursor_moved() "{{{ if !exists('b:vimfiler') return endif === modified file 'vim/bundle/vimfiler.vim/autoload/vimfiler/helper.vim' --- vim/bundle/vimfiler.vim/autoload/vimfiler/helper.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/vimfiler/helper.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! vimfiler#helper#_get_directory_files(directory, ...) abort "{{{ +function! vimfiler#helper#_get_directory_files(directory, ...) "{{{ " Save current files. let is_manualed = get(a:000, 0, 0) @@ -53,7 +53,7 @@ return vimfiler#helper#_sort_files(current_files) endfunction"}}} -function! vimfiler#helper#_sort_files(files) abort "{{{ +function! vimfiler#helper#_sort_files(files) "{{{ let files = a:files let dirs = filter(copy(a:files), 'v:val.vimfiler__is_directory') let files = filter(copy(a:files), '!v:val.vimfiler__is_directory') @@ -66,7 +66,7 @@ return files endfunction"}}} -function! vimfiler#helper#_parse_path(path) abort "{{{ +function! vimfiler#helper#_parse_path(path) "{{{ let path = a:path let source_name = matchstr(path, '^\h[^:]*\ze:') @@ -89,8 +89,13 @@ return insert(source_args, source_name) endfunction"}}} -function! vimfiler#helper#_get_cd_path(dir) abort "{{{ +function! vimfiler#helper#_get_cd_path(dir) "{{{ let dir = vimfiler#util#substitute_path_separator(a:dir) + if b:vimfiler.source !=# 'file' && + \ dir !~ ':\|^//' && dir =~ '^/\|^\a:' + " Use file source. + let dir = 'file:' . dir + endif if dir =~ '^\h\w*:' " Parse path. @@ -153,7 +158,7 @@ return fullpath endfunction"}}} -function! vimfiler#helper#_complete(arglead, cmdline, cursorpos) abort "{{{ +function! vimfiler#helper#_complete(arglead, cmdline, cursorpos) "{{{ let _ = [] " Option names completion. @@ -172,7 +177,7 @@ return sort(_) endfunction"}}} -function! vimfiler#helper#_complete_path(arglead, cmdline, cursorpos) abort "{{{ +function! vimfiler#helper#_complete_path(arglead, cmdline, cursorpos) "{{{ let ret = vimfiler#parse_path(a:cmdline) let source_name = ret[0] let source_args = ret[1:] @@ -202,12 +207,12 @@ return sort(_) endfunction"}}} -function! vimfiler#helper#_get_file_directory(...) abort "{{{ +function! vimfiler#helper#_get_file_directory(...) "{{{ let line_num = get(a:000, 0, line('.')) - let file = vimfiler#get_file(b:vimfiler, line_num) + let file = vimfiler#get_file(line_num) if empty(file) - let directory = b:vimfiler.current_dir + let directory = vimfiler#get_current_vimfiler().current_dir else let directory = unite#helper#get_candidate_directory(file) @@ -222,7 +227,7 @@ endfunction"}}} -function! vimfiler#helper#_get_buffer_directory(bufnr) abort "{{{ +function! vimfiler#helper#_get_buffer_directory(bufnr) "{{{ let filetype = getbufvar(a:bufnr, '&filetype') if filetype ==# 'vimfiler' let dir = getbufvar(a:bufnr, 'vimfiler').current_dir @@ -238,14 +243,14 @@ return dir endfunction"}}} -function! vimfiler#helper#_set_cursor() abort "{{{ +function! vimfiler#helper#_set_cursor() "{{{ let pos = getpos('.') execute 'normal!' (line('.') <= winheight(0) ? 'zb' : \ line('$') - line('.') > winheight(0) ? 'zz' : line('$').'zb') call setpos('.', pos) endfunction"}}} -function! vimfiler#helper#_call_filters(files, context) abort "{{{ +function! vimfiler#helper#_call_filters(files, context) "{{{ let files = a:files for filter in b:vimfiler.filters let files = filter.filter(files, a:context) @@ -253,7 +258,7 @@ return files endfunction"}}} -function! s:sort(files, type) abort "{{{ +function! s:sort(files, type) "{{{ let ignorecase_save = &ignorecase try let &ignorecase = vimfiler#util#is_windows() @@ -291,7 +296,7 @@ return files endfunction"}}} -function! vimfiler#helper#_sort_human(candidates, has_lua) abort "{{{ +function! vimfiler#helper#_sort_human(candidates, has_lua) "{{{ if !a:has_lua || len(filter(copy(a:candidates), \ "v:val.vimfiler__filename =~ '\\d'")) >= 2 return sort(a:candidates, 's:compare_filename') @@ -323,7 +328,7 @@ endfunction"}}} " Compare filename by human order. "{{{ -function! s:compare_filename(i1, i2) abort +function! s:compare_filename(i1, i2) let words_1 = s:get_words(a:i1.vimfiler__filename) let words_2 = s:get_words(a:i2.vimfiler__filename) let words_1_len = len(words_1) === modified file 'vim/bundle/vimfiler.vim/autoload/vimfiler/init.vim' --- vim/bundle/vimfiler.vim/autoload/vimfiler/init.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/vimfiler/init.vim 2015-08-25 11:01:00 +0000 @@ -93,15 +93,15 @@ endif "}}} -let s:manager = vimfiler#util#get_vital_buffer() +let s:manager = vimfiler#util#get_vital().import('Vim.Buffer') let s:loaded_columns = {} let s:loaded_filters = {} -function! vimfiler#init#_initialize() abort "{{{ +function! vimfiler#init#_initialize() "{{{ " Dummy initialize endfunction"}}} -function! vimfiler#init#_command(default, args) abort "{{{ +function! vimfiler#init#_command(default, args) "{{{ let args = [] let options = a:default for arg in split(a:args, '\%(\\\@ 0 wincmd p else - call vimfiler#util#winmove( - \ bufwinnr(a:context.alternate_buffer)) - keepjumps call winrestview(a:context.prev_winsaveview) + execute bufwinnr(a:context.alternate_buffer).'wincmd w' endif endif endfunction"}}} -function! s:create_vimfiler_buffer(path, context) abort "{{{ +function! s:create_vimfiler_buffer(path, context) "{{{ let search_path = fnamemodify(bufname('%'), ':p') let path = a:path if path == '' @@ -523,9 +521,6 @@ " Create new buffer name. let prefix = 'vimfiler:' let prefix .= context.buffer_name - if a:path =~ ':' && a:path !~ '/$' - let prefix .= '@' . a:path - endif let postfix = vimfiler#init#_get_postfix(prefix, 1) @@ -573,13 +568,12 @@ if winbufnr(winnr('#')) > 0 wincmd p else - call vimfiler#util#winmove( - \ bufwinnr(a:context.alternate_buffer)) + execute bufwinnr(a:context.alternate_buffer).'wincmd w' endif endif endfunction"}}} -function! vimfiler#init#_default_settings() abort "{{{ +function! vimfiler#init#_default_settings() "{{{ call s:buffer_default_settings() " Set autocommands. @@ -597,7 +591,7 @@ augroup end"}}} endfunction"}}} -function! s:buffer_default_settings() abort "{{{ +function! s:buffer_default_settings() "{{{ setlocal buftype=nofile setlocal noswapfile setlocal noreadonly @@ -616,23 +610,16 @@ endif if has('conceal') - if &l:conceallevel < 2 - setlocal conceallevel=2 - endif + setlocal conceallevel=3 setlocal concealcursor=nvc endif - if b:vimfiler.context.explorer + if vimfiler#get_context().explorer setlocal nobuflisted endif - - if g:vimfiler_force_overwrite_statusline - \ && &l:statusline !=# b:vimfiler.statusline - let &l:statusline = b:vimfiler.statusline - endif endfunction"}}} -function! vimfiler#init#_get_postfix(prefix, is_create) abort "{{{ +function! vimfiler#init#_get_postfix(prefix, is_create) "{{{ let buffers = get(a:000, 0, range(1, bufnr('$'))) let buflist = vimfiler#util#sort_by(filter(map(buffers, \ 'bufname(v:val)'), 'stridx(v:val, a:prefix) >= 0'), @@ -645,7 +632,7 @@ return num == '' && !a:is_create ? '' : \ '@' . (a:is_create ? (num + 1) : num) endfunction"}}} -function! vimfiler#init#_get_filetype(file) abort "{{{ +function! vimfiler#init#_get_filetype(file) "{{{ let ext = tolower(a:file.vimfiler__extension) if (vimfiler#util#is_windows() && ext ==? 'LNK') @@ -679,7 +666,7 @@ return ' ' endif endfunction"}}} -function! vimfiler#init#_get_datemark(file) abort "{{{ +function! vimfiler#init#_get_datemark(file) "{{{ let time = localtime() - a:file.vimfiler__filetime if time < 86400 " 60 * 60 * 24 === modified file 'vim/bundle/vimfiler.vim/autoload/vimfiler/mappings.vim' --- vim/bundle/vimfiler.vim/autoload/vimfiler/mappings.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/vimfiler/mappings.vim 2015-08-25 11:01:00 +0000 @@ -25,17 +25,17 @@ scriptencoding utf-8 -let s:Cache = vimfiler#util#get_vital_cache() +let s:Cache = vimfiler#util#get_vital().import('System.Cache') -function! s:SID_PREFIX() abort +function! s:SID_PREFIX() return matchstr(expand(''), '\d\+_\zeSID_PREFIX$') endfunction -function! vimfiler#mappings#define_default_mappings(context) abort "{{{ +function! vimfiler#mappings#define_default_mappings(context) "{{{ " Plugin keymappings "{{{ nnoremap (vimfiler_loop_cursor_down) \ (line('.') == line('$'))? - \ (vimfiler#get_file_offset(b:vimfiler)+1).'Gzb' : 'j' + \ (vimfiler#get_file_offset()+1).'Gzb' : 'j' nnoremap (vimfiler_loop_cursor_up) \ (line('.') == 1)? ":call \cursor_bottom()\" : 'k' nnoremap (vimfiler_redraw_screen) @@ -51,7 +51,7 @@ nnoremap (vimfiler_mark_similar_lines) \ :call mark_similar_lines() nnoremap (vimfiler_clear_mark_all_lines) - \ :call clear_mark_all_lines(b:vimfiler) + \ :call clear_mark_all_lines() nnoremap (vimfiler_mark_current_line) \ :call mark_current_line() nmap (vimfiler_cd_or_edit) @@ -86,7 +86,7 @@ \ :call popup_shell() nnoremap (vimfiler_edit_file) \ :call vimfiler#mappings#do_switch_action( - \ b:vimfiler, b:vimfiler.context.edit_action) + \ b:vimfiler.context.edit_action) nnoremap (vimfiler_split_edit_file) \ :call split_edit_file() nnoremap (vimfiler_edit_binary_file) @@ -100,12 +100,12 @@ nnoremap (vimfiler_exit) \ :call exit(b:vimfiler) nnoremap (vimfiler_close) - \ :call close(b:vimfiler) + \ :call close() nnoremap (vimfiler_help) \ :call help() nnoremap (vimfiler_preview_file) \ :call vimfiler#mappings#do_action( - \ b:vimfiler, b:vimfiler.context.preview_action) + \ b:vimfiler.context.preview_action) nnoremap (vimfiler_sync_with_current_vimfiler) \ :call sync_with_current_vimfiler() nnoremap (vimfiler_sync_with_another_vimfiler) @@ -163,7 +163,7 @@ \ (vimfiler_cd_or_edit) endif nnoremap (vimfiler_cursor_top) - \ (vimfiler#get_file_offset(b:vimfiler)+1).'Gzb' + \ (vimfiler#get_file_offset()+1).'Gzb' nnoremap (vimfiler_cursor_bottom) \ :call cursor_bottom() nnoremap (vimfiler_expand_tree) @@ -271,8 +271,6 @@ execute s:nowait_nmap() 'x' \ '(vimfiler_execute_system_associated)' - execute s:nowait_nmap() 'X' - \ '(vimfiler_execute_vimfiler_associated)' " Move to directory. execute s:nowait_nmap() 'h' @@ -381,25 +379,25 @@ \ '(vimfiler_jump_first_child)' endfunction"}}} -function! s:nowait_nmap() abort "{{{ +function! s:nowait_nmap() "{{{ return 'nmap ' \ . ((v:version > 703 || (v:version == 703 && has('patch1261'))) ? \ '' : '') endfunction "}}} -function! vimfiler#mappings#smart_cursor_map(directory_map, file_map) abort "{{{ +function! vimfiler#mappings#smart_cursor_map(directory_map, file_map) "{{{ let filename = vimfiler#get_filename() - let file = vimfiler#get_file(b:vimfiler) + let file = vimfiler#get_file() return filename == '..' || empty(file) \ || file.vimfiler__is_directory ? \ a:directory_map : a:file_map endfunction"}}} -function! vimfiler#mappings#do_action(vimfiler, action, ...) abort "{{{ +function! vimfiler#mappings#do_action(action, ...) "{{{ let cursor_linenr = get(a:000, 0, line('.')) - let marked_files = vimfiler#get_marked_files(a:vimfiler) + let marked_files = vimfiler#get_marked_files() if empty(marked_files) - let file = vimfiler#get_file(a:vimfiler, cursor_linenr) + let file = vimfiler#get_file(cursor_linenr) if empty(file) return endif @@ -407,15 +405,14 @@ let marked_files = [ file ] endif - return vimfiler#mappings#do_files_action( - \ a:vimfiler, a:action, marked_files) + return vimfiler#mappings#do_files_action(a:action, marked_files) endfunction"}}} -function! vimfiler#mappings#do_switch_action(vimfiler, action) abort "{{{ +function! vimfiler#mappings#do_switch_action(action) "{{{ let current_linenr = line('.') call s:switch() - let context = a:vimfiler.context + let context = vimfiler#get_context() if !context.force_quit \ && context.quit && buflisted(context.alternate_buffer) \ && getbufvar(context.alternate_buffer, '&filetype') !=# 'vimfiler' @@ -423,41 +420,46 @@ silent! execute 'buffer' context.alternate_buffer endif - call vimfiler#mappings#do_action(a:vimfiler, a:action, current_linenr) + call vimfiler#mappings#do_action(a:action, current_linenr) endfunction"}}} -function! vimfiler#mappings#do_files_action(vimfiler, action, files, ...) abort "{{{ +function! vimfiler#mappings#do_files_action(action, files, ...) "{{{ + let vimfiler = vimfiler#get_current_vimfiler() + let context = get(a:000, 0, {}) if !has_key(context, 'vimfiler__current_directory') - let context.vimfiler__current_directory = a:vimfiler.current_dir + let context.vimfiler__current_directory = vimfiler.current_dir endif let context.unite__is_interactive = 1 - call s:clear_mark_all_lines(a:vimfiler) + call s:clear_mark_all_lines() - call s:check_force_quit(a:vimfiler, a:action) + call s:check_force_quit(vimfiler, a:action) " Execute action. call unite#mappings#do_action(a:action, a:files, context) endfunction"}}} -function! vimfiler#mappings#do_current_dir_action(vimfiler, action, ...) abort "{{{ +function! vimfiler#mappings#do_current_dir_action(action, ...) "{{{ let context = get(a:000, 0, {}) - return vimfiler#mappings#do_dir_action( - \ a:vimfiler, a:action, a:vimfiler.current_dir, context) + let vimfiler = vimfiler#get_current_vimfiler() + + return vimfiler#mappings#do_dir_action(a:action, vimfiler.current_dir, context) endfunction"}}} -function! vimfiler#mappings#do_dir_action(vimfiler, action, directory, ...) abort "{{{ +function! vimfiler#mappings#do_dir_action(action, directory, ...) "{{{ + let vimfiler = vimfiler#get_current_vimfiler() + let context = get(a:000, 0, {}) let context.vimfiler__current_directory = a:directory let context.unite__is_interactive = 1 - let files = vimfiler#get_marked_files(a:vimfiler) + let files = vimfiler#get_marked_files() if empty(files) let context.vimfiler__is_dummy = 1 let files = unite#get_vimfiler_candidates( - \ [[a:vimfiler.source, a:directory]], context) + \ [[vimfiler.source, a:directory]], context) if empty(files) return endif @@ -465,23 +467,23 @@ let context.vimfiler__is_dummy = 0 endif - call s:clear_mark_all_lines(a:vimfiler) + call s:clear_mark_all_lines() - call s:check_force_quit(a:vimfiler, a:action) + call s:check_force_quit(vimfiler, a:action) " Execute action. call unite#mappings#do_action(a:action, files, context) endfunction"}}} -function! vimfiler#mappings#cd_project(...) abort "{{{ +function! vimfiler#mappings#cd_project(...) "{{{ let path = get(a:000, 0, \ vimfiler#util#path2project_directory( - \ b:vimfiler.context.path) + \ vimfiler#get_context().path) \ ) call vimfiler#mappings#cd(path) endfunction"}}} -function! vimfiler#mappings#cd(dir, ...) abort "{{{ +function! vimfiler#mappings#cd(dir, ...) "{{{ if &filetype !=# 'vimfiler' return endif @@ -503,7 +505,7 @@ let fullpath = vimfiler#helper#_get_cd_path(a:dir) let b:vimfiler.current_dir = fullpath - if b:vimfiler.context.auto_cd + if vimfiler#get_context().auto_cd call vimfiler#mappings#_change_vim_current_dir() endif @@ -543,7 +545,7 @@ call s:restore_cursor(a:dir, fullpath, save_pos, \ previous_current_dir) endfunction"}}} -function! s:restore_cursor(dir, fullpath, save_pos, previous_current_dir) abort "{{{ +function! s:restore_cursor(dir, fullpath, save_pos, previous_current_dir) "{{{ " Restore cursor pos. if a:dir ==# '..' " Search previous current directory. @@ -555,7 +557,7 @@ if path ==# \ b:vimfiler.source.':'.a:previous_current_dir \ || path ==# a:previous_current_dir - call cursor(vimfiler#get_line_number(b:vimfiler, num), 1) + call cursor(vimfiler#get_line_number(num), 1) break endif @@ -564,24 +566,24 @@ elseif has_key(b:vimfiler.directory_cursor_pos, a:fullpath) call setpos('.', b:vimfiler.directory_cursor_pos[a:fullpath]) else - call cursor(vimfiler#get_file_offset(b:vimfiler)+1, 0) + call cursor(vimfiler#get_file_offset()+1, 0) endif call vimfiler#helper#_set_cursor() endfunction"}}} -function! s:cursor_bottom() abort "{{{ +function! s:cursor_bottom() "{{{ if b:vimfiler.all_files_len != len(b:vimfiler.current_files) call vimfiler#view#_redraw_screen(1) endif call cursor(line('$'), 0) endfunction"}}} -function! vimfiler#mappings#search_cursor(path) abort "{{{ +function! vimfiler#mappings#search_cursor(path) "{{{ let max = line('$') let cnt = 1 while cnt <= max - let file = vimfiler#get_file(b:vimfiler, cnt) + let file = vimfiler#get_file(cnt) if empty(file) let cnt += 1 continue @@ -606,38 +608,37 @@ endwhile endfunction"}}} -function! vimfiler#mappings#close(buffer_name) abort "{{{ +function! vimfiler#mappings#close(buffer_name) "{{{ let quit_winnr = vimfiler#util#get_vimfiler_winnr(a:buffer_name) if quit_winnr > 0 " Hide unite buffer. - call vimfiler#util#winmove(quit_winnr) + silent execute quit_winnr 'wincmd w' if winnr('$') != 1 close else - call vimfiler#util#alternate_buffer( - \ getbufvar(winbufnr(quit_winnr), 'vimfiler').context) + call vimfiler#util#alternate_buffer() endif endif return quit_winnr > 0 endfunction"}}} -function! s:switch() abort "{{{ - let context = b:vimfiler.context +function! s:switch() "{{{ + let context = vimfiler#get_context() if context.quit return endif - let prev_bufnr = bufnr('%') - - let windows = filter(unite#helper#get_choose_windows(), - \ "getwinvar(v:val, '&filetype') !=# 'qf'") - + let vimfiler = vimfiler#get_current_vimfiler() + + call vimfiler#set_current_vimfiler(vimfiler) + + let windows = unite#helper#get_choose_windows() if empty(windows) rightbelow vnew elseif len(windows) == 1 - call vimfiler#util#winmove(windows[0]) + execute windows[0].'wincmd w' else let alt_winnr = winnr('#') let [tabnr, winnr] = [tabpagenr(), winnr()] @@ -675,14 +676,17 @@ if winnr == 0 || (winnr == old_winnr && tabnr == old_tabnr) rightbelow vnew else - call vimfiler#util#winmove(winnr) + execute winnr.'wincmd w' endif endif - call vimfiler#handler#_event_bufwin_enter(prev_bufnr) + if context.auto_cd + " Change current directory. + call vimfiler#mappings#_change_vim_current_dir() + endif endfunction"}}} -function! s:toggle_mark_current_line(...) abort "{{{ - let file = vimfiler#get_file(b:vimfiler) +function! s:toggle_mark_current_line(...) "{{{ + let file = vimfiler#get_file() if empty(file) " Don't toggle. return @@ -717,8 +721,8 @@ execute 'normal!' map endif endfunction"}}} -function! s:mark_current_line() abort "{{{ - let file = vimfiler#get_file(b:vimfiler) +function! s:mark_current_line() "{{{ + let file = vimfiler#get_file() if empty(file) " Don't toggle. return @@ -736,8 +740,8 @@ setlocal readonly endtry endfunction"}}} -function! s:toggle_mark_all_lines() abort "{{{ - for file in b:vimfiler.all_files +function! s:toggle_mark_all_lines() "{{{ + for file in vimfiler#get_current_vimfiler().all_files let file.vimfiler__is_marked = !file.vimfiler__is_marked let file.vimfiler__marked_time = localtime() endfor @@ -748,8 +752,8 @@ call vimfiler#redraw_screen() endif endfunction"}}} -function! s:mark_similar_lines() abort "{{{ - let file = vimfiler#get_file(b:vimfiler) +function! s:mark_similar_lines() "{{{ + let file = vimfiler#get_file() if empty(file) " Don't toggle. return @@ -767,7 +771,8 @@ endwhile let pattern = join(idents, '.\+') - for file in filter(copy(b:vimfiler.current_files), + for file in filter(copy( + \ vimfiler#get_current_vimfiler().current_files), \ 'v:val.vimfiler__filename =~# pattern') let file.vimfiler__is_marked = 1 let file.vimfiler__marked_time = localtime() @@ -775,10 +780,10 @@ call vimfiler#redraw_screen() endfunction"}}} -function! s:toggle_mark_lines(start, end) abort "{{{ +function! s:toggle_mark_lines(start, end) "{{{ let cnt = a:start while cnt <= a:end - let file = vimfiler#get_file(b:vimfiler, cnt) + let file = vimfiler#get_file(cnt) if !empty(file) " Toggle mark. let file.vimfiler__is_marked = !file.vimfiler__is_marked @@ -790,15 +795,14 @@ call vimfiler#redraw_screen() endfunction"}}} -function! s:clear_mark_all_lines(vimfiler) abort "{{{ - for file in a:vimfiler.current_files +function! s:clear_mark_all_lines() "{{{ + for file in vimfiler#get_current_vimfiler().current_files let file.vimfiler__is_marked = 0 endfor call vimfiler#redraw_screen() endfunction"}}} -function! s:execute_vimfiler_associated() abort "{{{ - let vimfiler = b:vimfiler +function! s:execute_vimfiler_associated() "{{{ let bufnr = bufnr('%') call s:switch() call unite#start(['vimfiler/execute'], { @@ -807,11 +811,12 @@ \ 'script' : 1, \ 'vimfiler__winnr' : bufwinnr(bufnr), \ }) + let vimfiler = vimfiler#get_current_vimfiler() call s:check_force_quit(vimfiler, '') endfunction"}}} -function! s:execute_system_associated() abort "{{{ - if empty(vimfiler#get_marked_files(b:vimfiler)) - if empty(vimfiler#get_file(b:vimfiler)) +function! s:execute_system_associated() "{{{ + if empty(vimfiler#get_marked_files()) + if empty(vimfiler#get_file()) call s:execute_external_filer() return endif @@ -822,9 +827,9 @@ " Execute marked files. call vimfiler#mappings#do_dir_action( - \ b:vimfiler, 'vimfiler__execute', b:vimfiler.current_dir) + \ 'vimfiler__execute', b:vimfiler.current_dir) endfunction"}}} -function! s:switch_to_other_window() abort "{{{ +function! s:switch_to_other_window() "{{{ if winnr('$') != 1 || !exists('b:vimfiler') wincmd w return @@ -832,7 +837,7 @@ call s:switch_to_another_vimfiler() endfunction"}}} -function! s:switch_to_another_vimfiler() abort "{{{ +function! s:switch_to_another_vimfiler() "{{{ if vimfiler#exists_another_vimfiler() call vimfiler#mappings#switch_another_vimfiler() else @@ -841,25 +846,25 @@ call vimfiler#redraw_all_vimfiler() endif endfunction"}}} -function! s:print_filename() abort "{{{ +function! s:print_filename() "{{{ let filename = vimfiler#get_filename() - if filename != '..' && empty(vimfiler#get_file(b:vimfiler)) + if filename != '..' && empty(vimfiler#get_file()) let filename = matchstr(getline('.'), \ ' Current directory: \zs.*\ze[/\\]') endif echo filename endfunction"}}} -function! s:yank_full_path() abort "{{{ - let filename = join(vimfiler#get_marked_filenames(b:vimfiler), "\n") +function! s:yank_full_path() "{{{ + let filename = join(vimfiler#get_marked_filenames(), "\n") if filename == '' " Use cursor filename. let filename = vimfiler#get_filename() - if filename == '..' || empty(vimfiler#get_file(b:vimfiler)) - let filename = b:vimfiler.current_dir + if filename == '..' || empty(vimfiler#get_file()) + let filename = vimfiler#get_current_vimfiler().current_dir else - let filename = vimfiler#get_file(b:vimfiler).action__path + let filename = vimfiler#get_file().action__path endif endif @@ -870,8 +875,8 @@ echo 'Yanked: '.filename endfunction"}}} -function! s:toggle_tree(is_recursive) abort "{{{ - let file = vimfiler#get_file(b:vimfiler) +function! s:toggle_tree(is_recursive) "{{{ + let file = vimfiler#get_file() if empty(file) || vimfiler#get_filename() == '..' if vimfiler#get_filename() == '..' call vimfiler#mappings#cd('..') @@ -882,7 +887,7 @@ if !file.vimfiler__is_directory " Search parent directory. for cnt in reverse(range(1, line('.')-1)) - let nest_level = get(vimfiler#get_file(b:vimfiler, cnt), + let nest_level = get(vimfiler#get_file(cnt), \ 'vimfiler__nest_level', -1) if (a:is_recursive && nest_level == 0) || \ (!a:is_recursive && @@ -901,8 +906,8 @@ call s:expand_tree(a:is_recursive) endif endfunction"}}} -function! s:expand_tree(is_recursive) abort "{{{ - let cursor_file = vimfiler#get_file(b:vimfiler) +function! s:expand_tree(is_recursive) "{{{ + let cursor_file = vimfiler#get_file() if empty(cursor_file) || vimfiler#get_filename() == '..' if vimfiler#get_filename() == '..' call vimfiler#mappings#cd('..') @@ -913,7 +918,7 @@ if !cursor_file.vimfiler__is_directory " Search parent directory. for cnt in reverse(range(1, line('.')-1)) - let nest_level = get(vimfiler#get_file(b:vimfiler, cnt), + let nest_level = get(vimfiler#get_file(cnt), \ 'vimfiler__nest_level', -1) if (a:is_recursive && nest_level == 0) || \ (!a:is_recursive && @@ -961,10 +966,10 @@ if !a:is_recursive && !b:vimfiler.is_visible_ignore_files let files = vimfiler#helper#_call_filters( - \ files, b:vimfiler.context) + \ files, vimfiler#get_context()) endif - let index = vimfiler#get_file_index(b:vimfiler, line('.')) + let index = vimfiler#get_file_index(line('.')) let index_orig = \ vimfiler#get_original_file_index(line('.')) @@ -973,21 +978,21 @@ call extend(b:vimfiler.original_files, original_files, index_orig+1) let b:vimfiler.all_files_len += len(files) - if b:vimfiler.context.auto_expand + if vimfiler#get_context().auto_expand \ && !a:is_recursive && len(files) == 1 \ && files[0].vimfiler__is_directory " Expand recursive. call cursor(line('.') + 1, 0) call s:expand_tree(a:is_recursive) elseif g:vimfiler_expand_jump_to_first_child && !a:is_recursive - \ || b:vimfiler.context.auto_expand + \ || vimfiler#get_context().auto_expand " Move to next line. call cursor(line('.') + 1, 0) endif call vimfiler#view#_redraw_screen() endfunction"}}} -function! vimfiler#mappings#expand_tree_rec(file, ...) abort "{{{ +function! vimfiler#mappings#expand_tree_rec(file, ...) "{{{ if get(a:file, 'vimfiler__ftype', '') ==# 'link' " Ignore symbolic link. return [] @@ -1016,7 +1021,7 @@ " Open in cursor directory. let file = files[0] let file.vimfiler__parent = - \ !b:vimfiler.context.explorer && + \ !vimfiler#get_context().explorer && \ has_key(a:file, 'vimfiler__parent') ? \ a:file.vimfiler__parent : deepcopy(a:file) let file.vimfiler__abbr = @@ -1057,8 +1062,8 @@ return _ endfunction"}}} -function! s:unexpand_tree() abort "{{{ - let cursor_file = vimfiler#get_file(b:vimfiler) +function! s:unexpand_tree() "{{{ + let cursor_file = vimfiler#get_file() if empty(cursor_file) || vimfiler#get_filename() == '..' return endif @@ -1068,7 +1073,7 @@ \ && !cursor_file.vimfiler__is_opened) " Search parent directory. for cnt in reverse(range(1, line('.')-1)) - let nest_level = get(vimfiler#get_file(b:vimfiler, cnt), + let nest_level = get(vimfiler#get_file(cnt), \ 'vimfiler__nest_level', -1) if nest_level >= 0 && nest_level < cursor_file.vimfiler__nest_level call cursor(cnt, 0) @@ -1105,7 +1110,7 @@ let nestlevel = cursor_file.vimfiler__nest_level " Search children. - let index = vimfiler#get_file_index(b:vimfiler, line('.')) + let index = vimfiler#get_file_index(line('.')) let end = index for cursor_file in b:vimfiler.current_files[index+1 :] if cursor_file.vimfiler__nest_level <= nestlevel @@ -1139,17 +1144,17 @@ call setpos('.', pos) endif endfunction"}}} -function! s:jump_child(is_first) abort "{{{ - if empty(vimfiler#get_file(b:vimfiler)) +function! s:jump_child(is_first) "{{{ + if empty(vimfiler#get_file()) return endif let max = a:is_first ? b:vimfiler.prompt_linenr : line('$') let cnt = line('.') - let file = vimfiler#get_file(b:vimfiler, cnt) + let file = vimfiler#get_file(cnt) let level = file.vimfiler__nest_level while cnt != max - let file = vimfiler#get_file(b:vimfiler, cnt) + let file = vimfiler#get_file(cnt) if level > file.vimfiler__nest_level if a:is_first @@ -1168,7 +1173,7 @@ endif endwhile - if empty(vimfiler#get_file(b:vimfiler, cnt)) + if empty(vimfiler#get_file(cnt)) if a:is_first let cnt += 1 else @@ -1179,34 +1184,33 @@ call cursor(cnt, 0) endfunction"}}} -function! s:switch_to_drive() abort "{{{ +function! s:switch_to_drive() "{{{ call unite#start(['vimfiler/drive'], \ { 'buffer_name' : 'vimfiler/drive', 'script' : 1 }) endfunction"}}} -function! s:switch_to_history_directory() abort "{{{ +function! s:switch_to_history_directory() "{{{ call unite#start(['vimfiler/history'], \ { 'buffer_name' : 'vimfiler/history', 'script' : 1 }) endfunction"}}} -function! s:pushd() abort "{{{ +function! s:pushd() "{{{ call unite#sources#vimfiler_popd#pushd() endfunction"}}} -function! s:popd() abort "{{{ +function! s:popd() "{{{ call unite#start(['vimfiler/popd'], \ { 'buffer_name' : 'vimfiler/popd', 'script' : 1 }) endfunction"}}} -function! s:toggle_visible_ignore_files() abort "{{{ +function! s:toggle_visible_ignore_files() "{{{ let b:vimfiler.is_visible_ignore_files = !b:vimfiler.is_visible_ignore_files call vimfiler#redraw_screen() endfunction"}}} -function! s:popup_shell() abort "{{{ - call vimfiler#mappings#do_current_dir_action( - \ b:vimfiler, 'vimfiler__shell', { - \ 'vimfiler__files' : vimfiler#get_escaped_marked_files(b:vimfiler), +function! s:popup_shell() "{{{ + call vimfiler#mappings#do_current_dir_action('vimfiler__shell', { + \ 'vimfiler__files' : vimfiler#get_escaped_marked_files(), \}) endfunction"}}} -function! s:edit_binary_file() abort "{{{ - let file = vimfiler#get_file(b:vimfiler) +function! s:edit_binary_file() "{{{ + let file = vimfiler#get_file() if empty(file) return endif @@ -1221,12 +1225,11 @@ execute 'Vinarise' escape(vimfiler#get_filename(), ' ') endfunction"}}} -function! s:execute_shell_command() abort "{{{ - let marked_files = vimfiler#get_marked_files(b:vimfiler) +function! s:execute_shell_command() "{{{ + let marked_files = vimfiler#get_marked_files() if !empty(marked_files) echo 'Marked files:' - echohl Type | echo join(vimfiler#get_marked_filenames( - \ b:vimfiler), "\n") | echohl NONE + echohl Type | echo join(vimfiler#get_marked_filenames(), "\n") | echohl NONE endif let command = input('Input shell command: ', '', 'shellcmd') @@ -1241,11 +1244,11 @@ if special == '*' let command = substitute(command, \'\s\+\zs[*]\ze\%([;|[:space:]]\|$\)', - \ join(vimfiler#get_escaped_marked_files(b:vimfiler)), 'g') + \ join(vimfiler#get_escaped_marked_files()), 'g') elseif !empty(marked_files) let base_command = command let command = '' - for file in vimfiler#get_escaped_marked_files(b:vimfiler) + for file in vimfiler#get_escaped_marked_files() if special == '?' let command .= substitute(base_command, \'\s\+\zs[?]\ze\%([;|[:space:]]\|$\)', file, 'g') . '; ' @@ -1256,12 +1259,11 @@ endif call vimfiler#mappings#do_current_dir_action( - \ b:vimfiler, \ 'vimfiler__shellcmd', { \ 'vimfiler__command' : command, \}) endfunction"}}} -function! s:exit(vimfiler) abort "{{{ +function! s:exit(vimfiler) "{{{ if !bufexists(a:vimfiler.bufnr) return endif @@ -1271,30 +1273,35 @@ if another_bufnr > 0 " Exit another vimfiler. - call vimfiler#util#winmove(bufwinnr(another_bufnr)) + execute bufwinnr(another_bufnr).'wincmd w' call vimfiler#util#delete_buffer(another_bufnr) endif endfunction"}}} -function! s:close(vimfiler) abort "{{{ - let context = a:vimfiler.context +function! s:close() "{{{ + let bufnr = bufnr('%') + + let context = vimfiler#get_context() if vimfiler#winnr_another_vimfiler() > 0 " Close current vimfiler. - call vimfiler#util#winclose(winnr(), context) - call vimfiler#force_redraw_all_vimfiler() - elseif winnr('$') != 1 && (context.split || context.toggle) - call vimfiler#util#winclose(bufwinnr(a:vimfiler.bufnr), context) + let bufnr = b:vimfiler.another_vimfiler_bufnr + close + execute bufwinnr(bufnr).'wincmd w' + call vimfiler#redraw_screen() + elseif winnr('$') != 1 && + \ (context.split || context.toggle) + close else - call vimfiler#util#alternate_buffer(context) + call vimfiler#util#alternate_buffer() endif endfunction"}}} -function! vimfiler#mappings#create_another_vimfiler() abort "{{{ - let current_vimfiler = b:vimfiler +function! vimfiler#mappings#create_another_vimfiler() "{{{ + let current_vimfiler = vimfiler#get_current_vimfiler() let current_bufnr = bufnr('%') let line = line('.') " Create another vimfiler. - let original_context = deepcopy(b:vimfiler.context) + let original_context = deepcopy(vimfiler#get_context()) let context = deepcopy(original_context) if context.split || context.explorer " Note: Horizontal automatically. @@ -1322,21 +1329,22 @@ call vimfiler#helper#_set_cursor() let b:vimfiler.another_vimfiler_bufnr = current_bufnr + call vimfiler#set_current_vimfiler(b:vimfiler) let current_vimfiler.another_vimfiler_bufnr = bufnr('%') endfunction"}}} -function! vimfiler#mappings#switch_another_vimfiler(...) abort "{{{ +function! vimfiler#mappings#switch_another_vimfiler(...) "{{{ let directory = get(a:000, 0, '') if vimfiler#winnr_another_vimfiler() > 0 " Switch to another vimfiler window. - call vimfiler#util#winmove(vimfiler#winnr_another_vimfiler()) + execute vimfiler#winnr_another_vimfiler().'wincmd w' if directory != '' " Change current directory. call vimfiler#mappings#cd(directory) endif else " Open another vimfiler buffer. - let current_vimfiler = b:vimfiler - let original_context = deepcopy(b:vimfiler.context) + let current_vimfiler = vimfiler#get_current_vimfiler() + let original_context = deepcopy(vimfiler#get_context()) let context = deepcopy(original_context) let context.split = 1 @@ -1355,7 +1363,7 @@ let b:vimfiler.context.split = original_context.split endif endfunction"}}} -function! s:sync_with_current_vimfiler() abort "{{{ +function! s:sync_with_current_vimfiler() "{{{ " Search vimfiler window. let line = line('.') if vimfiler#exists_another_vimfiler() @@ -1373,7 +1381,7 @@ call cursor(line, 0) call vimfiler#redraw_screen() endfunction"}}} -function! s:sync_with_another_vimfiler() abort "{{{ +function! s:sync_with_another_vimfiler() "{{{ " Search vimfiler window. if vimfiler#exists_another_vimfiler() " Change current vimfiler directory. @@ -1393,50 +1401,49 @@ call cursor(line, 0) endfunction"}}} -function! s:open_file_in_another_vimfiler() abort "{{{ - let vimfiler = b:vimfiler - +function! s:open_file_in_another_vimfiler() "{{{ " Search vimfiler window. - let files = vimfiler#get_marked_files(vimfiler) + let files = vimfiler#get_marked_files() if empty(files) - let files = [vimfiler#get_file(vimfiler)] + let files = [vimfiler#get_file()] endif - call s:clear_mark_all_lines(vimfiler) + call s:clear_mark_all_lines() call s:switch_to_other_window() if len(files) > 1 || !files[0].vimfiler__is_directory call vimfiler#mappings#do_files_action( - \ vimfiler, vimfiler.context.edit_action, files) + \ vimfiler#get_context().edit_action, files) else call vimfiler#mappings#cd(files[0].action__path) endif call s:switch_to_other_window() endfunction"}}} -function! s:choose_action() abort "{{{ - let marked_files = vimfiler#get_marked_files(b:vimfiler) +function! s:choose_action() "{{{ + let marked_files = vimfiler#get_marked_files() if empty(marked_files) - if empty(vimfiler#get_file(b:vimfiler)) + if empty(vimfiler#get_file()) return endif - let marked_files = [ vimfiler#get_file(b:vimfiler) ] + let marked_files = [ vimfiler#get_file() ] endif call unite#mappings#_choose_action(marked_files, { - \ 'vimfiler__current_directory' : b:vimfiler.current_dir, + \ 'vimfiler__current_directory' : + \ vimfiler#get_current_vimfiler().current_dir, \ }) endfunction"}}} -function! s:split_edit_file() abort "{{{ - let context = b:vimfiler.context +function! s:split_edit_file() "{{{ + let context = vimfiler#get_context() let winwidth = (winnr('$') != 1) ? \ &columns - (winwidth(0)+1)/2*2 : \ (context.winwidth > 0) ? \ &columns / 2 : \ &columns - context.winwidth - call vimfiler#mappings#do_action(b:vimfiler, context.split_action) + call vimfiler#mappings#do_action(context.split_action) " Resize. execute 'vertical resize' @@ -1446,8 +1453,8 @@ endfunction"}}} " File operations. -function! s:copy() abort "{{{ - if empty(vimfiler#get_marked_files(b:vimfiler)) +function! s:copy() "{{{ + if empty(vimfiler#get_marked_files()) " Mark current line. call s:toggle_mark_current_line() return @@ -1466,14 +1473,12 @@ " Execute copy. call vimfiler#mappings#do_dir_action( - \ b:vimfiler, \ 'vimfiler__copy', - \ s:get_action_current_dir( - \ vimfiler#get_marked_files(b:vimfiler)), + \ s:get_action_current_dir(vimfiler#get_marked_files()), \ { 'action__directory' : dest_dir }) endfunction"}}} -function! s:move() abort "{{{ - if empty(vimfiler#get_marked_files(b:vimfiler)) +function! s:move() "{{{ + if empty(vimfiler#get_marked_files()) " Mark current line. call s:toggle_mark_current_line() return @@ -1492,14 +1497,12 @@ " Execute move. call vimfiler#mappings#do_dir_action( - \ b:vimfiler, \ 'vimfiler__move', - \ s:get_action_current_dir( - \ vimfiler#get_marked_files(b:vimfiler)), + \ s:get_action_current_dir(vimfiler#get_marked_files()), \ { 'action__directory' : dest_dir }) endfunction"}}} -function! s:delete() abort "{{{ - if empty(vimfiler#get_marked_files(b:vimfiler)) +function! s:delete() "{{{ + if empty(vimfiler#get_marked_files()) " Mark current line. call s:toggle_mark_current_line() return @@ -1507,55 +1510,50 @@ " Execute delete. call vimfiler#mappings#do_dir_action( - \ b:vimfiler, \ 'vimfiler__delete', - \ s:get_action_current_dir( - \ vimfiler#get_marked_files(b:vimfiler))) + \ s:get_action_current_dir(vimfiler#get_marked_files())) endfunction"}}} -function! s:rename() abort "{{{ - let vimfiler = b:vimfiler - if !empty(vimfiler#get_marked_filenames(vimfiler)) +function! s:rename() "{{{ + if !empty(vimfiler#get_marked_filenames()) " Extended rename. - call vimfiler#exrename#create_buffer( - \ vimfiler#get_marked_files(vimfiler)) - call s:clear_mark_all_lines(vimfiler) + call vimfiler#exrename#create_buffer(vimfiler#get_marked_files()) + call s:clear_mark_all_lines() return endif - let file = vimfiler#get_file(vimfiler) + let file = vimfiler#get_file() if empty(file) return endif call vimfiler#mappings#do_files_action( - \ vimfiler, \ 'vimfiler__rename', [file], { \ 'vimfiler__current_directory' : \ s:get_action_current_dir([file]), \ }) endfunction"}}} -function! s:make_directory() abort "{{{ +function! s:make_directory() "{{{ let directory = vimfiler#get_file_directory() " Don't quit. - let context = b:vimfiler.context + let context = vimfiler#get_context() let is_quit = context.quit try let context.quit = 0 - call vimfiler#mappings#do_dir_action( - \ b:vimfiler, 'vimfiler__mkdir', directory) + call vimfiler#mappings#do_dir_action('vimfiler__mkdir', directory) finally let context.quit = is_quit endtry endfunction"}}} -function! s:new_file() abort "{{{ +function! s:new_file() "{{{ let directory = vimfiler#get_file_directory() - call vimfiler#mappings#do_dir_action( - \ b:vimfiler, 'vimfiler__newfile', directory) + call s:switch() + + call vimfiler#mappings#do_dir_action('vimfiler__newfile', directory) endfunction"}}} -function! s:clipboard_copy() abort "{{{ - if empty(vimfiler#get_marked_files(b:vimfiler)) +function! s:clipboard_copy() "{{{ + if empty(vimfiler#get_marked_files()) " Mark current line. call s:toggle_mark_current_line() return @@ -1563,13 +1561,13 @@ let clipboard = vimfiler#variables#get_clipboard() let clipboard.operation = 'copy' - let clipboard.files = vimfiler#get_marked_files(b:vimfiler) - call s:clear_mark_all_lines(b:vimfiler) + let clipboard.files = vimfiler#get_marked_files() + call s:clear_mark_all_lines() echo 'Copied files to vimfiler clipboard.' endfunction"}}} -function! s:clipboard_move() abort "{{{ - if empty(vimfiler#get_marked_files(b:vimfiler)) +function! s:clipboard_move() "{{{ + if empty(vimfiler#get_marked_files()) " Mark current line. call s:toggle_mark_current_line() return @@ -1577,12 +1575,12 @@ let clipboard = vimfiler#variables#get_clipboard() let clipboard.operation = 'move' - let clipboard.files = vimfiler#get_marked_files(b:vimfiler) - call s:clear_mark_all_lines(b:vimfiler) + let clipboard.files = vimfiler#get_marked_files() + call s:clear_mark_all_lines() echo 'Moved files to vimfiler clipboard.' endfunction"}}} -function! s:clipboard_paste() abort "{{{ +function! s:clipboard_paste() "{{{ let clipboard = vimfiler#variables#get_clipboard() if empty(clipboard.files) call vimfiler#util#print_error('Clipboard is empty.') @@ -1594,7 +1592,6 @@ " Execute file operation. call vimfiler#mappings#do_files_action( - \ b:vimfiler, \ 'vimfiler__' . clipboard.operation, \ clipboard.files, { \ 'action__directory' : dest_dir, @@ -1605,16 +1602,16 @@ let clipboard.files = [] endfunction"}}} -function! s:set_current_mask() abort "{{{ +function! s:set_current_mask() "{{{ call vimfiler#redraw_screen() call unite#start(['vimfiler/mask'], \ { 'start_insert' : 1, 'buffer_name' : 'vimfiler/mask', 'script' : 1 }) endfunction"}}} -function! s:select_sort_type() abort "{{{ +function! s:select_sort_type() "{{{ call unite#start(['vimfiler/sort'], \ { 'buffer_name' : 'vimfiler/sort', 'script' : 1 }) endfunction"}}} -function! s:switch_vim_buffer_mode() abort "{{{ +function! s:switch_vim_buffer_mode() "{{{ redir => nmaps silent nmap redir END @@ -1633,30 +1630,28 @@ echo 'Switched vim buffer mode' endfunction"}}} -function! s:restore_vimfiler_mode() abort "{{{ +function! s:restore_vimfiler_mode() "{{{ for [lhs, rhs] in items(b:vimfiler.mapdict) execute 'nmap ' lhs rhs endfor echo 'Switched vimfiler mode' endfunction"}}} -function! s:help() abort "{{{ +function! s:help() "{{{ call unite#start(['mapping'], \ { 'buffer_name' : 'vimfiler/mapping', 'script' : 1 }) endfunction"}}} -function! s:execute_external_filer() abort "{{{ - let file = vimfiler#get_file(b:vimfiler) +function! s:execute_external_filer() "{{{ + let file = vimfiler#get_file() if empty(file) " Use current directory - call vimfiler#mappings#do_current_dir_action( - \ b:vimfiler, 'vimfiler__execute') + call vimfiler#mappings#do_current_dir_action('vimfiler__execute') else - call vimfiler#mappings#do_files_action( - \ b:vimfiler, 'vimfiler__external_filer', [file]) + call vimfiler#mappings#do_files_action('vimfiler__external_filer', [file]) endif endfunction"}}} -function! vimfiler#mappings#_change_vim_current_dir() abort "{{{ - let vimfiler = b:vimfiler +function! vimfiler#mappings#_change_vim_current_dir() "{{{ + let vimfiler = vimfiler#get_current_vimfiler() if vimfiler.source !=# 'file' call vimfiler#util#print_error( \ 'Invalid operation in not file source.') @@ -1669,7 +1664,7 @@ execute g:unite_kind_cdable_lcd_command \ fnameescape(vimfiler.current_dir) endfunction"}}} -function! s:grep() abort "{{{ +function! s:grep() "{{{ if !vimfiler#util#has_vimproc() call vimfiler#util#print_error( \ 'Sorry, vimproc is not installed. '. @@ -1679,17 +1674,15 @@ call unite#sources#grep#define() - let vimfiler = b:vimfiler - call s:switch() - if empty(vimfiler#get_marked_files(vimfiler)) - call vimfiler#mappings#do_current_dir_action(vimfiler, 'grep') + if empty(vimfiler#get_marked_files()) + call vimfiler#mappings#do_current_dir_action('grep') else - call vimfiler#mappings#do_action(vimfiler, 'grep') + call vimfiler#mappings#do_action('grep') endif endfunction"}}} -function! s:find() abort "{{{ +function! s:find() "{{{ if !vimfiler#util#has_vimproc() call vimfiler#util#print_error( \ 'Sorry, vimproc is not installed. '. @@ -1699,25 +1692,23 @@ call unite#sources#find#define() - let vimfiler = b:vimfiler - call s:switch() - call vimfiler#mappings#do_current_dir_action(vimfiler, 'find') + call vimfiler#mappings#do_current_dir_action('find') endfunction"}}} -function! s:cd_file_directory() abort "{{{ +function! s:cd_file_directory() "{{{ " Change directory. call vimfiler#mappings#cd(vimfiler#get_filename()) - if b:vimfiler.context.auto_expand + if vimfiler#get_context().auto_expand \ && b:vimfiler.all_files_len == 1 \ && b:vimfiler.all_files[0].vimfiler__is_directory " Cd recursive call s:cd_file_directory() endif endfunction"}}} -function! s:cd_input_directory() abort "{{{ - let vimfiler = b:vimfiler +function! s:cd_input_directory() "{{{ + let vimfiler = vimfiler#get_current_vimfiler() let current_dir = vimfiler.current_dir let dir = input('[in]: ', \ vimfiler.source . ':'. current_dir, @@ -1731,8 +1722,8 @@ " Change directory. call vimfiler#mappings#cd(dir) endfunction"}}} -function! s:on_double_click() abort "{{{ - let file = vimfiler#get_file(b:vimfiler) +function! s:on_double_click() "{{{ + let file = vimfiler#get_file() if empty(file) \ || !file.vimfiler__is_directory if vimfiler#get_filename() ==# '..' @@ -1744,14 +1735,14 @@ call s:toggle_tree(0) endif endfunction"}}} -function! s:quick_look() abort "{{{ +function! s:quick_look() "{{{ if !vimfiler#util#has_vimproc() call vimfiler#util#print_error( \ 'vimproc is needed for this feature.') return endif - let file = vimfiler#get_file(b:vimfiler) + let file = vimfiler#get_file() if empty(file) return endif @@ -1771,7 +1762,7 @@ endfunction"}}} " For safe mode. -function! s:toggle_safe_mode() abort "{{{ +function! s:toggle_safe_mode() "{{{ let b:vimfiler.is_safe_mode = !b:vimfiler.is_safe_mode echo 'Safe mode is ' . (b:vimfiler.is_safe_mode ? 'enabled' : 'disabled') call vimfiler#view#_redraw_screen() @@ -1782,7 +1773,7 @@ call s:mapping_file_operations() endif endfunction"}}} -function! s:mapping_file_operations() abort "{{{ +function! s:mapping_file_operations() "{{{ nnoremap (vimfiler_copy_file) \ :call copy() nnoremap (vimfiler_move_file) @@ -1802,7 +1793,7 @@ nnoremap (vimfiler_clipboard_paste) \ :call clipboard_paste() endfunction"}}} -function! s:unmapping_file_operations() abort "{{{ +function! s:unmapping_file_operations() "{{{ nnoremap (vimfiler_copy_file) \ :call disable_operation() nnoremap (vimfiler_move_file) @@ -1822,19 +1813,19 @@ nnoremap (vimfiler_clipboard_paste) \ :call disable_operation() endfunction"}}} -function! s:disable_operation() abort "{{{ +function! s:disable_operation() "{{{ call vimfiler#util#print_error( \ 'In safe mode, this operation is disabled.') endfunction"}}} -function! s:toggle_simple_mode() abort "{{{ +function! s:toggle_simple_mode() "{{{ let b:vimfiler.context.simple = !b:vimfiler.context.simple call vimfiler#redraw_screen() echo 'Simple mode is ' . \ (b:vimfiler.context.simple ? 'enabled' : 'disabled') endfunction"}}} -function! s:toggle_maximize_window() abort "{{{ - let std_width = b:vimfiler.context.winwidth +function! s:toggle_maximize_window() "{{{ + let std_width = vimfiler#get_context().winwidth if std_width == 0 let std_width = (&columns+1)/2 endif @@ -1851,7 +1842,7 @@ setlocal winfixwidth endfunction"}}} -function! s:get_action_current_dir(files) abort "{{{ +function! s:get_action_current_dir(files) "{{{ let current_dir = b:vimfiler.current_dir if b:vimfiler.source != 'file' let current_dir = b:vimfiler.source . ':' . current_dir @@ -1867,31 +1858,29 @@ return current_dir endfunction"}}} -function! s:get_abbr_length(parent, child) abort "{{{ +function! s:get_abbr_length(parent, child) "{{{ return strwidth(repeat(' ', a:parent.vimfiler__nest_level \ * g:vimfiler_tree_indentation) . \ a:parent.vimfiler__abbr.a:child.vimfiler__abbr) + 5 endfunction"}}} -function! s:check_force_quit(vimfiler, action) abort "{{{ +function! s:check_force_quit(vimfiler, action) "{{{ if (a:vimfiler.context.force_quit || a:vimfiler.context.force_hide) \ && index([ \ 'vimfiler__move', 'vimfiler__copy', 'vimfiler__delete', - \ 'vimfiler__rename', 'vimfiler__mkdir', 'vimfiler__newfile', + \ 'vimfiler__rename', 'vimfiler__mkdir', \ ], a:action) < 0 if a:vimfiler.context.force_quit call s:exit(a:vimfiler) else - call vimfiler#util#hide_buffer(a:vimfiler.bufnr) + call s:close() endif endif endfunction"}}} -function! s:check_opened() abort "{{{ - return get(vimfiler#get_file(b:vimfiler), - \ 'vimfiler__is_opened', 0) - \ || get(vimfiler#get_file(b:vimfiler), - \ 'vimfiler__nest_level', 0) > 0 +function! s:check_opened() "{{{ + return get(vimfiler#get_file(), 'vimfiler__is_opened', 0) + \ || get(vimfiler#get_file(), 'vimfiler__nest_level', 0) > 0 endfunction"}}} " vim: foldmethod=marker === modified file 'vim/bundle/vimfiler.vim/autoload/vimfiler/util.vim' --- vim/bundle/vimfiler.vim/autoload/vimfiler/util.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/vimfiler/util.vim 2015-08-25 11:01:00 +0000 @@ -26,46 +26,36 @@ let s:save_cpo = &cpo set cpo&vim -function! vimfiler#util#get_vital() abort "{{{ - if !exists('s:V') - let s:V = vital#vimfiler#of() - endif +let s:V = vital#of('vimfiler') + +function! vimfiler#util#get_vital() "{{{ return s:V endfunction"}}} -function! vimfiler#util#get_vital_cache() abort "{{{ - if !exists('s:Cache') - let s:Cache = vimfiler#util#get_vital().import('System.Cache.Deprecated') - endif - return s:Cache -endfunction"}}} -function! vimfiler#util#get_vital_buffer() abort "{{{ - return vimfiler#util#get_vital().import('Vim.Buffer') -endfunction"}}} -function! s:get_prelude() abort "{{{ +function! s:get_prelude() "{{{ if !exists('s:Prelude') let s:Prelude = vimfiler#util#get_vital().import('Prelude') endif return s:Prelude endfunction"}}} -function! s:get_list() abort "{{{ +function! s:get_list() "{{{ if !exists('s:List') let s:List = vimfiler#util#get_vital().import('Data.List') endif return s:List endfunction"}}} -function! s:get_message() abort "{{{ +function! s:get_message() "{{{ if !exists('s:Message') let s:Message = vimfiler#util#get_vital().import('Vim.Message') endif return s:Message endfunction"}}} -function! s:get_process() abort "{{{ +function! s:get_process() "{{{ if !exists('s:Process') let s:Process = vimfiler#util#get_vital().import('Process') endif return s:Process endfunction"}}} -function! s:get_string() abort "{{{ +function! s:get_string() "{{{ if !exists('s:String') let s:String = vimfiler#util#get_vital().import('Data.String') endif @@ -74,94 +64,94 @@ let s:is_windows = has('win16') || has('win32') || has('win64') -function! vimfiler#util#truncate_smart(...) abort +function! vimfiler#util#truncate_smart(...) return call(s:get_string().truncate_skipping, a:000) endfunction -function! vimfiler#util#truncate(...) abort +function! vimfiler#util#truncate(...) return call(s:get_string().truncate, a:000) endfunction -function! vimfiler#util#is_windows(...) abort +function! vimfiler#util#is_windows(...) return s:is_windows endfunction -function! vimfiler#util#is_win_path(path) abort +function! vimfiler#util#is_win_path(path) return a:path =~ '^\a\?:' || a:path =~ '^\\\\[^\\]\+\\' endfunction -function! vimfiler#util#print_error(msg) abort +function! vimfiler#util#print_error(msg) let msg = '[vimfiler] ' . a:msg return call(s:get_message().error, [msg]) endfunction -function! vimfiler#util#escape_file_searching(...) abort +function! vimfiler#util#escape_file_searching(...) return call(s:get_prelude().escape_file_searching, a:000) endfunction -function! vimfiler#util#escape_pattern(...) abort - return call(s:get_string().escape_pattern, a:000) +function! vimfiler#util#escape_pattern(...) + return call(s:get_prelude().escape_pattern, a:000) endfunction -function! vimfiler#util#set_default(...) abort +function! vimfiler#util#set_default(...) return call(s:get_prelude().set_default, a:000) endfunction -function! vimfiler#util#set_dictionary_helper(...) abort +function! vimfiler#util#set_dictionary_helper(...) return call(s:get_prelude().set_dictionary_helper, a:000) endfunction -function! vimfiler#util#substitute_path_separator(...) abort +function! vimfiler#util#substitute_path_separator(...) return call(s:get_prelude().substitute_path_separator, a:000) endfunction -function! vimfiler#util#path2directory(...) abort +function! vimfiler#util#path2directory(...) return call(s:get_prelude().path2directory, a:000) endfunction -function! vimfiler#util#path2project_directory(...) abort +function! vimfiler#util#path2project_directory(...) return call(s:get_prelude().path2project_directory, a:000) endfunction -function! vimfiler#util#has_vimproc(...) abort +function! vimfiler#util#has_vimproc(...) return call(s:get_process().has_vimproc, a:000) endfunction -function! vimfiler#util#system(...) abort +function! vimfiler#util#system(...) return call(s:get_process().system, a:000) endfunction -function! vimfiler#util#get_last_status(...) abort +function! vimfiler#util#get_last_status(...) return call(s:get_process().get_last_status, a:000) endfunction -function! vimfiler#util#sort_by(...) abort +function! vimfiler#util#sort_by(...) return call(s:get_list().sort_by, a:000) endfunction -function! vimfiler#util#escape_file_searching(...) abort +function! vimfiler#util#escape_file_searching(...) return call(s:get_prelude().escape_file_searching, a:000) endfunction -function! vimfiler#util#has_lua() abort +function! vimfiler#util#has_lua() " Note: Disabled if_lua feature if less than 7.3.885. " Because if_lua has double free problem. return has('lua') && (v:version > 703 || v:version == 703 && has('patch885')) endfunction -function! vimfiler#util#is_cmdwin() abort "{{{ +function! vimfiler#util#is_cmdwin() "{{{ return bufname('%') ==# '[Command Line]' endfunction"}}} -function! vimfiler#util#expand(path) abort "{{{ +function! vimfiler#util#expand(path) "{{{ return s:get_prelude().substitute_path_separator( \ (a:path =~ '^\~') ? substitute(a:path, '^\~', expand('~'), '') : \ (a:path =~ '^\$\h\w*') ? substitute(a:path, \ '^\$\h\w*', '\=eval(submatch(0))', '') : \ a:path) endfunction"}}} -function! vimfiler#util#set_default_dictionary_helper(variable, keys, value) abort "{{{ +function! vimfiler#util#set_default_dictionary_helper(variable, keys, value) "{{{ for key in split(a:keys, '\s*,\s*') if !has_key(a:variable, key) let a:variable[key] = a:value endif endfor endfunction"}}} -function! vimfiler#util#set_dictionary_helper(variable, keys, value) abort "{{{ +function! vimfiler#util#set_dictionary_helper(variable, keys, value) "{{{ for key in split(a:keys, '\s*,\s*') let a:variable[key] = a:value endfor endfunction"}}} -function! vimfiler#util#resolve(filename) abort "{{{ +function! vimfiler#util#resolve(filename) "{{{ return ((vimfiler#util#is_windows() && fnamemodify(a:filename, ':e') ==? 'LNK') || getftype(a:filename) ==# 'link') ? \ vimfiler#util#substitute_path_separator(resolve(a:filename)) : a:filename endfunction"}}} -function! vimfiler#util#set_variables(variables) abort "{{{ +function! vimfiler#util#set_variables(variables) "{{{ let variables_save = {} for [key, value] in items(a:variables) let save_value = exists(key) ? eval(key) : '' @@ -172,35 +162,43 @@ return variables_save endfunction"}}} -function! vimfiler#util#restore_variables(variables_save) abort "{{{ +function! vimfiler#util#restore_variables(variables_save) "{{{ for [key, value] in items(a:variables_save) execute 'let' key '=' string(value) endfor endfunction"}}} -function! vimfiler#util#hide_buffer(...) abort "{{{ - let bufnr = get(a:000, 0, bufnr('%')) +function! vimfiler#util#hide_buffer() "{{{ + let bufnr = bufnr('%') - let vimfiler = getbufvar(bufnr, 'vimfiler') - let context = vimfiler.context + let context = vimfiler#get_context() if vimfiler#winnr_another_vimfiler() > 0 " Hide another vimfiler. - call vimfiler#util#winclose( - \ bufwinnr(vimfiler.another_vimfiler_bufnr), context) + let bufnr = b:vimfiler.another_vimfiler_bufnr + close! + execute bufwinnr(bufnr).'wincmd w' call vimfiler#util#hide_buffer() - elseif winnr('$') != 1 && (context.split || context.toggle) - call vimfiler#util#winclose(bufwinnr(bufnr), context) + elseif winnr('$') != 1 && exists('b:vimfiler') + \ && (context.split || context.toggle) + close! + if winbufnr(context.vimfiler__prev_winnr) + \ != context.vimfiler__prev_bufnr + execute bufwinnr(context.vimfiler__prev_bufnr) . 'wincmd w' + else + execute context.vimfiler__prev_winnr . 'wincmd w' + endif else - call vimfiler#util#alternate_buffer(context) + call vimfiler#util#alternate_buffer() endif endfunction"}}} -function! vimfiler#util#alternate_buffer(context) abort "{{{ - if s:buflisted(a:context.alternate_buffer) - \ && getbufvar(a:context.alternate_buffer, '&filetype') !=# 'vimfiler' +function! vimfiler#util#alternate_buffer() "{{{ + let context = vimfiler#get_context() + + if s:buflisted(context.alternate_buffer) + \ && getbufvar(context.alternate_buffer, '&filetype') !=# 'vimfiler' \ && g:vimfiler_restore_alternate_file - execute 'buffer' a:context.alternate_buffer - keepjumps call winrestview(a:context.prev_winsaveview) + execute 'buffer' context.alternate_buffer return endif @@ -218,23 +216,23 @@ silent call vimfiler#force_redraw_all_vimfiler() endfunction"}}} -function! vimfiler#util#delete_buffer(...) abort "{{{ - let bufnr = get(a:000, 0, bufnr('%')) - - call vimfiler#util#hide_buffer(bufnr) - - silent execute 'bwipeout!' bufnr +function! vimfiler#util#delete_buffer(...) "{{{ + let delete_bufnr = get(a:000, 0, bufnr('%')) + + call vimfiler#util#hide_buffer() + + silent execute 'bwipeout!' delete_bufnr endfunction"}}} -function! s:buflisted(bufnr) abort "{{{ +function! s:buflisted(bufnr) "{{{ return exists('t:tabpagebuffer') ? \ has_key(t:tabpagebuffer, a:bufnr) && buflisted(a:bufnr) : \ buflisted(a:bufnr) endfunction"}}} -function! vimfiler#util#convert2list(expr) abort "{{{ - return type(a:expr) ==# type([]) ? copy(a:expr) : [a:expr] +function! vimfiler#util#convert2list(expr) "{{{ + return type(a:expr) ==# type([]) ? a:expr : [a:expr] endfunction"}}} -function! vimfiler#util#get_vimfiler_winnr(buffer_name) abort "{{{ +function! vimfiler#util#get_vimfiler_winnr(buffer_name) "{{{ for winnr in filter(range(1, winnr('$')), \ "getbufvar(winbufnr(v:val), '&filetype') =~# 'vimfiler'") let buffer_context = getbufvar( @@ -247,29 +245,12 @@ return -1 endfunction"}}} -function! vimfiler#util#is_sudo() abort "{{{ +function! vimfiler#util#is_sudo() "{{{ return $SUDO_USER != '' && $USER !=# $SUDO_USER \ && $HOME !=# expand('~'.$USER) \ && $HOME ==# expand('~'.$SUDO_USER) endfunction"}}} -function! vimfiler#util#winmove(winnr) abort "{{{ - if a:winnr > 0 - silent execute a:winnr.'wincmd w' - endif -endfunction"}}} -function! vimfiler#util#winclose(winnr, context) abort "{{{ - if winnr('$') != 1 - let winnr = (winnr() == a:winnr) ? winnr('#') : winnr() - let prev_winnr = (winnr < a:winnr) ? winnr : winnr - 1 - call vimfiler#util#winmove(a:winnr) - close! - call vimfiler#util#winmove(prev_winnr) - else - call vimfiler#util#alternate_buffer(a:context) - endif -endfunction"}}} - let &cpo = s:save_cpo unlet s:save_cpo === modified file 'vim/bundle/vimfiler.vim/autoload/vimfiler/variables.vim' --- vim/bundle/vimfiler.vim/autoload/vimfiler/variables.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/vimfiler/variables.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! vimfiler#variables#get_clipboard() abort "{{{ +function! vimfiler#variables#get_clipboard() "{{{ if !exists('s:clipboard') let s:clipboard = {'operation' : '', 'files' : []} endif @@ -34,7 +34,7 @@ return s:clipboard endfunction"}}} -function! vimfiler#variables#get_data_directory() abort "{{{ +function! vimfiler#variables#get_data_directory() "{{{ let g:vimfiler_data_directory = \ substitute(fnamemodify(get( \ g:, 'vimfiler_data_directory', @@ -48,7 +48,7 @@ return g:vimfiler_data_directory endfunction"}}} -function! vimfiler#variables#default_context() abort "{{{ +function! vimfiler#variables#default_context() "{{{ if !exists('s:default_context') call s:initialize_default_options() endif @@ -56,7 +56,7 @@ return deepcopy(s:default_context) endfunction"}}} -function! vimfiler#variables#options() abort "{{{ +function! vimfiler#variables#options() "{{{ if !exists('s:options') let s:options = map(filter(items(vimfiler#variables#default_context()), \ "v:val[0] !~ '^vimfiler__'"), @@ -72,7 +72,7 @@ return deepcopy(s:options) endfunction"}}} -function! s:initialize_default_options() abort "{{{ +function! s:initialize_default_options() "{{{ let s:default_context = { \ 'buffer_name' : 'default', \ 'quit' : 1, @@ -97,7 +97,6 @@ \ 'find' : 0, \ 'tab' : 0, \ 'alternate_buffer' : bufnr('%'), - \ 'prev_winsaveview' : winsaveview(), \ 'focus' : 1, \ 'invisible' : 0, \ 'columns' : 'type:size:time', @@ -108,7 +107,6 @@ \ 'edit_action' : 'open', \ 'split_action' : 'right', \ 'preview_action' : 'preview', - \ 'fnamewidth' : -1, \ 'vimfiler__prev_bufnr' : bufnr('%'), \ 'vimfiler__prev_winnr' : winnr(), \ 'vimfiler__winfixwidth' : &l:winfixwidth, === modified file 'vim/bundle/vimfiler.vim/autoload/vimfiler/view.vim' --- vim/bundle/vimfiler.vim/autoload/vimfiler/view.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/vimfiler/view.vim 2015-08-25 11:01:00 +0000 @@ -29,9 +29,9 @@ let g:vimfiler_min_cache_files = \ get(g:, 'vimfiler_min_cache_files', 100) -let s:Cache = vimfiler#util#get_vital_cache() +let s:Cache = vimfiler#util#get_vital().import('System.Cache') -function! vimfiler#view#_force_redraw_screen(...) abort "{{{ +function! vimfiler#view#_force_redraw_screen(...) "{{{ let is_manualed = get(a:000, 0, 0) let old_original_files = {} @@ -94,17 +94,27 @@ call vimfiler#view#_redraw_screen() endfunction"}}} -function! vimfiler#view#_redraw_screen(...) abort "{{{ - if &filetype !=# 'vimfiler' - " Not vimfiler window. - return +function! vimfiler#view#_redraw_screen(...) "{{{ + let is_switch = &filetype !=# 'vimfiler' + let save_winnr = winnr() + if is_switch + " Switch vimfiler. + let vimfiler = vimfiler#get_current_vimfiler() + + let winnr = bufwinnr(vimfiler.bufnr) + if winnr < 0 + " Not vimfiler window. + return + endif + + execute winnr . 'wincmd w' endif if !has_key(b:vimfiler, 'original_files') return endif - let current_file = vimfiler#get_file(b:vimfiler) + let current_file = vimfiler#get_file() let b:vimfiler.all_files = \ unite#filters#matcher_vimfiler_mask#define().filter( @@ -112,7 +122,7 @@ \ { 'input' : b:vimfiler.current_mask }) if !b:vimfiler.is_visible_ignore_files let b:vimfiler.all_files = vimfiler#helper#_call_filters( - \ b:vimfiler.all_files, b:vimfiler.context) + \ b:vimfiler.all_files, vimfiler#get_context()) let b:vimfiler.all_files = \ s:check_tree(b:vimfiler.all_files) endif @@ -152,12 +162,16 @@ let index = index(b:vimfiler.current_files, current_file) if index >= 0 - call cursor(vimfiler#get_line_number(b:vimfiler, index), 0) + call cursor(vimfiler#get_line_number(index), 0) else call cursor(last_line, 0) endif + + if is_switch + execute save_winnr . 'wincmd w' + endif endfunction"}}} -function! vimfiler#view#_force_redraw_all_vimfiler(...) abort "{{{ +function! vimfiler#view#_force_redraw_all_vimfiler(...) "{{{ let is_manualed = get(a:000, 0, 0) let current_nr = winnr() @@ -166,27 +180,30 @@ " Search vimfiler window. for winnr in filter(range(1, winnr('$')), \ "getwinvar(v:val, '&filetype') ==# 'vimfiler'") - call vimfiler#util#winmove(winnr) + execute winnr . 'wincmd w' call vimfiler#view#_force_redraw_screen(is_manualed) endfor finally - call vimfiler#util#winmove(current_nr) + execute current_nr . 'wincmd w' endtry endfunction"}}} -function! vimfiler#view#_redraw_all_vimfiler() abort "{{{ +function! vimfiler#view#_redraw_all_vimfiler() "{{{ let current_nr = winnr() - try + let bufnr = 1 + while bufnr <= winnr('$') " Search vimfiler window. - for winnr in filter(range(1, winnr('$')), - \ "getwinvar(v:val, '&filetype') ==# 'vimfiler'") - call vimfiler#util#winmove(winnr) + if getwinvar(bufnr, '&filetype') ==# 'vimfiler' + + execute bufnr . 'wincmd w' call vimfiler#view#_redraw_screen() - endfor - finally - call vimfiler#util#winmove(current_nr) - endtry + endif + + let bufnr += 1 + endwhile + + execute current_nr . 'wincmd w' endfunction"}}} -function! s:redraw_prompt() abort "{{{ +function! s:redraw_prompt() "{{{ if &filetype !=# 'vimfiler' return endif @@ -220,7 +237,7 @@ endif let b:vimfiler.status = prefix . dir . mask . sort . safe - let context = b:vimfiler.context + let context = vimfiler#get_context() " Append up directory. let modifiable_save = &l:modifiable @@ -253,7 +270,7 @@ let &l:readonly = readonly_save endtry endfunction"}}} -function! vimfiler#view#_get_print_lines(files) abort "{{{ +function! vimfiler#view#_get_print_lines(files) "{{{ " Clear previous syntax. for syntax in b:vimfiler.syntaxes silent! execute 'syntax clear' syntax @@ -322,7 +339,7 @@ return lines endfunction"}}} -function! vimfiler#view#_get_max_len(files) abort "{{{ +function! vimfiler#view#_get_max_len(files) "{{{ let columns = (b:vimfiler.context.simple) ? [] : b:vimfiler.columns for column in columns @@ -349,20 +366,16 @@ silent execute 'sign unplace buffer='.bufnr('%') endif - let max_len = max([winwidth(0) - padding, 10]) - if b:vimfiler.context.fnamewidth > 0 - let max_len = min([max_len, b:vimfiler.context.fnamewidth]) - endif - return max_len + return max([winwidth(0) - padding, 10]) endfunction"}}} -function! vimfiler#view#_define_syntax() abort "{{{ +function! vimfiler#view#_define_syntax() "{{{ for column in filter( \ copy(b:vimfiler.columns), "get(v:val, 'syntax', '') != ''") call column.define_syntax(b:vimfiler.context) endfor endfunction"}}} -function! s:check_tree(files) abort "{{{ +function! s:check_tree(files) "{{{ let level = 0 let _ = [] for file in a:files === modified file 'vim/bundle/vimfiler.vim/autoload/vital/_vimfiler.vim' --- vim/bundle/vimfiler.vim/autoload/vital/_vimfiler.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/vital/_vimfiler.vim 2015-08-25 11:01:00 +0000 @@ -1,5 +1,303 @@ -let s:_plugin_name = expand(':t:r') - -function! vital#{s:_plugin_name}#new() abort - return vital#{s:_plugin_name[1:]}#of() +let s:self_version = expand(':t:r') +let s:self_file = expand('') + +" Note: The extra argument to globpath() was added in Patch 7.2.051. +let s:globpath_third_arg = v:version > 702 || v:version == 702 && has('patch51') + +let s:loaded = {} + +function! s:import(name, ...) abort + let target = {} + let functions = [] + for a in a:000 + if type(a) == type({}) + let target = a + elseif type(a) == type([]) + let functions = a + endif + unlet a + endfor + let module = s:_import(a:name) + if empty(functions) + call extend(target, module, 'keep') + else + for f in functions + if has_key(module, f) && !has_key(target, f) + let target[f] = module[f] + endif + endfor + endif + return target +endfunction + +function! s:load(...) dict abort + for arg in a:000 + let [name; as] = type(arg) == type([]) ? arg[: 1] : [arg, arg] + let target = split(join(as, ''), '\W\+') + let dict = self + while 1 <= len(target) + let ns = remove(target, 0) + if !has_key(dict, ns) + let dict[ns] = {} + endif + if type(dict[ns]) == type({}) + let dict = dict[ns] + else + unlet dict + break + endif + endwhile + + if exists('dict') + call extend(dict, s:_import(name)) + endif + unlet arg + endfor + return self +endfunction + +function! s:unload() abort + let s:loaded = {} +endfunction + +function! s:exists(name) abort + return s:_get_module_path(a:name) !=# '' +endfunction + +function! s:search(pattern) abort + let paths = s:_vital_files(a:pattern) + let modules = sort(map(paths, 's:_file2module(v:val)')) + return s:_uniq(modules) +endfunction + +function! s:expand_modules(entry, all) abort + if type(a:entry) == type([]) + let candidates = s:_concat(map(copy(a:entry), 's:search(v:val)')) + if empty(candidates) + throw printf('vital: Any of module %s is not found', string(a:entry)) + endif + if eval(join(map(copy(candidates), 'has_key(a:all, v:val)'), '+')) + let modules = [] + else + let modules = [candidates[0]] + endif + else + let modules = s:search(a:entry) + if empty(modules) + throw printf('vital: Module %s is not found', a:entry) + endif + endif + call filter(modules, '!has_key(a:all, v:val)') + for module in modules + let a:all[module] = 1 + endfor + return modules +endfunction + +function! s:_import(name) abort + if type(a:name) == type(0) + return s:_build_module(a:name) + endif + let path = s:_get_module_path(a:name) + if path ==# '' + throw 'vital: module not found: ' . a:name + endif + let sid = s:_get_sid_by_script(path) + if !sid + try + execute 'source' fnameescape(path) + catch /^Vim\%((\a\+)\)\?:E484/ + throw 'vital: module not found: ' . a:name + catch /^Vim\%((\a\+)\)\?:E127/ + " Ignore. + endtry + + let sid = s:_get_sid_by_script(path) + endif + return s:_build_module(sid) +endfunction + +function! s:_get_module_path(name) abort + if s:_is_absolute_path(a:name) && filereadable(a:name) + return a:name + endif + if a:name ==# '' + let paths = [s:self_file] + elseif a:name =~# '\v^\u\w*%(\.\u\w*)*$' + let paths = s:_vital_files(a:name) + else + throw 'vital: Invalid module name: ' . a:name + endif + + call filter(paths, 'filereadable(expand(v:val, 1))') + let path = get(paths, 0, '') + return path !=# '' ? path : '' +endfunction + +function! s:_get_sid_by_script(path) abort + let path = s:_unify_path(a:path) + for line in filter(split(s:_redir('scriptnames'), "\n"), + \ 'stridx(v:val, s:self_version) > 0') + let list = matchlist(line, '^\s*\(\d\+\):\s\+\(.\+\)\s*$') + if !empty(list) && s:_unify_path(list[2]) ==# path + return list[1] - 0 + endif + endfor + return 0 +endfunction + +function! s:_file2module(file) abort + let filename = fnamemodify(a:file, ':p:gs?[\\/]?/?') + let tail = matchstr(filename, 'autoload/vital/_\w\+/\zs.*\ze\.vim$') + return join(split(tail, '[\\/]\+'), '.') +endfunction + +if filereadable(expand(':r') . '.VIM') + " resolve() is slow, so we cache results. + let s:_unify_path_cache = {} + " Note: On windows, vim can't expand path names from 8.3 formats. + " So if getting full path via and $HOME was set as 8.3 format, + " vital load duplicated scripts. Below's :~ avoid this issue. + function! s:_unify_path(path) abort + if has_key(s:_unify_path_cache, a:path) + return s:_unify_path_cache[a:path] + endif + let value = tolower(fnamemodify(resolve(fnamemodify( + \ a:path, ':p')), ':~:gs?[\\/]?/?')) + let s:_unify_path_cache[a:path] = value + return value + endfunction +else + function! s:_unify_path(path) abort + return resolve(fnamemodify(a:path, ':p:gs?[\\/]?/?')) + endfunction +endif + +if s:globpath_third_arg + function! s:_runtime_files(path) abort + return split(globpath(&runtimepath, a:path, 1), "\n") + endfunction +else + function! s:_runtime_files(path) abort + return split(globpath(&runtimepath, a:path), "\n") + endfunction +endif + +let s:_vital_files_cache_runtimepath = '' +let s:_vital_files_cache = [] +function! s:_vital_files(pattern) abort + if s:_vital_files_cache_runtimepath !=# &runtimepath + let path = printf('autoload/vital/%s/**/*.vim', s:self_version) + let s:_vital_files_cache = s:_runtime_files(path) + let mod = ':p:gs?[\\/]\+?/?' + call map(s:_vital_files_cache, 'fnamemodify(v:val, mod)') + let s:_vital_files_cache_runtimepath = &runtimepath + endif + let target = substitute(a:pattern, '\.', '/', 'g') + let target = substitute(target, '\*', '[^/]*', 'g') + let regexp = printf('autoload/vital/%s/%s.vim', s:self_version, target) + return filter(copy(s:_vital_files_cache), 'v:val =~# regexp') +endfunction + +" Copy from System.Filepath +if has('win16') || has('win32') || has('win64') + function! s:_is_absolute_path(path) abort + return a:path =~? '^[a-z]:[/\\]' + endfunction +else + function! s:_is_absolute_path(path) abort + return a:path[0] ==# '/' + endfunction +endif + +function! s:_build_module(sid) abort + if has_key(s:loaded, a:sid) + return copy(s:loaded[a:sid]) + endif + let functions = s:_get_functions(a:sid) + + let prefix = '' . a:sid . '_' + let module = {} + for func in functions + let module[func] = function(prefix . func) + endfor + if has_key(module, '_vital_loaded') + let V = vital#{s:self_version}#new() + if has_key(module, '_vital_depends') + let all = {} + let modules = + \ s:_concat(map(module._vital_depends(), + \ 's:expand_modules(v:val, all)')) + call call(V.load, modules, V) + endif + try + call module._vital_loaded(V) + catch + " FIXME: Show an error message for debug. + endtry + endif + if !get(g:, 'vital_debug', 0) + call filter(module, 'v:key =~# "^\\a"') + endif + let s:loaded[a:sid] = module + return copy(module) +endfunction + +if exists('+regexpengine') + function! s:_get_functions(sid) abort + let funcs = s:_redir(printf("function /\\%%#=2^\%d_", a:sid)) + let map_pat = '' . a:sid . '_\zs\w\+' + return map(split(funcs, "\n"), 'matchstr(v:val, map_pat)') + endfunction +else + function! s:_get_functions(sid) abort + let prefix = '' . a:sid . '_' + let funcs = s:_redir('function') + let filter_pat = '^\s*function ' . prefix + let map_pat = prefix . '\zs\w\+' + return map(filter(split(funcs, "\n"), + \ 'stridx(v:val, prefix) > 0 && v:val =~# filter_pat'), + \ 'matchstr(v:val, map_pat)') + endfunction +endif + +if exists('*uniq') + function! s:_uniq(list) abort + return uniq(a:list) + endfunction +else + function! s:_uniq(list) abort + let i = len(a:list) - 1 + while 0 < i + if a:list[i] ==# a:list[i - 1] + call remove(a:list, i) + let i -= 2 + else + let i -= 1 + endif + endwhile + return a:list + endfunction +endif + +function! s:_concat(lists) abort + let result_list = [] + for list in a:lists + let result_list += list + endfor + return result_list +endfunction + +function! s:_redir(cmd) abort + let [save_verbose, save_verbosefile] = [&verbose, &verbosefile] + set verbose=0 verbosefile= + redir => res + silent! execute a:cmd + redir END + let [&verbose, &verbosefile] = [save_verbose, save_verbosefile] + return res +endfunction + +function! vital#{s:self_version}#new() abort + return s:_import('') endfunction === removed file 'vim/bundle/vimfiler.vim/autoload/vital/_vimfiler/Data/Dict.vim' --- vim/bundle/vimfiler.vim/autoload/vital/_vimfiler/Data/Dict.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/vital/_vimfiler/Data/Dict.vim 1970-01-01 00:00:00 +0000 @@ -1,116 +0,0 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_vimfiler#Data#Dict#import() abort - return map({'pick': '', 'clear': '', 'max_by': '', 'foldl': '', 'swap': '', 'omit': '', 'min_by': '', 'foldr': '', 'make_index': '', 'make': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_vimfiler#Data#Dict#import() abort', printf("return map({'pick': '', 'clear': '', 'max_by': '', 'foldl': '', 'swap': '', 'omit': '', 'min_by': '', 'foldr': '', 'make_index': '', 'make': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ -" Utilities for dictionary. - -let s:save_cpo = &cpo -set cpo&vim - -" Makes a dict from keys and values -function! s:make(keys, values, ...) abort - let dict = {} - let fill = a:0 ? a:1 : 0 - for i in range(len(a:keys)) - let key = type(a:keys[i]) == type('') ? a:keys[i] : string(a:keys[i]) - if key ==# '' - throw "vital: Data.Dict: Can't use an empty string for key." - endif - let dict[key] = get(a:values, i, fill) - endfor - return dict -endfunction - -" Swaps keys and values -function! s:swap(dict) abort - return s:make(values(a:dict), keys(a:dict)) -endfunction - -" Makes a index dict from a list -function! s:make_index(list, ...) abort - let value = a:0 ? a:1 : 1 - return s:make(a:list, [], value) -endfunction - -function! s:pick(dict, keys) abort - let new_dict = {} - for key in a:keys - if has_key(a:dict, key) - let new_dict[key] = a:dict[key] - endif - endfor - return new_dict -endfunction - -function! s:omit(dict, keys) abort - let new_dict = copy(a:dict) - for key in a:keys - if has_key(a:dict, key) - call remove(new_dict, key) - endif - endfor - return new_dict -endfunction - -function! s:clear(dict) abort - for key in keys(a:dict) - call remove(a:dict, key) - endfor - return a:dict -endfunction - -function! s:_max_by(dict, expr) abort - let dict = s:swap(map(copy(a:dict), a:expr)) - let key = dict[max(keys(dict))] - return [key, a:dict[key]] -endfunction - -function! s:max_by(dict, expr) abort - if empty(a:dict) - throw 'vital: Data.Dict: Empty dictionary' - endif - return s:_max_by(a:dict, a:expr) -endfunction - -function! s:min_by(dict, expr) abort - if empty(a:dict) - throw 'vital: Data.Dict: Empty dictionary' - endif - return s:_max_by(a:dict, '-(' . a:expr . ')') -endfunction - -function! s:_foldl(f, init, xs) abort - let memo = a:init - for [k, v] in a:xs - let expr = substitute(a:f, 'v:key', string(k), 'g') - let expr = substitute(expr, 'v:val', string(v), 'g') - let expr = substitute(expr, 'v:memo', string(memo), 'g') - unlet memo - let memo = eval(expr) - endfor - return memo -endfunction - -function! s:foldl(f, init, dict) abort - return s:_foldl(a:f, a:init, items(a:dict)) -endfunction - -function! s:foldr(f, init, dict) abort - return s:_foldl(a:f, a:init, reverse(items(a:dict))) -endfunction - -let &cpo = s:save_cpo -unlet s:save_cpo - -" vim:set et ts=2 sts=2 sw=2 tw=0: === modified file 'vim/bundle/vimfiler.vim/autoload/vital/_vimfiler/Data/List.vim' --- vim/bundle/vimfiler.vim/autoload/vital/_vimfiler/Data/List.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/vital/_vimfiler/Data/List.vim 2015-08-25 11:01:00 +0000 @@ -1,18 +1,3 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_vimfiler#Data#List#import() abort - return map({'combinations': '', 'and': '', 'sort_by': '', 'foldr1': '', 'sort': '', 'flatten': '', 'has_index': '', 'find_indices': '', 'any': '', 'unshift': '', 'span': '', 'pop': '', 'binary_search': '', 'uniq_by': '', 'or': '', 'all': '', 'zip': '', 'find_last_index': '', 'find': '', 'partition': '', 'map_accum': '', 'permutations': '', 'break': '', 'max_by': '', 'foldl': '', 'foldr': '', 'find_index': '', 'group_by': '', 'take_while': '', 'conj': '', 'push': '', 'char_range': '', 'cons': '', 'foldl1': '', 'intersect': '', 'concat': '', 'shift': '', 'clear': '', 'has_common_items': '', 'product': '', 'zip_fill': '', 'uniq': '', 'has': '', 'min_by': '', 'with_index': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_vimfiler#Data#List#import() abort', printf("return map({'combinations': '', 'and': '', 'sort_by': '', 'foldr1': '', 'sort': '', 'flatten': '', 'has_index': '', 'find_indices': '', 'any': '', 'unshift': '', 'span': '', 'pop': '', 'binary_search': '', 'uniq_by': '', 'or': '', 'all': '', 'zip': '', 'find_last_index': '', 'find': '', 'partition': '', 'map_accum': '', 'permutations': '', 'break': '', 'max_by': '', 'foldl': '', 'foldr': '', 'find_index': '', 'group_by': '', 'take_while': '', 'conj': '', 'push': '', 'char_range': '', 'cons': '', 'foldl1': '', 'intersect': '', 'concat': '', 'shift': '', 'clear': '', 'has_common_items': '', 'product': '', 'zip_fill': '', 'uniq': '', 'has': '', 'min_by': '', 'with_index': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ " Utilities for list. let s:save_cpo = &cpo @@ -240,7 +225,7 @@ " similar to Haskell's Prelude.foldl1 function! s:foldl1(f, xs) abort if len(a:xs) == 0 - throw 'vital: Data.List: foldl1' + throw 'foldl1' endif return s:foldl(a:f, a:xs[0], a:xs[1:]) endfunction @@ -253,7 +238,7 @@ " similar to Haskell's Prelude.fold11 function! s:foldr1(f, xs) abort if len(a:xs) == 0 - throw 'vital: Data.List: foldr1' + throw 'foldr1' endif return s:foldr(a:f, a:xs[-1], a:xs[0:-2]) endfunction @@ -279,10 +264,11 @@ " Inspired by Ruby's with_index method. function! s:with_index(list, ...) abort let base = a:0 > 0 ? a:1 : 0 - return map(copy(a:list), '[v:val, v:key + base]') + return s:zip(a:list, range(base, len(a:list)+base-1)) endfunction " similar to Ruby's detect or Haskell's find. +" TODO spec and doc function! s:find(list, default, f) abort for x in a:list if eval(substitute(a:f, 'v:val', string(x), 'g')) === modified file 'vim/bundle/vimfiler.vim/autoload/vital/_vimfiler/Data/String.vim' --- vim/bundle/vimfiler.vim/autoload/vital/_vimfiler/Data/String.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/vital/_vimfiler/Data/String.vim 2015-08-25 11:01:00 +0000 @@ -1,18 +1,3 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_vimfiler#Data#String#import() abort - return map({'starts_with': '', 'split3': '', 'chop': '', 'unescape': '', 'split_posix_text': '', 'replace': '', 'scan': '', 'strchars': '', 'strwidthpart': '', 'common_head': '', 'reverse': '', 'escape_pattern': '', 'trim_end': '', '_vital_depends': '', 'wrap': '', 'join_posix_lines': '', 'contains_multibyte': '', 'truncate_skipping': '', 'split_leftright': '', 'ends_with': '', 'nsplit': '', 'substitute_last': '', 'strwidthpart_reverse': '', 'unescape_pattern': '', 'levenshtein_distance': '', 'trim_start': '', 'nr2hex': '', 'remove_ansi_sequences': '', 'iconv': '', 'pad_left': '', 'nr2enc_char': '', 'lines': '', 'repair_posix_text': '', 'nr2byte': '', 'trim': '', 'diffidx': '', 'truncate': '', 'split_by_displaywidth': '', 'padding_by_displaywidth': '', 'hash': '', 'chomp': '', 'pad_between_letters': '', 'wcswidth': '', 'dstring': '', 'pad_both_sides': '', 'justify_equal_spacing': '', 'pad_right': '', 'replace_first': '', '_vital_loaded': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_vimfiler#Data#String#import() abort', printf("return map({'starts_with': '', 'split3': '', 'chop': '', 'unescape': '', 'split_posix_text': '', 'replace': '', 'scan': '', 'strchars': '', 'strwidthpart': '', 'common_head': '', 'reverse': '', 'escape_pattern': '', 'trim_end': '', '_vital_depends': '', 'wrap': '', 'join_posix_lines': '', 'contains_multibyte': '', 'truncate_skipping': '', 'split_leftright': '', 'ends_with': '', 'nsplit': '', 'substitute_last': '', 'strwidthpart_reverse': '', 'unescape_pattern': '', 'levenshtein_distance': '', 'trim_start': '', 'nr2hex': '', 'remove_ansi_sequences': '', 'iconv': '', 'pad_left': '', 'nr2enc_char': '', 'lines': '', 'repair_posix_text': '', 'nr2byte': '', 'trim': '', 'diffidx': '', 'truncate': '', 'split_by_displaywidth': '', 'padding_by_displaywidth': '', 'hash': '', 'chomp': '', 'pad_between_letters': '', 'wcswidth': '', 'dstring': '', 'pad_both_sides': '', 'justify_equal_spacing': '', 'pad_right': '', 'replace_first': '', '_vital_loaded': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ " Utilities for string. let s:save_cpo = &cpo @@ -20,11 +5,12 @@ function! s:_vital_loaded(V) abort let s:V = a:V + let s:P = s:V.import('Prelude') let s:L = s:V.import('Data.List') endfunction function! s:_vital_depends() abort - return ['Data.List'] + return ['Prelude', 'Data.List'] endfunction " Substitute a:from => a:to by string. @@ -54,15 +40,6 @@ return join(reverse(split(a:str, '.\zs')), '') endfunction -function! s:starts_with(str, prefix) abort - return stridx(a:str, a:prefix) == 0 -endfunction - -function! s:ends_with(str, suffix) abort - let idx = strridx(a:str, a:suffix) - return 0 <= idx && idx + len(a:suffix) == len(a:str) -endfunction - function! s:common_head(strs) abort if empty(a:strs) return '' @@ -73,7 +50,7 @@ endif let strs = len == 2 ? a:strs : sort(copy(a:strs)) let pat = substitute(strs[0], '.', '\="[" . escape(submatch(0), "^\\") . "]"', 'g') - return pat ==# '' ? '' : matchstr(strs[-1], '\C^\%[' . pat . ']') + return pat == '' ? '' : matchstr(strs[-1], '\C^\%[' . pat . ']') endfunction " Split to two elements of List. ([left, right]) @@ -177,15 +154,15 @@ " NOTE _concat() is just a copy of Data.List.concat(). " FIXME don't repeat yourself function! s:_split_by_wcswidth_once(body, x) abort - let fst = s:strwidthpart(a:body, a:x) - let snd = s:strwidthpart_reverse(a:body, s:wcswidth(a:body) - s:wcswidth(fst)) + let fst = s:P.strwidthpart(a:body, a:x) + let snd = s:P.strwidthpart_reverse(a:body, s:P.wcswidth(a:body) - s:P.wcswidth(fst)) return [fst, snd] endfunction function! s:_split_by_wcswidth(body, x) abort let memo = [] let body = a:body - while s:wcswidth(body) > a:x + while s:P.wcswidth(body) > a:x let [tmp, body] = s:_split_by_wcswidth_once(body, a:x) call add(memo, tmp) endwhile @@ -197,14 +174,6 @@ return matchstr(a:str,'^\s*\zs.\{-}\ze\s*$') endfunction -function! s:trim_start(str) abort - return matchstr(a:str,'^\s*\zs.\{-}$') -endfunction - -function! s:trim_end(str) abort - return matchstr(a:str,'^.\{-}\ze\s*$') -endfunction - function! s:wrap(str,...) abort let _columns = a:0 > 0 ? a:1 : &columns return s:L.concat( @@ -222,7 +191,7 @@ endfunction function! s:nr2enc_char(charcode) abort - if &encoding ==# 'utf-8' + if &encoding == 'utf-8' return nr2char(a:charcode) endif let char = s:nr2byte(a:charcode) @@ -234,7 +203,7 @@ function! s:nr2hex(nr) abort let n = a:nr - let r = '' + let r = "" while n let r = '0123456789ABCDEF'[n % 16] . r let n = n / 16 @@ -330,7 +299,7 @@ let letters2 = split(a:str2, '\zs') let length1 = len(letters1) let length2 = len(letters2) - let distances = map(range(1, length1 + 1), 'map(range(1, length2 + 1), ''0'')') + let distances = map(range(1, length1 + 1), 'map(range(1, length2 + 1), "0")') for i1 in range(0, length1) let distances[i1][0] = i1 @@ -385,7 +354,7 @@ let text = '' while cs_index < len(cs) - if cs[cs_index] is# "\n" + if cs[cs_index] is "\n" let text = s:padding_by_displaywidth(text, a:width, a:float) let lines += [text] let text = '' @@ -406,7 +375,7 @@ if a:is_wrap if a:width < w if a:width < strdisplaywidth(cs[cs_index]) - while get(cs, cs_index, "\n") isnot# "\n" + while get(cs, cs_index, "\n") isnot "\n" let cs_index += 1 endwhile continue @@ -415,7 +384,7 @@ endif endif else - while get(cs, cs_index, "\n") isnot# "\n" + while get(cs, cs_index, "\n") isnot "\n" let cs_index += 1 endwhile continue @@ -576,86 +545,7 @@ endfunction endif -function! s:remove_ansi_sequences(text) abort - return substitute(a:text, '\e\[\%(\%(\d;\)\?\d\{1,2}\)\?[mK]', '', 'g') -endfunction - -function! s:escape_pattern(str) abort - " escape characters for no-magic - return escape(a:str, '^$~.*[]\') -endfunction - -function! s:unescape_pattern(str) abort - " unescape characters for no-magic - return s:unescape(a:str, '^$~.*[]\') -endfunction - -function! s:unescape(str, chars) abort - let chars = map(split(a:chars, '\zs'), 'escape(v:val, ''^$~.*[]\'')') - return substitute(a:str, '\\\(' . join(chars, '\|') . '\)', '\1', 'g') -endfunction - -function! s:iconv(expr, from, to) abort - if a:from ==# '' || a:to ==# '' || a:from ==? a:to - return a:expr - endif - let result = iconv(a:expr, a:from, a:to) - return empty(result) ? a:expr : result -endfunction - -" NOTE: -" A definition of a TEXT file is "A file that contains characters organized -" into one or more lines." -" A definition of a LINE is "A sequence of zero or more non- s -" plus a terminating " -" That's why {stdin} always ends with ideally. However, there are -" some programs which does not follow the POSIX rule and a Vim's way to join -" List into TEXT; join({text}, "\n"); does not add to the end of -" the last line. -" That's why add a trailing if it does not exist. -" REF: -" http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_392 -" http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_205 -" :help split() -" NOTE: -" it does nothing if the text is a correct POSIX text -function! s:repair_posix_text(text, ...) abort - let newline = get(a:000, 0, "\n") - return a:text =~# '\n$' ? a:text : a:text . newline -endfunction - -" NOTE: -" A definition of a TEXT file is "A file that contains characters organized -" into one or more lines." -" A definition of a LINE is "A sequence of zero or more non- s -" plus a terminating " -" REF: -" http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_392 -" http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_205 -function! s:join_posix_lines(lines, ...) abort - let newline = get(a:000, 0, "\n") - return join(a:lines, newline) . newline -endfunction - -" NOTE: -" A definition of a TEXT file is "A file that contains characters organized -" into one or more lines." -" A definition of a LINE is "A sequence of zero or more non- s -" plus a terminating " -" TEXT into List; split({text}, '\r\?\n', 1); add an extra empty line at the -" end of List because the end of TEXT ends with and keepempty=1 is -" specified. (btw. keepempty=0 cannot be used because it will remove -" emptylines in the head and the tail). -" That's why removing a trailing before proceeding to 'split' is required -" REF: -" http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_392 -" http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_205 -function! s:split_posix_text(text, ...) abort - let newline = get(a:000, 0, '\r\?\n') - let text = substitute(a:text, newline . '$', '', '') - return split(text, newline, 1) -endfunction - let &cpo = s:save_cpo unlet s:save_cpo + " vim:set et ts=2 sts=2 sw=2 tw=0: === modified file 'vim/bundle/vimfiler.vim/autoload/vital/_vimfiler/Prelude.vim' --- vim/bundle/vimfiler.vim/autoload/vital/_vimfiler/Prelude.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/vital/_vimfiler/Prelude.vim 2015-08-25 11:01:00 +0000 @@ -1,18 +1,3 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_vimfiler#Prelude#import() abort - return map({'escape_pattern': '', 'is_funcref': '', 'path2directory': '', 'wcswidth': '', 'is_string': '', 'input_helper': '', 'is_number': '', 'is_cygwin': '', 'path2project_directory': '', 'strwidthpart_reverse': '', 'input_safe': '', 'is_list': '', 'truncate_skipping': '', 'glob': '', 'truncate': '', 'is_dict': '', 'set_default': '', 'is_numeric': '', 'getchar_safe': '', 'substitute_path_separator': '', 'is_mac': '', 'strwidthpart': '', 'getchar': '', 'is_unix': '', 'is_windows': '', 'globpath': '', 'escape_file_searching': '', 'is_float': '', 'smart_execute_command': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_vimfiler#Prelude#import() abort', printf("return map({'escape_pattern': '', 'is_funcref': '', 'path2directory': '', 'wcswidth': '', 'is_string': '', 'input_helper': '', 'is_number': '', 'is_cygwin': '', 'path2project_directory': '', 'strwidthpart_reverse': '', 'input_safe': '', 'is_list': '', 'truncate_skipping': '', 'glob': '', 'truncate': '', 'is_dict': '', 'set_default': '', 'is_numeric': '', 'getchar_safe': '', 'substitute_path_separator': '', 'is_mac': '', 'strwidthpart': '', 'getchar': '', 'is_unix': '', 'is_windows': '', 'globpath': '', 'escape_file_searching': '', 'is_float': '', 'smart_execute_command': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ let s:save_cpo = &cpo set cpo&vim @@ -42,7 +27,7 @@ \ s:__TYPE_DICT, \ s:__TYPE_FLOAT] = [ \ type(3), - \ type(''), + \ type(""), \ type(function('tr')), \ type([]), \ type({}), @@ -83,9 +68,12 @@ return type(a:Value) ==# s:__TYPE_DICT endfunction +function! s:truncate_smart(str, max, footer_width, separator) abort + echoerr 'Prelude.truncate_smart() is obsolete. Use its truncate_skipping() instead; they are equivalent.' + return s:truncate_skipping(a:str, a:max, a:footer_width, a:separator) +endfunction + function! s:truncate_skipping(str, max, footer_width, separator) abort - call s:_warn_deprecated('truncate_skipping', 'Data.String.truncate_skipping') - let width = s:wcswidth(a:str) if width <= a:max let ret = a:str @@ -102,8 +90,6 @@ " Original function is from mattn. " http://github.com/mattn/googlereader-vim/tree/master - call s:_warn_deprecated('truncate', 'Data.String.truncate') - if a:str =~# '^[\x00-\x7f]*$' return len(a:str) < a:width ? \ printf('%-'.a:width.'s', a:str) : strpart(a:str, 0, a:width) @@ -124,8 +110,6 @@ endfunction function! s:strwidthpart(str, width) abort - call s:_warn_deprecated('strwidthpart', 'Data.String.strwidthpart') - if a:width <= 0 return '' endif @@ -140,8 +124,6 @@ return ret endfunction function! s:strwidthpart_reverse(str, width) abort - call s:_warn_deprecated('strwidthpart_reverse', 'Data.String.strwidthpart_reverse') - if a:width <= 0 return '' endif @@ -159,13 +141,10 @@ if v:version >= 703 " Use builtin function. function! s:wcswidth(str) abort - call s:_warn_deprecated('wcswidth', 'Data.String.wcswidth') return strwidth(a:str) endfunction else function! s:wcswidth(str) abort - call s:_warn_deprecated('wcswidth', 'Data.String.wcswidth') - if a:str =~# '^[\x00-\x7f]*$' return strlen(a:str) end @@ -230,17 +209,13 @@ return s:is_unix endfunction -function! s:_warn_deprecated(name, alternative) abort - try - echohl Error - echomsg 'Prelude.' . a:name . ' is deprecated! Please use ' . a:alternative . ' instead.' - finally - echohl None - endtry +function! s:_deprecated2(fname) abort + echomsg printf("Vital.Prelude.%s is deprecated!", + \ a:fname) endfunction function! s:smart_execute_command(action, word) abort - execute a:action . ' ' . (a:word ==# '' ? '' : '`=a:word`') + execute a:action . ' ' . (a:word == '' ? '' : '`=a:word`') endfunction function! s:escape_file_searching(buffer_name) abort @@ -248,10 +223,6 @@ endfunction function! s:escape_pattern(str) abort - call s:_warn_deprecated( - \ 'escape_pattern', - \ 'Data.String.escape_pattern', - \) return escape(a:str, '~"\.^$[]*') endfunction @@ -262,7 +233,7 @@ function! s:getchar_safe(...) abort let c = s:input_helper('getchar', a:000) - return type(c) == type('') ? c : nr2char(c) + return type(c) == type("") ? c : nr2char(c) endfunction function! s:input_safe(...) abort @@ -272,13 +243,13 @@ function! s:input_helper(funcname, args) abort let success = 0 if inputsave() !=# success - throw 'vital: Prelude: inputsave() failed' + throw 'inputsave() failed' endif try return call(a:funcname, a:args) finally if inputrestore() !=# success - throw 'vital: Prelude: inputrestore() failed' + throw 'inputrestore() failed' endif endtry endfunction @@ -289,6 +260,16 @@ endif endfunction +function! s:set_dictionary_helper(variable, keys, pattern) abort + call s:_deprecated2('set_dictionary_helper') + + for key in split(a:keys, '\s*,\s*') + if !has_key(a:variable, key) + let a:variable[key] = a:pattern + endif + endfor +endfunction + function! s:substitute_path_separator(path) abort return s:is_windows ? substitute(a:path, '\\', '/', 'g') : a:path endfunction @@ -319,7 +300,7 @@ let find_directory = s:escape_file_searching(search_directory) let d = finddir('.svn', find_directory . ';') - if d ==# '' + if d == '' return '' endif @@ -329,9 +310,9 @@ let parent_directory = s:path2directory( \ fnamemodify(directory, ':h')) - if parent_directory !=# '' + if parent_directory != '' let d = finddir('.svn', parent_directory . ';') - if d !=# '' + if d != '' let directory = s:_path2project_directory_svn(parent_directory) endif endif @@ -344,7 +325,7 @@ let find_directory = s:escape_file_searching(search_directory) let d = finddir(vcs, find_directory . ';') - if d ==# '' + if d == '' return '' endif return fnamemodify(d, ':p:h:h') @@ -364,25 +345,25 @@ else let directory = s:_path2project_directory_others(vcs, search_directory) endif - if directory !=# '' + if directory != '' break endif endfor " Search project file. - if directory ==# '' + if directory == '' for d in ['build.xml', 'prj.el', '.project', 'pom.xml', 'package.json', \ 'Makefile', 'configure', 'Rakefile', 'NAnt.build', \ 'P4CONFIG', 'tags', 'gtags'] let d = findfile(d, s:escape_file_searching(search_directory) . ';') - if d !=# '' + if d != '' let directory = fnamemodify(d, ':p:h') break endif endfor endif - if directory ==# '' + if directory == '' " Search /src/ directory. let base = s:substitute_path_separator(search_directory) if base =~# '/src/' @@ -390,7 +371,7 @@ endif endif - if directory ==# '' && !is_allow_empty + if directory == '' && !is_allow_empty " Use original path. let directory = search_directory endif === modified file 'vim/bundle/vimfiler.vim/autoload/vital/_vimfiler/Process.vim' --- vim/bundle/vimfiler.vim/autoload/vital/_vimfiler/Process.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/vital/_vimfiler/Process.vim 2015-08-25 11:01:00 +0000 @@ -1,18 +1,3 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_vimfiler#Process#import() abort - return map({'shellescape': '', 'has_vimproc': '', 'system': '', 'iconv': '', 'spawn': '', 'get_last_status': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_vimfiler#Process#import() abort', printf("return map({'shellescape': '', 'has_vimproc': '', 'system': '', 'iconv': '', 'spawn': '', 'get_last_status': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ " TODO: move all comments to doc file. " " @@ -34,8 +19,23 @@ let s:TYPE_DICT = type({}) let s:TYPE_LIST = type([]) -let s:TYPE_STRING = type('') - +let s:TYPE_STRING = type("") + + +" Execute program in the background from Vim. +" Return an empty string always. +" +" If a:expr is a List, shellescape() each argument. +" If a:expr is a String, the arguments are passed as-is. +" +" Windows: +" Using :!start , execute program without via cmd.exe. +" Spawning 'expr' with 'noshellslash' +" keep special characters from unwanted expansion. +" (see :help shellescape()) +" +" Unix: +" using :! , execute program in the background by shell. function! s:spawn(expr, ...) abort let shellslash = 0 if s:is_windows @@ -70,11 +70,11 @@ " iconv() wrapper for safety. function! s:iconv(expr, from, to) abort - if a:from ==# '' || a:to ==# '' || a:from ==? a:to + if a:from == '' || a:to == '' || a:from ==? a:to return a:expr endif let result = iconv(a:expr, a:from, a:to) - return result !=# '' ? result : a:expr + return result != '' ? result : a:expr endfunction " Check vimproc. === removed directory 'vim/bundle/vimfiler.vim/autoload/vital/_vimfiler/System/Cache' === added file 'vim/bundle/vimfiler.vim/autoload/vital/_vimfiler/System/Cache.vim' --- vim/bundle/vimfiler.vim/autoload/vital/_vimfiler/System/Cache.vim 1970-01-01 00:00:00 +0000 +++ vim/bundle/vimfiler.vim/autoload/vital/_vimfiler/System/Cache.vim 2015-08-25 11:01:00 +0000 @@ -0,0 +1,85 @@ +" Utilities for output cache. + +let s:save_cpo = &cpo +set cpo&vim + +function! s:_vital_loaded(V) abort + let s:V = a:V + let s:S = s:V.import('Data.String') +endfunction + +function! s:_vital_depends() abort + return ['Data.String'] +endfunction + +function! s:getfilename(cache_dir, filename) abort + return s:_encode_name(a:cache_dir, a:filename) +endfunction + +function! s:filereadable(cache_dir, filename) abort + let cache_name = s:_encode_name(a:cache_dir, a:filename) + return filereadable(cache_name) +endfunction + +function! s:readfile(cache_dir, filename) abort + let cache_name = s:_encode_name(a:cache_dir, a:filename) + return filereadable(cache_name) ? readfile(cache_name) : [] +endfunction + +function! s:writefile(cache_dir, filename, list) abort + let cache_name = s:_encode_name(a:cache_dir, a:filename) + + call writefile(a:list, cache_name) +endfunction + +function! s:delete(cache_dir, filename) abort + echoerr 'System.Cache.delete() is obsolete. Use its deletefile() instead.' + return call('s:deletefile', a:cache_dir, a:filename) +endfunction + +function! s:deletefile(cache_dir, filename) abort + let cache_name = s:_encode_name(a:cache_dir, a:filename) + return delete(cache_name) +endfunction + +function! s:_encode_name(cache_dir, filename) abort + " Check cache directory. + if !isdirectory(a:cache_dir) + call mkdir(a:cache_dir, 'p') + endif + let cache_dir = a:cache_dir + if cache_dir !~ '/$' + let cache_dir .= '/' + endif + + return cache_dir . s:_create_hash(cache_dir, a:filename) +endfunction + +function! s:check_old_cache(cache_dir, filename) abort + " Check old cache file. + let cache_name = s:_encode_name(a:cache_dir, a:filename) + let ret = getftime(cache_name) == -1 + \ || getftime(cache_name) <= getftime(a:filename) + if ret && filereadable(cache_name) + " Delete old cache. + call delete(cache_name) + endif + + return ret +endfunction + +function! s:_create_hash(dir, str) abort + if len(a:dir) + len(a:str) < 150 + let hash = substitute(substitute( + \ a:str, ':', '=-', 'g'), '[/\\]', '=+', 'g') + else + let hash = s:S.hash(a:str) + endif + + return hash +endfunction + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim:set et ts=2 sts=2 sw=2 tw=0: === removed file 'vim/bundle/vimfiler.vim/autoload/vital/_vimfiler/System/Cache/Deprecated.vim' --- vim/bundle/vimfiler.vim/autoload/vital/_vimfiler/System/Cache/Deprecated.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/vital/_vimfiler/System/Cache/Deprecated.vim 1970-01-01 00:00:00 +0000 @@ -1,101 +0,0 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_vimfiler#System#Cache#Deprecated#import() abort - return map({'filereadable': '', '_vital_depends': '', 'delete': '', 'readfile': '', 'getfilename': '', 'deletefile': '', 'check_old_cache': '', 'writefile': '', '_vital_loaded': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_vimfiler#System#Cache#Deprecated#import() abort', printf("return map({'filereadable': '', '_vital_depends': '', 'delete': '', 'readfile': '', 'getfilename': '', 'deletefile': '', 'check_old_cache': '', 'writefile': '', '_vital_loaded': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ -" Note: -" This module is deprecated. Use a new `Syste.Cache` instead. - -let s:save_cpo = &cpo -set cpo&vim - -function! s:_vital_loaded(V) abort - let s:V = a:V - let s:S = s:V.import('Data.String') -endfunction - -function! s:_vital_depends() abort - return ['Data.String'] -endfunction - -function! s:getfilename(cache_dir, filename) abort - return s:_encode_name(a:cache_dir, a:filename) -endfunction - -function! s:filereadable(cache_dir, filename) abort - let cache_name = s:_encode_name(a:cache_dir, a:filename) - return filereadable(cache_name) -endfunction - -function! s:readfile(cache_dir, filename) abort - let cache_name = s:_encode_name(a:cache_dir, a:filename) - return filereadable(cache_name) ? readfile(cache_name) : [] -endfunction - -function! s:writefile(cache_dir, filename, list) abort - let cache_name = s:_encode_name(a:cache_dir, a:filename) - - call writefile(a:list, cache_name) -endfunction - -function! s:delete(cache_dir, filename) abort - echoerr 'System.Cache.delete() is obsolete. Use its deletefile() instead.' - return call('s:deletefile', a:cache_dir, a:filename) -endfunction - -function! s:deletefile(cache_dir, filename) abort - let cache_name = s:_encode_name(a:cache_dir, a:filename) - return delete(cache_name) -endfunction - -function! s:_encode_name(cache_dir, filename) abort - " Check cache directory. - if !isdirectory(a:cache_dir) - call mkdir(a:cache_dir, 'p') - endif - let cache_dir = a:cache_dir - if cache_dir !~# '/$' - let cache_dir .= '/' - endif - - return cache_dir . s:_create_hash(cache_dir, a:filename) -endfunction - -function! s:check_old_cache(cache_dir, filename) abort - " Check old cache file. - let cache_name = s:_encode_name(a:cache_dir, a:filename) - let ret = getftime(cache_name) == -1 - \ || getftime(cache_name) <= getftime(a:filename) - if ret && filereadable(cache_name) - " Delete old cache. - call delete(cache_name) - endif - - return ret -endfunction - -function! s:_create_hash(dir, str) abort - if len(a:dir) + len(a:str) < 150 - let hash = substitute(substitute( - \ a:str, ':', '=-', 'g'), '[/\\]', '=+', 'g') - else - let hash = s:S.hash(a:str) - endif - - return hash -endfunction - -let &cpo = s:save_cpo -unlet s:save_cpo - -" vim:set et ts=2 sts=2 sw=2 tw=0: === modified file 'vim/bundle/vimfiler.vim/autoload/vital/_vimfiler/Vim/Buffer.vim' --- vim/bundle/vimfiler.vim/autoload/vital/_vimfiler/Vim/Buffer.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/vital/_vimfiler/Vim/Buffer.vim 2015-08-25 11:01:00 +0000 @@ -1,29 +1,13 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_vimfiler#Vim#Buffer#import() abort - return map({'_vital_depends': '', 'read_content': '', 'get_selected_text': '', 'is_cmdwin': '', 'edit_content': '', 'open': '', 'get_last_selected': '', '_vital_loaded': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_vimfiler#Vim#Buffer#import() abort', printf("return map({'_vital_depends': '', 'read_content': '', 'get_selected_text': '', 'is_cmdwin': '', 'edit_content': '', 'open': '', 'get_last_selected': '', '_vital_loaded': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ let s:save_cpo = &cpo set cpo&vim function! s:_vital_loaded(V) abort let s:V = a:V let s:P = s:V.import('Prelude') - let s:G = s:V.import('Vim.Guard') endfunction function! s:_vital_depends() abort - return ['Prelude', 'Vim.Guard'] + return ['Prelude'] endfunction if exists('*getcmdwintype') @@ -43,7 +27,7 @@ if s:P.is_funcref(a:opener) let loaded = !bufloaded(a:buffer) call a:opener(a:buffer) - elseif a:buffer is 0 || a:buffer is# '' + elseif a:buffer is 0 || a:buffer is '' let loaded = 1 silent execute a:opener enew @@ -101,58 +85,10 @@ \ + (end[1] - begin[1] <# 2 ? [] : getline(begin[1]+1, end[1]-1)) \ + [getline(end[1])[: end[2]-2]] endif - return join(lines, "\n") . lastchar . (visualmode() ==# 'V' ? "\n" : '') + return join(lines, "\n") . lastchar . (visualmode() ==# "V" ? "\n" : "") endif endfunction -function! s:read_content(content, ...) abort - let options = extend({ - \ 'tempfile': '', - \ 'fileformat': '', - \ 'encoding': '', - \ 'binary': 0, - \ 'nobinary': 0, - \ 'bad': '', - \ 'edit': 0, - \}, get(a:000, 0, {})) - let tempfile = empty(options.tempfile) ? tempname() : options.tempfile - let optnames = [ - \ empty(options.fileformat) ? '' : '++ff=' . options.fileformat, - \ empty(options.encoding) ? '' : '++enc=' . options.encoding, - \ empty(options.binary) ? '' : '++bin', - \ empty(options.nobinary) ? '' : '++nobin', - \ empty(options.bad) ? '' : '++bad=' . options.bad, - \ empty(options.edit) ? '' : '++edit', - \] - let optname = join(filter(optnames, '!empty(v:val)')) - try - call writefile(a:content, tempfile) - execute printf('keepalt keepjumps read %s%s', - \ empty(optname) ? '' : optname . ' ', - \ fnameescape(tempfile), - \) - finally - call delete(tempfile) - endtry -endfunction - -function! s:edit_content(content, ...) abort - let options = extend({ - \ 'edit': 1, - \}, get(a:000, 0, {})) - let guard = s:G.store('&l:modifiable') - let saved_view = winsaveview() - try - let &l:modifiable=1 - silent keepjumps %delete _ - silent call s:read_content(a:content, options) - silent keepjumps 1delete _ - finally - keepjump call winrestview(saved_view) - call guard.restore() - endtry - setlocal nomodified -endfunction let &cpo = s:save_cpo unlet s:save_cpo === removed file 'vim/bundle/vimfiler.vim/autoload/vital/_vimfiler/Vim/Guard.vim' --- vim/bundle/vimfiler.vim/autoload/vital/_vimfiler/Vim/Guard.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/vital/_vimfiler/Vim/Guard.vim 1970-01-01 00:00:00 +0000 @@ -1,235 +0,0 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_vimfiler#Vim#Guard#import() abort - return map({'_vital_depends': '', '_vital_created': '', 'store': '', '_vital_loaded': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_vimfiler#Vim#Guard#import() abort', printf("return map({'_vital_depends': '', '_vital_created': '', 'store': '', '_vital_loaded': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ -let s:save_cpo = &cpo -set cpo&vim - -" Use a Funcref as a special term _UNDEFINED -function! s:_undefined() abort - return 'undefined' -endfunction -let s:_UNDEFINED = function('s:_undefined') - -function! s:_vital_loaded(V) abort - let s:V = a:V - let s:Prelude = s:V.import('Prelude') - let s:List = s:V.import('Data.List') - let s:Dict = s:V.import('Data.Dict') -endfunction -function! s:_vital_depends() abort - return ['Prelude', 'Data.List', 'Data.Dict'] -endfunction -function! s:_vital_created(module) abort - " define constant variables - if !exists('s:const') - let s:const = {} - let s:const.is_local_variable_supported = - \ v:version > 703 || (v:version == 703 && has('patch560')) - " NOTE: - " The third argument is available from 7.4.242 but it had bug and that - " bug was fixed from 7.4.513 - let s:const.is_third_argument_of_getreg_supported = has('patch-7.4.513') - lockvar s:const - endif - call extend(a:module, s:const) -endfunction -function! s:_throw(msg) abort - throw printf('vital: Vim.Guard: %s', a:msg) -endfunction - -let s:option = {} -function! s:_new_option(name) abort - if a:name !~# '^&' - call s:_throw(printf( - \'An option name "%s" requires to be started from "&"', a:name - \)) - elseif !exists(a:name) - call s:_throw(printf( - \'An option name "%s" does not exist', a:name - \)) - endif - let option = copy(s:option) - let option.name = a:name - let option.value = eval(a:name) - return option -endfunction -function! s:option.restore() abort - execute printf('let %s = %s', self.name, string(self.value)) -endfunction - -let s:register = {} -function! s:_new_register(name) abort - if len(a:name) != 2 - call s:_throw(printf( - \'A register name "%s" requires to be "@" + a single character', a:name - \)) - elseif a:name !~# '^@' - call s:_throw(printf( - \'A register name "%s" requires to be started from "@"', a:name - \)) - elseif a:name =~# '^@[:.%]$' - call s:_throw(printf( - \'A register name "%s" is read only', a:name - \)) - elseif a:name !~# '^@[@0-9a-zA-Z#=*+~_/-]$' - call s:_throw(printf( - \'A register name "%s" does not exist. See ":help let-register"', a:name - \)) - endif - let name = a:name ==# '@@' ? '' : a:name[1] - let register = copy(s:register) - let register.name = name - if s:const.is_third_argument_of_getreg_supported - let register.value = getreg(name, 1, 1) - else - let register.value = getreg(name, 1) - endif - let register.type = getregtype(name) - return register -endfunction -function! s:register.restore() abort - call setreg(self.name, self.value, self.type) -endfunction - -let s:environment = {} -function! s:_new_environment(name) abort - if a:name !~# '^\$' - call s:_throw(printf( - \'An environment variable name "%s" requires to be started from "$"', a:name - \)) - elseif !exists(a:name) - call s:_throw(printf( - \'An environment variable name "%s" does not exist. While Vim cannot unlet environment variable, it requires to exist', a:name - \)) - endif - let environment = copy(s:environment) - let environment.name = a:name - let environment.value = eval(a:name) - return environment -endfunction -function! s:environment.restore() abort - execute printf('let %s = %s', self.name, string(self.value)) -endfunction - -let s:variable = {} -function! s:_new_variable(name, ...) abort - if a:0 == 0 - let m = matchlist(a:name, '^\([bwtg]:\)\(.*\)$') - if empty(m) - call s:_throw(printf( - \ join([ - \ 'An variable name "%s" requires to start from b:, w:, t:, or g:', - \ 'while no {namespace} is specified', - \ ]), - \ a:name, - \)) - endif - let [prefix, name] = m[1 : 2] - let namespace = eval(prefix) - else - let name = a:name - let namespace = a:1 - endif - let variable = copy(s:variable) - let variable.name = name - let variable.value = get(namespace, name, s:_UNDEFINED) - let variable.value = - \ type(variable.value) == type({}) || type(variable.value) == type([]) - \ ? deepcopy(variable.value) - \ : variable.value - let variable._namespace = namespace - return variable -endfunction -function! s:variable.restore() abort - " unlet the variable to prevent variable type mis-match in case - silent! unlet! self._namespace[self.name] - if type(self.value) == type(s:_UNDEFINED) && self.value == s:_UNDEFINED - " do nothing, leave the variable as undefined - else - let self._namespace[self.name] = self.value - endif -endfunction - -let s:instance = {} -function! s:_new_instance(instance, ...) abort - let shallow = get(a:000, 0, 0) - if !s:Prelude.is_list(a:instance) && !s:Prelude.is_dict(a:instance) - call s:_throw(printf( - \'An instance "%s" requires to be List or Dictionary', string(a:instance) - \)) - endif - let instance = copy(s:instance) - let instance.instance = a:instance - let instance.values = shallow ? copy(a:instance) : deepcopy(a:instance) - return instance -endfunction -function! s:instance.restore() abort - if s:Prelude.is_list(self.instance) - call s:List.clear(self.instance) - else - call s:Dict.clear(self.instance) - endif - call extend(self.instance, self.values) -endfunction - -let s:guard = {} -function! s:store(...) abort - let resources = [] - for meta in a:000 - if s:Prelude.is_list(meta) - if len(meta) == 1 - call add(resources, s:_new_instance(meta[0])) - elseif len(meta) == 2 - if s:Prelude.is_string(meta[0]) - call add(resources, call('s:_new_variable', meta)) - else - call add(resources, call('s:_new_instance', meta)) - endif - else - call s:_throw('List assignment requires one or two elements') - endif - elseif type(meta) == type('') - if meta =~# '^[bwtgls]:' - " Note: - " To improve an error message, handle l:XXX or s:XXX as well - call add(resources, s:_new_variable(meta)) - elseif meta =~# '^&' - call add(resources, s:_new_option(meta)) - elseif meta =~# '^@' - call add(resources, s:_new_register(meta)) - elseif meta =~# '^\$' - call add(resources, s:_new_environment(meta)) - else - call s:_throw(printf( - \ 'Unknown value "%s" was specified', - \ meta - \)) - endif - endif - unlet meta - endfor - let guard = copy(s:guard) - let guard._resources = resources - return guard -endfunction -function! s:guard.restore() abort - for resource in self._resources - call resource.restore() - endfor -endfunction - -let &cpo = s:save_cpo -unlet! s:save_cpo -" vim:set et ts=2 sts=2 sw=2 tw=0 fdm=marker: === modified file 'vim/bundle/vimfiler.vim/autoload/vital/_vimfiler/Vim/Message.vim' --- vim/bundle/vimfiler.vim/autoload/vital/_vimfiler/Vim/Message.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/vital/_vimfiler/Vim/Message.vim 2015-08-25 11:01:00 +0000 @@ -1,32 +1,8 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_vimfiler#Vim#Message#import() abort - return map({'capture': '', 'echomsg': '', 'echo': '', 'warn': '', 'get_hit_enter_max_length': '', 'error': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_vimfiler#Vim#Message#import() abort', printf("return map({'capture': '', 'echomsg': '', 'echo': '', 'warn': '', 'get_hit_enter_max_length': '', 'error': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ let s:save_cpo = &cpo set cpo&vim -function! s:echo(hl, msg) abort - execute 'echohl' a:hl - try - echo a:msg - finally - echohl None - endtry -endfunction - function! s:echomsg(hl, msg) abort execute 'echohl' a:hl try === removed file 'vim/bundle/vimfiler.vim/autoload/vital/vimfiler.vim' --- vim/bundle/vimfiler.vim/autoload/vital/vimfiler.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/vital/vimfiler.vim 1970-01-01 00:00:00 +0000 @@ -1,305 +0,0 @@ -let s:plugin_name = expand(':t:r') -let s:vital_base_dir = expand(':h') -let s:project_root = expand(':h:h:h') -let s:has_latest_module = isdirectory(expand(':h') . '/__latest__') -let s:is_vital_vim = s:plugin_name is# '_latest__' - -let s:loaded = {} -let s:cache_sid = {} - -" function() wrapper -if v:version > 703 || v:version == 703 && has('patch1170') - function! s:_function(fstr) abort - return function(a:fstr) - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - let s:_s = '' . s:_SID() . '_' - function! s:_function(fstr) abort - return function(substitute(a:fstr, 's:', s:_s, 'g')) - endfunction -endif - -function! vital#{s:plugin_name}#of() abort - return s:new(s:plugin_name) -endfunction - -let s:Vital = {} - -function! s:new(plugin_name) abort - let base = deepcopy(s:Vital) - let base.plugin_name = a:plugin_name - return base -endfunction - -function! s:vital_files() abort - if !exists('s:vital_files') - let s:vital_files = map( - \ s:is_vital_vim ? s:_global_vital_files() : s:_self_vital_files(), - \ 'fnamemodify(v:val, ":p:gs?[\\\\/]?/?")') - endif - return copy(s:vital_files) -endfunction -let s:Vital.vital_files = s:_function('s:vital_files') - -function! s:import(name, ...) abort dict - let target = {} - let functions = [] - for a in a:000 - if type(a) == type({}) - let target = a - elseif type(a) == type([]) - let functions = a - endif - unlet a - endfor - let module = self._import(a:name) - if empty(functions) - call extend(target, module, 'keep') - else - for f in functions - if has_key(module, f) && !has_key(target, f) - let target[f] = module[f] - endif - endfor - endif - return target -endfunction -let s:Vital.import = s:_function('s:import') - -function! s:load(...) abort dict - for arg in a:000 - let [name; as] = type(arg) == type([]) ? arg[: 1] : [arg, arg] - let target = split(join(as, ''), '\W\+') - let dict = self - let dict_type = type({}) - while !empty(target) - let ns = remove(target, 0) - if !has_key(dict, ns) - let dict[ns] = {} - endif - if type(dict[ns]) == dict_type - let dict = dict[ns] - else - unlet dict - break - endif - endwhile - if exists('dict') - call extend(dict, self._import(name)) - endif - unlet arg - endfor - return self -endfunction -let s:Vital.load = s:_function('s:load') - -function! s:unload() abort dict - let s:loaded = {} - let s:cache_sid = {} - unlet! s:vital_files -endfunction -let s:Vital.unload = s:_function('s:unload') - -function! s:exists(name) abort dict - let b = exists(printf('*vital#_%s#%s#import', self.plugin_name, substitute(a:name, '\.', '#', 'g'))) - if b - return b - endif - let name_path = substitute(a:name, '\.', '/', 'g') - let path = printf('%s/_%s/%s.vim', s:vital_base_dir, self.plugin_name, name_path) - let b = filereadable(path) - if b - return b - endif - let path = printf('%s/_%s/%s.vim', s:vital_base_dir, '_latest__', name_path) - let b = filereadable(path) -endfunction -let s:Vital.exists = s:_function('s:exists') - -function! s:search(pattern) abort dict - let paths = s:_extract_files(a:pattern, self.vital_files()) - let modules = sort(map(paths, 's:_file2module(v:val)')) - return s:_uniq(modules) -endfunction -let s:Vital.search = s:_function('s:search') - -function! s:_self_vital_files() abort - let builtin = printf('%s/__%s__/', s:vital_base_dir, s:plugin_name) - let installed = printf('%s/_%s/', s:vital_base_dir, s:plugin_name) - let base = builtin . ',' . installed - return split(globpath(base, '**/*.vim', 1), "\n") -endfunction - -function! s:_global_vital_files() abort - let pattern = 'autoload/vital/__latest__/**/*.vim' - return split(globpath(&runtimepath, pattern, 1), "\n") -endfunction - -function! s:_extract_files(pattern, files) abort - let tr = {'.': '/', '*': '[^/]*', '**': '.*'} - let target = substitute(a:pattern, '\.\|\*\*\?', '\=tr[submatch(0)]', 'g') - let regexp = printf('autoload/vital/[^/]\+/%s.vim$', target) - return filter(a:files, 'v:val =~# regexp') -endfunction - -function! s:_file2module(file) abort - let filename = fnamemodify(a:file, ':p:gs?[\\/]?/?') - let tail = matchstr(filename, 'autoload/vital/_\w\+/\zs.*\ze\.vim$') - return join(split(tail, '[\\/]\+'), '.') -endfunction - -" @param {string} name e.g. Data.List -function! s:_import(name) abort dict - if has_key(s:loaded, a:name) - return copy(s:loaded[a:name]) - endif - let module = self._get_module(a:name) - if has_key(module, '_vital_created') - call module._vital_created(module) - endif - let export_module = filter(copy(module), 'v:key =~# "^\\a"') - " Cache module before calling module.vital_loaded() to avoid cyclic - " dependences but remove the cache if module._vital_loaded() fails. - " let s:loaded[a:name] = export_module - let s:loaded[a:name] = export_module - if has_key(module, '_vital_loaded') - try - call module._vital_loaded(vital#{s:plugin_name}#of()) - catch - unlet s:loaded[a:name] - throw 'vital: fail to call ._vital_loaded(): ' . v:exception - endtry - endif - return copy(s:loaded[a:name]) -endfunction -let s:Vital._import = s:_function('s:_import') - -" s:_get_module() returns module object wihch has all script local functions. -function! s:_get_module(name) abort dict - try - let module = vital#_{self.plugin_name}#{substitute(a:name, '\.', '#', 'g')}#import() - catch /E117: Unknown function:/ - if !s:has_latest_module - throw 'vital: module not found: ' . a:name - endif - " Retry to support loading self modules. - let module = s:_get_latest_module(a:name) - endtry - return module -endfunction -let s:Vital._get_module = s:_function('s:_get_module') - -function! s:_get_latest_module(name) abort - return s:sid2sfuncs(s:_module_sid(a:name)) -endfunction - -function! s:_module_sid(name) abort - let module_path = substitute(a:name, '\.', '/', 'g') . '.vim' - let module_rel_path = 'autoload/vital/__*__/' . module_path - let module_full_path = s:_unify_path(get(split(globpath(s:_module_sid_base_dir(), module_rel_path, 1), "\n"), 0, '')) - if !filereadable(module_full_path) - throw 'vital: module not found: ' . a:name - endif - let p = substitute('autoload/vital/__\w\+__/' . module_path, '/', '[/\\\\]\\+', 'g') - let sid = s:_sid(module_full_path, p) - if !sid - call s:_source(module_full_path) - let sid = s:_sid(module_full_path, p) - if !sid - throw 'vital: cannot get from path' - endif - endif - return sid -endfunction - -function! s:_module_sid_base_dir() abort - return s:is_vital_vim ? &rtp : s:project_root -endfunction - -function! s:_source(path) abort - execute 'source' fnameescape(a:path) -endfunction - -" @vimlint(EVL102, 1, l:_) -" @vimlint(EVL102, 1, l:__) -function! s:_sid(fullpath, filter_pattern) abort - if has_key(s:cache_sid, a:fullpath) - return s:cache_sid[a:fullpath] - endif - for line in filter(split(s:_redir(':scriptnames'), "\n"), 'v:val =~# a:filter_pattern') - let [_, sid, path; __] = matchlist(line, '^\s*\(\d\+\):\s\+\(.\+\)\s*$') - if s:_unify_path(path) is# a:fullpath - let s:cache_sid[a:fullpath] = sid - return s:cache_sid[a:fullpath] - endif - endfor - return 0 -endfunction - -function! s:_redir(cmd) abort - let [save_verbose, save_verbosefile] = [&verbose, &verbosefile] - set verbose=0 verbosefile= - redir => res - silent! execute a:cmd - redir END - let [&verbose, &verbosefile] = [save_verbose, save_verbosefile] - return res -endfunction - -if filereadable(expand(':r') . '.VIM') - let s:_unify_path_cache = {} - " resolve() is slow, so we cache results. - " Note: On windows, vim can't expand path names from 8.3 formats. - " So if getting full path via and $HOME was set as 8.3 format, - " vital load duplicated scripts. Below's :~ avoid this issue. - function! s:_unify_path(path) abort - if has_key(s:_unify_path_cache, a:path) - return s:_unify_path_cache[a:path] - endif - let value = tolower(fnamemodify(resolve(fnamemodify( - \ a:path, ':p')), ':~:gs?[\\/]?/?')) - let s:_unify_path_cache[a:path] = value - return value - endfunction -else - function! s:_unify_path(path) abort - return resolve(fnamemodify(a:path, ':p:gs?[\\/]?/?')) - endfunction -endif - -" copied and modified from Vim.ScriptLocal -let s:SNR = join(map(range(len("\")), '"[\\x" . printf("%0x", char2nr("\"[v:val])) . "]"'), '') -function! s:sid2sfuncs(sid) abort - let fs = split(s:_redir(printf(':function /^%s%s_', s:SNR, a:sid)), "\n") - let r = {} - let pattern = printf('\m^function\s%d_\zs\w\{-}\ze(', a:sid) - for fname in map(fs, 'matchstr(v:val, pattern)') - let r[fname] = function(s:_sfuncname(a:sid, fname)) - endfor - return r -endfunction - -"" Return funcname of script local functions with SID -function! s:_sfuncname(sid, funcname) abort - return printf('%s_%s', a:sid, a:funcname) -endfunction - -if exists('*uniq') - function! s:_uniq(list) abort - return uniq(a:list) - endfunction -else - function! s:_uniq(list) abort - let i = len(a:list) - 1 - while 0 < i - if a:list[i] ==# a:list[i - 1] - call remove(a:list, i) - endif - let i -= 1 - endwhile - return a:list - endfunction -endif === modified file 'vim/bundle/vimfiler.vim/autoload/vital/vimfiler.vital' --- vim/bundle/vimfiler.vim/autoload/vital/vimfiler.vital 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/autoload/vital/vimfiler.vital 2015-08-25 11:01:00 +0000 @@ -1,10 +1,10 @@ vimfiler -1a385f58a58571e4cb6309831ad4d7260180bc71 +bb1d9cb Prelude Data.List Process +System.Cache Vim.Buffer Vim.Message Data.String -System.Cache.Deprecated === modified file 'vim/bundle/vimfiler.vim/doc/vimfiler.txt' --- vim/bundle/vimfiler.vim/doc/vimfiler.txt 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/doc/vimfiler.txt 2015-08-25 11:01:00 +0000 @@ -1,6 +1,6 @@ *vimfiler.txt* Powerful file explorer implemented by Vim script -Version: 5.0 +Version: 4.2 Author : Shougo License: MIT license {{{ Permission is hereby granted, free of charge, to any person obtaining @@ -39,7 +39,6 @@ Unite sources |vimfiler-unite-sources| Create source |vimfiler-create-source| Create kind |vimfiler-create-kind| -Extensions |vimfiler-extensions| FAQ |vimfiler-faq| ============================================================================== @@ -75,11 +74,8 @@ *:VimFiler* :VimFiler [{options}...] [[{source-name}:]{path}] Runs vimfiler. This command reuses a buffer if a vimfiler - buffer already exists. If you omit {path} and a vimfiler - buffer do not exist, vimfiler opens current directory. If you - omit {path} and a vimfiler buffer already exists, vimfiler - does not change the vimfiler current directory. - [[{source-name}:]{path}] arg is same as + buffer already exists. If you omit {path}, vimfiler opens + current directory. [[{source-name}:]{path}] arg is same as |:Unite|. But you omit source name, "file" source will be used. If {path} is directory, browse in {path} directory files. If {path} is file, edit {path} file. @@ -830,7 +826,7 @@ Visual mode key mappings. - *(vimfiler_toggle_mark_selected_lines)* + *(vimfiler_toggle_selected_lines)* (vimfiler_toggle_mark_selected_lines) Toggles marks in selected lines. @@ -867,7 +863,6 @@ o (vimfiler_expand_or_edit) l (vimfiler_smart_l) x (vimfiler_execute_system_associated) -X (vimfiler_execute_vimfiler_associated) h (vimfiler_smart_h) L (vimfiler_switch_to_drive) ~ (vimfiler_switch_to_home_directory) @@ -954,11 +949,6 @@ Specifies the height of a vimfiler buffer. Note: If this option is 0, auto resize feature is disabled. - *vimfiler-options-fnamewidth* - -fnamewidth={filename-width} - Specifies the filename width of a vimfiler buffer. - Note: If this option is less than equal 0, it is disabled. - *vimfiler-options-direction* -direction={direction} Defines split position rule. The default value is "topleft". @@ -1235,13 +1225,6 @@ Execute files with external file explorer. ============================================================================== -EXTENSIONS *vimfiler-extensions* - -vimfiler-prompt: - https://github.com/romgrk/vimfiler-prompt - It navigates vimfiler buffer with auto completion. - -============================================================================== FAQ *vimfiler-faq* Like NERDTree FAQ(https://github.com/scrooloose/nerdtree). @@ -1274,7 +1257,7 @@ A: (vimfiler_hide) closes both vimfiler windows. You can use (vimfiler_close) instead of it: > - autocmd FileType vimfiler nmap q (vimfiler_close) + autocmd FileType vimfiler nmap q (vimfiler_close) < Q: I want to put trashbox instead of "rm" command. === modified file 'vim/bundle/vimfiler.vim/plugin/vimfiler.vim' --- vim/bundle/vimfiler.vim/plugin/vimfiler.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/plugin/vimfiler.vim 2015-08-25 11:01:00 +0000 @@ -53,28 +53,36 @@ \ :VimFilerSimple "}}} -command! -nargs=? -bar -complete=customlist,vimfiler#complete VimFiler +command! -nargs=? -complete=customlist,vimfiler#complete VimFiler \ call vimfiler#init#_command({}, ) -command! -nargs=? -bar -complete=customlist,vimfiler#complete VimFilerDouble +command! -nargs=? -complete=customlist,vimfiler#complete VimFilerDouble \ call vimfiler#init#_command({ 'double' : 1 }, ) -command! -nargs=? -bar -complete=customlist,vimfiler#complete VimFilerCurrentDir +command! -nargs=? -complete=customlist,vimfiler#complete VimFilerCurrentDir \ call vimfiler#init#_command({}, . ' ' . getcwd()) -command! -nargs=? -bar -complete=customlist,vimfiler#complete VimFilerBufferDir +command! -nargs=? -complete=customlist,vimfiler#complete VimFilerBufferDir \ call vimfiler#init#_command({}, . ' ' . \ vimfiler#helper#_get_buffer_directory(bufnr('%'))) -command! -nargs=? -bar -complete=customlist,vimfiler#complete VimFilerCreate +command! -nargs=? -complete=customlist,vimfiler#complete VimFilerCreate \ call vimfiler#init#_command({ 'create' : 1 }, ) -command! -nargs=? -bar -complete=customlist,vimfiler#complete VimFilerSimple +command! -nargs=? -complete=customlist,vimfiler#complete VimFilerSimple \ call vimfiler#init#_command({ 'simple' : 1, 'split' : 1, 'create' : 1 }, ) -command! -nargs=? -bar -complete=customlist,vimfiler#complete VimFilerSplit +command! -nargs=? -complete=customlist,vimfiler#complete VimFilerSplit \ call vimfiler#init#_command({ 'split' : 1, }, ) -command! -nargs=? -bar -complete=customlist,vimfiler#complete VimFilerTab +command! -nargs=? -complete=customlist,vimfiler#complete VimFilerTab \ call vimfiler#init#_command({ 'tab' : 1 }, ) -command! -nargs=? -bar -complete=customlist,vimfiler#complete VimFilerExplorer +command! -nargs=? -complete=customlist,vimfiler#complete VimFilerExplorer \ call vimfiler#init#_command({ 'explorer' : 1, }, ) -command! -nargs=1 -bar VimFilerClose call vimfiler#mappings#close() +command! -nargs=1 VimFilerClose call vimfiler#mappings#close() augroup vimfiler + autocmd BufReadCmd ??*:{*,*/*} + \ call vimfiler#handler#_event_handler('BufReadCmd') + autocmd BufWriteCmd ??*:{*,*/*} + \ call vimfiler#handler#_event_handler('BufWriteCmd') + autocmd FileAppendCmd ??*:{*,*/*} + \ call vimfiler#handler#_event_handler('FileAppendCmd') + autocmd FileReadCmd ??*:{*,*/*} + \ call vimfiler#handler#_event_handler('FileReadCmd') autocmd BufEnter,VimEnter,BufNew,BufWinEnter,BufRead,BufCreate \ * call s:browse_check(expand('')) augroup END @@ -91,7 +99,7 @@ \ VimFilerWrite ,write endif -function! s:browse_check(path) abort "{{{ +function! s:browse_check(path) "{{{ if !g:vimfiler_as_default_explorer \ || a:path == '' \ || bufnr('%') != expand('') === modified file 'vim/bundle/vimfiler.vim/test/functions.vim' --- vim/bundle/vimfiler.vim/test/functions.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimfiler.vim/test/functions.vim 2015-08-25 11:01:00 +0000 @@ -1,7 +1,7 @@ let s:suite = themis#suite('parser') let s:assert = themis#helper('assert') -function! s:suite.sort() abort +function! s:suite.sort() let candidates = [] for i in range(1, 100) call add(candidates, { 'vimfiler__filename' : 'foo'.i.'.txt'.i }) === modified file 'vim/bundle/vimproc.vim/.git/config' (properties changed: -x to +x) === modified file 'vim/bundle/vimproc.vim/.git/hooks/applypatch-msg.sample' --- vim/bundle/vimproc.vim/.git/hooks/applypatch-msg.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/.git/hooks/applypatch-msg.sample 2015-08-25 11:01:00 +0000 @@ -10,6 +10,6 @@ # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup -commitmsg="$(git rev-parse --git-path hooks/commit-msg)" -test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} +test -x "$GIT_DIR/hooks/commit-msg" && + exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} : === modified file 'vim/bundle/vimproc.vim/.git/hooks/pre-applypatch.sample' --- vim/bundle/vimproc.vim/.git/hooks/pre-applypatch.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/.git/hooks/pre-applypatch.sample 2015-08-25 11:01:00 +0000 @@ -9,6 +9,6 @@ # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup -precommit="$(git rev-parse --git-path hooks/pre-commit)" -test -x "$precommit" && exec "$precommit" ${1+"$@"} +test -x "$GIT_DIR/hooks/pre-commit" && + exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} : === modified file 'vim/bundle/vimproc.vim/.git/hooks/pre-push.sample' --- vim/bundle/vimproc.vim/.git/hooks/pre-push.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/.git/hooks/pre-push.sample 2015-08-25 11:01:00 +0000 @@ -24,6 +24,7 @@ z40=0000000000000000000000000000000000000000 +IFS=' ' while read local_ref local_sha remote_ref remote_sha do if [ "$local_sha" = $z40 ] === modified file 'vim/bundle/vimproc.vim/.git/hooks/update.sample' --- vim/bundle/vimproc.vim/.git/hooks/update.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/.git/hooks/update.sample 2015-08-25 11:01:00 +0000 @@ -1,6 +1,6 @@ #!/bin/sh # -# An example hook script to block unannotated tags from entering. +# An example hook script to blocks unannotated tags from entering. # Called by "git receive-pack" with arguments: refname sha1-old sha1-new # # To enable this hook, rename this file to "update". === modified file 'vim/bundle/vimproc.vim/.git/index' Binary files vim/bundle/vimproc.vim/.git/index 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/index 2015-08-25 11:01:00 +0000 differ === modified file 'vim/bundle/vimproc.vim/.git/logs/HEAD' --- vim/bundle/vimproc.vim/.git/logs/HEAD 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/.git/logs/HEAD 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 b2255c66a3dc04fba1adbda3e380facff45fe6ec Jan Pobrislo 1470298389 +0200 clone: from https://github.com/Shougo/vimproc.vim +0000000000000000000000000000000000000000 150d5fd04fed462831b99539dfe9920a00a7cea6 Jan Pobrislo 1440500305 +0200 clone: from https://github.com/Shougo/vimproc.vim === modified file 'vim/bundle/vimproc.vim/.git/logs/refs/heads/master' --- vim/bundle/vimproc.vim/.git/logs/refs/heads/master 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/.git/logs/refs/heads/master 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 b2255c66a3dc04fba1adbda3e380facff45fe6ec Jan Pobrislo 1470298389 +0200 clone: from https://github.com/Shougo/vimproc.vim +0000000000000000000000000000000000000000 150d5fd04fed462831b99539dfe9920a00a7cea6 Jan Pobrislo 1440500305 +0200 clone: from https://github.com/Shougo/vimproc.vim === modified file 'vim/bundle/vimproc.vim/.git/logs/refs/remotes/origin/HEAD' --- vim/bundle/vimproc.vim/.git/logs/refs/remotes/origin/HEAD 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/.git/logs/refs/remotes/origin/HEAD 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 b2255c66a3dc04fba1adbda3e380facff45fe6ec Jan Pobrislo 1470298389 +0200 clone: from https://github.com/Shougo/vimproc.vim +0000000000000000000000000000000000000000 150d5fd04fed462831b99539dfe9920a00a7cea6 Jan Pobrislo 1440500305 +0200 clone: from https://github.com/Shougo/vimproc.vim === added directory 'vim/bundle/vimproc.vim/.git/objects/00' === added file 'vim/bundle/vimproc.vim/.git/objects/00/2fd935899ec6d6aea0b8ffd2b3e57e94036fab' Binary files vim/bundle/vimproc.vim/.git/objects/00/2fd935899ec6d6aea0b8ffd2b3e57e94036fab 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/00/2fd935899ec6d6aea0b8ffd2b3e57e94036fab 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/01' === removed file 'vim/bundle/vimproc.vim/.git/objects/01/cd890af908897f52b0dea4933b92634a04effd' Binary files vim/bundle/vimproc.vim/.git/objects/01/cd890af908897f52b0dea4933b92634a04effd 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/01/cd890af908897f52b0dea4933b92634a04effd 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimproc.vim/.git/objects/03' === added file 'vim/bundle/vimproc.vim/.git/objects/03/da9d08142811b9c3c7e1731be60cae7ec7a04e' Binary files vim/bundle/vimproc.vim/.git/objects/03/da9d08142811b9c3c7e1731be60cae7ec7a04e 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/03/da9d08142811b9c3c7e1731be60cae7ec7a04e 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/vimproc.vim/.git/objects/05' === added file 'vim/bundle/vimproc.vim/.git/objects/05/5bd1b88291d7d3950ed3334a5d6c2d969eba7c' --- vim/bundle/vimproc.vim/.git/objects/05/5bd1b88291d7d3950ed3334a5d6c2d969eba7c 1970-01-01 00:00:00 +0000 +++ vim/bundle/vimproc.vim/.git/objects/05/5bd1b88291d7d3950ed3334a5d6c2d969eba7c 2015-08-25 11:01:00 +0000 @@ -0,0 +1,1 @@ +xuOO1Ž2bEuC*Djc]- .^&7~UfYvsrb.<@VZ|a܋x,Ǿn_qnҚ$%:d(dGWoRB !erΙwF߲n)ߢx jY\Vb2OWw9 }NnRjC=mep"mߵ63dfj1+`xB+Q1+8{5d#xu ;Q\QAj.1l#:/d \ No newline at end of file === added file 'vim/bundle/vimproc.vim/.git/objects/0a/ea624cc95450fd5a1dfc4a0a70c853d4f38946' Binary files vim/bundle/vimproc.vim/.git/objects/0a/ea624cc95450fd5a1dfc4a0a70c853d4f38946 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/0a/ea624cc95450fd5a1dfc4a0a70c853d4f38946 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/0b' === removed file 'vim/bundle/vimproc.vim/.git/objects/0b/742944e96a2712956f0c938712b57f87d0171a' Binary files vim/bundle/vimproc.vim/.git/objects/0b/742944e96a2712956f0c938712b57f87d0171a 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/0b/742944e96a2712956f0c938712b57f87d0171a 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/0d' === removed file 'vim/bundle/vimproc.vim/.git/objects/0d/0387a2642753a8d311a7319b59e46198d1f491' Binary files vim/bundle/vimproc.vim/.git/objects/0d/0387a2642753a8d311a7319b59e46198d1f491 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/0d/0387a2642753a8d311a7319b59e46198d1f491 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimproc.vim/.git/objects/15' === added file 'vim/bundle/vimproc.vim/.git/objects/15/0d5fd04fed462831b99539dfe9920a00a7cea6' --- vim/bundle/vimproc.vim/.git/objects/15/0d5fd04fed462831b99539dfe9920a00a7cea6 1970-01-01 00:00:00 +0000 +++ vim/bundle/vimproc.vim/.git/objects/15/0d5fd04fed462831b99539dfe9920a00a7cea6 2015-08-25 11:01:00 +0000 @@ -0,0 +1,5 @@ +xKn0}##ƖPؔLf&UpF O?R.ڢ +^2 ++usVqcR"CX(CF5AbDIU +]! Lb8ㄆ6nS +WjNs#8.cȵ|nM^צ(b~ԇT:P \ No newline at end of file === added directory 'vim/bundle/vimproc.vim/.git/objects/17' === added file 'vim/bundle/vimproc.vim/.git/objects/17/d90d99d028170f5a4086736aeab432591c5980' Binary files vim/bundle/vimproc.vim/.git/objects/17/d90d99d028170f5a4086736aeab432591c5980 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/17/d90d99d028170f5a4086736aeab432591c5980 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/vimproc.vim/.git/objects/18' === added file 'vim/bundle/vimproc.vim/.git/objects/18/5f300a7e996f423db98773496bd5fb23ee4f76' Binary files vim/bundle/vimproc.vim/.git/objects/18/5f300a7e996f423db98773496bd5fb23ee4f76 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/18/5f300a7e996f423db98773496bd5fb23ee4f76 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/vimproc.vim/.git/objects/1b' === added file 'vim/bundle/vimproc.vim/.git/objects/1b/39b963a2a66bf7d02dc41a8079394529d994c3' Binary files vim/bundle/vimproc.vim/.git/objects/1b/39b963a2a66bf7d02dc41a8079394529d994c3 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/1b/39b963a2a66bf7d02dc41a8079394529d994c3 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/20' === removed file 'vim/bundle/vimproc.vim/.git/objects/20/9ee3d5ae46ddfd73555a83529de2aeacbde216' Binary files vim/bundle/vimproc.vim/.git/objects/20/9ee3d5ae46ddfd73555a83529de2aeacbde216 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/20/9ee3d5ae46ddfd73555a83529de2aeacbde216 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/26' === removed file 'vim/bundle/vimproc.vim/.git/objects/26/2c36aef5de2a8ec539120dffcb71887a296278' Binary files vim/bundle/vimproc.vim/.git/objects/26/2c36aef5de2a8ec539120dffcb71887a296278 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/26/2c36aef5de2a8ec539120dffcb71887a296278 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimproc.vim/.git/objects/2b' === added file 'vim/bundle/vimproc.vim/.git/objects/2b/4dc7d2567364489a9b3f7ea245ff44a37d563e' Binary files vim/bundle/vimproc.vim/.git/objects/2b/4dc7d2567364489a9b3f7ea245ff44a37d563e 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/2b/4dc7d2567364489a9b3f7ea245ff44a37d563e 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/2e' === removed file 'vim/bundle/vimproc.vim/.git/objects/2e/4c5dc13ba18d1304465d2f798f1de9d1509964' --- vim/bundle/vimproc.vim/.git/objects/2e/4c5dc13ba18d1304465d2f798f1de9d1509964 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/.git/objects/2e/4c5dc13ba18d1304465d2f798f1de9d1509964 1970-01-01 00:00:00 +0000 @@ -1,3 +0,0 @@ -xuOMO1'CVՖiQ(Dece ɿHzg)/ǗO;]$@Y"hQYsDV/KH4A~~ r_WsK󑙿qO%J} 8BvK ZJ# \ No newline at end of file === removed directory 'vim/bundle/vimproc.vim/.git/objects/34' === removed file 'vim/bundle/vimproc.vim/.git/objects/34/14f8e715beccaf3d9aa079bda4ba3e7a2a050c' Binary files vim/bundle/vimproc.vim/.git/objects/34/14f8e715beccaf3d9aa079bda4ba3e7a2a050c 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/34/14f8e715beccaf3d9aa079bda4ba3e7a2a050c 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimproc.vim/.git/objects/37' === added file 'vim/bundle/vimproc.vim/.git/objects/37/6b2420bda30352231ce9bb329ff69420c1efd7' Binary files vim/bundle/vimproc.vim/.git/objects/37/6b2420bda30352231ce9bb329ff69420c1efd7 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/37/6b2420bda30352231ce9bb329ff69420c1efd7 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/39' === removed file 'vim/bundle/vimproc.vim/.git/objects/39/25a95a241acf4560d3838b2c5ffe89dda1c643' --- vim/bundle/vimproc.vim/.git/objects/39/25a95a241acf4560d3838b2c5ffe89dda1c643 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/.git/objects/39/25a95a241acf4560d3838b2c5ffe89dda1c643 1970-01-01 00:00:00 +0000 @@ -1,1 +0,0 @@ -xPAn W0M`z5`߇$U*;; h`}{B#!4F: Aӈ=u +{,vGCo#0Ls^ʸtFEtI}( cImʜq>u![J 1v> zcgRԫ-2~NuMw~k>>7ϯ.Z1[-q \ No newline at end of file === removed directory 'vim/bundle/vimproc.vim/.git/objects/3a' === removed file 'vim/bundle/vimproc.vim/.git/objects/3a/23207f0722876552e61e0afa11f681fa353596' --- vim/bundle/vimproc.vim/.git/objects/3a/23207f0722876552e61e0afa11f681fa353596 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/.git/objects/3a/23207f0722876552e61e0afa11f681fa353596 1970-01-01 00:00:00 +0000 @@ -1,2 +0,0 @@ -xEQK0}]>ʼnJZPV &dHLiD_Ὦξ~+* -c1-GR2uh-qZs}gGx clxڦ)FU{/a)>gġh{ h @Z)sjU~Ӄv48 6̤Ub" -^`T.\(fɨ[Um"σ"EhvuwBpT2}߇dtt&3/1l!kYivղPO3_ CV(px 'ڨDۃ[ &oՓ P\go*=5c %O# Ӛ<m:o^cSն6dK8yN*SL/4]N>|ヸ}ԐS#iixf7Wz(;tr}FT5Resq(Ry4j(mS|KSy#Q.R.}_JIϒSjeiSAkO޾ +k]BOttx֮P<T ?o{ METEEWrM \ No newline at end of file === removed directory 'vim/bundle/vimproc.vim/.git/objects/41' === removed file 'vim/bundle/vimproc.vim/.git/objects/41/6ec4ae5659775d2be745b8df6a029e5061bc1b' Binary files vim/bundle/vimproc.vim/.git/objects/41/6ec4ae5659775d2be745b8df6a029e5061bc1b 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/41/6ec4ae5659775d2be745b8df6a029e5061bc1b 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/44' === removed file 'vim/bundle/vimproc.vim/.git/objects/44/d4a503772146d307fa9c2a039483517bdaa760' Binary files vim/bundle/vimproc.vim/.git/objects/44/d4a503772146d307fa9c2a039483517bdaa760 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/44/d4a503772146d307fa9c2a039483517bdaa760 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimproc.vim/.git/objects/46' === added file 'vim/bundle/vimproc.vim/.git/objects/46/1d525925bd8a8b433c35ea5be767b51e53fe4b' Binary files vim/bundle/vimproc.vim/.git/objects/46/1d525925bd8a8b433c35ea5be767b51e53fe4b 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/46/1d525925bd8a8b433c35ea5be767b51e53fe4b 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/48' === removed file 'vim/bundle/vimproc.vim/.git/objects/48/917cff47ac93d1a5a65ce857074c54a8939fb4' Binary files vim/bundle/vimproc.vim/.git/objects/48/917cff47ac93d1a5a65ce857074c54a8939fb4 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/48/917cff47ac93d1a5a65ce857074c54a8939fb4 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/49' === removed file 'vim/bundle/vimproc.vim/.git/objects/49/b86efc48a2965488f5ac0562d96ac49bfb9fa2' Binary files vim/bundle/vimproc.vim/.git/objects/49/b86efc48a2965488f5ac0562d96ac49bfb9fa2 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/49/b86efc48a2965488f5ac0562d96ac49bfb9fa2 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimproc.vim/.git/objects/4a' === added file 'vim/bundle/vimproc.vim/.git/objects/4a/adcc103fdf2a03779d80d56dfd65c1ed7eccc6' Binary files vim/bundle/vimproc.vim/.git/objects/4a/adcc103fdf2a03779d80d56dfd65c1ed7eccc6 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/4a/adcc103fdf2a03779d80d56dfd65c1ed7eccc6 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/vimproc.vim/.git/objects/4c' === added file 'vim/bundle/vimproc.vim/.git/objects/4c/9f1b37b0c8fb6b6daecf888bbd6731c8657e99' Binary files vim/bundle/vimproc.vim/.git/objects/4c/9f1b37b0c8fb6b6daecf888bbd6731c8657e99 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/4c/9f1b37b0c8fb6b6daecf888bbd6731c8657e99 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/vimproc.vim/.git/objects/4e' === added file 'vim/bundle/vimproc.vim/.git/objects/4e/75c7a787ad95a592ceeb0f5fbcf5b237541137' --- vim/bundle/vimproc.vim/.git/objects/4e/75c7a787ad95a592ceeb0f5fbcf5b237541137 1970-01-01 00:00:00 +0000 +++ vim/bundle/vimproc.vim/.git/objects/4e/75c7a787ad95a592ceeb0f5fbcf5b237541137 2015-08-25 11:01:00 +0000 @@ -0,0 +1,2 @@ +xRMk19"*lVieci=x$m}Kuo>B- + d͛yiѧ; ]Q'Qv,Xe3@Z0;0,KF-vt.S 6#BkܙA5r"Ѻ-|*,ȴ64D%6Us-? CBL:LQlp6ϋ9Oaח5z/bc6m9]."!^%N؇1n@T~@G ) щOWbG)eUI]тWZhpMRbpK25'Z55 \ No newline at end of file === added directory 'vim/bundle/vimproc.vim/.git/objects/51' === added file 'vim/bundle/vimproc.vim/.git/objects/51/33d90dcea5d999ed20968ed3ddfb8cda6bf90e' Binary files vim/bundle/vimproc.vim/.git/objects/51/33d90dcea5d999ed20968ed3ddfb8cda6bf90e 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/51/33d90dcea5d999ed20968ed3ddfb8cda6bf90e 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/53' === removed file 'vim/bundle/vimproc.vim/.git/objects/53/02166b20f31404f001c43cf9ffc5a7d6032da2' Binary files vim/bundle/vimproc.vim/.git/objects/53/02166b20f31404f001c43cf9ffc5a7d6032da2 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/53/02166b20f31404f001c43cf9ffc5a7d6032da2 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimproc.vim/.git/objects/57' === added file 'vim/bundle/vimproc.vim/.git/objects/57/bc701d420aa2a6edfba8fd72e350a691eeb688' Binary files vim/bundle/vimproc.vim/.git/objects/57/bc701d420aa2a6edfba8fd72e350a691eeb688 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/57/bc701d420aa2a6edfba8fd72e350a691eeb688 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/58' === removed file 'vim/bundle/vimproc.vim/.git/objects/58/6d9f4ed376af4e59a6378b0d3b0287d6fe8131' Binary files vim/bundle/vimproc.vim/.git/objects/58/6d9f4ed376af4e59a6378b0d3b0287d6fe8131 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/58/6d9f4ed376af4e59a6378b0d3b0287d6fe8131 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimproc.vim/.git/objects/5f' === added file 'vim/bundle/vimproc.vim/.git/objects/5f/98424343af1f3616ec40f72cc122843c88f219' --- vim/bundle/vimproc.vim/.git/objects/5f/98424343af1f3616ec40f72cc122843c88f219 1970-01-01 00:00:00 +0000 +++ vim/bundle/vimproc.vim/.git/objects/5f/98424343af1f3616ec40f72cc122843c88f219 2015-08-25 11:01:00 +0000 @@ -0,0 +1,7 @@ +xXY6$+{7m:i=ФE.dȢ+R{!o7CJl'@Z&s~sPB-7䫡xɵXJmun"η`(6t<sQc윿ˑ @ިXl#lM˵d:/L^U]f&W&2ʭZ櫻pߕԪBc^˫lTk3h5p$l]Ȫi(osmt<YH&"%xXc,D"HORhpؤ8OAceӯQw>[we]>6ͰcOٙ[?zȊ',Vu_aNaቼYmE!v>W;Y +6r5EKiш#M]̌V)AS8 +d yŅ2$@ˆ/BKhoW{Nom4q[#KM>1|y( 6h|]ڸ?_=!/`wTZG!b ڥ\ualSmrNL0z ^G{V31_9^:)Ts!qX1z92.PJeD#>, #G0ge=}挣u&6:DwB/Ty-+#Ң8SZ%a?;p-/t&7aE:&{׈'lUC)P+ʿMe_MmBXDQDjmp%&T\R1w;ejLFT|kwx*.T)EX)(x6G =A-[B$Ċ}RT[6,NZx;NR.PVESMd @q.bH( %'k 1N.]fsCvwp"֏?l0b~4])/㗜Q"v@MEcM мA#T۱lTACQkidU]JUw+e#%6C+6GV"1LM\xlL9`qvbku{[8/ +}L(5 sݧ>J<=c$D͛`3ɢrwУ*d! 2Uj"BD? r I蘴zay޲tLUVhEeYnT!f"MX;ȴ(3!  !1B4+P/]UpjQ +y<'sn? ܬlg~oyrH52LNxNH忡x@pqzw s aTUKj4ڋץB?]dI䙠V2br&;lSRavD|iYL]?~~u2ljG9kLǧHtb}WĖқ qG KwU$H#gRm?s3ăv \ No newline at end of file === added file 'vim/bundle/vimproc.vim/.git/objects/5f/a79ba43f7b8f64f36f622fce5915bbdd498b9a' Binary files vim/bundle/vimproc.vim/.git/objects/5f/a79ba43f7b8f64f36f622fce5915bbdd498b9a 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/5f/a79ba43f7b8f64f36f622fce5915bbdd498b9a 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/60' === removed file 'vim/bundle/vimproc.vim/.git/objects/60/3116884429ae47260b7fb02300b252fe8da1ce' --- vim/bundle/vimproc.vim/.git/objects/60/3116884429ae47260b7fb02300b252fe8da1ce 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/.git/objects/60/3116884429ae47260b7fb02300b252fe8da1ce 1970-01-01 00:00:00 +0000 @@ -1,2 +0,0 @@ -xRK0ܿ"`IaJaGѣ#k_MXWtuI:Q Xȡyߏo48b +dCF˨I k+J0=,t -$ɣK8q !W#;;3X.$Z7ee0𳐈ĆTs-2uꌡK昛g6 c-2ي<<Ư͟$#Kp+GB1` Wâ7 *v@Ri XŽ]7F0 ݟVLJاiBw*ô7[CEjI60G0E m4 \ No newline at end of file === removed directory 'vim/bundle/vimproc.vim/.git/objects/62' === removed file 'vim/bundle/vimproc.vim/.git/objects/62/40f3c4947956e140be30f5e42a6d6e2e1a5c57' Binary files vim/bundle/vimproc.vim/.git/objects/62/40f3c4947956e140be30f5e42a6d6e2e1a5c57 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/62/40f3c4947956e140be30f5e42a6d6e2e1a5c57 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/vimproc.vim/.git/objects/6c/690e52d51e8867a9aebdb27a9f3928fc9e5a79' --- vim/bundle/vimproc.vim/.git/objects/6c/690e52d51e8867a9aebdb27a9f3928fc9e5a79 1970-01-01 00:00:00 +0000 +++ vim/bundle/vimproc.vim/.git/objects/6c/690e52d51e8867a9aebdb27a9f3928fc9e5a79 2015-08-25 11:01:00 +0000 @@ -0,0 +1,3 @@ +xMA @:b J*[Kd1JZP~~[Vva͛wtC< +y%n%OVJۼdJ 6q\1e{VW֥$4YfQ< +Ȇ"IH3IUK Pm \ No newline at end of file === removed file 'vim/bundle/vimproc.vim/.git/objects/6c/a4d352f68fb7b789f164c9a21922582a171669' Binary files vim/bundle/vimproc.vim/.git/objects/6c/a4d352f68fb7b789f164c9a21922582a171669 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/6c/a4d352f68fb7b789f164c9a21922582a171669 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimproc.vim/.git/objects/6e' === added file 'vim/bundle/vimproc.vim/.git/objects/6e/6109ba40e96a7be35f86659bf7640553605e4f' Binary files vim/bundle/vimproc.vim/.git/objects/6e/6109ba40e96a7be35f86659bf7640553605e4f 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/6e/6109ba40e96a7be35f86659bf7640553605e4f 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/6f' === removed file 'vim/bundle/vimproc.vim/.git/objects/6f/609e9f5b06139256cca7d9dcb299d626099d08' Binary files vim/bundle/vimproc.vim/.git/objects/6f/609e9f5b06139256cca7d9dcb299d626099d08 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/6f/609e9f5b06139256cca7d9dcb299d626099d08 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/72' === removed file 'vim/bundle/vimproc.vim/.git/objects/72/1159021a2240fa83678d97bf1b793b15a9b57c' Binary files vim/bundle/vimproc.vim/.git/objects/72/1159021a2240fa83678d97bf1b793b15a9b57c 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/72/1159021a2240fa83678d97bf1b793b15a9b57c 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimproc.vim/.git/objects/73' === added file 'vim/bundle/vimproc.vim/.git/objects/73/371e872bad22fa43c6264c764de9a6072e2493' Binary files vim/bundle/vimproc.vim/.git/objects/73/371e872bad22fa43c6264c764de9a6072e2493 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/73/371e872bad22fa43c6264c764de9a6072e2493 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/vimproc.vim/.git/objects/75/0d7f060debbda7656e6da29a2654a57fc47b88' Binary files vim/bundle/vimproc.vim/.git/objects/75/0d7f060debbda7656e6da29a2654a57fc47b88 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/75/0d7f060debbda7656e6da29a2654a57fc47b88 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/vimproc.vim/.git/objects/75/1a8e690ec41c8cd1edea45c793f1cfbc111d29' Binary files vim/bundle/vimproc.vim/.git/objects/75/1a8e690ec41c8cd1edea45c793f1cfbc111d29 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/75/1a8e690ec41c8cd1edea45c793f1cfbc111d29 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/vimproc.vim/.git/objects/76/9ec879efc17890ca265959bd2afb53d3374e9b' Binary files vim/bundle/vimproc.vim/.git/objects/76/9ec879efc17890ca265959bd2afb53d3374e9b 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/76/9ec879efc17890ca265959bd2afb53d3374e9b 2015-08-25 11:01:00 +0000 differ === removed file 'vim/bundle/vimproc.vim/.git/objects/76/f0181f0e51a45c1b56d7a8fd3b290fa1ca9624' Binary files vim/bundle/vimproc.vim/.git/objects/76/f0181f0e51a45c1b56d7a8fd3b290fa1ca9624 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/76/f0181f0e51a45c1b56d7a8fd3b290fa1ca9624 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimproc.vim/.git/objects/7c' === added file 'vim/bundle/vimproc.vim/.git/objects/7c/8c5b7e9a506d3aabaaba5710925e65438b426e' Binary files vim/bundle/vimproc.vim/.git/objects/7c/8c5b7e9a506d3aabaaba5710925e65438b426e 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/7c/8c5b7e9a506d3aabaaba5710925e65438b426e 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/vimproc.vim/.git/objects/87' === added file 'vim/bundle/vimproc.vim/.git/objects/87/356305ec4fc3e03be7a779abcc4da28fedd8fc' --- vim/bundle/vimproc.vim/.git/objects/87/356305ec4fc3e03be7a779abcc4da28fedd8fc 1970-01-01 00:00:00 +0000 +++ vim/bundle/vimproc.vim/.git/objects/87/356305ec4fc3e03be7a779abcc4da28fedd8fc 2015-08-25 11:01:00 +0000 @@ -0,0 +1,1 @@ +xőj0EWLey!ȷ"cɑƦr])qt.su"wzDT #[LVB̌=C-R^yD3؊7cV`rD_|>ʒ=31-ezy]fG@h֗+u=j[, BKxSy=rַz~*jKu_ q7by8;ՇN3zՠUK \ No newline at end of file === added directory 'vim/bundle/vimproc.vim/.git/objects/89' === added file 'vim/bundle/vimproc.vim/.git/objects/89/0fe31f321450460576b3e956b3799219dfa853' Binary files vim/bundle/vimproc.vim/.git/objects/89/0fe31f321450460576b3e956b3799219dfa853 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/89/0fe31f321450460576b3e956b3799219dfa853 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/vimproc.vim/.git/objects/89/305873bf5a9291e1b1c660cbfe406515c6447c' Binary files vim/bundle/vimproc.vim/.git/objects/89/305873bf5a9291e1b1c660cbfe406515c6447c 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/89/305873bf5a9291e1b1c660cbfe406515c6447c 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/90' === removed file 'vim/bundle/vimproc.vim/.git/objects/90/52e23e1e122abe2ce7f4a36d0a7ff5b773d48a' Binary files vim/bundle/vimproc.vim/.git/objects/90/52e23e1e122abe2ce7f4a36d0a7ff5b773d48a 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/90/52e23e1e122abe2ce7f4a36d0a7ff5b773d48a 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimproc.vim/.git/objects/91' === added file 'vim/bundle/vimproc.vim/.git/objects/91/97fa461dba36be8a02dcdaa7c5703b6c4a5627' Binary files vim/bundle/vimproc.vim/.git/objects/91/97fa461dba36be8a02dcdaa7c5703b6c4a5627 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/91/97fa461dba36be8a02dcdaa7c5703b6c4a5627 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/97' === removed file 'vim/bundle/vimproc.vim/.git/objects/97/ead7c7fe91097735ef4d6946c7b6d0ec7fd4b4' Binary files vim/bundle/vimproc.vim/.git/objects/97/ead7c7fe91097735ef4d6946c7b6d0ec7fd4b4 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/97/ead7c7fe91097735ef4d6946c7b6d0ec7fd4b4 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/99' === removed file 'vim/bundle/vimproc.vim/.git/objects/99/c4668132e72f2b223bff521bf6fb7260f43e92' Binary files vim/bundle/vimproc.vim/.git/objects/99/c4668132e72f2b223bff521bf6fb7260f43e92 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/99/c4668132e72f2b223bff521bf6fb7260f43e92 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimproc.vim/.git/objects/9a' === added file 'vim/bundle/vimproc.vim/.git/objects/9a/82e11a7677c27c1af3d63df9db76561409ef23' Binary files vim/bundle/vimproc.vim/.git/objects/9a/82e11a7677c27c1af3d63df9db76561409ef23 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/9a/82e11a7677c27c1af3d63df9db76561409ef23 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/vimproc.vim/.git/objects/9b' === added file 'vim/bundle/vimproc.vim/.git/objects/9b/1c6ca347c06f67c4888689f1169b153fa54f7f' Binary files vim/bundle/vimproc.vim/.git/objects/9b/1c6ca347c06f67c4888689f1169b153fa54f7f 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/9b/1c6ca347c06f67c4888689f1169b153fa54f7f 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/ad' === removed file 'vim/bundle/vimproc.vim/.git/objects/ad/c101995c858019feecbbbe05a87b6bfa39a4ed' Binary files vim/bundle/vimproc.vim/.git/objects/ad/c101995c858019feecbbbe05a87b6bfa39a4ed 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/ad/c101995c858019feecbbbe05a87b6bfa39a4ed 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/af' === removed file 'vim/bundle/vimproc.vim/.git/objects/af/51ee5b2a40360499157cc8b0744b5bbdd0689d' Binary files vim/bundle/vimproc.vim/.git/objects/af/51ee5b2a40360499157cc8b0744b5bbdd0689d 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/af/51ee5b2a40360499157cc8b0744b5bbdd0689d 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/b2' === removed file 'vim/bundle/vimproc.vim/.git/objects/b2/255c66a3dc04fba1adbda3e380facff45fe6ec' --- vim/bundle/vimproc.vim/.git/objects/b2/255c66a3dc04fba1adbda3e380facff45fe6ec 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/.git/objects/b2/255c66a3dc04fba1adbda3e380facff45fe6ec 1970-01-01 00:00:00 +0000 @@ -1,1 +0,0 @@ -xuj0D{W,XH%e^C(驽/W+`E"5{ 3SZ*}Ed@Ơ80EI'gјw/z .G2u(AbĊ𗏎UѠ4COtȈvk.qmp{;/Arzֲ#'ovw?TR[.y6u-~6Wxt=A,9AѯK~N7wk$6C;Cqeb \ No newline at end of file === removed directory 'vim/bundle/vimproc.vim/.git/objects/b8' === removed file 'vim/bundle/vimproc.vim/.git/objects/b8/f174d7c717ec1f8ba6ea2a44133407c4d16af9' Binary files vim/bundle/vimproc.vim/.git/objects/b8/f174d7c717ec1f8ba6ea2a44133407c4d16af9 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/b8/f174d7c717ec1f8ba6ea2a44133407c4d16af9 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimproc.vim/.git/objects/b9' === added file 'vim/bundle/vimproc.vim/.git/objects/b9/7bbd4397f596dd1d42eeb7d0587e6897612453' Binary files vim/bundle/vimproc.vim/.git/objects/b9/7bbd4397f596dd1d42eeb7d0587e6897612453 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/b9/7bbd4397f596dd1d42eeb7d0587e6897612453 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/bb' === removed file 'vim/bundle/vimproc.vim/.git/objects/bb/3b9720331527da40cf1e6b7e8b0114eea19361' Binary files vim/bundle/vimproc.vim/.git/objects/bb/3b9720331527da40cf1e6b7e8b0114eea19361 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/bb/3b9720331527da40cf1e6b7e8b0114eea19361 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/vimproc.vim/.git/objects/bb/7014f9d7e8b57e2bf44562b1d0e5541dd77db6' Binary files vim/bundle/vimproc.vim/.git/objects/bb/7014f9d7e8b57e2bf44562b1d0e5541dd77db6 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/bb/7014f9d7e8b57e2bf44562b1d0e5541dd77db6 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/vimproc.vim/.git/objects/bd/52e60cf3cbc4a6a1fabe91d12bd26dfbbd9088' Binary files vim/bundle/vimproc.vim/.git/objects/bd/52e60cf3cbc4a6a1fabe91d12bd26dfbbd9088 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/bd/52e60cf3cbc4a6a1fabe91d12bd26dfbbd9088 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/vimproc.vim/.git/objects/bd/abdbdb5d2a09226fc95d55179e511beba98a06' Binary files vim/bundle/vimproc.vim/.git/objects/bd/abdbdb5d2a09226fc95d55179e511beba98a06 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/bd/abdbdb5d2a09226fc95d55179e511beba98a06 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/vimproc.vim/.git/objects/bf' === added file 'vim/bundle/vimproc.vim/.git/objects/bf/125fb93ff82775486b516fef9fb320c9fea075' Binary files vim/bundle/vimproc.vim/.git/objects/bf/125fb93ff82775486b516fef9fb320c9fea075 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/bf/125fb93ff82775486b516fef9fb320c9fea075 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/c1' === removed file 'vim/bundle/vimproc.vim/.git/objects/c1/265a9505e4e40b5e49e6a3f4b25f532d5201e7' Binary files vim/bundle/vimproc.vim/.git/objects/c1/265a9505e4e40b5e49e6a3f4b25f532d5201e7 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/c1/265a9505e4e40b5e49e6a3f4b25f532d5201e7 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimproc.vim/.git/objects/c8' === added file 'vim/bundle/vimproc.vim/.git/objects/c8/a4987c1c148ac21e6ac37b18de35d09458219b' Binary files vim/bundle/vimproc.vim/.git/objects/c8/a4987c1c148ac21e6ac37b18de35d09458219b 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/c8/a4987c1c148ac21e6ac37b18de35d09458219b 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/c9' === removed file 'vim/bundle/vimproc.vim/.git/objects/c9/cd600429201474c86f1a446e778b2159009168' Binary files vim/bundle/vimproc.vim/.git/objects/c9/cd600429201474c86f1a446e778b2159009168 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/c9/cd600429201474c86f1a446e778b2159009168 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/d5' === removed file 'vim/bundle/vimproc.vim/.git/objects/d5/64d0bc3dd917926892c55e3706cc116d5b165e' Binary files vim/bundle/vimproc.vim/.git/objects/d5/64d0bc3dd917926892c55e3706cc116d5b165e 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/d5/64d0bc3dd917926892c55e3706cc116d5b165e 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimproc.vim/.git/objects/da' === added file 'vim/bundle/vimproc.vim/.git/objects/da/d5a2d96549e75a3b27dd384fa76740b79991c9' Binary files vim/bundle/vimproc.vim/.git/objects/da/d5a2d96549e75a3b27dd384fa76740b79991c9 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/da/d5a2d96549e75a3b27dd384fa76740b79991c9 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/df' === removed file 'vim/bundle/vimproc.vim/.git/objects/df/e2b524e69509aea6593137ba1fac09487d1f8f' Binary files vim/bundle/vimproc.vim/.git/objects/df/e2b524e69509aea6593137ba1fac09487d1f8f 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/df/e2b524e69509aea6593137ba1fac09487d1f8f 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/e4' === removed file 'vim/bundle/vimproc.vim/.git/objects/e4/106ca1724fa18b69b4c34930bb177a5238d121' Binary files vim/bundle/vimproc.vim/.git/objects/e4/106ca1724fa18b69b4c34930bb177a5238d121 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/e4/106ca1724fa18b69b4c34930bb177a5238d121 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/vimproc.vim/.git/objects/e4/52ab83a992b3b6372813ac8dc933556a5a21de' Binary files vim/bundle/vimproc.vim/.git/objects/e4/52ab83a992b3b6372813ac8dc933556a5a21de 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/e4/52ab83a992b3b6372813ac8dc933556a5a21de 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/e6' === removed file 'vim/bundle/vimproc.vim/.git/objects/e6/9daa71ce59e3265832ecdac96a4e464ddd8b00' Binary files vim/bundle/vimproc.vim/.git/objects/e6/9daa71ce59e3265832ecdac96a4e464ddd8b00 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/e6/9daa71ce59e3265832ecdac96a4e464ddd8b00 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/vimproc.vim/.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391' Binary files vim/bundle/vimproc.vim/.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/ea' === removed file 'vim/bundle/vimproc.vim/.git/objects/ea/ece6e6c8ad5d9d2d54fc74b5509dcb584cb2d0' Binary files vim/bundle/vimproc.vim/.git/objects/ea/ece6e6c8ad5d9d2d54fc74b5509dcb584cb2d0 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/ea/ece6e6c8ad5d9d2d54fc74b5509dcb584cb2d0 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimproc.vim/.git/objects/ec' === added file 'vim/bundle/vimproc.vim/.git/objects/ec/fd9b875c3ed2c61362284fcc57a7db95d7aff4' Binary files vim/bundle/vimproc.vim/.git/objects/ec/fd9b875c3ed2c61362284fcc57a7db95d7aff4 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/ec/fd9b875c3ed2c61362284fcc57a7db95d7aff4 2015-08-25 11:01:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/ee' === removed file 'vim/bundle/vimproc.vim/.git/objects/ee/947e9d86a434cce109a6d0bb28108ba6a204e3' Binary files vim/bundle/vimproc.vim/.git/objects/ee/947e9d86a434cce109a6d0bb28108ba6a204e3 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/ee/947e9d86a434cce109a6d0bb28108ba6a204e3 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/f0' === removed file 'vim/bundle/vimproc.vim/.git/objects/f0/c61305ca0660ef826167fef0c2106e48ccaa1d' Binary files vim/bundle/vimproc.vim/.git/objects/f0/c61305ca0660ef826167fef0c2106e48ccaa1d 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/f0/c61305ca0660ef826167fef0c2106e48ccaa1d 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/f2' === removed file 'vim/bundle/vimproc.vim/.git/objects/f2/c189e39b08848ab8d15bacb1c0f233a5b3b0ae' Binary files vim/bundle/vimproc.vim/.git/objects/f2/c189e39b08848ab8d15bacb1c0f233a5b3b0ae 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/f2/c189e39b08848ab8d15bacb1c0f233a5b3b0ae 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/vimproc.vim/.git/objects/f6/7f01d2aac6fb5f6c773a4f7447e6a49613667a' Binary files vim/bundle/vimproc.vim/.git/objects/f6/7f01d2aac6fb5f6c773a4f7447e6a49613667a 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/f6/7f01d2aac6fb5f6c773a4f7447e6a49613667a 1970-01-01 00:00:00 +0000 differ === removed directory 'vim/bundle/vimproc.vim/.git/objects/f7' === removed file 'vim/bundle/vimproc.vim/.git/objects/f7/2ede1f455b1766748fd56165637e986cfe67f5' Binary files vim/bundle/vimproc.vim/.git/objects/f7/2ede1f455b1766748fd56165637e986cfe67f5 2016-08-04 08:15:51 +0000 and vim/bundle/vimproc.vim/.git/objects/f7/2ede1f455b1766748fd56165637e986cfe67f5 1970-01-01 00:00:00 +0000 differ === added directory 'vim/bundle/vimproc.vim/.git/objects/f8' === added file 'vim/bundle/vimproc.vim/.git/objects/f8/0d0c197a7ecfdd2d60a596d4c7cf5133b97cf7' Binary files vim/bundle/vimproc.vim/.git/objects/f8/0d0c197a7ecfdd2d60a596d4c7cf5133b97cf7 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/f8/0d0c197a7ecfdd2d60a596d4c7cf5133b97cf7 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/vimproc.vim/.git/objects/f8/d9e81684b0615c2630814db7bdd8f8aa524a78' Binary files vim/bundle/vimproc.vim/.git/objects/f8/d9e81684b0615c2630814db7bdd8f8aa524a78 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/f8/d9e81684b0615c2630814db7bdd8f8aa524a78 2015-08-25 11:01:00 +0000 differ === added directory 'vim/bundle/vimproc.vim/.git/objects/fe' === added file 'vim/bundle/vimproc.vim/.git/objects/fe/027609c159777031c6a90a4c60d4cf23feb041' Binary files vim/bundle/vimproc.vim/.git/objects/fe/027609c159777031c6a90a4c60d4cf23feb041 1970-01-01 00:00:00 +0000 and vim/bundle/vimproc.vim/.git/objects/fe/027609c159777031c6a90a4c60d4cf23feb041 2015-08-25 11:01:00 +0000 differ === modified file 'vim/bundle/vimproc.vim/.git/packed-refs' --- vim/bundle/vimproc.vim/.git/packed-refs 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/.git/packed-refs 2015-08-25 11:01:00 +0000 @@ -1,2 +1,2 @@ # pack-refs with: peeled fully-peeled -b2255c66a3dc04fba1adbda3e380facff45fe6ec refs/remotes/origin/master +150d5fd04fed462831b99539dfe9920a00a7cea6 refs/remotes/origin/master === modified file 'vim/bundle/vimproc.vim/.git/refs/heads/master' --- vim/bundle/vimproc.vim/.git/refs/heads/master 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/.git/refs/heads/master 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -b2255c66a3dc04fba1adbda3e380facff45fe6ec +150d5fd04fed462831b99539dfe9920a00a7cea6 === modified file 'vim/bundle/vimproc.vim/.git/shallow' --- vim/bundle/vimproc.vim/.git/shallow 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/.git/shallow 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -b2255c66a3dc04fba1adbda3e380facff45fe6ec +150d5fd04fed462831b99539dfe9920a00a7cea6 === modified file 'vim/bundle/vimproc.vim/.gitignore' --- vim/bundle/vimproc.vim/.gitignore 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/.gitignore 2015-08-25 11:01:00 +0000 @@ -1,8 +1,12 @@ -lib/* +autoload/vimproc_*.so +autoload/vimproc_*.dll +autoload/vimproc_*.dll.old +autoload/vimproc_*.dll.manifest +autoload/vimproc_*.exp +autoload/vimproc_*.lib +autoload/*.pdb doc/tags *.obj *.o -*.so -*.dll *.swp *~ === modified file 'vim/bundle/vimproc.vim/.travis.yml' --- vim/bundle/vimproc.vim/.travis.yml 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/.travis.yml 2015-08-25 11:01:00 +0000 @@ -1,9 +1,3 @@ -os: - - linux - - osx - -sudo: false - before_script: - git clone https://github.com/syngan/vim-vimlint /tmp/vim-vimlint - git clone https://github.com/ynkdir/vim-vimlparser /tmp/vim-vimlparser === modified file 'vim/bundle/vimproc.vim/Makefile' --- vim/bundle/vimproc.vim/Makefile 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/Makefile 2015-08-25 11:01:00 +0000 @@ -2,14 +2,13 @@ # Need to figure out if Cygwin/Mingw is installed SYS := $(shell gcc -dumpmachine) ifeq ($(findstring cygwin, $(SYS)),cygwin) - PLATFORM = cygwin - endif - ifeq ($(findstring mingw, $(SYS)),mingw) - ifeq ($(findstring x86_64, $(SYS)),x86_64) - PLATFORM = mingw64 - else - PLATFORM = mingw32 - endif + PLATFORM = cygwin + endif + ifeq ($(findstring mingw32, $(SYS)),mingw32) + PLATFORM = mingw32 + endif + ifeq ($(findstring mingw64, $(SYS)),mingw64) + PLATFORM = mingw64 endif else # Grab the output of `uname -s` and switch to set the platform @@ -18,20 +17,16 @@ PLATFORM = unix endif ifeq ($(UNAME_S),FreeBSD) - MAKE = make # BSD Make - PLATFORM = bsd + PLATFORM = unix endif ifeq ($(UNAME_S),DragonFly) - MAKE = make # BSD Make - PLATFORM = bsd + PLATFORM = unix endif ifeq ($(UNAME_S),NetBSD) - MAKE = make # BSD Make - PLATFORM = bsd + PLATFORM = unix endif ifeq ($(UNAME_S),OpenBSD) - MAKE = make # BSD Make - PLATFORM = bsd + PLATFORM = unix endif ifeq ($(UNAME_S),Darwin) PLATFORM = mac === modified file 'vim/bundle/vimproc.vim/README.mkd' --- vim/bundle/vimproc.vim/README.mkd 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/README.mkd 2015-08-25 11:01:00 +0000 @@ -1,13 +1,9 @@ # vimproc -[![Travis Build Status](https://travis-ci.org/Shougo/vimproc.vim.svg?branch=master)](https://travis-ci.org/Shougo/vimproc.vim) -[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/nutwxuj2poauar2b/branch/master?svg=true)](https://ci.appveyor.com/project/Shougo/vimproc-vim/branch/master) -[![GitHub release](https://img.shields.io/github/release/Shougo/vimproc.vim.svg)](https://github.com/Shougo/vimproc.vim/releases) +[![Build Status](https://travis-ci.org/Shougo/vimproc.vim.svg?branch=master)](https://travis-ci.org/Shougo/vimproc.vim) -vimproc is a great asynchronous execution library for Vim. It is a fork of -proc.vim by Yukihiro Nakadaira. I added some features and fixed some bugs and -I'm maintaining it now. Instead of an external shell (example: 'shell'), -vimproc uses an external DLL file. +vimproc requires a native extension to be built, and will not work properly if +that library (a `.so` or `.dll`) is missing. Supported platforms: * Windows 32/64bit (Compiled by MinGW or Visual Studio) @@ -27,37 +23,20 @@ * Clone this repo * Build vimproc's native extensions (see Building for details) -* Copy `autoload/*`, `lib/*` and `plugin/*` files to your 'runtimepath' - directory (see `:help runtimepath`). - -### dein.vim - -If you use [dein.vim](http://github.com/Shougo/dein.vim), you can -update and build vimproc automatically. This is the recommended package manager. - -```vim -call dein#add('Shougo/vimproc.vim', {'build' : 'make'}) -``` - -### Vim-Plug - -If you use [vim-plug](https://github.com/junegunn/vim-plug), you can update and build vimproc automatically. - -```vim -Plug 'Shougo/vimproc.vim', {'do' : 'make'} -``` +* Copy `autoload/*` and `plugin/*` files to your 'runtimepath' directory (see + `:help runtimepath`). ### NeoBundle If you use [neobundle.vim](http://github.com/Shougo/neobundle.vim), you can -update and build vimproc automatically. +update and build vimproc automatically. This is the recommended package manager. ```vim NeoBundle 'Shougo/vimproc.vim', { \ 'build' : { \ 'windows' : 'tools\\update-dll-mingw', \ 'cygwin' : 'make -f make_cygwin.mak', -\ 'mac' : 'make', +\ 'mac' : 'make -f make_mac.mak', \ 'linux' : 'make', \ 'unix' : 'gmake', \ }, @@ -153,6 +132,5 @@ ### Windows Binaries -* [Kaoriya Vim](http://www.kaoriya.net/software/vim/) comes bundled with a precompiled version +[Kaoriya Vim](http://www.kaoriya.net/software/vim/) comes bundled with a precompiled version for vimproc in Windows environment -* https://github.com/Shougo/vimproc.vim/releases === removed file 'vim/bundle/vimproc.vim/appveyor.yml' --- vim/bundle/vimproc.vim/appveyor.yml 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/appveyor.yml 1970-01-01 00:00:00 +0000 @@ -1,39 +0,0 @@ ---- -version: '{build}' -shallow_clone: true -environment: - global: - AUTH_TOKEN: - secure: rKd6JLXUIl3vcA8d0S9w14bl+uvUlZLt0d1M8bmlOh+owQqr5c40+/4ITCNBpHG3 - matrix: - - COMPILER: msvc - CPU: i386 - ENV: /x86 - BIT: 32 - - COMPILER: msvc - CPU: AMD64 - ENV: /x64 - BIT: 64 - - COMPILER: cygwin - - COMPILER: mingw - BIT: 32 - - COMPILER: msys2 - MSYS2_ARCH: x86_64 - MSYS2_DIR: msys64 - MSYSTEM: MINGW64 - BIT: 64 -build_script: - - '%APPVEYOR_BUILD_FOLDER%\tools\appveyor.bat' -test_script: - - '%APPVEYOR_BUILD_FOLDER%\tools\appveyor.bat test' -artifacts: - - path: lib/vimproc_*.dll - name: vimproc.dll -deploy: - provider: GitHub - description: vimproc - auth_token: - secure: rKd6JLXUIl3vcA8d0S9w14bl+uvUlZLt0d1M8bmlOh+owQqr5c40+/4ITCNBpHG3 - on: - appveyor_repo_tag: true - COMPILER: msvc === added file 'vim/bundle/vimproc.vim/autoload/fakepoll.h' --- vim/bundle/vimproc.vim/autoload/fakepoll.h 1970-01-01 00:00:00 +0000 +++ vim/bundle/vimproc.vim/autoload/fakepoll.h 2015-08-25 11:01:00 +0000 @@ -0,0 +1,165 @@ +/* fakepoll.h */ +/* poll using select */ +/* Warning: a call to this poll() takes about 4K of stack space. */ + +/* Greg Parker gparker-web@sealiesoftware.com December 2000 */ +/* This code is in the public domain and may be copied or modified without */ +/* permission. */ + +/* Nico Raffato gparker-web@sealiesoftware.com September 2009 */ + +/* Updated Sep 2009: */ +/* * fix crash when an fd is less than 0 */ +/* * don't set POLLIN or POLLOUT in revents if it wasn't requested */ +/* in events (only happens when an fd is in the poll set twice) */ + +#ifndef _FAKE_POLL_H +#define _FAKE_POLL_H + +#include +#include +#include +#include +#include + +#ifndef OPEN_MAX + #define OPEN_MAX (sysconf(_SC_OPEN_MAX)) +#endif + +typedef struct pollfd { + int fd; /* file desc to poll */ + short events; /* events of interest on fd */ + short revents; /* events that occurred on fd */ +} pollfd_t; + + +/* poll flags */ +#define POLLIN 0x0001 +#define POLLOUT 0x0004 +#define POLLERR 0x0008 + +/* synonyms */ +#define POLLNORM POLLIN +#define POLLPRI POLLIN +#define POLLRDNORM POLLIN +#define POLLRDBAND POLLIN +#define POLLWRNORM POLLOUT +#define POLLWRBAND POLLOUT + +/* ignored */ +#define POLLHUP 0x0010 +#define POLLNVAL 0x0020 + +int poll(struct pollfd *pollSet, int pollCount, int pollTimeout) +{ + struct timeval tv; + struct timeval *tvp; + fd_set readFDs, writeFDs, exceptFDs; + fd_set *readp, *writep, *exceptp; + struct pollfd *pollEnd, *p; + int selected; + int result; + int maxFD; + + if (!pollSet) { + pollEnd = NULL; + readp = NULL; + writep = NULL; + exceptp = NULL; + maxFD = 0; + } + else { + pollEnd = pollSet + pollCount; + readp = &readFDs; + writep = &writeFDs; + exceptp = &exceptFDs; + + FD_ZERO(readp); + FD_ZERO(writep); + FD_ZERO(exceptp); + + /* Find the biggest fd in the poll set */ + maxFD = 0; + for (p = pollSet; p < pollEnd; p++) { + if (p->fd > maxFD) maxFD = p->fd; + } + + if (maxFD >= OPEN_MAX) { + /* At least one fd is too big */ + errno = EINVAL; + return -1; + } + + /* Transcribe flags from the poll set to the fd sets */ + for (p = pollSet; p < pollEnd; p++) { + if (p->fd < 0) { + /* Negative fd checks nothing and always reports zero */ + } else { + if (p->events & POLLIN) FD_SET(p->fd, readp); + if (p->events & POLLOUT) FD_SET(p->fd, writep); + if (p->events != 0) FD_SET(p->fd, exceptp); + /* POLLERR is never set coming in; poll() always reports errors */ + /* But don't report if we're not listening to anything at all. */ + } + } + } + + /* poll timeout is in milliseconds. Convert to struct timeval. */ + /* poll timeout == -1 : wait forever : select timeout of NULL */ + /* poll timeout == 0 : return immediately : select timeout of zero */ + if (pollTimeout >= 0) { + tv.tv_sec = pollTimeout / 1000; + tv.tv_usec = (pollTimeout % 1000) * 1000; + tvp = &tv; + } else { + tvp = NULL; + } + + + selected = select(maxFD+1, readp, writep, exceptp, tvp); + + + if (selected < 0) { + /* Error during select */ + result = -1; + } + else if (selected > 0) { + /* Select found something */ + /* Transcribe result from fd sets to poll set. */ + /* Also count the number of selected fds. poll returns the */ + /* number of ready fds; select returns the number of bits set. */ + int polled = 0; + for (p = pollSet; p < pollEnd; p++) { + p->revents = 0; + if (p->fd < 0) { + /* Negative fd always reports zero */ + } else { + if ((p->events & POLLIN) && FD_ISSET(p->fd, readp)) { + p->revents |= POLLIN; + } + if ((p->events & POLLOUT) && FD_ISSET(p->fd, writep)) { + p->revents |= POLLOUT; + } + if ((p->events != 0) && FD_ISSET(p->fd, exceptp)) { + p->revents |= POLLERR; + } + + if (p->revents) polled++; + } + } + result = polled; + } + else { + /* selected == 0, select timed out before anything happened */ + /* Clear all result bits and return zero. */ + for (p = pollSet; p < pollEnd; p++) { + p->revents = 0; + } + result = 0; + } + + return result; +} + + +#endif /* _FAKE_POLL_H */ === added file 'vim/bundle/vimproc.vim/autoload/proc.c' --- vim/bundle/vimproc.vim/autoload/proc.c 1970-01-01 00:00:00 +0000 +++ vim/bundle/vimproc.vim/autoload/proc.c 2015-08-25 11:01:00 +0000 @@ -0,0 +1,1255 @@ +/* vim:set sw=4 sts=4 et: */ +/** + * FILE: proc.c + * AUTHOR: Yukihiro Nakadaira (original) + * Nico Raffo (modified) + */ + +#define _XOPEN_SOURCE 600 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if !defined __APPLE__ +# include +# include +#endif +#include + +#include + +/* for poll() */ +#if defined __APPLE__ +# include "fakepoll.h" +#else +# include +#endif + +/* for forkpty() / login_tty() */ +#if (defined __linux__ || defined __CYGWIN__) && !defined __ANDROID__ +# include +# include +#elif defined __APPLE__ || defined __NetBSD__ || defined __OpenBSD__ +# include +#elif defined __sun__ || defined __ANDROID__ +# include "ptytty.h" +#else +# include +# include +#endif + +/* for ioctl() */ +#ifdef __APPLE__ +# include +#endif + +/* for tc* and ioctl */ +#include +#include +#ifndef TIOCGWINSZ +# include /* 4.3+BSD requires this too */ +#endif + +/* for waitpid() */ +#include +#include +#if defined __NetBSD__ +# define WIFCONTINUED(x) (_WSTATUS(x) == _WSTOPPED && WSTOPSIG(x) == 0x13) +#elif defined __ANDROID__ +# define WIFCONTINUED(x) (WIFSTOPPED(x) && WSTOPSIG(x) == 0x13) +#endif + +/* for socket */ +#if defined __FreeBSD__ +# define __BSD_VISIBLE 1 +# include +#endif +#include +#include +#include +#include + +/* for ctermid */ +#if defined __ANDROID__ +# define ctermid(x) "/dev/tty" +#endif + +#include "vimstack.c" + +const int debug = 0; + +/* API */ +const char *vp_dlopen(char *args); /* [handle] (path) */ +const char *vp_dlclose(char *args); /* [] (handle) */ +const char *vp_dlversion(char *args); /* [version] () */ + +const char *vp_file_open(char *args); /* [fd] (path, flags, mode) */ +const char *vp_file_close(char *args); /* [] (fd) */ +const char *vp_file_read(char *args); /* [hd, eof] (fd, cnt, timeout) */ +const char *vp_file_write(char *args); /* [nleft] (fd, timeout, hd) */ + +const char *vp_pipe_open(char *args); /* [pid, [fd] * npipe] + (npipe, hstdin, hstdout, hstderr, argc, [argv]) */ +const char *vp_pipe_close(char *args); /* [] (fd) */ +const char *vp_pipe_read(char *args); /* [hd, eof] (fd, cnt, timeout) */ +const char *vp_pipe_write(char *args); /* [nleft] (fd, timeout, hd) */ + +const char *vp_pty_open(char *args); +/* [pid, stdin, stdout, stderr] + (npipe, width, height,hstdin, hstdout, hstderr, argc, [argv]) */ +const char *vp_pty_close(char *args); /* [] (fd) */ +const char *vp_pty_read(char *args); /* [hd, eof] (fd, cnt, timeout) */ +const char *vp_pty_write(char *args); /* [nleft] (fd, timeout, hd) */ +const char *vp_pty_get_winsize(char *args); /* [width, height] (fd) */ +const char *vp_pty_set_winsize(char *args); /* [] (fd, width, height) */ + +const char *vp_kill(char *args); /* [] (pid, sig) */ +const char *vp_waitpid(char *args); /* [cond, status] (pid) */ + +const char *vp_socket_open(char *args); /* [socket] (host, port) */ +const char *vp_socket_close(char *args);/* [] (socket) */ +const char *vp_socket_read(char *args); /* [hd, eof] (socket, cnt, timeout) */ +const char *vp_socket_write(char *args);/* [nleft] (socket, hd, timeout) */ + +const char *vp_host_exists(char *args); /* [int] (host) */ + +const char *vp_decode(char *args); /* [decoded_str] (encode_str) */ + +const char *vp_get_signals(char *args); /* [signals] () */ +/* --- */ + +#define VP_BUFSIZE (65536) +#define VP_READ_BUFSIZE (VP_BUFSIZE - 4) + +static vp_stack_t _result = VP_STACK_NULL; + +const char * +vp_dlopen(char *args) +{ + vp_stack_t stack; + char *path; + void *handle; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &path)); + VP_RETURN_IF_FAIL(vp_stack_reserve(&_result, VP_BUFSIZE)); + + handle = dlopen(path, RTLD_LAZY); + if (handle == NULL) + return dlerror(); + vp_stack_push_num(&_result, "%p", handle); + return vp_stack_return(&_result); +} + +const char * +vp_dlclose(char *args) +{ + vp_stack_t stack; + void *handle; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%p", &handle)); + + /* On FreeBSD6, to call dlclose() twice with same pointer causes SIGSEGV */ + if (dlclose(handle) == -1) + return dlerror(); + vp_stack_free(&_result); + return NULL; +} + +const char * +vp_dlversion(char *args) +{ + vp_stack_push_num(&_result, "%2d%02d", 8, 0); + return vp_stack_return(&_result); +} + +static int +str_to_oflag(const char *flags) +{ + int oflag = 0; + + if (strchr("rwa", flags[0])) { + if (strchr(flags, '+')) { + oflag = O_RDWR; + } else { + oflag = flags[0] == 'r' ? O_RDONLY : O_WRONLY; + } + if (flags[0] == 'w' || flags[0] == 'a') { + oflag |= O_CREAT | (flags[0] == 'w' ? O_TRUNC : O_APPEND); + } +#define VP_CHR_TO_OFLAG(_c, _f) do { \ + if (strchr(flags, (_c))) { oflag |= (_f); } \ +} while (0) + +#ifdef O_EXCL + VP_CHR_TO_OFLAG('x', O_EXCL); +#endif +#ifdef O_CLOEXEC + VP_CHR_TO_OFLAG('e', O_CLOEXEC); +#endif +#ifdef O_BINARY + VP_CHR_TO_OFLAG('b', O_BINARY); +#endif +#ifdef O_TEXT + VP_CHR_TO_OFLAG('t', O_TEXT); +#endif +#ifdef O_SEQUENTIAL + VP_CHR_TO_OFLAG('S', O_SEQUENTIAL); +#endif +#ifdef O_RANDOM + VP_CHR_TO_OFLAG('R', O_RANDOM); +#endif + +#undef VP_CHR_TO_OFLAG + } else { + if (strstr(flags, "O_RDONLY")) { + oflag = O_RDONLY; + } else if (strstr(flags, "O_WRONLY")) { + oflag = O_WRONLY; + } else if (strstr(flags, "O_RDWR")) { + oflag = O_RDWR; + } else { + return -1; + } +#define VP_STR_TO_OFLAG(_f) do { \ + if (strstr(flags, #_f)) { oflag |= (_f); } \ +} while (0) + + VP_STR_TO_OFLAG(O_APPEND); + VP_STR_TO_OFLAG(O_CREAT); + VP_STR_TO_OFLAG(O_TRUNC); +#ifdef O_EXCL + VP_STR_TO_OFLAG(O_EXCL); +#endif +#ifdef O_NONBLOCK + VP_STR_TO_OFLAG(O_NONBLOCK); +#endif +#ifdef O_SHLOCK + VP_STR_TO_OFLAG(O_SHLOCK); +#endif +#ifdef O_EXLOCK + VP_STR_TO_OFLAG(O_EXLOCK); +#endif +#ifdef O_DIRECT + VP_STR_TO_OFLAG(O_DIRECT); +#endif +#ifdef O_FSYNC + VP_STR_TO_OFLAG(O_FSYNC); +#endif +#ifdef O_NOFOLLOW + VP_STR_TO_OFLAG(O_NOFOLLOW); +#endif +#ifdef O_TEMPORARY + VP_STR_TO_OFLAG(O_TEMPORARY); +#endif +#ifdef O_RANDOM + VP_STR_TO_OFLAG(O_RANDOM); +#endif +#ifdef O_SEQUENTIAL + VP_STR_TO_OFLAG(O_SEQUENTIAL); +#endif +#ifdef O_BINARY + VP_STR_TO_OFLAG(O_BINARY); +#endif +#ifdef O_TEXT + VP_STR_TO_OFLAG(O_TEXT); +#endif +#ifdef O_INHERIT + VP_STR_TO_OFLAG(O_INHERIT); +#endif +#ifdef _O_SHORT_LIVED + VP_STR_TO_OFLAG(O_SHORT_LIVED); +#endif + +#undef VP_STR_TO_OFLAG + } + + return oflag; +} + +static int +fd_set_nonblock(int fd) +{ +#if defined(F_GETFL) && defined(F_SETFL) && defined(O_NONBLOCK) + int flag; + + if ((flag = fcntl(fd, F_GETFL, 0)) == -1) + return -1; + if (!(flag & O_NONBLOCK)) + return fcntl(fd, F_SETFL, flag | O_NONBLOCK); +#endif + return 0; +} +#ifdef __linux__ +# define VP_SET_NONBLOCK_IF_NEEDED(_fd) (void)fd_set_nonblock(_fd) +#else +# define VP_SET_NONBLOCK_IF_NEEDED(_fd) do { /* nop */ } while (0) +#endif + +const char * +vp_file_open(char *args) +{ + vp_stack_t stack; + char *path; + char *flags; + int mode; /* used when flags have O_CREAT */ + int oflag = 0; + int fd; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &path)); + VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &flags)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &mode)); + + oflag = str_to_oflag(flags); + if (oflag == -1) + return vp_stack_return_error(&_result, "open flag error."); + + fd = open(path, oflag, mode); + if (fd == -1) + return vp_stack_return_error(&_result, "open() error: %s", + strerror(errno)); + vp_stack_push_num(&_result, "%d", fd); + return vp_stack_return(&_result); +} + +const char * +vp_file_close(char *args) +{ + vp_stack_t stack; + int fd; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &fd)); + + if (close(fd) == -1) + return vp_stack_return_error(&_result, "close() error: %s", + strerror(errno)); + return NULL; +} + +const char * +vp_file_read(char *args) +{ +#ifdef __linux__ +# define VP_POLLIN (POLLIN | POLLHUP) +#else +# define VP_POLLIN (POLLIN) +#endif + vp_stack_t stack; + int fd; + int cnt; + int timeout; + int n; + char *buf; + char *eof; + struct pollfd pfd = {0, POLLIN, 0}; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &fd)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &cnt)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &timeout)); + + if (cnt < 0 || VP_READ_BUFSIZE < cnt) { + cnt = VP_READ_BUFSIZE; + } + + /* initialize buffer */ + buf = _result.top = _result.buf; + *(buf++) = VP_EOV; + *(eof = buf++) = '0'; + + pfd.fd = fd; + while (cnt > 0) { + n = poll(&pfd, 1, timeout); + if (n == -1) { + /* eof or error */ + *eof = '1'; + break; + } else if (n == 0) { + /* timeout */ + break; + } + if (pfd.revents & VP_POLLIN) { + n = read(fd, buf, cnt); + if (n == -1) { + if (pfd.revents & POLLHUP) { + /* eof */ + *eof = '1'; + break; + } + return vp_stack_return_error(&_result, "read() error: %s", + strerror(errno)); + } else if (n == 0) { + /* eof */ + *eof = '1'; + break; + } + /* decrease stack top for concatenate. */ + cnt -= n; + buf += n; + /* try read more bytes without waiting */ + timeout = 0; + continue; + } else if (pfd.revents & (POLLERR | POLLHUP)) { + /* eof or error */ + *eof = '1'; + break; + } else if (pfd.revents & POLLNVAL) { + return vp_stack_return_error(&_result, "poll() POLLNVAL: %d", + pfd.revents); + } + /* DO NOT REACH HERE */ + return vp_stack_return_error(&_result, "poll() unknown status: %d", + pfd.revents); + } + _result.top = buf; + return vp_stack_return(&_result); +#undef VP_POLLIN +} + +const char * +vp_file_write(char *args) +{ + vp_stack_t stack; + int fd; + char *buf; + size_t size; + int timeout; + size_t nleft; + int n; + struct pollfd pfd = {0, POLLOUT, 0}; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &fd)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &timeout)); + + buf = stack.buf; + size = (stack.top - 1) - stack.buf; + buf[size] = 0; + + pfd.fd = fd; + nleft = 0; + while (nleft < size) { + n = poll(&pfd, 1, timeout); + if (n == -1) { + return vp_stack_return_error(&_result, "poll() error: %s", + strerror(errno)); + } else if (n == 0) { + /* timeout */ + break; + } + if (pfd.revents & POLLOUT) { + n = write(fd, buf + nleft, size - nleft); + if (n == -1) { + return vp_stack_return_error(&_result, "write() error: %s", + strerror(errno)); + } + nleft += n; + /* try write more bytes without waiting */ + timeout = 0; + continue; + } else if (pfd.revents & (POLLERR | POLLHUP)) { + /* eof or error */ + break; + } else if (pfd.revents & POLLNVAL) { + return vp_stack_return_error(&_result, "poll() POLLNVAL: %d", + pfd.revents); + } + /* DO NOT REACH HERE */ + return vp_stack_return_error(&_result, "poll() unknown status: %s", + pfd.revents); + } + vp_stack_push_num(&_result, "%zu", nleft); + return vp_stack_return(&_result); +} + +static void +close_allfd(int fds[3][2]) +{ + int i; + + for (i = 0; i < 6; ++i) { + int fd = fds[i / 2][i % 2]; + + if (fd > 0) { + (void)close(fd); + } + } +} + +const char * +vp_pipe_open(char *args) +{ +#define VP_GOTO_ERROR(_fmt) do { errfmt = (_fmt); goto error; } while(0) + vp_stack_t stack; + int npipe, hstdin, hstderr, hstdout; + int argc; + int fd[3][2] = {{0}}; + pid_t pid; + int dummy; + char *errfmt; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &npipe)); + if (npipe != 2 && npipe != 3) + return vp_stack_return_error(&_result, "npipe range error. wrong pipes."); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &hstdin)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &hstdout)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &hstderr)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &argc)); + + if (hstdin > 0) { + fd[0][0] = hstdin; + fd[0][1] = 0; + } else { + if (pipe(fd[0]) < 0) { + VP_GOTO_ERROR("pipe() error: %s"); + } + } + if (hstdout > 0) { + fd[1][1] = hstdout; + fd[1][0] = 0; + } else { + if (pipe(fd[1]) < 0) { + VP_GOTO_ERROR("pipe() error: %s"); + } + } + if (hstderr > 0) { + fd[2][1] = hstderr; + fd[2][0] = 0; + } else if (npipe == 3 && hstderr == 0) { + if (pipe(fd[2]) < 0) { + VP_GOTO_ERROR("pipe() error: %s"); + } + } + + pid = fork(); + if (pid < 0) { + VP_GOTO_ERROR("fork() error: %s"); + } else if (pid == 0) { + /* child */ + char **argv; + int i; + + /* Set process group. */ + setpgid(0, 0); + + if (fd[0][1] > 0) { + close(fd[0][1]); + } + if (fd[1][0] > 0) { + close(fd[1][0]); + } + if (fd[2][0] > 0) { + close(fd[2][0]); + } + if (fd[0][0] > 0) { + if (dup2(fd[0][0], STDIN_FILENO) != STDIN_FILENO) { + goto child_error; + } + close(fd[0][0]); + } + if (fd[1][1] > 0) { + if (dup2(fd[1][1], STDOUT_FILENO) != STDOUT_FILENO) { + goto child_error; + } + close(fd[1][1]); + } + if (fd[2][1] > 0) { + if (dup2(fd[2][1], STDERR_FILENO) != STDERR_FILENO) { + goto child_error; + } + close(fd[2][1]); + } else if (npipe == 2) { + if (dup2(STDOUT_FILENO, STDERR_FILENO) != STDERR_FILENO) { + goto child_error; + } + } + + { +#ifndef TIOCNOTTY + setsid(); +#else + /* Ignore tty. */ + char name[L_ctermid]; + if (ctermid(name)[0] != '\0') { + int tfd; + if ((tfd = open(name, O_RDONLY)) != -1) { + ioctl(tfd, TIOCNOTTY, NULL); + close(tfd); + } + } +#endif + } + + argv = malloc(sizeof(char *) * (argc+1)); + if (argv == NULL) { + goto child_error; + } + for (i = 0; i < argc; ++i) { + if (vp_stack_pop_str(&stack, &(argv[i]))) { + free(argv); + goto child_error; + } + } + argv[argc] = NULL; + + execv(argv[0], argv); + /* error */ + goto child_error; + } else { + /* parent */ + if (fd[0][0] > 0) { + close(fd[0][0]); + } + if (fd[1][1] > 0) { + close(fd[1][1]); + } + if (fd[2][1] > 0) { + close(fd[2][1]); + } + + vp_stack_push_num(&_result, "%d", pid); + vp_stack_push_num(&_result, "%d", fd[0][1]); + vp_stack_push_num(&_result, "%d", fd[1][0]); + if (npipe == 3) { + vp_stack_push_num(&_result, "%d", fd[2][0]); + } + return vp_stack_return(&_result); + } + /* DO NOT REACH HERE */ + return NULL; + + /* error */ +error: + close_allfd(fd); + return vp_stack_return_error(&_result, errfmt, strerror(errno)); + +child_error: + dummy = write(STDOUT_FILENO, strerror(errno), strlen(strerror(errno))); + _exit(EXIT_FAILURE); +#undef VP_GOTO_ERROR +} + +const char * +vp_pipe_close(char *args) +{ + return vp_file_close(args); +} + +const char * +vp_pipe_read(char *args) +{ + return vp_file_read(args); +} + +const char * +vp_pipe_write(char *args) +{ + return vp_file_write(args); +} + +const char * +vp_pty_open(char *args) +{ +#define VP_GOTO_ERROR(_fmt) do { errfmt = (_fmt); goto error; } while(0) + vp_stack_t stack; + int argc; + int fd[3][2] = {{0}}; + pid_t pid; + struct winsize ws = {0, 0, 0, 0}; + int dummy; + int hstdin, hstderr, hstdout; + int fdm; + int npipe; + char *errfmt; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &npipe)); + if (npipe != 2 && npipe != 3) + return vp_stack_return_error(&_result, "npipe range error. wrong pipes."); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%hu", &(ws.ws_col))); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%hu", &(ws.ws_row))); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &hstdin)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &hstdout)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &hstderr)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &argc)); + + /* Set pipe */ + if (hstdin > 0) { + fd[0][0] = hstdin; + fd[0][1] = 0; + } + if (hstdout > 1) { + fd[1][1] = hstdout; + fd[1][0] = 0; + } else if (hstdout == 1) { + if (pipe(fd[1]) < 0) { + VP_GOTO_ERROR("pipe() error: %s"); + } + } + if (hstderr > 1) { + fd[2][1] = hstderr; + fd[2][0] = 0; + } else if (npipe == 3) { + if (hstderr == 1){ + if (pipe(fd[2]) < 0) { + VP_GOTO_ERROR("pipe() error: %s"); + } + } else if (hstderr == 0) { + if (openpty(&fd[2][0], &fd[2][1], NULL, NULL, &ws) < 0) { + VP_GOTO_ERROR("openpty() error: %s"); + } + VP_SET_NONBLOCK_IF_NEEDED(fd[2][0]); + } + } + + pid = forkpty(&fdm, NULL, NULL, &ws); + if (pid < 0) { + VP_GOTO_ERROR("fork() error: %s"); + } else if (pid == 0) { + /* child */ + char **argv; + int i; + + /* Close pipe */ + if (fd[1][0] > 0) { + close(fd[1][0]); + } + if (fd[2][0] > 0) { + close(fd[2][0]); + } + + if (fd[0][0] > 0) { + if (dup2(fd[0][0], STDIN_FILENO) != STDIN_FILENO) { + goto child_error; + } + close(fd[0][0]); + } + + if (fd[1][1] > 0) { + if (dup2(fd[1][1], STDOUT_FILENO) != STDOUT_FILENO) { + goto child_error; + } + close(fd[1][1]); + } + + if (fd[2][1] > 0) { + if (dup2(fd[2][1], STDERR_FILENO) != STDERR_FILENO) { + goto child_error; + } + close(fd[2][1]); + } + + argv = malloc(sizeof(char *) * (argc+1)); + if (argv == NULL) { + goto child_error; + } + for (i = 0; i < argc; ++i) { + if (vp_stack_pop_str(&stack, &(argv[i]))) { + free(argv); + goto child_error; + } + } + argv[argc] = NULL; + + execv(argv[0], argv); + /* error */ + goto child_error; + } else { + /* parent */ + if (fd[1][1] > 0) { + close(fd[1][1]); + } + if (fd[2][1] > 0) { + close(fd[2][1]); + } + + if (hstdin == 0) { + fd[0][1] = fdm; + } + if (hstdout == 0) { + fd[1][0] = hstdin == 0 ? dup(fdm) : fdm; + VP_SET_NONBLOCK_IF_NEEDED(fd[1][0]); + } + + vp_stack_push_num(&_result, "%d", pid); + vp_stack_push_num(&_result, "%d", fd[0][1]); + vp_stack_push_num(&_result, "%d", fd[1][0]); + if (npipe == 3) { + vp_stack_push_num(&_result, "%d", fd[2][0]); + } + return vp_stack_return(&_result); + } + /* DO NOT REACH HERE */ + return NULL; + + /* error */ +error: + close_allfd(fd); + return vp_stack_return_error(&_result, errfmt, strerror(errno)); + +child_error: + dummy = write(STDOUT_FILENO, strerror(errno), strlen(strerror(errno))); + _exit(EXIT_FAILURE); +#undef VP_GOTO_ERROR +} + +const char * +vp_pty_close(char *args) +{ + return vp_file_close(args); +} + +const char * +vp_pty_read(char *args) +{ + return vp_file_read(args); +} + +const char * +vp_pty_write(char *args) +{ + return vp_file_write(args); +} + +const char * +vp_pty_get_winsize(char *args) +{ + vp_stack_t stack; + int fd; + struct winsize ws = {0, 0, 0, 0}; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &fd)); + + if (ioctl(fd, TIOCGWINSZ, &ws) < 0) + return vp_stack_return_error(&_result, "ioctl() error: %s", + strerror(errno)); + vp_stack_push_num(&_result, "%hu", ws.ws_col); + vp_stack_push_num(&_result, "%hu", ws.ws_row); + return vp_stack_return(&_result); +} +const char * +vp_pty_set_winsize(char *args) +{ + vp_stack_t stack; + int fd; + struct winsize ws = {0, 0, 0, 0}; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &fd)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%hu", &(ws.ws_col))); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%hu", &(ws.ws_row))); + + if (ioctl(fd, TIOCSWINSZ, &ws) < 0) + return vp_stack_return_error(&_result, "ioctl() error: %s", + strerror(errno)); + return NULL; +} + +const char * +vp_kill(char *args) +{ + vp_stack_t stack; + pid_t pid, pgid; + int sig; + int ret; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &pid)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &sig)); + + ret = kill(pid, sig); + if (ret < 0) + return vp_stack_return_error(&_result, "kill() error: %s", + strerror(errno)); + + if (sig != 0) { + /* Kill by the process group. */ + pgid = getpgid(pid); + if (pid == pgid) { + kill(-pgid, sig); + } + } + + vp_stack_push_num(&_result, "%d", ret); + return vp_stack_return(&_result); +} + +const char * +vp_waitpid(char *args) +{ + vp_stack_t stack; + pid_t pid, pgid; + pid_t n; + int status; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &pid)); + + n = waitpid(pid, &status, WNOHANG | WUNTRACED); + if (n == -1) + return vp_stack_return_error(&_result, "waitpid() error: %s", + strerror(errno)); + if (n == 0 || WIFCONTINUED(status)) { + vp_stack_push_str(&_result, "run"); + vp_stack_push_num(&_result, "%d", 0); + } else if (WIFEXITED(status)) { + /* Kill by the process group. */ + pgid = getpgid(pid); + if (pgid > 0) { + kill(-pgid, 15); + } + + vp_stack_push_str(&_result, "exit"); + vp_stack_push_num(&_result, "%d", WEXITSTATUS(status)); + } else if (WIFSIGNALED(status)) { + vp_stack_push_str(&_result, "signal"); + vp_stack_push_num(&_result, "%d", WTERMSIG(status)); + } else if (WIFSTOPPED(status)) { + vp_stack_push_str(&_result, "stop"); + vp_stack_push_num(&_result, "%d", WSTOPSIG(status)); + } else { + return vp_stack_return_error(&_result, + "waitpid() unknown status: status=%d", status); + } + + return vp_stack_return(&_result); +} + +/* + * This is based on socket.diff.gz written by Yasuhiro Matsumoto. + * see: http://marc.theaimsgroup.com/?l=vim-dev&m=105289857008664&w=2 + */ +const char * +vp_socket_open(char *args) +{ + vp_stack_t stack; + char *host; + char *port; + char *p; + int n; + unsigned short nport; + int sock; + struct sockaddr_in sockaddr; + struct hostent *hostent; + struct servent *servent; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &host)); + VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &port)); + + n = strtol(port, &p, 10); + if (p == port + strlen(port)) { + nport = htons(n); + } else { + servent = getservbyname(port, NULL); + if (servent == NULL) + return vp_stack_return_error(&_result, "getservbyname() error: %s", + port); + nport = servent->s_port; + } + + sock = socket(PF_INET, SOCK_STREAM, 0); + hostent = gethostbyname(host); + sockaddr.sin_family = AF_INET; + sockaddr.sin_port = nport; + sockaddr.sin_addr = *((struct in_addr*)*hostent->h_addr_list); + + if (connect(sock, (struct sockaddr*)&sockaddr, sizeof(struct sockaddr_in)) + == -1) + return vp_stack_return_error(&_result, "connect() error: %s", + strerror(errno)); + + vp_stack_push_num(&_result, "%d", sock); + return vp_stack_return(&_result); +} + +const char * +vp_socket_close(char *args) +{ + return vp_file_close(args); +} + +const char * +vp_socket_read(char *args) +{ + return vp_file_read(args); +} + +const char * +vp_socket_write(char *args) +{ + return vp_file_write(args); +} + +/* + * Added by Richard Emberson + * Check to see if a host exists. + */ +const char * +vp_host_exists(char *args) +{ + vp_stack_t stack; + char *host; + struct hostent *hostent; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &host)); + + hostent = gethostbyname(host); + if (hostent) { + vp_stack_push_num(&_result, "%d", 1); + } else { + vp_stack_push_num(&_result, "%d", 0); + } + + return vp_stack_return(&_result); +} + +const char * +vp_readdir(char *args) +{ + vp_stack_t stack; + char *dirname; + char buf[1024]; + + DIR *dir; + struct dirent *dp; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &dirname)); + + if ((dir=opendir(dirname)) == NULL) { + return vp_stack_return_error(&_result, "opendir() error: %s", + strerror(errno)); + } + + if (strcmp(dirname, "/") == 0) { + dirname[0] = '\0'; + } + + for (dp = readdir(dir); dp != NULL; dp = readdir(dir)) { + if (strcmp(dp->d_name, ".") && strcmp(dp->d_name, "..")) { + snprintf(buf, sizeof(buf), "%s/%s", dirname, dp->d_name); + vp_stack_push_str(&_result, buf); + } + } + closedir(dir); + + return vp_stack_return(&_result); +} + +const char * +vp_decode(char *args) +{ + vp_stack_t stack; + size_t len; + char *str; + char *p, *q; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &str)); + + len = strlen(str); + if (len % 2 != 0) { + return "vp_decode: invalid data length"; + } + + VP_RETURN_IF_FAIL(vp_stack_reserve(&_result, + (_result.top - _result.buf) + (len / 2) + sizeof(VP_EOV_STR))); + + for (p = str, q = _result.top; p < str + len; ) { + char hb, lb; + + hb = CHR2XD[(int)*(p++)]; + lb = CHR2XD[(int)*(p++)]; + if (hb != (char)-1 && lb != (char)-1) { + *(q++) = (hb << 4) | lb; + } + } + *(q++) = VP_EOV; + *q = '\0'; + _result.top = q; + + return vp_stack_return(&_result); +} + +const char * +vp_get_signals(char *args) +{ +#define VP_STACK_PUSH_SIGNAME(_signame) \ + vp_stack_push_num(&_result, #_signame ":%d", (_signame)) +#define VP_STACK_PUSH_ALTSIGNAME(_signame, _altsig) \ + vp_stack_push_num(&_result, #_signame ":%d", (_altsig)) + +#ifdef SIGABRT + VP_STACK_PUSH_SIGNAME(SIGABRT); +#else +#error "SIGABRT is undefined, contrary to ISO C standard." +#endif +#ifdef SIGFPE + VP_STACK_PUSH_SIGNAME(SIGFPE); +#else +#error "SIGFPE is undefined, contrary to ISO C standard." +#endif +#ifdef SIGILL + VP_STACK_PUSH_SIGNAME(SIGILL); +#else +#error "SIGILL is undefined, contrary to ISO C standard." +#endif +#ifdef SIGINT + VP_STACK_PUSH_SIGNAME(SIGINT); +#else +#error "SIGINT is undefined, contrary to ISO C standard." +#endif +#ifdef SIGSEGV + VP_STACK_PUSH_SIGNAME(SIGSEGV); +#else +#error "SIGSEGV is undefined, contrary to ISO C standard." +#endif +#ifdef SIGTERM + VP_STACK_PUSH_SIGNAME(SIGTERM); +#else +#error "SIGTERM is undefined, contrary to ISO C standard." +#endif +#ifdef SIGALRM + VP_STACK_PUSH_SIGNAME(SIGALRM); +#else + VP_STACK_PUSH_ALTSIGNAME(SIGALRM, SIGTERM); +#endif +#ifdef SIGBUS + VP_STACK_PUSH_SIGNAME(SIGBUS); +#else + VP_STACK_PUSH_ALTSIGNAME(SIGBUS, SIGABRT); +#endif +#ifdef SIGCHLD + VP_STACK_PUSH_SIGNAME(SIGCHLD); +#else + VP_STACK_PUSH_ALTSIGNAME(SIGCHLD, 0); +#endif +#ifdef SIGCONT + VP_STACK_PUSH_SIGNAME(SIGCONT); +#else + VP_STACK_PUSH_ALTSIGNAME(SIGCONT, 0); +#endif +#ifdef SIGHUP + VP_STACK_PUSH_SIGNAME(SIGHUP); +#else + VP_STACK_PUSH_ALTSIGNAME(SIGHUP, SIGTERM); +#endif +#ifdef SIGKILL + VP_STACK_PUSH_SIGNAME(SIGKILL); +#else + VP_STACK_PUSH_ALTSIGNAME(SIGKILL, SIGTERM); +#endif +#ifdef SIGPIPE + VP_STACK_PUSH_SIGNAME(SIGPIPE); +#else + VP_STACK_PUSH_ALTSIGNAME(SIGPIPE, SIGTERM); +#endif +#ifdef SIGQUIT + VP_STACK_PUSH_SIGNAME(SIGQUIT); +#else + VP_STACK_PUSH_ALTSIGNAME(SIGQUIT, SIGTERM); +#endif +#ifdef SIGSTOP + VP_STACK_PUSH_SIGNAME(SIGSTOP); +#else + VP_STACK_PUSH_ALTSIGNAME(SIGSTOP, 0); +#endif +#ifdef SIGTSTP + VP_STACK_PUSH_SIGNAME(SIGTSTP); +#else + VP_STACK_PUSH_ALTSIGNAME(SIGTSTP, 0); +#endif +#ifdef SIGTTIN + VP_STACK_PUSH_SIGNAME(SIGTTIN); +#else + VP_STACK_PUSH_ALTSIGNAME(SIGTTIN, 0); +#endif +#ifdef SIGTTOU + VP_STACK_PUSH_SIGNAME(SIGTTOU); +#else + VP_STACK_PUSH_ALTSIGNAME(SIGTTOU, 0); +#endif +#ifdef SIGUSR1 + VP_STACK_PUSH_SIGNAME(SIGUSR1); +#else + VP_STACK_PUSH_ALTSIGNAME(SIGUSR1, SIGTERM); +#endif +#ifdef SIGUSR2 + VP_STACK_PUSH_SIGNAME(SIGUSR2); +#else + VP_STACK_PUSH_ALTSIGNAME(SIGUSR2, SIGTERM); +#endif +#ifdef SIGPOLL + VP_STACK_PUSH_SIGNAME(SIGPOLL); +#else + VP_STACK_PUSH_ALTSIGNAME(SIGPOLL, SIGTERM); +#endif +#ifdef SIGPROF + VP_STACK_PUSH_SIGNAME(SIGPROF); +#else + VP_STACK_PUSH_ALTSIGNAME(SIGPROF, SIGTERM); +#endif +#ifdef SIGSYS + VP_STACK_PUSH_SIGNAME(SIGSYS); +#else + VP_STACK_PUSH_ALTSIGNAME(SIGSYS, SIGABRT); +#endif +#ifdef SIGTRAP + VP_STACK_PUSH_SIGNAME(SIGTRAP); +#else + VP_STACK_PUSH_ALTSIGNAME(SIGTRAP, SIGABRT); +#endif +#ifdef SIGURG + VP_STACK_PUSH_SIGNAME(SIGURG); +#else + VP_STACK_PUSH_ALTSIGNAME(SIGURG, 0); +#endif +#ifdef SIGVTALRM + VP_STACK_PUSH_SIGNAME(SIGVTALRM); +#else + VP_STACK_PUSH_ALTSIGNAME(SIGVTALRM, SIGTERM); +#endif +#ifdef SIGXCPU + VP_STACK_PUSH_SIGNAME(SIGXCPU); +#else + VP_STACK_PUSH_ALTSIGNAME(SIGXCPU, SIGABRT); +#endif +#ifdef SIGXFSZ + VP_STACK_PUSH_SIGNAME(SIGXFSZ); +#else + VP_STACK_PUSH_ALTSIGNAME(SIGXFSZ, SIGABRT); +#endif +#ifdef SIGEMT + VP_STACK_PUSH_SIGNAME(SIGEMT); +#else + VP_STACK_PUSH_ALTSIGNAME(SIGEMT, SIGTERM); +#endif +#ifdef SIGWINCH + VP_STACK_PUSH_SIGNAME(SIGWINCH); +#else + VP_STACK_PUSH_ALTSIGNAME(SIGWINCH, 0); +#endif + return vp_stack_return(&_result); + +#undef VP_STACK_PUSH_SIGNAME +#undef VP_STACK_PUSH_ALTSIGNAME +} + +/* + * vim:set sw=4 sts=4 et: + */ === added file 'vim/bundle/vimproc.vim/autoload/proc_w32.c' --- vim/bundle/vimproc.vim/autoload/proc_w32.c 1970-01-01 00:00:00 +0000 +++ vim/bundle/vimproc.vim/autoload/proc_w32.c 2015-08-25 11:01:00 +0000 @@ -0,0 +1,1266 @@ +/*----------------------------------------------------------------------------- + * Copyright (c) 2006 Yukihiro Nakadaira - original version(vimproc) + * Copyright (c) 2009 Shougo Matsushita - modified version + * + * License: MIT license + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + *---------------------------------------------------------------------------*/ + +#include +#include +#include +#include +#include +#include +#include +#include + +/* For GetConsoleWindow() for Windows 2000 or later. */ +#ifndef WINVER +#define WINVER 0x0500 +#endif +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0500 +#endif + +#include +#include +#include +#if 0 +# include +#endif +#define _POSIX_ +#include +#include + +const int debug = 0; + +#ifdef _MSC_VER +# define EXPORT __declspec(dllexport) +#else +# define EXPORT +#endif + +#ifdef _MSC_VER +# if _MSC_VER < 1900 +# define snprintf _snprintf +# endif +# if _MSC_VER < 1400 +# define vsnprintf _vsnprintf +# endif +#endif + +#include "vimstack.c" + +#define lengthof(arr) (sizeof(arr) / sizeof((arr)[0])) + +/* API */ +EXPORT const char *vp_dlopen(char *args); /* [handle] (path) */ +EXPORT const char *vp_dlclose(char *args); /* [] (handle) */ +EXPORT const char *vp_dlversion(char *args); /* [version] () */ + +EXPORT const char *vp_file_open(char *args); /* [fd] (path, flags, mode) */ +EXPORT const char *vp_file_close(char *args); /* [] (fd) */ +EXPORT const char *vp_file_read(char *args); /* [hd, eof] (fd, cnt, timeout) */ +EXPORT const char *vp_file_write(char *args); /* [nleft] (fd, timeout, hd) */ + +EXPORT const char *vp_pipe_open(char *args); /* [pid, [fd] * npipe] + (npipe, argc, [argv]) */ +EXPORT const char *vp_pipe_close(char *args); /* [] (fd) */ +EXPORT const char *vp_pipe_read(char *args); /* [hd, eof] (fd, cnt, timeout) */ +EXPORT const char *vp_pipe_write(char *args); /* [nleft] (fd, timeout, hd) */ + +EXPORT const char *vp_pty_open(char *args); /* [pid, fd, ttyname] + (width, height, argc, [argv]) */ +EXPORT const char *vp_pty_close(char *args); /* [] (fd) */ +EXPORT const char *vp_pty_read(char *args); /* [hd, eof] (fd, cnt, timeout) */ +EXPORT const char *vp_pty_write(char *args); /* [nleft] (fd, timeout, hd) */ +EXPORT const char *vp_pty_get_winsize(char *args); /* [width, height] (fd) */ +EXPORT const char *vp_pty_set_winsize(char *args); /* [] (fd, width, height) */ + +EXPORT const char *vp_kill(char *args); /* [] (pid, sig) */ +EXPORT const char *vp_waitpid(char *args); /* [cond, status] (pid) */ +EXPORT const char *vp_close_handle(char *args); /* [] (fd) */ + +EXPORT const char *vp_socket_open(char *args); /* [socket] (host, port) */ +EXPORT const char *vp_socket_close(char *args);/* [] (socket) */ +EXPORT const char *vp_socket_read(char *args); /* [hd, eof] (socket, cnt, timeout) */ +EXPORT const char *vp_socket_write(char *args);/* [nleft] (socket, hd, timeout) */ + +EXPORT const char *vp_host_exists(char *args); /* [int] (host) */ + +EXPORT const char *vp_decode(char *args); /* [decoded_str] (encode_str) */ + +EXPORT const char *vp_open(char *args); /* [] (path) */ +EXPORT const char *vp_readdir(char *args); /* [files] (dirname) */ + + +EXPORT const char * vp_delete_trash(char *args); /* [int] (filename) */ + +EXPORT const char *vp_get_signals(char *args); /* [signals] () */ + +static BOOL ExitRemoteProcess(HANDLE hProcess, UINT_PTR uExitCode); + +/* --- */ + +#define VP_BUFSIZE (65536) +#define VP_READ_BUFSIZE (VP_BUFSIZE - 4) + +static LPWSTR +utf8_to_utf16(const char *str) +{ + LPWSTR buf; + int len; + + len = MultiByteToWideChar(CP_UTF8, 0, str, -1, NULL, 0); + if (len == 0) + return NULL; + buf = malloc(sizeof(WCHAR) * (len + 1)); + if (buf == NULL) { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return NULL; + } + MultiByteToWideChar(CP_UTF8, 0, str, -1, buf, len); + buf[len] = 0; + return buf; +} + +static char * +utf16_to_utf8(LPCWSTR wstr) +{ + char *buf; + int len; + + len = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, NULL, 0, NULL, NULL); + if (len == 0) + return NULL; + buf = malloc(sizeof(char) * (len + 1)); + if (buf == NULL) { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return NULL; + } + WideCharToMultiByte(CP_UTF8, 0, wstr, -1, buf, len, NULL, NULL); + buf[len] = 0; + return buf; +} + +static const char * +lasterror() +{ + static char lpMsgBuf[512]; + WCHAR buf[512]; + char *p; + + FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, GetLastError(), 0, + buf, lengthof(buf), NULL); + p = utf16_to_utf8(buf); + if (p == NULL) + return NULL; + lstrcpyn(lpMsgBuf, p, lengthof(lpMsgBuf)); + free(p); + return lpMsgBuf; +} + +#define open _open +#define close _close +#define read _read +#define write _write +#define lseek _lseek + +static vp_stack_t _result = VP_STACK_NULL; + +const char * +vp_dlopen(char *args) +{ + vp_stack_t stack; + char *path; + LPWSTR pathw; + HINSTANCE handle; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &path)); + VP_RETURN_IF_FAIL(vp_stack_reserve(&_result, VP_BUFSIZE)); + + pathw = utf8_to_utf16(path); + if (pathw == NULL) + return lasterror(); + handle = LoadLibraryW(pathw); + free(pathw); + if (handle == NULL) + return lasterror(); + vp_stack_push_num(&_result, "%p", handle); + return vp_stack_return(&_result); +} + +const char * +vp_dlclose(char *args) +{ + vp_stack_t stack; + HINSTANCE handle; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%p", &handle)); + + if (!FreeLibrary(handle)) + return lasterror(); + vp_stack_free(&_result); + return NULL; +} + +const char * +vp_dlversion(char *args) +{ + vp_stack_push_num(&_result, "%2d%02d", 8, 0); + return vp_stack_return(&_result); +} + +static int +str_to_oflag(const char *flags) +{ + int oflag = 0; + + if (strchr("rwa", flags[0])) { + if (strchr(flags, '+')) { + oflag = _O_RDWR; + } else { + oflag = flags[0] == 'r' ? _O_RDONLY : _O_WRONLY; + } + if (flags[0] == 'w' || flags[0] == 'a') { + oflag |= _O_CREAT | (flags[0] == 'w' ? _O_TRUNC : _O_APPEND); + } +#define VP_CHR_TO_OFLAG(_c, _f) do { \ + if (strchr(flags, (_c))) { oflag |= _ ## _f; } \ +} while (0) + +#ifdef _O_EXCL + VP_CHR_TO_OFLAG('x', O_EXCL); +#endif +#ifdef _O_CLOEXEC + VP_CHR_TO_OFLAG('e', O_CLOEXEC); +#endif +#ifdef _O_BINARY + VP_CHR_TO_OFLAG('b', O_BINARY); +#endif +#ifdef _O_TEXT + VP_CHR_TO_OFLAG('t', O_TEXT); +#endif +#ifdef _O_SEQUENTIAL + VP_CHR_TO_OFLAG('S', O_SEQUENTIAL); +#endif +#ifdef _O_RANDOM + VP_CHR_TO_OFLAG('R', O_RANDOM); +#endif + +#undef VP_CHR_TO_OFLAG + } else { + if (strstr(flags, "O_RDONLY")) { + oflag = _O_RDONLY; + } else if (strstr(flags, "O_WRONLY")) { + oflag = _O_WRONLY; + } else if (strstr(flags, "O_RDWR")) { + oflag = _O_RDWR; + } else { + return -1; + } +#define VP_STR_TO_OFLAG(_f) do { \ + if (strstr(flags, #_f)) { oflag |= _ ## _f; } \ +} while (0) + + VP_STR_TO_OFLAG(O_APPEND); + VP_STR_TO_OFLAG(O_CREAT); + VP_STR_TO_OFLAG(O_TRUNC); +#ifdef _O_EXCL + VP_STR_TO_OFLAG(O_EXCL); +#endif +#ifdef _O_NONBLOCK + VP_STR_TO_OFLAG(O_NONBLOCK); +#endif +#ifdef _O_SHLOCK + VP_STR_TO_OFLAG(O_SHLOCK); +#endif +#ifdef _O_EXLOCK + VP_STR_TO_OFLAG(O_EXLOCK); +#endif +#ifdef _O_DIRECT + VP_STR_TO_OFLAG(O_DIRECT); +#endif +#ifdef _O_FSYNC + VP_STR_TO_OFLAG(O_FSYNC); +#endif +#ifdef _O_NOFOLLOW + VP_STR_TO_OFLAG(O_NOFOLLOW); +#endif +#ifdef _O_TEMPORARY + VP_STR_TO_OFLAG(O_TEMPORARY); +#endif +#ifdef _O_RANDOM + VP_STR_TO_OFLAG(O_RANDOM); +#endif +#ifdef _O_SEQUENTIAL + VP_STR_TO_OFLAG(O_SEQUENTIAL); +#endif +#ifdef _O_BINARY + VP_STR_TO_OFLAG(O_BINARY); +#endif +#ifdef _O_TEXT + VP_STR_TO_OFLAG(O_TEXT); +#endif +#ifdef _O_INHERIT + VP_STR_TO_OFLAG(O_INHERIT); +#endif +#ifdef _O_SHORT_LIVED + VP_STR_TO_OFLAG(O_SHORT_LIVED); +#endif + +#undef VP_STR_TO_OFLAG + } + + return oflag; +} + +const char * +vp_file_open(char *args) +{ + vp_stack_t stack; + char *path; + LPWSTR pathw; + char *flags; + int mode; /* used when flags have O_CREAT */ + int oflag = 0; + int fd; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &path)); + VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &flags)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &mode)); + + oflag = str_to_oflag(flags); + if (oflag == -1) + return vp_stack_return_error(&_result, "open flag error."); + + pathw = utf8_to_utf16(path); + if (pathw == NULL) + return lasterror(); + + fd = _wopen(pathw, oflag, mode); + free(pathw); + if (fd == -1) { + return vp_stack_return_error(&_result, "open() error: %s", + strerror(errno)); + } + if (oflag & O_APPEND) { + /* Note: Windows7 ignores O_APPEND flag. why? */ + lseek(fd, 0, SEEK_END); + } + vp_stack_push_num(&_result, "%d", fd); + return vp_stack_return(&_result); +} + +const char * +vp_file_close(char *args) +{ + vp_stack_t stack; + int fd; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &fd)); + + if (close(fd) == -1) + return vp_stack_return_error(&_result, "close() error: %s", + strerror(errno)); + return NULL; +} + +const char * +vp_file_read(char *args) +{ + vp_stack_t stack; + int fd; + int cnt; + int timeout; + DWORD ret; + int n; + char *buf; + char *eof; + HANDLE hFile; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &fd)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &cnt)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &timeout)); + + if (cnt < 0 || VP_READ_BUFSIZE < cnt) { + cnt = VP_READ_BUFSIZE; + } + + /* initialize buffer */ + buf = _result.top = _result.buf; + *(buf++) = VP_EOV; + *(eof = buf++) = '0'; + + hFile = (HANDLE)_get_osfhandle(fd); + while (cnt > 0) { + ret = WaitForSingleObject(hFile, timeout); + if (ret == WAIT_FAILED) { + return vp_stack_return_error(&_result, "WaitForSingleObject() error: %s", + lasterror()); + } else if (ret == WAIT_TIMEOUT) { + /* timeout */ + break; + } + n = read(fd, buf, cnt); + if (n == -1) { + return vp_stack_return_error(&_result, "read() error: %s", + strerror(errno)); + } else if (n == 0) { + /* eof */ + *eof = '1'; + break; + } + /* decrease stack top for concatenate. */ + cnt -= n; + buf += n; + /* try read more bytes without waiting */ + timeout = 0; + } + _result.top = buf; + return vp_stack_return(&_result); +} + +const char * +vp_file_write(char *args) +{ + vp_stack_t stack; + int fd; + char *buf; + size_t size; + int timeout; + size_t nleft; + DWORD ret; + int n; + HANDLE hFile; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &fd)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &timeout)); + + buf = stack.buf; + size = (stack.top - 1) - stack.buf; + buf[size] = 0; + + nleft = 0; + hFile = (HANDLE)_get_osfhandle(fd); + while (nleft < size) { + ret = WaitForSingleObject(hFile, timeout); + if (ret == WAIT_FAILED) { + return vp_stack_return_error(&_result, "WaitForSingleObject() error: %s", + lasterror()); + } else if (ret == WAIT_TIMEOUT) { + /* timeout */ + break; + } + n = write(fd, buf + nleft, (unsigned int)(size - nleft)); + if (n == -1) { + return vp_stack_return_error(&_result, "write() error: %s", + strerror(errno)); + } + nleft += n; + /* try write more bytes without waiting */ + timeout = 0; + } + vp_stack_push_num(&_result, "%u", nleft); + return vp_stack_return(&_result); +} + +/* + * http://support.microsoft.com/kb/190351/ + */ +const char * +vp_pipe_open(char *args) +{ +#define VP_GOTO_ERROR(_fmt) do { errfmt = (_fmt); goto error; } while(0) +#define VP_DUP_HANDLE(hIn, phOut, inherit) \ + if (!DuplicateHandle(GetCurrentProcess(), hIn, \ + GetCurrentProcess(), phOut, \ + 0, inherit, DUPLICATE_SAME_ACCESS)) { \ + VP_GOTO_ERROR("DuplicateHandle() error: %s"); \ + } + vp_stack_t stack; + int npipe, hstdin, hstderr, hstdout; + char *errfmt; + const char *errmsg; + char *cmdline; + LPWSTR cmdlinew; + HANDLE hInputWrite = INVALID_HANDLE_VALUE, hInputRead = INVALID_HANDLE_VALUE; + HANDLE hOutputWrite = INVALID_HANDLE_VALUE, hOutputRead = INVALID_HANDLE_VALUE; + HANDLE hErrorWrite = INVALID_HANDLE_VALUE, hErrorRead = INVALID_HANDLE_VALUE; + SECURITY_ATTRIBUTES sa; + PROCESS_INFORMATION pi; + STARTUPINFOW si; + BOOL ret; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &npipe)); + if (npipe != 2 && npipe != 3) + return vp_stack_return_error(&_result, "npipe range error"); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &hstdin)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &hstdout)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &hstderr)); + VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &cmdline)); + + sa.nLength = sizeof(SECURITY_ATTRIBUTES); + sa.lpSecurityDescriptor = NULL; + sa.bInheritHandle = TRUE; + + if (hstdin) { + /* Get handle. */ + VP_DUP_HANDLE((HANDLE)_get_osfhandle(hstdin), &hInputRead, TRUE); + } else { + HANDLE hInputWriteTmp; + + /* Create pipe. */ + if (!CreatePipe(&hInputRead, &hInputWrite, &sa, 0)) + VP_GOTO_ERROR("CreatePipe() error: %s"); + + VP_DUP_HANDLE(hInputWrite, &hInputWriteTmp, FALSE); + CloseHandle(hInputWrite); + hInputWrite = hInputWriteTmp; + } + + if (hstdout) { + /* Get handle. */ + VP_DUP_HANDLE((HANDLE)_get_osfhandle(hstdout), &hOutputWrite, TRUE); + } else { + HANDLE hOutputReadTmp; + + /* Create pipe. */ + if (!CreatePipe(&hOutputRead, &hOutputWrite, &sa, 0)) + VP_GOTO_ERROR("CreatePipe() error: %s"); + + VP_DUP_HANDLE(hOutputRead, &hOutputReadTmp, FALSE); + CloseHandle(hOutputRead); + hOutputRead = hOutputReadTmp; + } + + if (npipe == 2) { + VP_DUP_HANDLE(hOutputWrite, &hErrorWrite, TRUE); + } else { + if (hstderr) { + /* Get handle. */ + VP_DUP_HANDLE((HANDLE)_get_osfhandle(hstderr), &hErrorWrite, TRUE); + } else { + HANDLE hErrorReadTmp; + + /* Create pipe. */ + if (!CreatePipe(&hErrorRead, &hErrorWrite, &sa, 0)) + VP_GOTO_ERROR("CreatePipe() error: %s"); + + VP_DUP_HANDLE(hErrorRead, &hErrorReadTmp, FALSE); + CloseHandle(hErrorRead); + hErrorRead = hErrorReadTmp; + } + } + + ZeroMemory(&si, sizeof(STARTUPINFOW)); + si.cb = sizeof(STARTUPINFOW); + si.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW; + si.wShowWindow = SW_SHOW; + si.hStdInput = hInputRead; + si.hStdOutput = hOutputWrite; + si.hStdError = hErrorWrite; + + cmdlinew = utf8_to_utf16(cmdline); + if (cmdlinew == NULL) + VP_GOTO_ERROR("utf8_to_utf16() error: %s"); + + ret = CreateProcessW(NULL, cmdlinew, NULL, NULL, TRUE, + CREATE_NO_WINDOW, NULL, NULL, &si, &pi); + free(cmdlinew); + if (!ret) + VP_GOTO_ERROR("CreateProcess() error: %s"); + + CloseHandle(pi.hThread); + + CloseHandle(hInputRead); + CloseHandle(hOutputWrite); + CloseHandle(hErrorWrite); + + vp_stack_push_num(&_result, "%p", pi.hProcess); + vp_stack_push_num(&_result, "%d", hstdin ? + 0 : _open_osfhandle((size_t)hInputWrite, 0)); + vp_stack_push_num(&_result, "%d", hstdout ? + 0 : _open_osfhandle((size_t)hOutputRead, _O_RDONLY)); + if (npipe == 3) + vp_stack_push_num(&_result, "%d", hstderr ? + 0 : _open_osfhandle((size_t)hErrorRead, _O_RDONLY)); + return vp_stack_return(&_result); + +error: + errmsg = lasterror(); + if (hInputWrite != INVALID_HANDLE_VALUE) CloseHandle(hInputWrite); + if (hInputRead != INVALID_HANDLE_VALUE) CloseHandle(hInputRead); + if (hOutputWrite != INVALID_HANDLE_VALUE) CloseHandle(hOutputWrite); + if (hOutputRead != INVALID_HANDLE_VALUE) CloseHandle(hOutputRead); + if (hErrorWrite != INVALID_HANDLE_VALUE) CloseHandle(hErrorWrite); + if (hErrorRead != INVALID_HANDLE_VALUE) CloseHandle(hErrorRead); + return vp_stack_return_error(&_result, errfmt, errmsg); +#undef VP_DUP_HANDLE +#undef VP_GOTO_ERROR +} + +const char * +vp_pipe_close(char *args) +{ + vp_stack_t stack; + int fd; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &fd)); + + if (close(fd)) + return vp_stack_return_error(&_result, "close() error: %s", + lasterror()); + return NULL; +} + +const char * +vp_pipe_read(char *args) +{ + vp_stack_t stack; + int fd; + int cnt; + int timeout; + DWORD n; + DWORD err; + char *buf; + char *eof; + HANDLE hPipe; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &fd)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &cnt)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &timeout)); + + if (cnt < 0 || VP_READ_BUFSIZE < cnt) { + cnt = VP_READ_BUFSIZE; + } + + /* initialize buffer */ + buf = _result.top = _result.buf; + *(buf++) = VP_EOV; + *(eof = buf++) = '0'; + + hPipe = (HANDLE)_get_osfhandle(fd); + while (cnt > 0) { + if (!PeekNamedPipe(hPipe, NULL, 0, NULL, &n, NULL)) { + /* can be ERROR_HANDLE_EOF? */ + err = GetLastError(); + if (err == 0 || err == ERROR_BROKEN_PIPE) { + /* error or eof */ + if (err == ERROR_BROKEN_PIPE) { + *eof = '1'; + } + break; + } + return vp_stack_return_error(&_result, "PeekNamedPipe() error: %08X %s", + err, lasterror()); + } else if (n == 0) { + if (timeout-- <= 0) { + break; + } + Sleep(1); + continue; + } + n = read(fd, buf, cnt); + if (n == -1) { + return vp_stack_return_error(&_result, "read() error: %s", + strerror(errno)); + } + /* decrease stack top for concatenate. */ + cnt -= n; + buf += n; + /* try read more bytes without waiting */ + timeout = 0; + } + _result.top = buf; + return vp_stack_return(&_result); +} + +const char * +vp_pipe_write(char *args) +{ + return vp_file_write(args); +} + +const char * +vp_pty_open(char *args) +{ + return "vp_pty_open() is not available"; +} + +const char * +vp_pty_close(char *args) +{ + return "vp_pty_close() is not available"; +} + +const char * +vp_pty_read(char *args) +{ + return "vp_pty_read() is not available"; +} + +const char * +vp_pty_write(char *args) +{ + return "vp_pty_write() is not available"; +} + +const char * +vp_pty_get_winsize(char *args) +{ + return "vp_pty_get_winsize() is not available"; +} + +const char * +vp_pty_set_winsize(char *args) +{ + return "vp_pty_set_winsize() is not available"; +} + +const char * +vp_kill(char *args) +{ + vp_stack_t stack; + HANDLE handle; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%p", &handle)); + + /*if (!TerminateProcess(handle, 2) || !CloseHandle(handle))*/ + /*return vp_stack_return_error(&_result, "kill() error: %s",*/ + /*lasterror());*/ + if (!ExitRemoteProcess(handle, 2)) { + return vp_stack_return_error(&_result, "kill() error: %s", + lasterror()); + } + + vp_stack_push_num(&_result, "%d", 0); + return vp_stack_return(&_result); +} + +/* Improved kill function. */ +/* http://homepage3.nifty.com/k-takata/diary/2009-05.html */ +static BOOL ExitRemoteProcess(HANDLE hProcess, UINT_PTR uExitCode) +{ + LPTHREAD_START_ROUTINE pfnExitProcess = + (LPTHREAD_START_ROUTINE) GetProcAddress( + GetModuleHandle("kernel32.dll"), "ExitProcess"); + if ((hProcess != NULL) && (pfnExitProcess != NULL)) { + HANDLE hThread = CreateRemoteThread(hProcess, NULL, 0, + pfnExitProcess, (LPVOID) uExitCode, 0, NULL); + if (hThread != NULL) { + CloseHandle(hThread); + return TRUE; + } + } + return FALSE; +} + +const char * +vp_waitpid(char *args) +{ + vp_stack_t stack; + HANDLE handle; + DWORD exitcode; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%p", &handle)); + + if (!GetExitCodeProcess(handle, &exitcode)) { + return vp_stack_return_error(&_result, + "GetExitCodeProcess() error: %s", lasterror()); + } + + vp_stack_push_str(&_result, (exitcode == STILL_ACTIVE) ? "run" : "exit"); + vp_stack_push_num(&_result, "%u", exitcode); + return vp_stack_return(&_result); +} + +const char * +vp_close_handle(char *args) +{ + vp_stack_t stack; + HANDLE handle; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%p", &handle)); + + if (!CloseHandle(handle)) { + return vp_stack_return_error(&_result, + "CloseHandle() error: %s", lasterror()); + } + return NULL; +} + +/* + * This is based on socket.diff.gz written by Yasuhiro Matsumoto. + * see: http://marc.theaimsgroup.com/?l=vim-dev&m=105289857008664&w=2 + */ +static int sockets_number = 0; + +static int +detain_winsock() +{ + WSADATA wsadata; + int res = 0; + + if (sockets_number == 0) { /* Need startup process. */ + res = WSAStartup(MAKEWORD(2, 0), &wsadata); + if(res) return res; /* Fail */ + } + ++sockets_number; + return res; +} + +static int +release_winsock() +{ + int res = 0; + + if (sockets_number != 0) { + res = WSACleanup(); + if(res) return res; /* Fail */ + + --sockets_number; + } + return res; +} + + +const char * +vp_socket_open(char *args) +{ + vp_stack_t stack; + char *host; + char *port; + int port_nr; + int n; + unsigned short nport; + int sock; + struct sockaddr_in sockaddr; + struct hostent *hostent; + struct servent *servent; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &host)); + VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &port)); + + if (detain_winsock()) { + return vp_stack_return_error(&_result, "WSAStartup() error: %s", + lasterror()); + } + + if (sscanf(port, "%d%n", &port_nr, &n) == 1 && port[n] == '\0') { + nport = htons((u_short)port_nr); + } else { + servent = getservbyname(port, NULL); + if (servent == NULL) + return vp_stack_return_error(&_result, "getservbyname() error: %s", + port); + nport = servent->s_port; + } + + sock = (int)socket(PF_INET, SOCK_STREAM, 0); + hostent = gethostbyname(host); + sockaddr.sin_family = AF_INET; + sockaddr.sin_port = nport; + sockaddr.sin_addr = *((struct in_addr*)*hostent->h_addr_list); + + if (connect(sock, (struct sockaddr*)&sockaddr, sizeof(struct sockaddr_in)) + == -1) { + return vp_stack_return_error(&_result, "connect() error: %s", + strerror(errno)); + } + + vp_stack_push_num(&_result, "%d", sock); + return vp_stack_return(&_result); +} + +const char * +vp_socket_close(char *args) +{ + vp_stack_t stack; + int sock; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &sock)); + + if (closesocket(sock) == SOCKET_ERROR) { + return vp_stack_return_error(&_result, "closesocket() error: %d", + WSAGetLastError()); + } + release_winsock(); + return NULL; +} + +const char * +vp_socket_read(char *args) +{ + vp_stack_t stack; + int sock; + int cnt; + int timeout; + struct timeval tv; + int n; + char *buf; + char *eof; + fd_set fdset; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &sock)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &cnt)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &timeout)); + tv.tv_sec = timeout / 1000; + tv.tv_usec = (timeout - tv.tv_sec * 1000) * 1000; + + if (cnt < 0 || VP_READ_BUFSIZE < cnt) { + cnt = VP_READ_BUFSIZE; + } + + /* initialize buffer */ + buf = _result.top = _result.buf; + *(buf++) = VP_EOV; + *(eof = buf++) = '0'; + + while (cnt > 0) { + FD_ZERO(&fdset); + FD_SET((unsigned)sock, &fdset); + + n = select(0, &fdset, NULL, NULL, (timeout == -1) ? NULL : &tv); + if (n == SOCKET_ERROR) { + return vp_stack_return_error(&_result, "select() error: %d", + WSAGetLastError()); + } else if (n == 0) { + /* timeout */ + break; + } + n = recv(sock, buf, cnt, 0); + if (n == -1) { + return vp_stack_return_error(&_result, "recv() error: %s", + strerror(errno)); + } else if (n == 0) { + /* eof */ + *eof = '1'; + break; + } + /* decrease stack top for concatenate. */ + cnt -= n; + buf += n; + /* try read more bytes without waiting */ + timeout = 0; + tv.tv_sec = 0; + tv.tv_usec = 0; + } + _result.top = buf; + return vp_stack_return(&_result); +} + +const char * +vp_socket_write(char *args) +{ + vp_stack_t stack; + int sock; + char *buf; + size_t size; + int timeout; + struct timeval tv; + size_t nleft; + int n; + fd_set fdset; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &sock)); + VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &timeout)); + tv.tv_sec = timeout / 1000; + tv.tv_usec = (timeout - tv.tv_sec * 1000) * 1000; + + buf = stack.buf; + size = (stack.top - 1) - stack.buf; + buf[size] = 0; + + nleft = 0; + while (nleft < size) { + FD_ZERO(&fdset); + FD_SET((unsigned)sock, &fdset); + + n = select(0, NULL, &fdset, NULL, (timeout == -1) ? NULL : &tv); + if (n == SOCKET_ERROR) { + return vp_stack_return_error(&_result, "select() error: %d", + WSAGetLastError()); + } else if (n == 0) { + /* timeout */ + break; + } + n = send(sock, buf + nleft, (int)(size - nleft), 0); + if (n == -1) + return vp_stack_return_error(&_result, "send() error: %s", + strerror(errno)); + nleft += n; + /* try write more bytes without waiting */ + timeout = 0; + tv.tv_sec = 0; + tv.tv_usec = 0; + } + vp_stack_push_num(&_result, "%u", nleft); + return vp_stack_return(&_result); +} + + +/* + * Added by Richard Emberson + * Check to see if a host exists. + */ +const char * +vp_host_exists(char *args) +{ + vp_stack_t stack; + char *host; + struct hostent *hostent; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &host)); + + if(detain_winsock()) + { + return vp_stack_return_error(&_result, "WSAStartup() error: %s", + lasterror()); + } + hostent = gethostbyname(host); + release_winsock(); + + if (hostent) { + vp_stack_push_num(&_result, "%d", 1); + } else { + vp_stack_push_num(&_result, "%d", 0); + } + + return vp_stack_return(&_result); +} + + +/* Referenced from */ +/* http://www.syuhitu.org/other/dir.html */ +const char * +vp_readdir(char *args) +{ + vp_stack_t stack; + char *dirname; + LPWSTR dirnamew; + WCHAR buf[1024]; + + WIN32_FIND_DATAW fd; + HANDLE h; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &dirname)); + + dirnamew = utf8_to_utf16(dirname); + if (dirnamew == NULL) + return lasterror(); + _snwprintf(buf, lengthof(buf), L"%s\\*", dirnamew); + buf[lengthof(buf) - 1] = 0; + + /* Get handle. */ + h = FindFirstFileExW(buf, +#if WINVER >= 0x601 + FindExInfoBasic, +#else + FindExInfoStandard, +#endif + &fd, + FindExSearchNameMatch, NULL, 0 + ); + + if (h == INVALID_HANDLE_VALUE) { + free(dirnamew); + return vp_stack_return_error(&_result, + "FindFirstFileEx() error: %s", + lasterror()); + } + + do { + if (wcscmp(fd.cFileName, L".") && wcscmp(fd.cFileName, L"..")) { + char *p; + _snwprintf(buf, lengthof(buf), L"%s/%s", dirnamew, fd.cFileName); + buf[lengthof(buf) - 1] = 0; + p = utf16_to_utf8(buf); + if (p) { + vp_stack_push_str(&_result, p); + free(p); + } + } + } while (FindNextFileW(h, &fd)); + free(dirnamew); + + FindClose(h); + return vp_stack_return(&_result); +} + +const char * +vp_delete_trash(char *args) +{ + vp_stack_t stack; + char *filename; + LPWSTR filenamew; + LPWSTR buf; + size_t len; + SHFILEOPSTRUCTW fs; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &filename)); + + filenamew = utf8_to_utf16(filename); + if (filenamew == NULL) + return lasterror(); + + len = wcslen(filenamew); + + buf = malloc(sizeof(WCHAR) * (len + 2)); + if (buf == NULL) { + free(filenamew); + return vp_stack_return_error(&_result, "malloc() error: %s", + "Memory cannot allocate"); + } + + /* Copy filename + '\0\0' */ + wcscpy(buf, filenamew); + buf[len + 1] = 0; + free(filenamew); + + ZeroMemory(&fs, sizeof(SHFILEOPSTRUCTW)); + fs.hwnd = NULL; + fs.wFunc = FO_DELETE; + fs.pFrom = buf; + fs.pTo = NULL; + fs.fFlags = FOF_ALLOWUNDO | FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_SILENT; + + vp_stack_push_num(&_result, "%d", SHFileOperationW(&fs)); + + free(buf); + + return vp_stack_return(&_result); +} + +const char * +vp_open(char *args) +{ + vp_stack_t stack; + char *path; + LPWSTR pathw; + size_t ret; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &path)); + + pathw = utf8_to_utf16(path); + if (pathw == NULL) + return lasterror(); + + ret = (size_t)ShellExecuteW(NULL, L"open", pathw, NULL, NULL, SW_SHOWNORMAL); + free(pathw); + if (ret < 32) { + return vp_stack_return_error(&_result, "ShellExecute() error: %s", + lasterror()); + } + + return NULL; +} + +const char * +vp_decode(char *args) +{ + vp_stack_t stack; + size_t len; + char *str; + char *p, *q; + + VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); + VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &str)); + + len = strlen(str); + if (len % 2 != 0) { + return "vp_decode: invalid data length"; + } + + VP_RETURN_IF_FAIL(vp_stack_reserve(&_result, + (_result.top - _result.buf) + (len / 2) + sizeof(VP_EOV_STR))); + + for (p = str, q = _result.top; p < str + len; ) { + char hb, lb; + + hb = CHR2XD[(int)*(p++)]; + lb = CHR2XD[(int)*(p++)]; + if (hb >= 0 && lb >= 0) { + *(q++) = (char)((hb << 4) | lb); + } + } + *(q++) = VP_EOV; + *q = '\0'; + _result.top = q; + + return vp_stack_return(&_result); +} + +const char * +vp_get_signals(char *args) +{ + const char *signames[] = { + "SIGABRT", + "SIGFPE", + "SIGILL", + "SIGINT", + "SIGSEGV", + "SIGTERM", + "SIGALRM", + "SIGCHLD", + "SIGCONT", + "SIGHUP", + "SIGKILL", + "SIGPIPE", + "SIGQUIT", + "SIGSTOP", + "SIGTSTP", + "SIGTTIN", + "SIGTTOU", + "SIGUSR1", + "SIGUSR2" + }; + size_t i; + + for (i = 0; i < lengthof(signames); ++i) + vp_stack_push_num(&_result, "%s:%d", signames[i], i + 1); + return vp_stack_return(&_result); +} + +/* + * vim:set sw=4 sts=4 et: + */ === added file 'vim/bundle/vimproc.vim/autoload/ptytty.c' --- vim/bundle/vimproc.vim/autoload/ptytty.c 1970-01-01 00:00:00 +0000 +++ vim/bundle/vimproc.vim/autoload/ptytty.c 2015-08-25 11:01:00 +0000 @@ -0,0 +1,171 @@ +/* vim:set sw=4 sts=4 et: */ + +/* for ptsname_r */ +#if defined __ANDROID__ +# define _GNU_SOURCE +#endif + +#include +#include + +#include +#include +#include +#if defined __sun__ +# include +#endif +#include +#include + +#include "ptytty.h" + +static int +ptsname_compat(int fd, char **buf) +{ +#if defined __ANDROID__ + static char b[16]; + + if (ptsname_r(fd, b, sizeof(b)) == -1) + return -1; + *buf = b; +#else + if ((*buf = ptsname(fd)) == NULL) + return -1; +#endif + return 0; +} + +static int +_internal_get_pty(int *master, char **path) +{ + if ((*master = open("/dev/ptmx", O_RDWR|O_NOCTTY)) == -1) + return -1; + if (grantpt(*master) != 0) + return -1; + if (unlockpt(*master) != 0) + return -1; + if (ptsname_compat(*master, path) == -1) + return -1; + + return 0; +} + +static int +_internal_get_tty(int *slave, const char *path, + struct termios *termp, struct winsize *winp, int ctty) +{ + if (path != NULL) { + if ((*slave = open(path, O_RDWR|O_NOCTTY)) == -1) + return -1; + } +#ifdef TIOCSCTTY + if (ctty && ioctl(*slave, TIOCSCTTY, NULL) == -1) + return -1; +#endif +#ifdef I_PUSH + if (ioctl(*slave, I_PUSH, "ptem") == -1) + return -1; + if (ioctl(*slave, I_PUSH, "ldterm") == -1) + return -1; +#if defined __sun__ + if (ioctl(*slave, I_PUSH, "ttcompat") == -1) + return -1; +#endif +#endif + + if (termp != NULL) + tcsetattr(*slave, TCSAFLUSH, termp); + if (winp != NULL) + ioctl(*slave, TIOCSWINSZ, winp); + + return 0; +} + +static int +_internal_login_tty(int fd, const char *path, + struct termios *termp, struct winsize *winp) +{ + setsid(); + + if (_internal_get_tty(&fd, path, termp, winp, 1) != 0) + return -1; + + dup2(fd, 0); + dup2(fd, 1); + dup2(fd, 2); + if (fd > 2) + close(fd); + return 0; + +} + +int +openpty(int *amaster, int *aslave, char *name, + struct termios *termp, struct winsize *winp) +{ + char *path = NULL; + int master = -1, slave = -1; + + if (amaster == NULL || aslave == NULL) + return -1; + + if (_internal_get_pty(&master, &path) != 0) + goto out; + if (_internal_get_tty(&slave, path, termp, winp, 0) != 0) + goto out; + if (name != NULL) + strcpy(name, path); + + *amaster = master; + *aslave = slave; + return 0; + +out: + if (master != -1) + close(master); + if (slave != -1) + close(slave); + return -1; +} + +int +forkpty(int *amaster, char *name, + struct termios *termp, struct winsize *winp) +{ + char *path; + int master = -1; + pid_t pid; + + if (amaster == NULL) + return -1; + + if (_internal_get_pty(&master, &path) != 0) + goto out; + if (name != NULL) + strcpy(name, path); + + if ((pid = fork()) == -1) + goto out; + if (pid == 0) { + close(master); + + if (_internal_login_tty(-1, path, termp, winp) != 0) + _exit(EXIT_FAILURE); + + return 0; + } + + *amaster = master; + return pid; + +out: + if (master != -1) + close(master); + return -1; +} + +int +login_tty(int fd) +{ + return _internal_login_tty(fd, NULL, NULL, NULL); +} === added file 'vim/bundle/vimproc.vim/autoload/ptytty.h' --- vim/bundle/vimproc.vim/autoload/ptytty.h 1970-01-01 00:00:00 +0000 +++ vim/bundle/vimproc.vim/autoload/ptytty.h 2015-08-25 11:01:00 +0000 @@ -0,0 +1,10 @@ +#ifndef VP_PTYTTY_H_ +#define VP_PTYTTY_H_ + +#include + +int openpty(int *, int *, char *, struct termios *, struct winsize *); +int forkpty(int *, char *, struct termios *, struct winsize *); +int login_tty(int); + +#endif /* VP_PTYTTY_H_ */ === modified file 'vim/bundle/vimproc.vim/autoload/vimproc.vim' --- vim/bundle/vimproc.vim/autoload/vimproc.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/autoload/vimproc.vim 2015-08-25 11:01:00 +0000 @@ -34,7 +34,7 @@ set cpo&vim " }}} -function! s:print_error(string) abort +function! s:print_error(string) echohl Error | echomsg '[vimproc] ' . a:string | echohl None endfunction @@ -47,13 +47,6 @@ endif "}}} -" Version info "{{{ -let s:MAJOR_VERSION = 9 -let s:MINOR_VERSION = 2 -let s:VERSION_NUMBER = str2nr(printf('%2d%02d', s:MAJOR_VERSION, s:MINOR_VERSION)) -let s:VERSION_STRING = printf('%d.%d', s:MAJOR_VERSION, s:MINOR_VERSION) -"}}} - " Global options definition. "{{{ " Set the default of g:vimproc_dll_path by judging OS "{{{ if vimproc#util#is_windows() @@ -67,10 +60,6 @@ let s:vimproc_dll_basename = 'vimproc_linux64.so' elseif glob('/lib*/ld-linux*.so.2',1) != '' let s:vimproc_dll_basename = 'vimproc_linux32.so' -elseif system('uname -s') =~? '^.\+BSD\n$' - let s:vimproc_dll_basename = system( - \ 'uname -sm | tr "[:upper:]" "[:lower:]"' - \ .' | sed -e "s/ /_/" | xargs -I "{}" echo "vimproc_{}.so"')[0 : -2] else let s:vimproc_dll_basename = 'vimproc_unix.so' endif @@ -78,15 +67,13 @@ call vimproc#util#set_default( \ 'g:vimproc#dll_path', - \ expand(':p:h:h') . '/lib/' . s:vimproc_dll_basename, + \ expand(':p:h') . '/' . s:vimproc_dll_basename, \ 'g:vimproc_dll_path') unlet s:vimproc_dll_basename call vimproc#util#set_default( - \'g:vimproc#download_windows_dll', 0) -call vimproc#util#set_default( \ 'g:vimproc#password_pattern', - \ '\%(Enter \|Repeat \|[Oo]ld \|[Nn]ew \|login ' . + \ '\%(Enter \|[Oo]ld \|[Nn]ew \|login ' . \'\|Kerberos \|EncFS \|CVS \|UNIX \| SMB \|LDAP \|\[sudo] ' . \'\|^\|\n\|''s \)\%([Pp]assword\|[Pp]assphrase\)\>', \ 'g:vimproc_password_pattern') @@ -105,7 +92,7 @@ "}}} " Constants {{{ -function! s:define_signals() abort +function! s:define_signals() let s:signames = {} let xs = s:libcall('vp_get_signals', []) for x in xs @@ -125,21 +112,16 @@ " Backward compatibility. let g:vimproc_password_pattern = g:vimproc#password_pattern -if g:vimproc#download_windows_dll && !filereadable(g:vimproc#dll_path) - \ && vimproc#util#is_windows() - call vimproc#util#try_download_windows_dll(s:VERSION_STRING) -endif - if !filereadable(g:vimproc#dll_path) || !has('libcall') "{{{ - function! vimproc#get_last_status() abort + function! vimproc#get_last_status() return v:shell_error endfunction - function! vimproc#get_last_errmsg() abort + function! vimproc#get_last_errmsg() return '' endfunction - function! vimproc#system(...) abort + function! vimproc#system(...) return call('system', a:000) endfunction @@ -154,10 +136,10 @@ finish endif"}}} -function! vimproc#version() abort "{{{ - return s:VERSION_NUMBER +function! vimproc#version() "{{{ + return str2nr(printf('%2d%02d', 8, 0)) endfunction"}}} -function! vimproc#dll_version() abort "{{{ +function! vimproc#dll_version() "{{{ let [dll_version] = s:libcall('vp_dlversion', []) return str2nr(dll_version) endfunction"}}} @@ -165,7 +147,7 @@ "----------------------------------------------------------- " API -function! vimproc#open(filename) abort "{{{ +function! vimproc#open(filename) "{{{ let filename = vimproc#util#iconv(fnamemodify(a:filename, ':p'), \ &encoding, vimproc#util#systemencoding()) @@ -206,7 +188,7 @@ endif endfunction"}}} -function! vimproc#get_command_name(command, ...) abort "{{{ +function! vimproc#get_command_name(command, ...) "{{{ let path = get(a:000, 0, $PATH) let cnt = a:0 < 2 ? 1 : a:2 @@ -228,7 +210,7 @@ return file endfunction"}}} -function! s:system(cmdline, is_passwd, input, timeout, is_pty) abort "{{{ +function! s:system(cmdline, is_passwd, input, timeout, is_pty) "{{{ let s:last_status = 0 let s:last_errmsg = '' @@ -237,16 +219,9 @@ endif " Open pipe. - try - let subproc = (type(a:cmdline[0]) == type('')) ? vimproc#popen3(a:cmdline) : - \ a:is_pty ? vimproc#ptyopen(a:cmdline): - \ vimproc#pgroup_open(a:cmdline) - catch - call s:print_error(v:exception) - let s:last_status = 1 - let s:last_errmsg = v:exception - return '' - endtry + let subproc = (type(a:cmdline[0]) == type('')) ? vimproc#popen3(a:cmdline) : + \ a:is_pty ? vimproc#ptyopen(a:cmdline): + \ vimproc#pgroup_open(a:cmdline) let outbuf = [] let errbuf = [] @@ -324,8 +299,7 @@ call subproc.kill(g:vimproc#SIGTERM) if v:exception !~ '^Vim:Interrupt' - call s:print_error(v:throwpoint) - call s:print_error(v:exception) + throw v:exception endif finally let output = join(outbuf, '') @@ -343,7 +317,7 @@ return output endfunction"}}} -function! vimproc#system(cmdline, ...) abort "{{{ +function! vimproc#system(cmdline, ...) "{{{ if type(a:cmdline) == type('') if a:cmdline =~ '&\s*$' let cmdline = substitute(a:cmdline, '&\s*$', '', '') @@ -370,7 +344,7 @@ return s:system(args, 0, input, timeout, 0) endfunction"}}} -function! vimproc#system2(...) abort "{{{ +function! vimproc#system2(...) "{{{ if empty(a:000) return '' endif @@ -392,7 +366,7 @@ return output endfunction"}}} -function! vimproc#system_passwd(cmdline, ...) abort "{{{ +function! vimproc#system_passwd(cmdline, ...) "{{{ if type(a:cmdline) == type('') let args = vimproc#parser#parse_pipe(a:cmdline) else @@ -412,7 +386,7 @@ let $LANG = lang_save endtry endfunction"}}} -function! vimproc#system_bg(cmdline) abort "{{{ +function! vimproc#system_bg(cmdline) "{{{ " Open pipe. if type(a:cmdline) == type('') if a:cmdline =~ '&\s*$' @@ -448,23 +422,23 @@ return '' endfunction"}}} -function! vimproc#system_gui(cmdline) abort "{{{ +function! vimproc#system_gui(cmdline) "{{{ return vimproc#system_bg(a:cmdline) endfunction"}}} -function! vimproc#get_last_status() abort "{{{ +function! vimproc#get_last_status() "{{{ return s:last_status endfunction"}}} -function! vimproc#get_last_errmsg() abort "{{{ +function! vimproc#get_last_errmsg() "{{{ return substitute(vimproc#util#iconv(s:last_errmsg, \ vimproc#util#stderrencoding(), &encoding), '\n$', '', '') endfunction"}}} -function! vimproc#shellescape(string) abort "{{{ +function! vimproc#shellescape(string) "{{{ return string(a:string) endfunction"}}} -function! vimproc#fopen(path, ...) abort "{{{ +function! vimproc#fopen(path, ...) "{{{ let flags = get(a:000, 0, 'r') let mode = get(a:000, 1, 0644) let fd = s:vp_file_open((s:is_null_device(a:path) @@ -473,7 +447,7 @@ return proc endfunction"}}} -function! vimproc#popen2(args, ...) abort "{{{ +function! vimproc#popen2(args, ...) "{{{ let args = type(a:args) == type('') ? \ vimproc#parser#split_args(a:args) : \ a:args @@ -484,7 +458,7 @@ \ 'fd' : { 'stdin' : '', 'stdout' : '', 'stderr' : '' }, \ }], is_pty) endfunction"}}} -function! vimproc#popen3(args, ...) abort "{{{ +function! vimproc#popen3(args, ...) "{{{ let args = type(a:args) == type('') ? \ vimproc#parser#split_args(a:args) : \ a:args @@ -496,7 +470,7 @@ \ }], is_pty) endfunction"}}} -function! vimproc#plineopen2(commands, ...) abort "{{{ +function! vimproc#plineopen2(commands, ...) "{{{ let commands = type(a:commands) == type('') ? \ vimproc#parser#parse_pipe(a:commands) : \ a:commands @@ -504,7 +478,7 @@ return s:plineopen(2, commands, is_pty) endfunction"}}} -function! vimproc#plineopen3(commands, ...) abort "{{{ +function! vimproc#plineopen3(commands, ...) "{{{ let commands = type(a:commands) == type('') ? \ vimproc#parser#parse_pipe(a:commands) : \ a:commands @@ -512,7 +486,7 @@ return s:plineopen(3, commands, is_pty) endfunction"}}} -function! s:plineopen(npipe, commands, is_pty) abort "{{{ +function! s:plineopen(npipe, commands, is_pty) "{{{ let pid_list = [] let stdin_list = [] let stdout_list = [] @@ -641,11 +615,11 @@ let s:null_device = vimproc#util#is_windows() ? 'NUL' : '/dev/null' -function! s:is_null_device(filename) abort +function! s:is_null_device(filename) return a:filename ==# '/dev/null' endfunction -function! s:is_pseudo_device(filename) abort "{{{ +function! s:is_pseudo_device(filename) "{{{ if vimproc#util#is_windows() && ( \ a:filename ==# '/dev/stdin' \ || a:filename ==# '/dev/stdout' @@ -658,7 +632,7 @@ \ || a:filename ==# '/dev/quickfix' endfunction"}}} -function! vimproc#pgroup_open(statements, ...) abort "{{{ +function! vimproc#pgroup_open(statements, ...) "{{{ if type(a:statements) == type('') let statements = \ vimproc#parser#parse_statements(a:statements) @@ -676,7 +650,7 @@ return s:pgroup_open(statements, is_pty && !vimproc#util#is_windows(), npipe) endfunction"}}} -function! s:pgroup_open(statements, is_pty, npipe) abort "{{{ +function! s:pgroup_open(statements, is_pty, npipe) "{{{ let proc = {} let cwd = getcwd() @@ -711,7 +685,7 @@ return proc endfunction"}}} -function! vimproc#ptyopen(commands, ...) abort "{{{ +function! vimproc#ptyopen(commands, ...) "{{{ let commands = type(a:commands) == type('') ? \ vimproc#parser#parse_pipe(a:commands) : \ a:commands @@ -720,29 +694,22 @@ return s:plineopen(npipe, commands, !vimproc#util#is_windows()) endfunction"}}} -function! vimproc#socket_open(host, port) abort "{{{ - if !vimproc#host_exists(a:host) - throw printf('vimproc: host "%s" does not exist', a:host) - endif - +function! vimproc#socket_open(host, port) "{{{ let fd = s:vp_socket_open(a:host, a:port) return s:fdopen(fd, 'vp_socket_close', 'vp_socket_read', 'vp_socket_write') endfunction"}}} -function! vimproc#host_exists(host) abort "{{{ +function! vimproc#host_exists(host) "{{{ let rval = s:vp_host_exists( \ substitute(substitute(a:host, '^\a\+://', '', ''), '/.*$', '', '')) return 0 + rval endfunction"}}} -function! vimproc#kill(pid, sig) abort "{{{ +function! vimproc#kill(pid, sig) "{{{ if a:sig == 0 && vimproc#util#is_windows() " Use waitpid(). - let cond = s:waitpid(a:pid, 1)[0] - if cond ==# 'error' - let s:last_errmsg = 'waitpid error' - endif - return cond !=# 'run' + let cond = s:waitpid(a:pid)[0] + return cond ==# 'run' endif try @@ -755,11 +722,11 @@ return ret endfunction"}}} -function! vimproc#decode_signal(signal) abort "{{{ +function! vimproc#decode_signal(signal) "{{{ return get(s:signames, a:signal, 'UNKNOWN') endfunction"}}} -function! vimproc#write(filename, string, ...) abort "{{{ +function! vimproc#write(filename, string, ...) "{{{ if a:string == '' return endif @@ -812,7 +779,7 @@ endif endfunction"}}} -function! vimproc#readdir(dirname) abort "{{{ +function! vimproc#readdir(dirname) "{{{ let dirname = vimproc#util#expand(a:dirname) if dirname == '' let dirname = getcwd() @@ -846,7 +813,7 @@ return files endfunction"}}} -function! vimproc#delete_trash(filename) abort "{{{ +function! vimproc#delete_trash(filename) "{{{ if !vimproc#util#is_windows() call s:print_error('Not implemented in this platform.') return @@ -877,7 +844,7 @@ return str2nr(ret) endfunction"}}} -function! vimproc#test_readdir(dirname) abort "{{{ +function! vimproc#test_readdir(dirname) "{{{ let start = reltime() call split(glob(a:dirname.'/*'), '\n') echomsg reltimestr(reltime(start)) @@ -887,7 +854,7 @@ echomsg reltimestr(reltime(start)) endfunction"}}} -function! s:close_all(self) abort "{{{ +function! s:close_all(self) "{{{ if has_key(a:self, 'stdin') call a:self.stdin.close() endif @@ -919,7 +886,7 @@ let eof = 0 while maxsize != 0 && !eof - let [out, eof] = self.f_read(maxsize, + let [out, eof] = self.f_read(maxsize, \ (timeout < s:read_timeout ? timeout : s:read_timeout)) if out ==# '' let timeout -= s:read_timeout @@ -948,7 +915,7 @@ let out = call(self.read, a:000, self) if out !=# '' - let outs = split(out, '\r*\n\|\r', 1) + let outs = split(out, '\r*\n', 1) let res .= outs[0] if len(outs) > 1 let lines += [substitute(res, '\r*$', '', '')] + outs[1:-2] @@ -985,7 +952,7 @@ return self.f_write(a:str, timeout) endfunction"}}} -function! s:fdopen(fd, f_close, f_read, f_write) abort "{{{ +function! s:fdopen(fd, f_close, f_read, f_write) "{{{ return { \ 'fd' : a:fd, \ 'eof' : 0, '__eof' : 0, 'is_valid' : 1, 'buffer' : [], @@ -994,7 +961,7 @@ \ 'read_line' : s:funcref('read_line'), 'read_lines' : s:funcref('read_lines'), \} endfunction"}}} -function! s:closed_fdopen(f_close, f_read, f_write) abort "{{{ +function! s:closed_fdopen(f_close, f_read, f_write) "{{{ return { \ 'fd' : -1, \ 'eof' : 1, '__eof' : 1, 'is_valid' : 0, 'buffer' : [], @@ -1003,16 +970,16 @@ \ 'read_line' : s:funcref('read_line'), 'read_lines' : s:funcref('read_lines'), \} endfunction"}}} -function! s:fdopen_pty(fd_stdin, fd_stdout, f_close, f_read, f_write) abort "{{{ +function! s:fdopen_pty(fd_stdin, fd_stdout, f_close, f_read, f_write) "{{{ return { \ 'eof' : 0, '__eof' : 0, 'is_valid' : 1, 'buffer' : [], \ 'fd_stdin' : a:fd_stdin, 'fd_stdout' : a:fd_stdout, - \ 'f_close' : s:funcref(a:f_close), 'f_read' : s:funcref(a:f_read), 'f_write' : s:funcref(a:f_write), + \ 'f_close' : s:funcref(a:f_close), 'f_read' : s:funcref(a:f_read), 'f_write' : s:funcref(a:f_write), \ 'close' : s:funcref('close'), 'read' : s:funcref('read'), 'write' : s:funcref('write'), \ 'read_line' : s:funcref('read_line'), 'read_lines' : s:funcref('read_lines'), \} endfunction"}}} -function! s:fdopen_pipes(fd, f_close, f_read, f_write) abort "{{{ +function! s:fdopen_pipes(fd, f_close, f_read, f_write) "{{{ return { \ 'eof' : 0, '__eof' : 0, 'is_valid' : 1, 'buffer' : [], \ 'fd' : a:fd, @@ -1021,7 +988,7 @@ \ 'read_line' : s:funcref('read_line'), 'read_lines' : s:funcref('read_lines'), \} endfunction"}}} -function! s:fdopen_pgroup(proc, fd, f_close, f_read, f_write) abort "{{{ +function! s:fdopen_pgroup(proc, fd, f_close, f_read, f_write) "{{{ return { \ 'eof' : 0, '__eof' : 0, 'is_valid' : 1, 'buffer' : [], \ 'proc' : a:proc, 'fd' : a:fd, @@ -1031,7 +998,7 @@ \} endfunction"}}} -function! s:garbage_collect(is_force) abort "{{{ +function! s:garbage_collect(is_force) "{{{ for pid in values(s:bg_processes) " Check processes. try @@ -1055,24 +1022,24 @@ endfunction"}}} " For debug API. -function! vimproc#_get_bg_processes() abort "{{{ +function! vimproc#_get_bg_processes() "{{{ return s:bg_processes endfunction"}}} "----------------------------------------------------------- " UTILS -function! s:str2hd(str) abort +function! s:str2hd(str) return join(map(range(len(a:str)), \ 'printf("%02X", char2nr(a:str[v:val]))'), '') endfunction -function! s:hd2str(hd) abort +function! s:hd2str(hd) " a:hd is a list because to avoid copying the value. return get(s:libcall('vp_decode', [a:hd[0]]), 0, '') endfunction -function! s:hd2str_lua(hd) abort +function! s:hd2str_lua(hd) let ret = [] lua << EOF do @@ -1090,23 +1057,23 @@ return ret[0] endfunction -function! s:str2list(str) abort +function! s:str2list(str) return map(range(len(a:str)), 'char2nr(a:str[v:val])') endfunction -function! s:list2str(lis) abort +function! s:list2str(lis) return s:hd2str(s:list2hd([a:lis])) endfunction -function! s:hd2list(hd) abort +function! s:hd2list(hd) return map(split(a:hd, '..\zs'), 'str2nr(v:val, 16)') endfunction -function! s:list2hd(lis) abort +function! s:list2hd(lis) return join(map(a:lis, 'printf("%02X", v:val)'), '') endfunction -function! s:convert_args(args) abort "{{{ +function! s:convert_args(args) "{{{ if empty(a:args) return [] endif @@ -1133,7 +1100,7 @@ \ v:val, &encoding, vimproc#util#systemencoding())') + args[1:] endfunction"}}} -function! vimproc#analyze_shebang(filename) abort "{{{ +function! vimproc#analyze_shebang(filename) "{{{ if !filereadable(a:filename) || \ getfsize(a:filename) > 100000 || \ (vimproc#util#is_windows() && @@ -1177,7 +1144,7 @@ let s:bg_processes = {} if vimproc#util#has_lua() - function! s:split(str, sep) abort + function! s:split(str, sep) let result = [] lua << EOF do @@ -1203,7 +1170,7 @@ return result endfunction else - function! s:split(str, sep) abort + function! s:split(str, sep) let [result, pos] = [[], 0] while 1 let tmp = stridx(a:str, a:sep, pos) @@ -1219,84 +1186,68 @@ endfunction endif -" Encode a 32-bit integer into a 5-byte string. -function! s:encode_size(n) abort - " Set each bit7 to 1 in order to avoid NUL byte. - return printf("%c%c%c%c%c", - \ ((a:n / 0x10000000) % 0x80) + 0x80, - \ ((a:n / 0x200000) % 0x80) + 0x80, - \ ((a:n / 0x4000) % 0x80) + 0x80, - \ ((a:n / 0x80) % 0x80) + 0x80, - \ ( a:n % 0x80) + 0x80) -endfunction - -" Decode a 32-bit integer from a 5-byte string. -function! s:decode_size(str, off) abort - return - \ (char2nr(a:str[a:off + 0]) - 0x80) * 0x10000000 + - \ (char2nr(a:str[a:off + 1]) - 0x80) * 0x200000 + - \ (char2nr(a:str[a:off + 2]) - 0x80) * 0x4000 + - \ (char2nr(a:str[a:off + 3]) - 0x80) * 0x80 + - \ (char2nr(a:str[a:off + 4]) - 0x80) -endfunction - -" Encode a list into a string. -function! s:encode_list(arr) abort - " End Of Value - let EOV = "\xFF" - " EOV, encoded size0, data0, EOV, encoded size1, data1, EOV, ... - return empty(a:arr) ? '' : - \ (EOV . join(map(copy(a:arr), 's:encode_size(strlen(v:val)) . v:val'), EOV) . EOV) -endfunction - -" Decode a list from a string. -function! s:decode_list(str) abort - let err = 0 - " End Of Value - let EOV = "\xFF" - if a:str[0] != EOV - let err = 1 - return [[a:str], err] - endif - let arr = [] - let slen = strlen(a:str) - let off = 1 - while slen - off >= 5 - let size = s:decode_size(a:str, off) - let arr += [a:str[off + 5 : off + 5 + size - 1]] - let off += 5 + size + 1 - endwhile - return [arr, err] -endfunction - -function! s:libcall(func, args) abort "{{{ - let stack_buf = libcall(g:vimproc#dll_path, a:func, s:encode_list(a:args)) - if empty(stack_buf) - return [] - endif - let [result, err] = s:decode_list(stack_buf) - if err - let s:lasterr = result - let msg = vimproc#util#iconv(string(result), - \ vimproc#util#systemencoding(), &encoding) - - throw printf('vimproc: %s: %s', a:func, msg) - endif - return result -endfunction"}}} - -" args[0]: fd, args[1]: count, args[2]: timeout -function! s:libcall_raw_read(func, args) abort "{{{ - let [err, hd] = s:libcall(a:func, a:args) - return [hd, err] -endfunction "}}} - -" args[0]: fd, args[1]: data, args[2]: timeout -function! s:libcall_raw_write(func, args) abort "{{{ - return s:libcall(a:func, [a:args[0], a:args[2], a:args[1]]) -endfunction "}}} - -function! s:SID_PREFIX() abort +function! s:libcall(func, args) "{{{ + " End Of Value + let EOV = "\xFF" + let args = empty(a:args) ? '' : (join(reverse(copy(a:args)), EOV) . EOV) + let stack_buf = libcall(g:vimproc#dll_path, a:func, args) + let result = s:split(stack_buf, EOV) + if get(result, -1, 'error') != '' + if stack_buf[len(stack_buf) - 1] ==# EOV + " Note: If &encoding equals "cp932" and output ends multibyte first byte, + " will fail split. + return result + endif + let s:lasterr = result + let msg = vimproc#util#iconv(string(result), + \ vimproc#util#systemencoding(), &encoding) + + throw printf('vimproc: %s: %s', a:func, msg) + endif + return result[:-2] +endfunction"}}} + +function! s:libcall_raw_read(func, args) "{{{ + " End Of Value + let EOV = "\xFF" + let args = empty(a:args) ? '' : (join(reverse(copy(a:args)), EOV) . EOV) + let result = libcall(g:vimproc#dll_path, a:func, args) + " SUCCESS:: EOV | EOF[0|1] | Bin + " ERROR :: ErrStr + if result[0] !=# EOV + let s:lasterr = [result] + let msg = vimproc#util#iconv(string(result), + \ vimproc#util#systemencoding(), &encoding) + + throw printf('vimproc: %s: %s', a:func, msg) + endif + return [result[2:], result[1]] +endfunction"}}} + +function! s:libcall_raw_write(func, args) "{{{ + " End Of Value + let EOV = "\xFF" + " Convert:: + " [Fd, Bin, Timeout] => Bin | EOV | Timeout | EOV | Fd | EOV + let args = join((a:args[1:] + a:args[:0]), EOV) . EOV + let stack_buf = libcall(g:vimproc#dll_path, a:func, args) + let result = s:split(stack_buf, EOV) + if get(result, -1, 'error') != '' + if stack_buf[len(stack_buf) - 1] ==# EOV + " Note: If &encoding equals "cp932" and output ends multibyte first byte, + " will fail split. + return result + endif + let s:lasterr = result + let msg = vimproc#util#iconv(string(result), + \ vimproc#util#systemencoding(), &encoding) + + throw printf('vimproc: %s: %s', a:func, msg) + endif + return result[:-2] +endfunction"}}} + +function! s:SID_PREFIX() if !exists('s:sid_prefix') let s:sid_prefix = matchstr(expand(''), \ '\d\+_\zeSID_PREFIX$') @@ -1305,11 +1256,11 @@ endfunction " Get funcref. -function! s:funcref(funcname) abort +function! s:funcref(funcname) return function(s:SID_PREFIX().a:funcname) endfunction -function! s:finalize() abort +function! s:finalize() call s:garbage_collect(1) if exists('s:dll_handle') @@ -1317,16 +1268,16 @@ endif endfunction -function! s:vp_dlopen(path) abort +function! s:vp_dlopen(path) let [handle] = s:libcall('vp_dlopen', [a:path]) return handle endfunction -function! s:vp_dlclose(handle) abort +function! s:vp_dlclose(handle) call s:libcall('vp_dlclose', [a:handle]) endfunction -function! s:vp_file_open(path, flags, mode) abort +function! s:vp_file_open(path, flags, mode) let [fd] = s:libcall('vp_file_open', [a:path, a:flags, a:mode]) return fd endfunction @@ -1348,12 +1299,12 @@ return nleft endfunction -function! s:quote_arg(arg) abort +function! s:quote_arg(arg) return (a:arg == '' || a:arg =~ '[ "]') ? \ '"' . substitute(a:arg, '"', '\\"', 'g') . '"' : a:arg endfunction -function! s:vp_pipe_open(npipe, hstdin, hstdout, hstderr, argv) abort "{{{ +function! s:vp_pipe_open(npipe, hstdin, hstdout, hstderr, argv) "{{{ try if vimproc#util#is_windows() let cmdline = s:quote_arg(substitute(a:argv[0], '/', '\', 'g')) @@ -1539,7 +1490,7 @@ return nleft endfunction"}}} -function! s:vp_pty_open(npipe, width, height, hstdin, hstdout, hstderr, argv) abort +function! s:vp_pty_open(npipe, width, height, hstdin, hstdout, hstderr, argv) let [pid; fdlist] = s:libcall('vp_pty_open', \ [a:npipe, a:width, a:height, \ a:hstdin, a:hstdout, a:hstderr, len(a:argv)] + a:argv) @@ -1614,7 +1565,7 @@ let ret = 0 for pid in get(self, 'pid_list', [self.pid]) - call s:waitpid(pid, 1) + call s:waitpid(pid) let ret = vimproc#kill(pid, sig) endfor @@ -1636,20 +1587,14 @@ return self.current_proc.kill(sig) endfunction -function! s:waitpid(pid, ...) abort - let nohang = a:0 ? a:1 : 0 +function! s:waitpid(pid) try - while 1 - let [cond, status] = s:libcall('vp_waitpid', [a:pid]) - " echomsg string([a:pid, cond, status]) - if cond !=# 'run' || nohang - break - endif - endwhile - + let [cond, status] = s:libcall('vp_waitpid', [a:pid]) + " echomsg string([a:pid, cond, status]) if cond ==# 'run' " Add process list. let s:bg_processes[a:pid] = a:pid + let [cond, status] = ['exit', '0'] elseif vimproc#util#is_windows() call s:libcall('vp_close_handle', [a:pid]) @@ -1680,8 +1625,7 @@ return [cond, str2nr(status)] endfunction -function! s:vp_waitpid(...) dict - let nohang = a:0 ? a:1 : 0 +function! s:vp_waitpid() dict call s:close_all(self) let self.is_valid = 0 @@ -1690,7 +1634,7 @@ " Use cache. let [cond, status] = [self.cond, self.status] else - let [cond, status] = s:waitpid(self.pid, nohang) + let [cond, status] = s:waitpid(self.pid) endif if cond ==# 'exit' @@ -1699,7 +1643,7 @@ if has_key(self, 'pid_list') for pid in self.pid_list[: -2] - call s:waitpid(pid, nohang) + call s:waitpid(pid) endfor endif @@ -1719,7 +1663,7 @@ return [self.cond, self.status] endfunction -function! s:vp_socket_open(host, port) abort +function! s:vp_socket_open(host, port) let [socket] = s:libcall('vp_socket_open', [a:host, a:port]) return socket endfunction @@ -1741,12 +1685,12 @@ return nleft endfunction -function! s:vp_host_exists(host) abort +function! s:vp_host_exists(host) let [rval] = s:libcall('vp_host_exists', [a:host]) return rval endfunction -function! s:get_winwidth() abort +function! s:get_winwidth() return winwidth(0) - &l:numberwidth - &l:foldcolumn endfunction @@ -1760,21 +1704,15 @@ " vimproc dll version check. "{{{ try - if vimproc#dll_version() != vimproc#version() + if vimproc#dll_version() < vimproc#version() call s:print_error(printf('Your vimproc binary version is "%d",'. \ ' but vimproc version is "%d".', \ vimproc#dll_version(), vimproc#version())) - if g:vimproc#download_windows_dll && vimproc#util#is_windows() - if vimproc#util#try_update_windows_dll(s:VERSION_STRING) - call s:print_error('DLL automatically update succeeded.') - call s:print_error('Please restart Vim.') - endif - endif endif catch call s:print_error(v:throwpoint) call s:print_error(v:exception) - call s:print_error('Your vimproc binary is not compatible with this vimproc!') + call s:print_error('Your vimproc binary is too old!') call s:print_error('Please re-compile it.') endtry "}}} === modified file 'vim/bundle/vimproc.vim/autoload/vimproc/cmd.vim' --- vim/bundle/vimproc.vim/autoload/vimproc/cmd.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/autoload/vimproc/cmd.vim 2015-08-25 11:01:00 +0000 @@ -29,7 +29,7 @@ " }}} if !vimproc#util#is_windows() - function! vimproc#cmd#system(expr) abort + function! vimproc#cmd#system(expr) return vimproc#system(a:expr) endfunction let &cpo = s:save_cpo @@ -45,7 +45,7 @@ augroup END -function! s:cmd.open() abort "{{{ +function! s:cmd.open() "{{{ let cmd = 'cmd.exe' let self.vimproc = vimproc#popen3(cmd) let self.cwd = getcwd() @@ -57,11 +57,11 @@ endwhile endfunction"}}} -function! s:cmd.close() abort "{{{ +function! s:cmd.close() "{{{ call self.vimproc.waitpid() endfunction"}}} -function! s:cmd.system(cmd) abort "{{{ +function! s:cmd.system(cmd) "{{{ " Execute cmd. if self.cwd !=# getcwd() " Execute cd. @@ -74,26 +74,22 @@ call self.vimproc.stdin.write(input . "\n") " Wait until getting prompt. + let result = [] let output = '' - while 1 - let output .= self.vimproc.stdout.read() - let lastnl = strridx(output, "\n") - if lastnl >= 0 && - \ output[lastnl + 1:] =~ '^\%([A-Z]:\\\|\\\\.\+\\.\+\\\).*>$' - break - endif + while output !~ '.\+>$' + let out = split(output . self.vimproc.stdout.read(), '\r\n\|\n') + let output = get(out, -1, '') + let result += out[ : -2] endwhile - let result = split(output, '\r\n\|\n')[1:-2] - return join(result, "\n") + return join(result[1 :], "\n") endfunction"}}} call s:cmd.open() -function! vimproc#cmd#system(expr) abort +function! vimproc#cmd#system(expr) let cmd = type(a:expr) == type('') ? a:expr : - \ join(map(a:expr, - \ 'match(v:val, "\\s") >= 0 ? "\"".v:val."\"" : v:val')) + \ join(map(a:expr, '"\"".v:val."\""')) return s:cmd.system(cmd) endfunction === removed file 'vim/bundle/vimproc.vim/autoload/vimproc/commands.vim' --- vim/bundle/vimproc.vim/autoload/vimproc/commands.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/autoload/vimproc/commands.vim 1970-01-01 00:00:00 +0000 @@ -1,110 +0,0 @@ -"============================================================================= -" FILE: commands.vim -" AUTHOR: Shougo Matsushita -" License: MIT license {{{ -" Permission is hereby granted, free of charge, to any person obtaining -" a copy of this software and associated documentation files (the -" "Software"), to deal in the Software without restriction, including -" without limitation the rights to use, copy, modify, merge, publish, -" distribute, sublicense, and/or sell copies of the Software, and to -" permit persons to whom the Software is furnished to do so, subject to -" the following conditions: -" -" The above copyright notice and this permission notice shall be included -" in all copies or substantial portions of the Software. -" -" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -" IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -" }}} -"============================================================================= - -" Saving 'cpoptions' {{{ -let s:save_cpo = &cpo -set cpo&vim -" }}} - -" Command functions: -function! vimproc#commands#_install(args) abort "{{{ - let savemp = &makeprg - let savecwd = getcwd() - - try - if executable('gmake') - let &makeprg = 'gmake' - elseif executable('make') - let &makeprg = 'make' - elseif executable('nmake') - let &makeprg = 'nmake -f make_msvc.mak nodebug=1' - endif - - " Change to the correct directory and run make - execute 'lcd' fnameescape(fnamemodify(g:vimproc#dll_path, ':h:h')) - execute 'make' a:args - finally - " Restore working directory and makeprg - execute 'lcd' fnameescape(savecwd) - let &makeprg = savemp - endtry -endfunction"}}} -function! vimproc#commands#_bang(cmdline) abort "{{{ - " Expand % and #. - let cmdline = join(map(vimproc#parser#split_args_through( - \ vimproc#util#iconv(a:cmdline, - \ vimproc#util#termencoding(), &encoding)), - \ 'substitute(expand(v:val), "\n", " ", "g")')) - - " Open pipe. - let subproc = vimproc#pgroup_open(cmdline, 1) - - call subproc.stdin.close() - - while !subproc.stdout.eof || !subproc.stderr.eof - if !subproc.stdout.eof - let output = subproc.stdout.read(10000, 0) - if output != '' - let output = vimproc#util#iconv(output, - \ vimproc#util#stdoutencoding(), &encoding) - - echon output - sleep 1m - endif - endif - - if !subproc.stderr.eof - let output = subproc.stderr.read(10000, 0) - if output != '' - let output = vimproc#util#iconv(output, - \ vimproc#util#stderrencoding(), &encoding) - echohl WarningMsg | echon output | echohl None - - sleep 1m - endif - endif - endwhile - - call subproc.stdout.close() - call subproc.stderr.close() - - call subproc.waitpid() -endfunction"}}} -function! vimproc#commands#_read(cmdline) abort "{{{ - " Expand % and #. - let cmdline = join(map(vimproc#parser#split_args_through( - \ vimproc#util#iconv(a:cmdline, - \ vimproc#util#termencoding(), &encoding)), - \ 'substitute(expand(v:val), "\n", " ", "g")')) - - " Expand args. - call append('.', split(vimproc#util#iconv(vimproc#system(cmdline), - \ vimproc#util#stdoutencoding(), &encoding), '\r\n\|\n')) -endfunction"}}} - -" Restore 'cpoptions' {{{ -let &cpo = s:save_cpo -" }}} -" vim:foldmethod=marker:fen:sw=2:sts=2 === modified file 'vim/bundle/vimproc.vim/autoload/vimproc/filepath.vim' --- vim/bundle/vimproc.vim/autoload/vimproc/filepath.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/autoload/vimproc/filepath.vim 2015-08-25 11:01:00 +0000 @@ -17,18 +17,18 @@ \ (!executable('xdg-open') && system('uname') =~? '^darwin')) " Get the directory separator. -function! s:separator() abort +function! s:separator() return !exists('+shellslash') || &shellslash ? '/' : '\' endfunction " Get the path separator. let s:path_separator = s:is_windows ? ';' : ':' -function! s:path_separator() abort +function! s:path_separator() return s:path_separator endfunction " Get the path extensions -function! s:path_extensions() abort +function! s:path_extensions() if !exists('s:path_extensions') if s:is_windows if exists('$PATHEXT') @@ -49,12 +49,12 @@ endfunction " Convert all directory separators to "/". -function! s:unify_separator(path) abort +function! s:unify_separator(path) return substitute(a:path, s:path_sep_pattern, '/', 'g') endfunction " Get the full path of command. -function! s:which(command, ...) abort +function! s:which(command, ...) let maxcount = (a:0 >= 2 && type(a:2) == type(0)) ? a:2 : 1 if maxcount == 1 && exists('*exepath') let full = exepath(a:command) @@ -105,7 +105,7 @@ " Split the path with directory separator. " Note that this includes the drive letter of MS Windows. -function! s:split(path) abort +function! s:split(path) return split(a:path, s:path_sep_pattern) endfunction @@ -113,7 +113,7 @@ " join('foo', 'bar') => 'foo/bar' " join('foo/', 'bar') => 'foo/bar' " join('/foo/', ['bar', 'buz/']) => '/foo/bar/buz/' -function! s:join(...) abort +function! s:join(...) let sep = s:separator() let path = '' for part in a:000 @@ -127,11 +127,11 @@ " Check if the path is absolute path. if s:is_windows - function! s:is_absolute(path) abort + function! s:is_absolute(path) return a:path =~? '^[a-z]:[/\]' endfunction else - function! s:is_absolute(path) abort + function! s:is_absolute(path) return a:path[0] ==# '/' endfunction endif @@ -139,7 +139,7 @@ " Return the parent directory of the path. " NOTE: fnamemodify(path, ':h') does not return the parent directory " when path[-1] is the separator. -function! s:dirname(path) abort +function! s:dirname(path) let path = a:path let orig = a:path @@ -153,7 +153,7 @@ endfunction " Remove the separator at the end of a:path. -function! s:remove_last_separator(path) abort +function! s:remove_last_separator(path) let sep = s:separator() let pat = (sep == '\' ? '\\' : '/') . '\+$' return substitute(a:path, pat, '', '') @@ -163,11 +163,11 @@ " Return true if filesystem ignores alphabetic case of a filename. " Return false otherwise. let s:is_case_tolerant = filereadable(expand(':r') . '.VIM') -function! s:is_case_tolerant() abort +function! s:is_case_tolerant() return s:is_case_tolerant endfunction -function! vimproc#filepath#which(command, path, maxcount) abort +function! vimproc#filepath#which(command, path, maxcount) return s:which(a:command, a:path, a:maxcount) endfunction === modified file 'vim/bundle/vimproc.vim/autoload/vimproc/lexer.vim' --- vim/bundle/vimproc.vim/autoload/vimproc/lexer.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/autoload/vimproc/lexer.vim 2015-08-25 11:01:00 +0000 @@ -35,7 +35,7 @@ \ } " }}} -function! vimproc#lexer#init_lexer(text) abort +function! vimproc#lexer#init_lexer(text) let lexer = deepcopy(s:lexer) let lexer.reader = vimproc#lexer#init_reader(a:text) @@ -43,7 +43,7 @@ endfunction let s:lexer = {} -function! s:lexer.advance() abort +function! s:lexer.advance() call self.skip_spaces() let c = self.reader.read() @@ -62,7 +62,7 @@ return 1 endfunction -function! s:lexer.lex_digit() abort +function! s:lexer.lex_digit() let self.val = 0 while 1 let c = self.reader.read() @@ -77,7 +77,7 @@ endwhile endfunction -function! s:lexer.skip_spaces() abort +function! s:lexer.skip_spaces() while 1 let c = self.reader.read() if c < 0 @@ -89,15 +89,15 @@ endwhile endfunction -function! s:lexer.token() abort +function! s:lexer.token() return self.tok endfunction -function! s:lexer.value() abort +function! s:lexer.value() return self.val endfunction -function! vimproc#lexer#init_reader(text) abort +function! vimproc#lexer#init_reader(text) let reader = deepcopy(s:reader) let reader.text = split(a:text, '\zs') let reader.pos = 0 @@ -107,7 +107,7 @@ let s:reader = {} -function! s:reader.read() abort +function! s:reader.read() if self.pos >= len(self.text) " Buffer over. return -1 @@ -119,7 +119,7 @@ return c endfunction -function! s:reader.unread() abort +function! s:reader.unread() let self.pos -= 1 endfunction === modified file 'vim/bundle/vimproc.vim/autoload/vimproc/parser.vim' --- vim/bundle/vimproc.vim/autoload/vimproc/parser.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/autoload/vimproc/parser.vim 2015-08-25 11:01:00 +0000 @@ -29,7 +29,7 @@ " }}} " For vimshell parser. -function! vimproc#parser#parse_pipe(statement) abort "{{{ +function! vimproc#parser#parse_pipe(statement) "{{{ let commands = [] for cmdline in vimproc#parser#split_pipe(a:statement) " Split args. @@ -64,7 +64,7 @@ return commands endfunction"}}} -function! s:parse_cmdline(cmdline) abort "{{{ +function! s:parse_cmdline(cmdline) "{{{ let cmdline = a:cmdline " Expand block. @@ -94,7 +94,7 @@ return s:parse_tilde(cmdline) endfunction"}}} -function! vimproc#parser#parse_statements(script) abort "{{{ +function! vimproc#parser#parse_statements(script) "{{{ if type(a:script) == type('') && a:script =~ '^\s*:' return [ { \ 'statement' : a:script, @@ -198,11 +198,11 @@ return statements endfunction"}}} -function! vimproc#parser#split_statements(script) abort "{{{ +function! vimproc#parser#split_statements(script) "{{{ return map(vimproc#parser#parse_statements(a:script), \ 'v:val.statement') endfunction"}}} -function! vimproc#parser#split_args(script) abort "{{{ +function! vimproc#parser#split_args(script) "{{{ let script = type(a:script) == type([]) ? \ a:script : split(a:script, '\zs') let max = len(script) @@ -266,7 +266,7 @@ return args endfunction"}}} -function! vimproc#parser#split_args_through(script) abort "{{{ +function! vimproc#parser#split_args_through(script) "{{{ let script = type(a:script) == type([]) ? \ a:script : split(a:script, '\zs') let max = len(script) @@ -326,7 +326,7 @@ return args endfunction"}}} -function! vimproc#parser#split_pipe(script) abort "{{{ +function! vimproc#parser#split_pipe(script) "{{{ let script = type(a:script) == type([]) ? \ a:script : split(a:script, '\zs') let max = len(script) @@ -368,7 +368,7 @@ return commands endfunction"}}} -function! vimproc#parser#split_commands(script) abort "{{{ +function! vimproc#parser#split_commands(script) "{{{ let script = type(a:script) == type([]) ? \ a:script : split(a:script, '\zs') let max = len(script) @@ -407,7 +407,7 @@ return commands endfunction"}}} -function! vimproc#parser#expand_wildcard(wildcard) abort "{{{ +function! vimproc#parser#expand_wildcard(wildcard) "{{{ " Check wildcard. let i = 0 let max = len(a:wildcard) @@ -523,7 +523,7 @@ endfunction"}}} " Parse helper. -function! s:parse_block(script) abort "{{{ +function! s:parse_block(script) "{{{ let script = '' let i = 0 @@ -531,8 +531,8 @@ while i < max if a:script[i] == '{' " Block. - let block = matchstr(a:script, '^{\zs.\{-}\ze}', i) - let rest = a:script[matchend(a:script, '^{.\{-}}', i) :] + let block = matchstr(a:script, '^{\zs.\{-1}\ze}', i) + let rest = a:script[matchend(a:script, '^{.\{-1}}', i) :] if block == '' let [script, i] = s:skip_else(script, a:script, i) continue @@ -559,10 +559,7 @@ endfor else " Normal block. - let blocks = (stridx(block, ',') < 0) ? - \ split(block, '\zs') : - \ split(block, ',', 1) - for b in vimproc#util#uniq(blocks) + for b in split(block, ',', 1) " Concat. let script .= head . escape(b, ' ') . foot . ' ' endfor @@ -577,7 +574,7 @@ return script endfunction"}}} -function! s:parse_tilde(script) abort "{{{ +function! s:parse_tilde(script) "{{{ let script = '' let i = 0 @@ -601,7 +598,7 @@ return script endfunction"}}} -function! s:parse_equal(script) abort "{{{ +function! s:parse_equal(script) "{{{ let script = '' let i = 0 @@ -633,7 +630,7 @@ return script endfunction"}}} -function! s:parse_variables(script) abort "{{{ +function! s:parse_variables(script) "{{{ let script = '' let i = 0 @@ -673,7 +670,7 @@ return script endfunction"}}} -function! s:parse_wildcard(script) abort "{{{ +function! s:parse_wildcard(script) "{{{ let script = '' for arg in vimproc#parser#split_args_through(a:script) let script .= join(vimproc#parser#expand_wildcard(arg)) . ' ' @@ -681,7 +678,7 @@ return script endfunction"}}} -function! s:parse_redirection(script) abort "{{{ +function! s:parse_redirection(script) "{{{ let script = '' let fd = { 'stdin' : '', 'stdout' : '', 'stderr' : '' } @@ -744,7 +741,7 @@ return [fd, script] endfunction"}}} -function! s:parse_single_quote(script, i) abort "{{{ +function! s:parse_single_quote(script, i) "{{{ if a:script[a:i] != "'" return ['', a:i] endif @@ -770,7 +767,7 @@ throw 'Exception: Quote ('') is not found.' endfunction"}}} -function! s:parse_double_quote(script, i) abort "{{{ +function! s:parse_double_quote(script, i) "{{{ if a:script[a:i] != '"' return ['', a:i] endif @@ -832,7 +829,7 @@ throw 'Exception: Quote (") is not found.' endfunction"}}} -function! s:parse_back_quote(script, i) abort "{{{ +function! s:parse_back_quote(script, i) "{{{ if a:script[a:i] != '`' return ['', a:i] endif @@ -881,7 +878,7 @@ endfunction"}}} " Skip helper. -function! s:skip_single_quote(script, i) abort "{{{ +function! s:skip_single_quote(script, i) "{{{ let max = len(a:script) let string = '' let i = a:i @@ -921,7 +918,7 @@ return [string, i] endfunction"}}} -function! s:skip_double_quote(script, i) abort "{{{ +function! s:skip_double_quote(script, i) "{{{ let max = len(a:script) let string = '' let i = a:i @@ -959,7 +956,7 @@ return [string, i] endfunction"}}} -function! s:skip_back_quote(script, i) abort "{{{ +function! s:skip_back_quote(script, i) "{{{ let max = len(a:script) let string = '' let i = a:i @@ -987,7 +984,7 @@ return [string, i] endfunction"}}} -function! s:skip_else(args, script, i) abort "{{{ +function! s:skip_else(args, script, i) "{{{ if a:script[a:i] == "'" " Single quote. let [string, i] = s:skip_single_quote(a:script, a:i) === modified file 'vim/bundle/vimproc.vim/autoload/vimproc/util.vim' --- vim/bundle/vimproc.vim/autoload/vimproc/util.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/autoload/vimproc/util.vim 2015-08-25 11:01:00 +0000 @@ -29,17 +29,17 @@ let s:is_windows = has('win32') let s:is_cygwin = has('win32unix') -let s:is_mac = !s:is_windows && !s:is_cygwin +let s:is_mac = !s:is_windows \ && (has('mac') || has('macunix') || has('gui_macvim') || \ (!isdirectory('/proc') && executable('sw_vers'))) " iconv() wrapper for safety. -function! vimproc#util#has_iconv() abort "{{{ +function! vimproc#util#has_iconv() "{{{ " On Windows, some encodings can be converted by iconv() even if " libiconv.dll is not available. return (has('iconv') || (s:is_windows && exists('*iconv'))) endfunction"}}} -function! vimproc#util#iconv(expr, from, to) abort "{{{ +function! vimproc#util#iconv(expr, from, to) "{{{ if !vimproc#util#has_iconv() \ || a:expr == '' || a:from == '' \ || a:to == '' || a:from ==# a:to @@ -49,53 +49,53 @@ let result = iconv(a:expr, a:from, a:to) return result != '' ? result : a:expr endfunction"}}} -function! vimproc#util#systemencoding() abort "{{{ +function! vimproc#util#systemencoding() "{{{ return s:is_windows ? 'utf-8' : 'char' endfunction"}}} -function! vimproc#util#termencoding() abort "{{{ +function! vimproc#util#termencoding() "{{{ return 'char' endfunction"}}} -function! vimproc#util#stdinencoding() abort "{{{ +function! vimproc#util#stdinencoding() "{{{ return exists('g:stdinencoding') && type(g:stdinencoding) == type("") ? \ g:stdinencoding : vimproc#util#termencoding() endfunction"}}} -function! vimproc#util#stdoutencoding() abort "{{{ +function! vimproc#util#stdoutencoding() "{{{ return exists('g:stdoutencoding') && type(g:stdoutencoding) == type("") ? \ g:stdoutencoding : vimproc#util#termencoding() endfunction"}}} -function! vimproc#util#stderrencoding() abort "{{{ +function! vimproc#util#stderrencoding() "{{{ return exists('g:stderrencoding') && type(g:stderrencoding) == type("") ? \ g:stderrencoding : vimproc#util#termencoding() endfunction"}}} -function! vimproc#util#expand(path) abort "{{{ +function! vimproc#util#expand(path) "{{{ return vimproc#util#substitute_path_separator( \ (a:path =~ '^\~') ? fnamemodify(a:path, ':p') : \ (a:path =~ '^\$\h\w*') ? substitute(a:path, \ '^\$\h\w*', '\=eval(submatch(0))', '') : \ a:path) endfunction"}}} -function! vimproc#util#is_windows() abort "{{{ +function! vimproc#util#is_windows() "{{{ return s:is_windows endfunction"}}} -function! vimproc#util#is_mac() abort "{{{ +function! vimproc#util#is_mac() "{{{ return s:is_mac endfunction"}}} -function! vimproc#util#is_cygwin() abort "{{{ +function! vimproc#util#is_cygwin() "{{{ return s:is_cygwin endfunction"}}} -function! vimproc#util#has_lua() abort "{{{ +function! vimproc#util#has_lua() "{{{ " Note: Disabled if_lua feature if less than 7.3.885. " Because if_lua has double free problem. return has('lua') && (v:version > 703 || v:version == 703 && has('patch885')) endfunction"}}} -function! vimproc#util#substitute_path_separator(path) abort "{{{ +function! vimproc#util#substitute_path_separator(path) "{{{ return s:is_windows ? substitute(a:path, '\\', '/', 'g') : a:path endfunction"}}} -function! vimproc#util#cd(path) abort "{{{ - execute (haslocaldir() ? 'lcd' : 'cd') fnameescape(a:path) +function! vimproc#util#cd(path) "{{{ + execute 'lcd' fnameescape(a:path) endfunction"}}} -function! vimproc#util#uniq(list, ...) abort "{{{ +function! vimproc#util#uniq(list, ...) "{{{ let list = a:0 ? map(copy(a:list), printf('[v:val, %s]', a:1)) : copy(a:list) let i = 0 let seen = {} @@ -110,7 +110,7 @@ endwhile return a:0 ? map(list, 'v:val[0]') : list endfunction"}}} -function! vimproc#util#set_default(var, val, ...) abort "{{{ +function! vimproc#util#set_default(var, val, ...) "{{{ if !exists(a:var) || type({a:var}) != type(a:val) let alternate_var = get(a:000, 0, '') @@ -118,45 +118,6 @@ \ {alternate_var} : a:val endif endfunction"}}} -function! vimproc#util#try_update_windows_dll(version) abort "{{{ - let old_path = g:vimproc#dll_path . '.old' - if filereadable(old_path) - if delete(old_path) == -1 - return 0 - endif - endif - if filereadable(g:vimproc#dll_path) - if delete(g:vimproc#dll_path) == -1 - if rename(g:vimproc#dll_path, old_path) - return 0 - endif - endif - endif - return vimproc#util#try_download_windows_dll(a:version) -endfunction"}}} -function! vimproc#util#try_download_windows_dll(version) abort "{{{ - let fname = printf('vimproc_win%s.dll', has('win64') ? '64' : '32') - let url = printf('https://github.com/Shougo/vimproc.vim/releases/download/ver.%s/%s', a:version, fname) - - if executable('curl') - let cmd = printf('curl --insecure --silent --location --output %s %s', - \ s:win_escape(g:vimproc#dll_path), - \ s:win_escape(url)) - call system(cmd) - return filereadable(g:vimproc#dll_path) - - elseif executable('powershell') - let pscmd = printf("(New-Object Net.WebClient).DownloadFile('%s', '%s')", - \ url, g:vimproc#dll_path) - let cmd = printf('powershell -Command %s', s:win_escape(pscmd)) - call system(cmd) - return filereadable(g:vimproc#dll_path) - endif - return 0 -endfunction"}}} -function! s:win_escape(str) abort "{{{ - return '"' . substitute(a:str, '"', '""', 'g') . '"' -endfunction"}}} " Global options definition. "{{{ === added file 'vim/bundle/vimproc.vim/autoload/vimstack.c' --- vim/bundle/vimproc.vim/autoload/vimstack.c 1970-01-01 00:00:00 +0000 +++ vim/bundle/vimproc.vim/autoload/vimstack.c 2015-08-25 11:01:00 +0000 @@ -0,0 +1,242 @@ +/* 2006-06-23 + * vim:set sw=4 sts=4 et: + */ +#include +#include +#include +#include +#include +#include + +/* + * Argument and Result are Stack. Each value is EOV terminated String. + * Number can be stored as String. + * The result which is not terminated by EOV is error message, except NULL + * is no value. + */ + +/* End Of Value */ +#define VP_EOV '\xFF' +#define VP_EOV_STR "\xFF" + +#define VP_NUM_BUFSIZE 64 +#define VP_NUMFMT_BUFSIZE 16 +#define VP_INITIAL_BUFSIZE 512 +#define VP_ERRMSG_SIZE 512 + +#define VP_RETURN_IF_FAIL(expr) \ + do { \ + const char *vp_err = expr; \ + if (vp_err) return vp_err; \ + } while (0) + +/* buf:var|EOV|var|EOV|top:free buffer|buf+size */ +typedef struct vp_stack_t { + size_t size; /* stack size */ + char *buf; /* stack bufffer */ + char *top; /* stack top */ +} vp_stack_t; + +/* use for initialize */ +#define VP_STACK_NULL {0, NULL, NULL} + +static const char CHR2XD[0x100] = { + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x00 - 0x0F */ + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x10 - 0x1F */ + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x20 - 0x2F */ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, /* 0x30 - 0x3F */ + -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x40 - 0x4F */ + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x50 - 0x5F */ + -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x60 - 0x6F */ + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x70 - 0x7F */ + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x80 - 0x8F */ + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x90 - 0x9F */ + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xA0 - 0xAF */ + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xB0 - 0xBF */ + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xC0 - 0xCF */ + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xD0 - 0xDF */ + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xE0 - 0xEF */ + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xF0 - 0xFF */ +}; + +#if 0 +static const char *XD2CHR = + "00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" + "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" + "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2A" "2B" "2C" "2D" "2E" "2F" + "30" "31" "32" "33" "34" "35" "36" "37" "38" "39" "3A" "3B" "3C" "3D" "3E" "3F" + "40" "41" "42" "43" "44" "45" "46" "47" "48" "49" "4A" "4B" "4C" "4D" "4E" "4F" + "50" "51" "52" "53" "54" "55" "56" "57" "58" "59" "5A" "5B" "5C" "5D" "5E" "5F" + "60" "61" "62" "63" "64" "65" "66" "67" "68" "69" "6A" "6B" "6C" "6D" "6E" "6F" + "70" "71" "72" "73" "74" "75" "76" "77" "78" "79" "7A" "7B" "7C" "7D" "7E" "7F" + "80" "81" "82" "83" "84" "85" "86" "87" "88" "89" "8A" "8B" "8C" "8D" "8E" "8F" + "90" "91" "92" "93" "94" "95" "96" "97" "98" "99" "9A" "9B" "9C" "9D" "9E" "9F" + "A0" "A1" "A2" "A3" "A4" "A5" "A6" "A7" "A8" "A9" "AA" "AB" "AC" "AD" "AE" "AF" + "B0" "B1" "B2" "B3" "B4" "B5" "B6" "B7" "B8" "B9" "BA" "BB" "BC" "BD" "BE" "BF" + "C0" "C1" "C2" "C3" "C4" "C5" "C6" "C7" "C8" "C9" "CA" "CB" "CC" "CD" "CE" "CF" + "D0" "D1" "D2" "D3" "D4" "D5" "D6" "D7" "D8" "D9" "DA" "DB" "DC" "DD" "DE" "DF" + "E0" "E1" "E2" "E3" "E4" "E5" "E6" "E7" "E8" "E9" "EA" "EB" "EC" "ED" "EE" "EF" + "F0" "F1" "F2" "F3" "F4" "F5" "F6" "F7" "F8" "F9" "FA" "FB" "FC" "FD" "FE" "FF"; +#endif + +static void vp_stack_free(vp_stack_t *stack); +static const char *vp_stack_from_args(vp_stack_t *stack, char *args); +static const char *vp_stack_return(vp_stack_t *stack); +static const char *vp_stack_return_error(vp_stack_t *stack, const char *fmt, ...); +static const char *vp_stack_reserve(vp_stack_t *stack, size_t needsize); +static const char *vp_stack_pop_num(vp_stack_t *stack, const char *fmt, void *ptr); +static const char *vp_stack_pop_str(vp_stack_t *stack, char **str); +static const char *vp_stack_push_num(vp_stack_t *stack, const char *fmt, ...); +static const char *vp_stack_push_str(vp_stack_t *stack, const char *str); + +static void +vp_stack_free(vp_stack_t *stack) +{ + if (stack->buf != NULL) { + free((void *)stack->buf); + stack->size = 0; + stack->buf = NULL; + stack->top = NULL; + } +} + +/* make readonly stack from arguments */ +static const char * +vp_stack_from_args(vp_stack_t *stack, char *args) +{ + if (args == NULL || args[0] == '\0') { + stack->size = 0; + stack->buf = NULL; + stack->top = NULL; + } else { + stack->size = strlen(args); /* don't count end of NUL. */ + stack->buf = args; + stack->top = stack->buf + stack->size; + if (stack->top[-1] != VP_EOV) + return "vp_stack_from_buf: no EOV"; + } + return NULL; +} + +/* clear stack top and return stack buffer */ +static const char * +vp_stack_return(vp_stack_t *stack) +{ + /* make sure *top == '\0' because the previous value can not be + * cleared when no value is assigned. */ + if (stack->top != NULL) + stack->top[0] = '\0'; + stack->top = stack->buf; + return stack->buf; +} + +/* push error message and return */ +static const char * +vp_stack_return_error(vp_stack_t *stack, const char *fmt, ...) +{ + va_list ap; + size_t needsize; + + needsize = (stack->top - stack->buf) + VP_ERRMSG_SIZE; + if (vp_stack_reserve(stack, needsize) != NULL) + return fmt; + + va_start(ap, fmt); + stack->top += vsnprintf(stack->top, + stack->size - (stack->top - stack->buf), fmt, ap); + va_end(ap); + return vp_stack_return(stack); +} + +/* ensure stack buffer is needsize or more bytes */ +static const char * +vp_stack_reserve(vp_stack_t *stack, size_t needsize) +{ + if (needsize > stack->size) { + size_t newsize; + char *newbuf; + + newsize = (stack->size == 0) ? VP_INITIAL_BUFSIZE : (stack->size * 2); + while (needsize > newsize) { + newsize *= 2; + if (newsize <= stack->size) /* paranoid check */ + return "vp_stack_reserve: too big"; + } + if ((newbuf = (char *)realloc(stack->buf, newsize)) == NULL) + return "vp_stack_reserve: NOMEM"; + stack->top = newbuf + (stack->top - stack->buf); + stack->buf = newbuf; + stack->size = newsize; + } + return NULL; +} + +static const char * +vp_stack_pop_num(vp_stack_t *stack, const char *fmt, void *ptr) +{ + char fmtbuf[VP_NUMFMT_BUFSIZE]; + int n; + char *top, *bot; + + if (stack->buf == stack->top) + return "vp_stack_pop_num: stack over flow"; + + top = stack->top - 1; + bot = stack->buf; + while (top != bot && top[-1] != VP_EOV) + --top; + + snprintf(fmtbuf, VP_NUMFMT_BUFSIZE, "%s%%n", fmt); + + if (sscanf(top, fmtbuf, ptr, &n) != 1 || top[n] != VP_EOV) + return "vp_stack_pop_num: sscanf error"; + + stack->top = top; + return NULL; +} + +/* str will be invalid after vp_stack_push_*() */ +static const char * +vp_stack_pop_str(vp_stack_t *stack, char **str) +{ + char *top, *bot; + + if (stack->buf == stack->top) + return "vp_stack_pop_str: stack over flow"; + + top = stack->top - 1; + bot = stack->buf; + while (top != bot && top[-1] != VP_EOV) + --top; + + *str = top; + stack->top[-1] = '\0'; + stack->top = top; + return NULL; +} + +static const char * +vp_stack_push_num(vp_stack_t *stack, const char *fmt, ...) +{ + va_list ap; + char buf[VP_NUM_BUFSIZE]; + + va_start(ap, fmt); + if (vsprintf(buf, fmt, ap) < 0) { + va_end(ap); + return "vp_stack_push_num: vsprintf error"; + } + va_end(ap); + return vp_stack_push_str(stack, buf); +} + +static const char * +vp_stack_push_str(vp_stack_t *stack, const char *str) +{ + size_t needsize; + + needsize = (stack->top - stack->buf) + strlen(str) + sizeof(VP_EOV_STR); + VP_RETURN_IF_FAIL(vp_stack_reserve(stack, needsize)); + stack->top += sprintf(stack->top, "%s%c", str, VP_EOV); + return NULL; +} === modified file 'vim/bundle/vimproc.vim/doc/vimproc.txt' --- vim/bundle/vimproc.vim/doc/vimproc.txt 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/doc/vimproc.txt 2015-08-25 11:01:00 +0000 @@ -1,6 +1,6 @@ *vimproc.txt* Asynchronous execution plugin for Vim -Version: 9.2 +Version: 8.0 Author : Shougo Original Author : Yukihiro Nakadaira License: MIT license {{{ @@ -39,27 +39,29 @@ ============================================================================== INTRODUCTION *vimproc-introduction* -*vimproc* is a great asynchronous execution library for Vim. It is a fork of +*vimproc* is great asynchronous execution library for Vim. It is fork of proc.vim by Yukihiro Nakadaira. I added some features and fixed some bugs and -I'm maintaining it now. Instead of an external shell (example: 'shell'), -|vimproc| uses an external DLL file. +I'm maintaining it now. Instead of external shell (example: 'shell'), +|vimproc| uses external dll file. ============================================================================== INSTALL *vimproc-install* -First, download vimproc by cloning the Git repository: +In first, you get vimproc from git repository. http://github.com/Shougo/vimproc.vim -Next, you have to compile the external DLL "vimproc_xxx.so" (or -"vimproc_win32.dll" for Windows, "vimproc_cygwin.dll" for Windows/Cygwin). -Because vimproc depends on the functions of the DLL, vimproc will show an -error message if the compiled DLL doesn't exist. +Next, make external dll "vimproc_xxx.so (or vimproc_win32.dll, +vimproc_cygwin.dll)". Because vimproc depends on "vimproc_xxx.so (or +vimproc_win32.dll, vimproc_cygwin.dll)"'s function, vimproc echoes error +message when "vimproc_xxx.so (vimproc_xxx.dll)" doesn't exist. -You can install the DLL using |VimProcInstall|. If you are having any trouble +You can install the dll using |VimProcInstall|. If you are having any trouble or want to build manually then read on. +Note: The vimproc_cygwin.dll compiled in Cygwin won't work with Windows Vim. + Supported platforms: * Windows 32/64bit (Compiled by MinGW or Visual Studio) * Mac OS X (10.5 or later) @@ -69,34 +71,38 @@ * BSD (but cannot check) * Android (experimental) -Unsupported platforms: +Note: You must use GNU make to build vimproc. + +Note: In Windows, using MinGW is recommended. + +Note: In Windows, to build it by Visual Studio, you must install Windows SDK. + +Not supported platforms: * Other UNIX platforms Build Steps: Note: You must use GNU make to build vimproc. -Note: You must execute the command from the root of the vimproc repository - -Linux *vimproc-linux* -> - $ make -< -Mac OS X *vimproc-macosx* -> - $ make -< -Note: If you want to build for multiple architectures, you can use $ARCHS and -$CC variables. - -Build for i386 and x86-64: *vimproc-multiarch* + +Linux +> + $ make +< +Mac OS X +> + $ make +< +Note: If you want to build for multiple architectures, you can use $ARCHS and $CC variables. + +Build for i386 and x86-64: > $ make ARCHS='i386 x86_64' < -FreeBSD *vimproc-freebsd* +FreeBSD > $ gmake < -Solaris *vimproc-solaris* +Solaris > $ gmake < @@ -104,11 +110,11 @@ > $ gmake SUNCC=cc < -Windows *vimproc-windows* +Windows Note: In Windows, using MinGW is recommended. -Note: If you do not have the "gcc" or "x86_64-w64-mingw32-gcc" binary in your -%PATH, you must change CC variable accordingly. +Note: If you have not "gcc" or "x86_64-w64-mingw32-gcc" binary, you must +change $CC value. Windows using MinGW (32bit Vim): > @@ -141,22 +147,17 @@ 32bit: nmake -f make_msvc.mak nodebug=1 CPU=i386 64bit: nmake -f make_msvc.mak nodebug=1 CPU=AMD64 < -* Cygwin: *vimproc-cygwin* +* Cygwin: > $ make -f make_cygwin.mak < Note: The `vimproc_cygwin.dll` compiled in Cygwin won't work with Windows Vim. -If you use |dein.vim| or |neobundle.vim|, you can update and build vimproc -automatically. -http://github.com/Shougo/dein.vim + +If you use |neobundle.vim|, you can update and build vimproc automatically. http://github.com/Shougo/neobundle.vim -Example for dein.vim: -> - call dein#add('Shougo/vimproc.vim', {'build': 'make'}) -< -Example for neobundle.vim: +Example for neobundle: > NeoBundle 'Shougo/vimproc.vim', { \ 'build' : { @@ -168,10 +169,6 @@ \ } \ } < -Windows Binaries: -* Kaoriya Vim (http://www.kaoriya.net/software/vim/) comes bundled with a - precompiled version for vimproc in Windows environment -* https://github.com/Shougo/vimproc.vim/releases ============================================================================== INTERFACE *vimproc-interface* @@ -182,14 +179,13 @@ :VimProcBang {path} *:VimProcBang* Executes {path} command and echo result. This command replaces |:!|. - Note: It is not asynchronous. :VimProcRead {path} *:VimProcRead* Executes {path} command and paste result in current buffer. This command replaces |:read|. :VimProcInstall {args} *:VimProcInstall* - Tries to build the necessary DLL using `gmake`/`make`. + Tries to build the necessary dll using `gmake`/`make`. You can supply extra arguments to `make`, for example to compile using clang `:VimProcInstall CC=clang`. @@ -201,7 +197,7 @@ 5.1 (5.01) is 501. It has the same format as |v:version|. vimproc#dll_version() *vimproc#dll_version()* - Same to |vimproc#version()|, but it returns vimproc DLL + Same to |vimproc#version()|, but it returns vimproc dll version. vimproc#open({filename}) *vimproc#open()* @@ -379,15 +375,15 @@ *g:vimproc#dll_path* g:vimproc#dll_path (default - Win32: "$VIMRUNTIME/lib/vimproc_win32.dll" - Win64: "$VIMRUNTIME/lib/vimproc_win64.dll" - Cygwin: "$VIMRUNTIME/lib/vimproc_cygwin.dll" - Mac: "$VIMRUNTIME/lib/vimproc_mac.so" - Linux32: "$VIMRUNTIME/lib/vimproc_linux32.so" - Linux64: "$VIMRUNTIME/lib/vimproc_linux64.so" - Others: "$VIMRUNTIME/lib/vimproc_unix.so") - This variable stores a DLL name used by vimproc. You must - compile this DLL file. If this DLL does not exist, vimproc + Win32: "$VIMRUNTIME/autoload/vimproc_win32.dll" + Win64: "$VIMRUNTIME/autoload/vimproc_win64.dll" + Cygwin: "$VIMRUNTIME/autoload/vimproc_cygwin.dll" + Mac: "$VIMRUNTIME/autoload/vimproc_mac.so" + Linux32: "$VIMRUNTIME/autoload/vimproc_linux32.so" + Linux64: "$VIMRUNTIME/autoload/vimproc_linux64.so" + Others: "$VIMRUNTIME/autoload/vimproc_unix.so") + This variable stores a dll name used by vimproc. You must + compile this dll file. If this dll does not exist, vimproc will echo error. *g:vimproc_dll_path* Note: |g:vimproc_dll_path| is obsolete name. @@ -397,15 +393,6 @@ If it is defined, you cannot call vimproc functions. You can use it to disable vimproc before loading it. - *g:vimproc#download_windows_dll* -g:vimproc#download_windows_dll (default : 0) - If this is non-zero, vimproc tries downloading MS Windows DLL - file from GitHub Releases page(*). - Vimproc also tries updating DLL file if it is outdated. - Vimproc does nothing if you don't use MS Windows. - - (*) https://github.com/Shougo/vimproc.vim/releases - *g:vimproc#popen2_commands* g:vimproc#popen2_commands (default : refer to autoload/vimproc.vim) This variable is that vimproc use popen2 commands instead of === removed directory 'vim/bundle/vimproc.vim/lib' === removed file 'vim/bundle/vimproc.vim/lib/.gitkeep' === modified file 'vim/bundle/vimproc.vim/make_android.mak' --- vim/bundle/vimproc.vim/make_android.mak 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/make_android.mak 2015-08-25 11:01:00 +0000 @@ -8,9 +8,9 @@ CFLAGS+=-W -Wall -Wno-unused -Wno-unused-parameter -std=c99 -O2 -fPIC -pedantic LDFLAGS+=-shared -TARGET=lib/vimproc_unix.so -SRC=src/proc.c src/ptytty.c -INC=src/vimstack.c src/ptytty.h +TARGET=autoload/vimproc_unix.so +SRC=autoload/proc.c autoload/ptytty.c +INC=autoload/vimstack.c autoload/ptytty.h all: $(TARGET) === removed file 'vim/bundle/vimproc.vim/make_bsd.mak' --- vim/bundle/vimproc.vim/make_bsd.mak 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/make_bsd.mak 1970-01-01 00:00:00 +0000 @@ -1,17 +0,0 @@ -# for *BSD platform. - -SUFFIX!=uname -sm | tr '[:upper:]' '[:lower:]' | sed -e 's/ /_/' - -TARGET=lib/vimproc_$(SUFFIX).so - -SRC=src/proc.c -CFLAGS+=-W -O2 -Wall -Wno-unused -Wno-unused-parameter -std=gnu99 -pedantic -shared -fPIC -LDFLAGS+=-lutil - -all: $(TARGET) - -$(TARGET): $(SRC) src/vimstack.c - $(CC) $(CFLAGS) -o $(TARGET) $(SRC) $(LDFLAGS) - -clean: - rm -f $(TARGET) === modified file 'vim/bundle/vimproc.vim/make_cygwin.mak' --- vim/bundle/vimproc.vim/make_cygwin.mak 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/make_cygwin.mak 2015-08-25 11:01:00 +0000 @@ -1,12 +1,12 @@ CFLAGS+=-O2 -W -Wall -Wno-unused -Wno-unused-parameter -use=gnu99 -shared -TARGET=lib/vimproc_cygwin.dll -SRC=src/proc.c +TARGET=autoload/vimproc_cygwin.dll +SRC=autoload/proc.c LDFLAGS+=-lutil all: $(TARGET) -$(TARGET): $(SRC) src/vimstack.c - $(CC) $(CFLAGS) -o $(TARGET) $(SRC) $(LDFLAGS) +$(TARGET): $(SRC) autoload/vimstack.c + gcc $(CFLAGS) -o $(TARGET) $(SRC) $(LDFLAGS) clean: rm -f $(TARGET) === modified file 'vim/bundle/vimproc.vim/make_mac.mak' --- vim/bundle/vimproc.vim/make_mac.mak 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/make_mac.mak 2015-08-25 11:01:00 +0000 @@ -10,15 +10,15 @@ endif endif -TARGET=lib/vimproc_mac.so -SRC=src/proc.c +TARGET=autoload/vimproc_mac.so +SRC=autoload/proc.c ARCHS= CFLAGS+=-O2 -W -Wall -Wno-unused -Wno-unused-parameter -bundle -fPIC $(foreach ARCH,$(ARCHS),-arch $(ARCH)) LDFLAGS= all: $(TARGET) -$(TARGET): $(SRC) src/vimstack.c +$(TARGET): $(SRC) autoload/vimstack.c $(CC) $(CFLAGS) -o $(TARGET) $(SRC) $(LDFLAGS) .PHONY : clean === modified file 'vim/bundle/vimproc.vim/make_mingw32.mak' --- vim/bundle/vimproc.vim/make_mingw32.mak 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/make_mingw32.mak 2015-08-25 11:01:00 +0000 @@ -1,14 +1,14 @@ # for MinGW. -TARGET=lib/vimproc_win32.dll -SRC=src/proc_w32.c +TARGET=autoload/vimproc_win32.dll +SRC=autoload/proc_w32.c CC=gcc CFLAGS+=-O2 -Wall -shared -m32 LDFLAGS+=-lwsock32 all: $(TARGET) -$(TARGET): $(SRC) src/vimstack.c +$(TARGET): $(SRC) autoload/vimstack.c $(CC) $(CFLAGS) -o $(TARGET) $(SRC) $(LDFLAGS) clean: === modified file 'vim/bundle/vimproc.vim/make_mingw64.mak' --- vim/bundle/vimproc.vim/make_mingw64.mak 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/make_mingw64.mak 2015-08-25 11:01:00 +0000 @@ -1,14 +1,14 @@ # for MinGW. -TARGET=lib/vimproc_win64.dll -SRC=src/proc_w32.c +TARGET=autoload/vimproc_win64.dll +SRC=autoload/proc_w32.c CC=x86_64-w64-mingw32-gcc CFLAGS+=-O2 -Wall -shared -m64 LDFLAGS+=-lwsock32 all: $(TARGET) -$(TARGET): $(SRC) src/vimstack.c +$(TARGET): $(SRC) autoload/vimstack.c $(CC) $(CFLAGS) -o $(TARGET) $(SRC) $(LDFLAGS) clean: === modified file 'vim/bundle/vimproc.vim/make_msvc.mak' --- vim/bundle/vimproc.vim/make_msvc.mak 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/make_msvc.mak 2015-08-25 11:01:00 +0000 @@ -42,8 +42,7 @@ VIMPROC=vimproc_win32 !endif -SRCDIR = src -LIBDIR = lib +SRCDIR = autoload OUTDIR = $(SRCDIR)\obj$(CPU) OBJS = $(OUTDIR)/proc_w32.obj @@ -53,16 +52,16 @@ # RULES -build: $(LIBDIR)\$(VIMPROC).dll +build: $(SRCDIR)\$(VIMPROC).dll clean: -IF EXIST $(OUTDIR)/nul RMDIR /s /q $(OUTDIR) - -DEL /F /Q $(LIBDIR)\vimproc_win32.* - -DEL /F /Q $(LIBDIR)\vimproc_win64.* + -DEL /F /Q $(SRCDIR)\vimproc_win32.* + -DEL /F /Q $(SRCDIR)\vimproc_win64.* -DEL /F /Q $(SRCDIR)\*.obj -DEL /F /Q $(SRCDIR)\*.pdb -$(LIBDIR)\$(VIMPROC).dll: $(OBJS) +$(SRCDIR)\$(VIMPROC).dll: $(OBJS) $(link) /NOLOGO $(ldebug) $(dlllflags) $(conlibsdll) $(LFLAGS) \ /OUT:$@ $(OBJS) shell32.lib IF EXIST $@.manifest \ === modified file 'vim/bundle/vimproc.vim/make_sunos.mak' --- vim/bundle/vimproc.vim/make_sunos.mak 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/make_sunos.mak 2015-08-25 11:01:00 +0000 @@ -11,9 +11,9 @@ endif CPPFLAGS+=-D_XPG6 -D__EXTENSIONS__ -TARGET=lib/vimproc_unix.so -SRC=src/proc.c src/ptytty.c -INC=src/vimstack.c src/ptytty.h +TARGET=autoload/vimproc_unix.so +SRC=autoload/proc.c autoload/ptytty.c +INC=autoload/vimstack.c autoload/ptytty.h all: $(TARGET) === modified file 'vim/bundle/vimproc.vim/make_unix.mak' --- vim/bundle/vimproc.vim/make_unix.mak 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/make_unix.mak 2015-08-25 11:01:00 +0000 @@ -5,16 +5,16 @@ else SUFFIX=unix endif -TARGET=lib/vimproc_$(SUFFIX).so +TARGET=autoload/vimproc_$(SUFFIX).so -SRC=src/proc.c +SRC=autoload/proc.c CFLAGS+=-W -O2 -Wall -Wno-unused -Wno-unused-parameter -std=gnu99 -pedantic -shared -fPIC -LIBS=-lutil +LDFLAGS+=-lutil all: $(TARGET) -$(TARGET): $(SRC) src/vimstack.c - $(CC) $(CFLAGS) $(LDFLAGS) -o $(TARGET) $(SRC) $(LIBS) +$(TARGET): $(SRC) autoload/vimstack.c + $(CC) $(CFLAGS) -o $(TARGET) $(SRC) $(LDFLAGS) clean: rm -f $(TARGET) === modified file 'vim/bundle/vimproc.vim/plugin/vimproc.vim' --- vim/bundle/vimproc.vim/plugin/vimproc.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/plugin/vimproc.vim 2015-08-25 11:01:00 +0000 @@ -30,19 +30,92 @@ finish endif -let g:loaded_vimproc = 1 - " Saving 'cpoptions' {{{ let s:save_cpo = &cpo set cpo&vim " }}} -command! -nargs=* VimProcInstall - \ call vimproc#commands#_install() -command! -nargs=+ -complete=shellcmd VimProcBang - \ call vimproc#commands#_bang() -command! -nargs=+ -complete=shellcmd VimProcRead - \ call vimproc#commands#_read() +command! -nargs=* VimProcInstall call s:install() +command! -nargs=+ -complete=shellcmd VimProcBang call s:bang() +command! -nargs=+ -complete=shellcmd VimProcRead call s:read() + +" Command functions: +function! s:install(args) "{{{ + let savemp = &makeprg + let savecwd = getcwd() + + try + if executable('gmake') + let &makeprg = 'gmake' + elseif executable('make') + let &makeprg = 'make' + elseif executable('nmake') + let &makeprg = 'nmake -f make_msvc.mak nodebug=1' + endif + + " Change to the correct directory and run make + execute 'lcd' fnameescape(fnamemodify(g:vimproc#dll_path, ':h:h')) + execute 'make' a:args + finally + " Restore working directory and makeprg + execute 'lcd' fnameescape(savecwd) + let &makeprg = savemp + endtry +endfunction"}}} +function! s:bang(cmdline) "{{{ + " Expand % and #. + let cmdline = join(map(vimproc#parser#split_args_through( + \ vimproc#util#iconv(a:cmdline, + \ vimproc#util#termencoding(), &encoding)), + \ 'substitute(expand(v:val), "\n", " ", "g")')) + + " Open pipe. + let subproc = vimproc#pgroup_open(cmdline, 1) + + call subproc.stdin.close() + + while !subproc.stdout.eof || !subproc.stderr.eof + if !subproc.stdout.eof + let output = subproc.stdout.read(10000, 0) + if output != '' + let output = vimproc#util#iconv(output, + \ vimproc#util#stdoutencoding(), &encoding) + + echon output + sleep 1m + endif + endif + + if !subproc.stderr.eof + let output = subproc.stderr.read(10000, 0) + if output != '' + let output = vimproc#util#iconv(output, + \ vimproc#util#stderrencoding(), &encoding) + echohl WarningMsg | echon output | echohl None + + sleep 1m + endif + endif + endwhile + + call subproc.stdout.close() + call subproc.stderr.close() + + call subproc.waitpid() +endfunction"}}} +function! s:read(cmdline) "{{{ + " Expand % and #. + let cmdline = join(map(vimproc#parser#split_args_through( + \ vimproc#util#iconv(a:cmdline, + \ vimproc#util#termencoding(), &encoding)), + \ 'substitute(expand(v:val), "\n", " ", "g")')) + + " Expand args. + call append('.', split(vimproc#util#iconv(vimproc#system(cmdline), + \ vimproc#util#stdoutencoding(), &encoding), '\r\n\|\n')) +endfunction"}}} + +let g:loaded_vimproc = 1 " Restore 'cpoptions' {{{ let &cpo = s:save_cpo === removed directory 'vim/bundle/vimproc.vim/src' === removed file 'vim/bundle/vimproc.vim/src/fakepoll.h' --- vim/bundle/vimproc.vim/src/fakepoll.h 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/src/fakepoll.h 1970-01-01 00:00:00 +0000 @@ -1,161 +0,0 @@ -/* fakepoll.h */ -/* poll using select */ -/* Warning: a call to this poll() takes about 4K of stack space. */ - -/* Greg Parker gparker-web@sealiesoftware.com December 2000 */ -/* This code is in the public domain and may be copied or modified without */ -/* permission. */ - -/* Nico Raffato gparker-web@sealiesoftware.com September 2009 */ - -/* Updated Sep 2009: */ -/* * fix crash when an fd is less than 0 */ -/* * don't set POLLIN or POLLOUT in revents if it wasn't requested */ -/* in events (only happens when an fd is in the poll set twice) */ - -#ifndef _FAKE_POLL_H -#define _FAKE_POLL_H - -#include -#include -#include -#include -#include - -#ifndef OPEN_MAX - #define OPEN_MAX (sysconf(_SC_OPEN_MAX)) -#endif - -typedef struct pollfd { - int fd; /* file desc to poll */ - short events; /* events of interest on fd */ - short revents; /* events that occurred on fd */ -} pollfd_t; - - -/* poll flags */ -#define POLLIN 0x0001 -#define POLLOUT 0x0004 -#define POLLERR 0x0008 - -/* synonyms */ -#define POLLNORM POLLIN -#define POLLPRI POLLIN -#define POLLRDNORM POLLIN -#define POLLRDBAND POLLIN -#define POLLWRNORM POLLOUT -#define POLLWRBAND POLLOUT - -/* ignored */ -#define POLLHUP 0x0010 -#define POLLNVAL 0x0020 - -int poll(struct pollfd *pollSet, int pollCount, int pollTimeout) -{ - struct timeval tv; - struct timeval *tvp; - fd_set readFDs, writeFDs, exceptFDs; - fd_set *readp, *writep, *exceptp; - struct pollfd *pollEnd, *p; - int selected; - int result; - int maxFD; - - if (!pollSet) { - pollEnd = NULL; - readp = NULL; - writep = NULL; - exceptp = NULL; - maxFD = 0; - } else { - pollEnd = pollSet + pollCount; - readp = &readFDs; - writep = &writeFDs; - exceptp = &exceptFDs; - - FD_ZERO(readp); - FD_ZERO(writep); - FD_ZERO(exceptp); - - /* Find the biggest fd in the poll set */ - maxFD = 0; - for (p = pollSet; p < pollEnd; p++) { - if (p->fd > maxFD) maxFD = p->fd; - } - - if (maxFD >= OPEN_MAX) { - /* At least one fd is too big */ - errno = EINVAL; - return -1; - } - - /* Transcribe flags from the poll set to the fd sets */ - for (p = pollSet; p < pollEnd; p++) { - if (p->fd < 0) { - /* Negative fd checks nothing and always reports zero */ - } else { - if (p->events & POLLIN) FD_SET(p->fd, readp); - if (p->events & POLLOUT) FD_SET(p->fd, writep); - if (p->events != 0) FD_SET(p->fd, exceptp); - /* POLLERR is never set coming in; poll() always reports errors */ - /* But don't report if we're not listening to anything at all. */ - } - } - } - - /* poll timeout is in milliseconds. Convert to struct timeval. */ - /* poll timeout == -1 : wait forever : select timeout of NULL */ - /* poll timeout == 0 : return immediately : select timeout of zero */ - if (pollTimeout >= 0) { - tv.tv_sec = pollTimeout / 1000; - tv.tv_usec = (pollTimeout % 1000) * 1000; - tvp = &tv; - } else { - tvp = NULL; - } - - selected = select(maxFD+1, readp, writep, exceptp, tvp); - - - if (selected < 0) { - /* Error during select */ - result = -1; - } else if (selected > 0) { - /* Select found something */ - /* Transcribe result from fd sets to poll set. */ - /* Also count the number of selected fds. poll returns the */ - /* number of ready fds; select returns the number of bits set. */ - int polled = 0; - for (p = pollSet; p < pollEnd; p++) { - p->revents = 0; - if (p->fd < 0) { - /* Negative fd always reports zero */ - } else { - if ((p->events & POLLIN) && FD_ISSET(p->fd, readp)) { - p->revents |= POLLIN; - } - if ((p->events & POLLOUT) && FD_ISSET(p->fd, writep)) { - p->revents |= POLLOUT; - } - if ((p->events != 0) && FD_ISSET(p->fd, exceptp)) { - p->revents |= POLLERR; - } - - if (p->revents) polled++; - } - } - result = polled; - } else { - /* selected == 0, select timed out before anything happened */ - /* Clear all result bits and return zero. */ - for (p = pollSet; p < pollEnd; p++) { - p->revents = 0; - } - result = 0; - } - - return result; -} - - -#endif /* _FAKE_POLL_H */ === removed file 'vim/bundle/vimproc.vim/src/proc.c' --- vim/bundle/vimproc.vim/src/proc.c 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/src/proc.c 1970-01-01 00:00:00 +0000 @@ -1,1273 +0,0 @@ -/* vim:set sw=4 sts=4 et: */ -/** - * FILE: proc.c - * AUTHOR: Yukihiro Nakadaira (original) - * Nico Raffo (modified) - */ - -#define _XOPEN_SOURCE 600 - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if !defined __APPLE__ -# include -# include -#endif -#include - -#include - -/* for poll() */ -#if defined __APPLE__ -# include "fakepoll.h" -#else -# include -#endif - -/* for forkpty() / login_tty() */ -#if (defined __linux__ || defined __CYGWIN__) && !defined __ANDROID__ -# include -# include -#elif defined __APPLE__ || defined __NetBSD__ || defined __OpenBSD__ -# include -#elif defined __sun__ || defined __ANDROID__ -# include "ptytty.h" -#else -# include -# include -#endif - -/* for ioctl() */ -#ifdef __APPLE__ -# include -#endif - -/* for tc* and ioctl */ -#include -#include -#ifndef TIOCGWINSZ -# include /* 4.3+BSD requires this too */ -#endif - -/* for waitpid() */ -#include -#include -#if defined __NetBSD__ -# define WIFCONTINUED(x) (_WSTATUS(x) == _WSTOPPED && WSTOPSIG(x) == 0x13) -#elif defined __ANDROID__ -# define WIFCONTINUED(x) (WIFSTOPPED(x) && WSTOPSIG(x) == 0x13) -#endif - -/* for socket */ -#if defined __FreeBSD__ -# define __BSD_VISIBLE 1 -# include -#endif -#include -#include -#include -#include - -/* for ctermid */ -#if defined __ANDROID__ -# define ctermid(x) "/dev/tty" -#endif - -#include "vimstack.c" - -const int debug = 0; - -/* API */ -const char *vp_dlopen(char *args); /* [handle] (path) */ -const char *vp_dlclose(char *args); /* [] (handle) */ -const char *vp_dlversion(char *args); /* [version] () */ - -const char *vp_file_open(char *args); /* [fd] (path, flags, mode) */ -const char *vp_file_close(char *args); /* [] (fd) */ -const char *vp_file_read(char *args); /* [eof, hd] (fd, cnt, timeout) */ -const char *vp_file_write(char *args); /* [nleft] (fd, timeout, hd) */ - -const char *vp_pipe_open(char *args); /* [pid, [fd] * npipe] - (npipe, hstdin, hstdout, hstderr, argc, [argv]) */ -const char *vp_pipe_close(char *args); /* [] (fd) */ -const char *vp_pipe_read(char *args); /* [eof, hd] (fd, cnt, timeout) */ -const char *vp_pipe_write(char *args); /* [nleft] (fd, timeout, hd) */ - -const char *vp_pty_open(char *args); -/* [pid, stdin, stdout, stderr] - (npipe, width, height,hstdin, hstdout, hstderr, argc, [argv]) */ -const char *vp_pty_close(char *args); /* [] (fd) */ -const char *vp_pty_read(char *args); /* [eof, hd] (fd, cnt, timeout) */ -const char *vp_pty_write(char *args); /* [nleft] (fd, timeout, hd) */ -const char *vp_pty_get_winsize(char *args); /* [width, height] (fd) */ -const char *vp_pty_set_winsize(char *args); /* [] (fd, width, height) */ - -const char *vp_kill(char *args); /* [] (pid, sig) */ -const char *vp_waitpid(char *args); /* [cond, status] (pid) */ - -const char *vp_socket_open(char *args); /* [socket] (host, port) */ -const char *vp_socket_close(char *args);/* [] (socket) */ -const char *vp_socket_read(char *args); /* [eof, hd] (socket, cnt, timeout) */ -const char *vp_socket_write(char *args);/* [nleft] (socket, hd, timeout) */ - -const char *vp_host_exists(char *args); /* [int] (host) */ - -const char *vp_decode(char *args); /* [decoded_str] (encode_str) */ - -const char *vp_get_signals(char *args); /* [signals] () */ -/* --- */ - -#define VP_BUFSIZE (65536) -#define VP_READ_BUFSIZE (VP_BUFSIZE - (VP_HEADER_SIZE + 1) * 2 - 1) - -static vp_stack_t _result = VP_STACK_NULL; - -const char * -vp_dlopen(char *args) -{ - vp_stack_t stack; - char *path; - void *handle; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &path)); - VP_RETURN_IF_FAIL(vp_stack_reserve(&_result, VP_BUFSIZE)); - - handle = dlopen(path, RTLD_LAZY); - if (handle == NULL) - return dlerror(); - vp_stack_push_num(&_result, "%p", handle); - return vp_stack_return(&_result); -} - -const char * -vp_dlclose(char *args) -{ - vp_stack_t stack; - void *handle; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%p", &handle)); - - /* On FreeBSD6, to call dlclose() twice with same pointer causes SIGSEGV */ - if (dlclose(handle) == -1) - return dlerror(); - vp_stack_free(&_result); - return NULL; -} - -const char * -vp_dlversion(char *args) -{ - vp_stack_push_num(&_result, "%2d%02d", 9, 2); - return vp_stack_return(&_result); -} - -static int -str_to_oflag(const char *flags) -{ - int oflag = 0; - - if (strchr("rwa", flags[0])) { - if (strchr(flags, '+')) { - oflag = O_RDWR; - } else { - oflag = flags[0] == 'r' ? O_RDONLY : O_WRONLY; - } - if (flags[0] == 'w' || flags[0] == 'a') { - oflag |= O_CREAT | (flags[0] == 'w' ? O_TRUNC : O_APPEND); - } -#define VP_CHR_TO_OFLAG(_c, _f) do { \ - if (strchr(flags, (_c))) { oflag |= (_f); } \ -} while (0) - -#ifdef O_EXCL - VP_CHR_TO_OFLAG('x', O_EXCL); -#endif -#ifdef O_CLOEXEC - VP_CHR_TO_OFLAG('e', O_CLOEXEC); -#endif -#ifdef O_BINARY - VP_CHR_TO_OFLAG('b', O_BINARY); -#endif -#ifdef O_TEXT - VP_CHR_TO_OFLAG('t', O_TEXT); -#endif -#ifdef O_SEQUENTIAL - VP_CHR_TO_OFLAG('S', O_SEQUENTIAL); -#endif -#ifdef O_RANDOM - VP_CHR_TO_OFLAG('R', O_RANDOM); -#endif - -#undef VP_CHR_TO_OFLAG - } else { - if (strstr(flags, "O_RDONLY")) { - oflag = O_RDONLY; - } else if (strstr(flags, "O_WRONLY")) { - oflag = O_WRONLY; - } else if (strstr(flags, "O_RDWR")) { - oflag = O_RDWR; - } else { - return -1; - } -#define VP_STR_TO_OFLAG(_f) do { \ - if (strstr(flags, #_f)) { oflag |= (_f); } \ -} while (0) - - VP_STR_TO_OFLAG(O_APPEND); - VP_STR_TO_OFLAG(O_CREAT); - VP_STR_TO_OFLAG(O_TRUNC); -#ifdef O_EXCL - VP_STR_TO_OFLAG(O_EXCL); -#endif -#ifdef O_NONBLOCK - VP_STR_TO_OFLAG(O_NONBLOCK); -#endif -#ifdef O_SHLOCK - VP_STR_TO_OFLAG(O_SHLOCK); -#endif -#ifdef O_EXLOCK - VP_STR_TO_OFLAG(O_EXLOCK); -#endif -#ifdef O_DIRECT - VP_STR_TO_OFLAG(O_DIRECT); -#endif -#ifdef O_FSYNC - VP_STR_TO_OFLAG(O_FSYNC); -#endif -#ifdef O_NOFOLLOW - VP_STR_TO_OFLAG(O_NOFOLLOW); -#endif -#ifdef O_TEMPORARY - VP_STR_TO_OFLAG(O_TEMPORARY); -#endif -#ifdef O_RANDOM - VP_STR_TO_OFLAG(O_RANDOM); -#endif -#ifdef O_SEQUENTIAL - VP_STR_TO_OFLAG(O_SEQUENTIAL); -#endif -#ifdef O_BINARY - VP_STR_TO_OFLAG(O_BINARY); -#endif -#ifdef O_TEXT - VP_STR_TO_OFLAG(O_TEXT); -#endif -#ifdef O_INHERIT - VP_STR_TO_OFLAG(O_INHERIT); -#endif -#ifdef _O_SHORT_LIVED - VP_STR_TO_OFLAG(O_SHORT_LIVED); -#endif - -#undef VP_STR_TO_OFLAG - } - - return oflag; -} - -static int -fd_set_nonblock(int fd) -{ -#if defined(F_GETFL) && defined(F_SETFL) && defined(O_NONBLOCK) - int flag; - - if ((flag = fcntl(fd, F_GETFL, 0)) == -1) - return -1; - if (!(flag & O_NONBLOCK)) - return fcntl(fd, F_SETFL, flag | O_NONBLOCK); -#endif - return 0; -} -#ifdef __linux__ -# define VP_SET_NONBLOCK_IF_NEEDED(_fd) (void)fd_set_nonblock(_fd) -#else -# define VP_SET_NONBLOCK_IF_NEEDED(_fd) do { /* nop */ } while (0) -#endif - -const char * -vp_fd_read(char *args, int is_pty_pipe) -{ -#ifdef __linux__ -# define VP_POLLIN (POLLIN | POLLHUP) -#else -# define VP_POLLIN (POLLIN) -#endif - vp_stack_t stack; - int fd; - int cnt; - int timeout; - int n; - char *buf; - char *eof; - unsigned int size = 0; - struct pollfd pfd = {0, POLLIN, 0}; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &fd)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &cnt)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &timeout)); - - if (cnt < 0 || VP_READ_BUFSIZE < cnt) { - cnt = VP_READ_BUFSIZE; - } - - /* initialize buffer */ - _result.top = _result.buf; - vp_stack_push_num(&_result, "%d", 0); /* set eof to 0 */ - eof = _result.top - 1; - buf = _result.top; - *(buf++) = VP_EOV; - buf += VP_HEADER_SIZE; - - pfd.fd = fd; - while (cnt > 0) { - n = poll(&pfd, 1, timeout); - if (n == -1) { - /* eof or error */ - *eof = '1'; - break; - } else if (n == 0) { - /* timeout */ - break; - } - if (pfd.revents & VP_POLLIN) { - n = read(fd, buf, cnt); - if (n == -1) { - if (pfd.revents & POLLERR - || pfd.revents & POLLNVAL - || pfd.revents & POLLWRNORM - /* Cygwin(after ver.2.0) fails pty read and returns - * POLLIN. */ - || (!is_pty_pipe && pfd.revents & POLLIN) - ) { - return vp_stack_return_error(&_result, - "read() error: revents = %d, error = %s", - pfd.revents, strerror(errno)); - } - /* eof */ - *eof = '1'; - break; - } else if (n == 0) { - /* eof */ - *eof = '1'; - break; - } - /* decrease stack top for concatenate. */ - cnt -= n; - buf += n; - size += n; - /* try read more bytes without waiting */ - timeout = 0; - continue; - } else if (pfd.revents & (POLLERR | POLLHUP)) { - /* eof or error */ - *eof = '1'; - break; - } else if (pfd.revents & POLLNVAL) { - return vp_stack_return_error(&_result, "poll() POLLNVAL: %d", - pfd.revents); - } - /* DO NOT REACH HERE */ - return vp_stack_return_error(&_result, "poll() unknown status: %d", - pfd.revents); - } - vp_encode_size(size, _result.top + 1); - _result.top = buf; - return vp_stack_return(&_result); -#undef VP_POLLIN -} - -const char * -vp_file_open(char *args) -{ - vp_stack_t stack; - char *path; - char *flags; - int mode; /* used when flags have O_CREAT */ - int oflag = 0; - int fd; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &path)); - VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &flags)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &mode)); - - oflag = str_to_oflag(flags); - if (oflag == -1) - return vp_stack_return_error(&_result, "open flag error."); - - fd = open(path, oflag, mode); - if (fd == -1) - return vp_stack_return_error(&_result, "open() error: %s", - strerror(errno)); - vp_stack_push_num(&_result, "%d", fd); - return vp_stack_return(&_result); -} - -const char * -vp_file_close(char *args) -{ - vp_stack_t stack; - int fd; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &fd)); - - if (close(fd) == -1) - return vp_stack_return_error(&_result, "close() error: %s", - strerror(errno)); - return NULL; -} - -const char * -vp_file_read(char *args) -{ - return vp_fd_read(args, 0); -} - -const char * -vp_file_write(char *args) -{ - vp_stack_t stack; - int fd; - char *buf; - size_t size; - int timeout; - size_t nleft; - int n; - struct pollfd pfd = {0, POLLOUT, 0}; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &fd)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &timeout)); - - size = vp_decode_size(stack.top); - buf = stack.top + VP_HEADER_SIZE; - - pfd.fd = fd; - nleft = 0; - while (nleft < size) { - n = poll(&pfd, 1, timeout); - if (n == -1) { - return vp_stack_return_error(&_result, "poll() error: %s", - strerror(errno)); - } else if (n == 0) { - /* timeout */ - break; - } - if (pfd.revents & POLLOUT) { - n = write(fd, buf + nleft, size - nleft); - if (n == -1) { - return vp_stack_return_error(&_result, "write() error: %s", - strerror(errno)); - } - nleft += n; - /* try write more bytes without waiting */ - timeout = 0; - continue; - } else if (pfd.revents & (POLLERR | POLLHUP)) { - /* eof or error */ - break; - } else if (pfd.revents & POLLNVAL) { - return vp_stack_return_error(&_result, "poll() POLLNVAL: %d", - pfd.revents); - } - /* DO NOT REACH HERE */ - return vp_stack_return_error(&_result, "poll() unknown status: %s", - pfd.revents); - } - vp_stack_push_num(&_result, "%zu", nleft); - return vp_stack_return(&_result); -} - -static void -close_allfd(int fds[3][2]) -{ - int i; - - for (i = 0; i < 6; ++i) { - int fd = fds[i / 2][i % 2]; - - if (fd > 0) { - (void)close(fd); - } - } -} - -const char * -vp_pipe_open(char *args) -{ -#define VP_GOTO_ERROR(_fmt) do { errfmt = (_fmt); goto error; } while(0) - vp_stack_t stack; - int npipe, hstdin, hstderr, hstdout; - int argc; - int fd[3][2] = {{0}}; - pid_t pid; - int dummy; - char *errfmt; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &npipe)); - if (npipe != 2 && npipe != 3) - return vp_stack_return_error(&_result, "npipe range error. wrong pipes."); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &hstdin)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &hstdout)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &hstderr)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &argc)); - - if (hstdin > 0) { - fd[0][0] = hstdin; - fd[0][1] = 0; - } else { - if (pipe(fd[0]) < 0) { - VP_GOTO_ERROR("pipe() error: %s"); - } - } - if (hstdout > 0) { - fd[1][1] = hstdout; - fd[1][0] = 0; - } else { - if (pipe(fd[1]) < 0) { - VP_GOTO_ERROR("pipe() error: %s"); - } - } - if (hstderr > 0) { - fd[2][1] = hstderr; - fd[2][0] = 0; - } else if (npipe == 3 && hstderr == 0) { - if (pipe(fd[2]) < 0) { - VP_GOTO_ERROR("pipe() error: %s"); - } - } - - pid = fork(); - if (pid < 0) { - VP_GOTO_ERROR("fork() error: %s"); - } else if (pid == 0) { - /* child */ - char **argv; - int i; - - /* Set process group. */ - setpgid(0, 0); - - if (fd[0][1] > 0) { - close(fd[0][1]); - } - if (fd[1][0] > 0) { - close(fd[1][0]); - } - if (fd[2][0] > 0) { - close(fd[2][0]); - } - if (fd[0][0] > 0) { - if (dup2(fd[0][0], STDIN_FILENO) != STDIN_FILENO) { - goto child_error; - } - close(fd[0][0]); - } - if (fd[1][1] > 0) { - if (dup2(fd[1][1], STDOUT_FILENO) != STDOUT_FILENO) { - goto child_error; - } - close(fd[1][1]); - } - if (fd[2][1] > 0) { - if (dup2(fd[2][1], STDERR_FILENO) != STDERR_FILENO) { - goto child_error; - } - close(fd[2][1]); - } else if (npipe == 2) { - if (dup2(STDOUT_FILENO, STDERR_FILENO) != STDERR_FILENO) { - goto child_error; - } - } - - { -#ifndef TIOCNOTTY - setsid(); -#else - /* Ignore tty. */ - char name[L_ctermid]; - if (ctermid(name)[0] != '\0') { - int tfd; - if ((tfd = open(name, O_RDONLY)) != -1) { - ioctl(tfd, TIOCNOTTY, NULL); - close(tfd); - } - } -#endif - } - - argv = malloc(sizeof(char *) * (argc+1)); - if (argv == NULL) { - goto child_error; - } - for (i = 0; i < argc; ++i) { - if (vp_stack_pop_str(&stack, &(argv[i]))) { - free(argv); - goto child_error; - } - } - argv[argc] = NULL; - - execv(argv[0], argv); - /* error */ - goto child_error; - } else { - /* parent */ - if (fd[0][0] > 0) { - close(fd[0][0]); - } - if (fd[1][1] > 0) { - close(fd[1][1]); - } - if (fd[2][1] > 0) { - close(fd[2][1]); - } - - vp_stack_push_num(&_result, "%d", pid); - vp_stack_push_num(&_result, "%d", fd[0][1]); - vp_stack_push_num(&_result, "%d", fd[1][0]); - if (npipe == 3) { - vp_stack_push_num(&_result, "%d", fd[2][0]); - } - return vp_stack_return(&_result); - } - /* DO NOT REACH HERE */ - return NULL; - - /* error */ -error: - close_allfd(fd); - return vp_stack_return_error(&_result, errfmt, strerror(errno)); - -child_error: - dummy = write(STDOUT_FILENO, strerror(errno), strlen(strerror(errno))); - _exit(EXIT_FAILURE); -#undef VP_GOTO_ERROR -} - -const char * -vp_pipe_close(char *args) -{ - return vp_file_close(args); -} - -const char * -vp_pipe_read(char *args) -{ - return vp_fd_read(args, 1); -} - -const char * -vp_pipe_write(char *args) -{ - return vp_file_write(args); -} - -const char * -vp_pty_open(char *args) -{ -#define VP_GOTO_ERROR(_fmt) do { errfmt = (_fmt); goto error; } while(0) - vp_stack_t stack; - int argc; - int fd[3][2] = {{0}}; - pid_t pid; - struct winsize ws = {0, 0, 0, 0}; - int dummy; - int hstdin, hstderr, hstdout; - int fdm; - int npipe; - char *errfmt; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &npipe)); - if (npipe != 2 && npipe != 3) - return vp_stack_return_error(&_result, "npipe range error. wrong pipes."); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%hu", &(ws.ws_col))); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%hu", &(ws.ws_row))); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &hstdin)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &hstdout)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &hstderr)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &argc)); - - /* Set pipe */ - if (hstdin > 0) { - fd[0][0] = hstdin; - fd[0][1] = 0; - } - if (hstdout > 1) { - fd[1][1] = hstdout; - fd[1][0] = 0; - } else if (hstdout == 1) { - if (pipe(fd[1]) < 0) { - VP_GOTO_ERROR("pipe() error: %s"); - } - } - if (hstderr > 1) { - fd[2][1] = hstderr; - fd[2][0] = 0; - } else if (npipe == 3) { - if (hstderr == 1){ - if (pipe(fd[2]) < 0) { - VP_GOTO_ERROR("pipe() error: %s"); - } - } else if (hstderr == 0) { - if (openpty(&fd[2][0], &fd[2][1], NULL, NULL, &ws) < 0) { - VP_GOTO_ERROR("openpty() error: %s"); - } - VP_SET_NONBLOCK_IF_NEEDED(fd[2][0]); - } - } - - pid = forkpty(&fdm, NULL, NULL, &ws); - if (pid < 0) { - VP_GOTO_ERROR("fork() error: %s"); - } else if (pid == 0) { - /* child */ - char **argv; - int i; - - /* Close pipe */ - if (fd[1][0] > 0) { - close(fd[1][0]); - } - if (fd[2][0] > 0) { - close(fd[2][0]); - } - - if (fd[0][0] > 0) { - if (dup2(fd[0][0], STDIN_FILENO) != STDIN_FILENO) { - goto child_error; - } - close(fd[0][0]); - } - - if (fd[1][1] > 0) { - if (dup2(fd[1][1], STDOUT_FILENO) != STDOUT_FILENO) { - goto child_error; - } - close(fd[1][1]); - } - - if (fd[2][1] > 0) { - if (dup2(fd[2][1], STDERR_FILENO) != STDERR_FILENO) { - goto child_error; - } - close(fd[2][1]); - } - - argv = malloc(sizeof(char *) * (argc+1)); - if (argv == NULL) { - goto child_error; - } - for (i = 0; i < argc; ++i) { - if (vp_stack_pop_str(&stack, &(argv[i]))) { - free(argv); - goto child_error; - } - } - argv[argc] = NULL; - - execv(argv[0], argv); - /* error */ - goto child_error; - } else { - /* parent */ - if (fd[1][1] > 0) { - close(fd[1][1]); - } - if (fd[2][1] > 0) { - close(fd[2][1]); - } - - if (hstdin == 0) { - fd[0][1] = fdm; - } - if (hstdout == 0) { - fd[1][0] = hstdin == 0 ? dup(fdm) : fdm; - VP_SET_NONBLOCK_IF_NEEDED(fd[1][0]); - } - - vp_stack_push_num(&_result, "%d", pid); - vp_stack_push_num(&_result, "%d", fd[0][1]); - vp_stack_push_num(&_result, "%d", fd[1][0]); - if (npipe == 3) { - vp_stack_push_num(&_result, "%d", fd[2][0]); - } - return vp_stack_return(&_result); - } - /* DO NOT REACH HERE */ - return NULL; - - /* error */ -error: - close_allfd(fd); - return vp_stack_return_error(&_result, errfmt, strerror(errno)); - -child_error: - dummy = write(STDOUT_FILENO, strerror(errno), strlen(strerror(errno))); - _exit(EXIT_FAILURE); -#undef VP_GOTO_ERROR -} - -const char * -vp_pty_close(char *args) -{ - return vp_file_close(args); -} - -const char * -vp_pty_read(char *args) -{ - return vp_fd_read(args, 1); -} - -const char * -vp_pty_write(char *args) -{ - return vp_file_write(args); -} - -const char * -vp_pty_get_winsize(char *args) -{ - vp_stack_t stack; - int fd; - struct winsize ws = {0, 0, 0, 0}; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &fd)); - - if (ioctl(fd, TIOCGWINSZ, &ws) < 0) - return vp_stack_return_error(&_result, "ioctl() error: %s", - strerror(errno)); - vp_stack_push_num(&_result, "%hu", ws.ws_col); - vp_stack_push_num(&_result, "%hu", ws.ws_row); - return vp_stack_return(&_result); -} -const char * -vp_pty_set_winsize(char *args) -{ - vp_stack_t stack; - int fd; - struct winsize ws = {0, 0, 0, 0}; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &fd)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%hu", &(ws.ws_col))); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%hu", &(ws.ws_row))); - - if (ioctl(fd, TIOCSWINSZ, &ws) < 0) - return vp_stack_return_error(&_result, "ioctl() error: %s", - strerror(errno)); - return NULL; -} - -const char * -vp_kill(char *args) -{ - vp_stack_t stack; - pid_t pid, pgid; - int sig; - int ret; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &pid)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &sig)); - - ret = kill(pid, sig); - if (ret < 0) - return vp_stack_return_error(&_result, "kill() error: %s", - strerror(errno)); - - if (sig != 0) { - /* Kill by the process group. */ - pgid = getpgid(pid); - if (pid == pgid) { - kill(-pgid, sig); - } - } - - vp_stack_push_num(&_result, "%d", ret); - return vp_stack_return(&_result); -} - -const char * -vp_waitpid(char *args) -{ - vp_stack_t stack; - pid_t pid, pgid; - pid_t n; - int status; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &pid)); - - n = waitpid(pid, &status, WNOHANG | WUNTRACED); - if (n == -1) - return vp_stack_return_error(&_result, "waitpid() error: %s", - strerror(errno)); - if (n == 0 || WIFCONTINUED(status)) { - vp_stack_push_str(&_result, "run"); - vp_stack_push_num(&_result, "%d", 0); - } else if (WIFEXITED(status)) { - /* Kill by the process group. */ - pgid = getpgid(pid); - if (pgid > 0) { - kill(-pgid, 15); - } - - vp_stack_push_str(&_result, "exit"); - vp_stack_push_num(&_result, "%d", WEXITSTATUS(status)); - } else if (WIFSIGNALED(status)) { - vp_stack_push_str(&_result, "signal"); - vp_stack_push_num(&_result, "%d", WTERMSIG(status)); - } else if (WIFSTOPPED(status)) { - vp_stack_push_str(&_result, "stop"); - vp_stack_push_num(&_result, "%d", WSTOPSIG(status)); - } else { - return vp_stack_return_error(&_result, - "waitpid() unknown status: status=%d", status); - } - - return vp_stack_return(&_result); -} - -/* - * This is based on socket.diff.gz written by Yasuhiro Matsumoto. - * see: http://marc.theaimsgroup.com/?l=vim-dev&m=105289857008664&w=2 - */ -const char * -vp_socket_open(char *args) -{ - vp_stack_t stack; - char *host; - char *port; - char *p; - int n; - unsigned short nport; - int sock; - struct sockaddr_in sockaddr; - struct hostent *hostent; - struct servent *servent; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &host)); - VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &port)); - - n = strtol(port, &p, 10); - if (p == port + strlen(port)) { - nport = htons(n); - } else { - servent = getservbyname(port, NULL); - if (servent == NULL) - return vp_stack_return_error(&_result, "getservbyname() error: %s", - port); - nport = servent->s_port; - } - - sock = socket(PF_INET, SOCK_STREAM, 0); - hostent = gethostbyname(host); - sockaddr.sin_family = AF_INET; - sockaddr.sin_port = nport; - sockaddr.sin_addr = *((struct in_addr*)*hostent->h_addr_list); - - if (connect(sock, (struct sockaddr*)&sockaddr, sizeof(struct sockaddr_in)) - == -1) - return vp_stack_return_error(&_result, "connect() error: %s", - strerror(errno)); - - vp_stack_push_num(&_result, "%d", sock); - return vp_stack_return(&_result); -} - -const char * -vp_socket_close(char *args) -{ - return vp_file_close(args); -} - -const char * -vp_socket_read(char *args) -{ - return vp_fd_read(args, 0); -} - -const char * -vp_socket_write(char *args) -{ - return vp_file_write(args); -} - -/* - * Added by Richard Emberson - * Check to see if a host exists. - */ -const char * -vp_host_exists(char *args) -{ - vp_stack_t stack; - char *host; - struct hostent *hostent; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &host)); - - hostent = gethostbyname(host); - if (hostent) { - vp_stack_push_num(&_result, "%d", 1); - } else { - vp_stack_push_num(&_result, "%d", 0); - } - - return vp_stack_return(&_result); -} - -const char * -vp_readdir(char *args) -{ - vp_stack_t stack; - char *dirname; - char buf[1024]; - - DIR *dir; - struct dirent *dp; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &dirname)); - - if ((dir=opendir(dirname)) == NULL) { - return vp_stack_return_error(&_result, "opendir() error: %s", - strerror(errno)); - } - - if (strcmp(dirname, "/") == 0) { - dirname[0] = '\0'; - } - - for (dp = readdir(dir); dp != NULL; dp = readdir(dir)) { - if (strcmp(dp->d_name, ".") && strcmp(dp->d_name, "..")) { - snprintf(buf, sizeof(buf), "%s/%s", dirname, dp->d_name); - vp_stack_push_str(&_result, buf); - } - } - closedir(dir); - - return vp_stack_return(&_result); -} - -const char * -vp_decode(char *args) -{ - vp_stack_t stack; - size_t len; - char *str; - char *p, *q; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &str)); - - len = strlen(str); - if (len % 2 != 0) { - return "vp_decode: invalid data length"; - } - - VP_RETURN_IF_FAIL(vp_stack_reserve(&_result, - (_result.top - _result.buf) + (len / 2) + sizeof(VP_EOV_STR))); - - for (p = str, q = _result.top; p < str + len; ) { - char hb, lb; - - hb = CHR2XD[(int)*(p++)]; - lb = CHR2XD[(int)*(p++)]; - if (hb != (char)-1 && lb != (char)-1) { - *(q++) = (hb << 4) | lb; - } - } - *(q++) = VP_EOV; - *q = '\0'; - _result.top = q; - - return vp_stack_return(&_result); -} - -const char * -vp_get_signals(char *args) -{ -#define VP_STACK_PUSH_SIGNAME(_signame) \ - vp_stack_push_num(&_result, #_signame ":%d", (_signame)) -#define VP_STACK_PUSH_ALTSIGNAME(_signame, _altsig) \ - vp_stack_push_num(&_result, #_signame ":%d", (_altsig)) - -#ifdef SIGABRT - VP_STACK_PUSH_SIGNAME(SIGABRT); -#else -#error "SIGABRT is undefined, contrary to ISO C standard." -#endif -#ifdef SIGFPE - VP_STACK_PUSH_SIGNAME(SIGFPE); -#else -#error "SIGFPE is undefined, contrary to ISO C standard." -#endif -#ifdef SIGILL - VP_STACK_PUSH_SIGNAME(SIGILL); -#else -#error "SIGILL is undefined, contrary to ISO C standard." -#endif -#ifdef SIGINT - VP_STACK_PUSH_SIGNAME(SIGINT); -#else -#error "SIGINT is undefined, contrary to ISO C standard." -#endif -#ifdef SIGSEGV - VP_STACK_PUSH_SIGNAME(SIGSEGV); -#else -#error "SIGSEGV is undefined, contrary to ISO C standard." -#endif -#ifdef SIGTERM - VP_STACK_PUSH_SIGNAME(SIGTERM); -#else -#error "SIGTERM is undefined, contrary to ISO C standard." -#endif -#ifdef SIGALRM - VP_STACK_PUSH_SIGNAME(SIGALRM); -#else - VP_STACK_PUSH_ALTSIGNAME(SIGALRM, SIGTERM); -#endif -#ifdef SIGBUS - VP_STACK_PUSH_SIGNAME(SIGBUS); -#else - VP_STACK_PUSH_ALTSIGNAME(SIGBUS, SIGABRT); -#endif -#ifdef SIGCHLD - VP_STACK_PUSH_SIGNAME(SIGCHLD); -#else - VP_STACK_PUSH_ALTSIGNAME(SIGCHLD, 0); -#endif -#ifdef SIGCONT - VP_STACK_PUSH_SIGNAME(SIGCONT); -#else - VP_STACK_PUSH_ALTSIGNAME(SIGCONT, 0); -#endif -#ifdef SIGHUP - VP_STACK_PUSH_SIGNAME(SIGHUP); -#else - VP_STACK_PUSH_ALTSIGNAME(SIGHUP, SIGTERM); -#endif -#ifdef SIGKILL - VP_STACK_PUSH_SIGNAME(SIGKILL); -#else - VP_STACK_PUSH_ALTSIGNAME(SIGKILL, SIGTERM); -#endif -#ifdef SIGPIPE - VP_STACK_PUSH_SIGNAME(SIGPIPE); -#else - VP_STACK_PUSH_ALTSIGNAME(SIGPIPE, SIGTERM); -#endif -#ifdef SIGQUIT - VP_STACK_PUSH_SIGNAME(SIGQUIT); -#else - VP_STACK_PUSH_ALTSIGNAME(SIGQUIT, SIGTERM); -#endif -#ifdef SIGSTOP - VP_STACK_PUSH_SIGNAME(SIGSTOP); -#else - VP_STACK_PUSH_ALTSIGNAME(SIGSTOP, 0); -#endif -#ifdef SIGTSTP - VP_STACK_PUSH_SIGNAME(SIGTSTP); -#else - VP_STACK_PUSH_ALTSIGNAME(SIGTSTP, 0); -#endif -#ifdef SIGTTIN - VP_STACK_PUSH_SIGNAME(SIGTTIN); -#else - VP_STACK_PUSH_ALTSIGNAME(SIGTTIN, 0); -#endif -#ifdef SIGTTOU - VP_STACK_PUSH_SIGNAME(SIGTTOU); -#else - VP_STACK_PUSH_ALTSIGNAME(SIGTTOU, 0); -#endif -#ifdef SIGUSR1 - VP_STACK_PUSH_SIGNAME(SIGUSR1); -#else - VP_STACK_PUSH_ALTSIGNAME(SIGUSR1, SIGTERM); -#endif -#ifdef SIGUSR2 - VP_STACK_PUSH_SIGNAME(SIGUSR2); -#else - VP_STACK_PUSH_ALTSIGNAME(SIGUSR2, SIGTERM); -#endif -#ifdef SIGPOLL - VP_STACK_PUSH_SIGNAME(SIGPOLL); -#else - VP_STACK_PUSH_ALTSIGNAME(SIGPOLL, SIGTERM); -#endif -#ifdef SIGPROF - VP_STACK_PUSH_SIGNAME(SIGPROF); -#else - VP_STACK_PUSH_ALTSIGNAME(SIGPROF, SIGTERM); -#endif -#ifdef SIGSYS - VP_STACK_PUSH_SIGNAME(SIGSYS); -#else - VP_STACK_PUSH_ALTSIGNAME(SIGSYS, SIGABRT); -#endif -#ifdef SIGTRAP - VP_STACK_PUSH_SIGNAME(SIGTRAP); -#else - VP_STACK_PUSH_ALTSIGNAME(SIGTRAP, SIGABRT); -#endif -#ifdef SIGURG - VP_STACK_PUSH_SIGNAME(SIGURG); -#else - VP_STACK_PUSH_ALTSIGNAME(SIGURG, 0); -#endif -#ifdef SIGVTALRM - VP_STACK_PUSH_SIGNAME(SIGVTALRM); -#else - VP_STACK_PUSH_ALTSIGNAME(SIGVTALRM, SIGTERM); -#endif -#ifdef SIGXCPU - VP_STACK_PUSH_SIGNAME(SIGXCPU); -#else - VP_STACK_PUSH_ALTSIGNAME(SIGXCPU, SIGABRT); -#endif -#ifdef SIGXFSZ - VP_STACK_PUSH_SIGNAME(SIGXFSZ); -#else - VP_STACK_PUSH_ALTSIGNAME(SIGXFSZ, SIGABRT); -#endif -#ifdef SIGEMT - VP_STACK_PUSH_SIGNAME(SIGEMT); -#else - VP_STACK_PUSH_ALTSIGNAME(SIGEMT, SIGTERM); -#endif -#ifdef SIGWINCH - VP_STACK_PUSH_SIGNAME(SIGWINCH); -#else - VP_STACK_PUSH_ALTSIGNAME(SIGWINCH, 0); -#endif - return vp_stack_return(&_result); - -#undef VP_STACK_PUSH_SIGNAME -#undef VP_STACK_PUSH_ALTSIGNAME -} - -/* - * vim:set sw=4 sts=4 et: - */ === removed file 'vim/bundle/vimproc.vim/src/proc_w32.c' --- vim/bundle/vimproc.vim/src/proc_w32.c 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/src/proc_w32.c 1970-01-01 00:00:00 +0000 @@ -1,1292 +0,0 @@ -/*----------------------------------------------------------------------------- - * Copyright (c) 2006 Yukihiro Nakadaira - original version(vimproc) - * Copyright (c) 2009 Shougo Matsushita - modified version - * - * License: MIT license - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - *---------------------------------------------------------------------------*/ - -#include -#include -#include -#include -#include -#include -#include -#include - -/* For GetConsoleWindow() for Windows 2000 or later. */ -#ifndef WINVER -#define WINVER 0x0500 -#endif -#ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x0500 -#endif - -#include -#include -#include -#if 0 -# include -#endif -#define _POSIX_ -#include -#include - -const int debug = 0; - -#ifdef _MSC_VER -# define EXPORT __declspec(dllexport) -#else -# define EXPORT -#endif - -#ifdef _MSC_VER -# if _MSC_VER < 1900 -# define snprintf _snprintf -# endif -# if _MSC_VER < 1400 -# define vsnprintf _vsnprintf -# endif -#endif - -#include "vimstack.c" - -#define lengthof(arr) (sizeof(arr) / sizeof((arr)[0])) - -/* API */ -EXPORT const char *vp_dlopen(char *args); /* [handle] (path) */ -EXPORT const char *vp_dlclose(char *args); /* [] (handle) */ -EXPORT const char *vp_dlversion(char *args); /* [version] () */ - -EXPORT const char *vp_file_open(char *args); /* [fd] (path, flags, mode) */ -EXPORT const char *vp_file_close(char *args); /* [] (fd) */ -EXPORT const char *vp_file_read(char *args); /* [eof, hd] (fd, cnt, timeout) */ -EXPORT const char *vp_file_write(char *args); /* [nleft] (fd, timeout, hd) */ - -EXPORT const char *vp_pipe_open(char *args); /* [pid, [fd] * npipe] - (npipe, argc, [argv]) */ -EXPORT const char *vp_pipe_close(char *args); /* [] (fd) */ -EXPORT const char *vp_pipe_read(char *args); /* [eof, hd] (fd, cnt, timeout) */ -EXPORT const char *vp_pipe_write(char *args); /* [nleft] (fd, timeout, hd) */ - -EXPORT const char *vp_pty_open(char *args); /* [pid, fd, ttyname] - (width, height, argc, [argv]) */ -EXPORT const char *vp_pty_close(char *args); /* [] (fd) */ -EXPORT const char *vp_pty_read(char *args); /* [eof, hd] (fd, cnt, timeout) */ -EXPORT const char *vp_pty_write(char *args); /* [nleft] (fd, timeout, hd) */ -EXPORT const char *vp_pty_get_winsize(char *args); /* [width, height] (fd) */ -EXPORT const char *vp_pty_set_winsize(char *args); /* [] (fd, width, height) */ - -EXPORT const char *vp_kill(char *args); /* [] (pid, sig) */ -EXPORT const char *vp_waitpid(char *args); /* [cond, status] (pid) */ -EXPORT const char *vp_close_handle(char *args); /* [] (fd) */ - -EXPORT const char *vp_socket_open(char *args); /* [socket] (host, port) */ -EXPORT const char *vp_socket_close(char *args);/* [] (socket) */ -EXPORT const char *vp_socket_read(char *args); /* [eof, hd] (socket, cnt, timeout) */ -EXPORT const char *vp_socket_write(char *args);/* [nleft] (socket, hd, timeout) */ - -EXPORT const char *vp_host_exists(char *args); /* [int] (host) */ - -EXPORT const char *vp_decode(char *args); /* [decoded_str] (encode_str) */ - -EXPORT const char *vp_open(char *args); /* [] (path) */ -EXPORT const char *vp_readdir(char *args); /* [files] (dirname) */ - - -EXPORT const char * vp_delete_trash(char *args); /* [int] (filename) */ - -EXPORT const char *vp_get_signals(char *args); /* [signals] () */ - -static BOOL ExitRemoteProcess(HANDLE hProcess, UINT_PTR uExitCode); - -/* --- */ - -#define VP_BUFSIZE (65536) -#define VP_READ_BUFSIZE (VP_BUFSIZE - (VP_HEADER_SIZE + 1) * 2 - 1) - -static LPWSTR -utf8_to_utf16(const char *str) -{ - LPWSTR buf; - int len; - - len = MultiByteToWideChar(CP_UTF8, 0, str, -1, NULL, 0); - if (len == 0) - return NULL; - buf = malloc(sizeof(WCHAR) * (len + 1)); - if (buf == NULL) { - SetLastError(ERROR_NOT_ENOUGH_MEMORY); - return NULL; - } - MultiByteToWideChar(CP_UTF8, 0, str, -1, buf, len); - buf[len] = 0; - return buf; -} - -static char * -utf16_to_utf8(LPCWSTR wstr) -{ - char *buf; - int len; - - len = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, NULL, 0, NULL, NULL); - if (len == 0) - return NULL; - buf = malloc(sizeof(char) * (len + 1)); - if (buf == NULL) { - SetLastError(ERROR_NOT_ENOUGH_MEMORY); - return NULL; - } - WideCharToMultiByte(CP_UTF8, 0, wstr, -1, buf, len, NULL, NULL); - buf[len] = 0; - return buf; -} - -static const char * -lasterror() -{ - static char lpMsgBuf[512]; - WCHAR buf[512]; - char *p; - - FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, GetLastError(), 0, - buf, lengthof(buf), NULL); - p = utf16_to_utf8(buf); - if (p == NULL) - return NULL; - lstrcpyn(lpMsgBuf, p, lengthof(lpMsgBuf)); - free(p); - return lpMsgBuf; -} - -#define open _open -#define close _close -#define read _read -#define write _write -#define lseek _lseek - -static vp_stack_t _result = VP_STACK_NULL; - -const char * -vp_dlopen(char *args) -{ - vp_stack_t stack; - char *path; - LPWSTR pathw; - HINSTANCE handle; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &path)); - VP_RETURN_IF_FAIL(vp_stack_reserve(&_result, VP_BUFSIZE)); - - pathw = utf8_to_utf16(path); - if (pathw == NULL) - return lasterror(); - handle = LoadLibraryW(pathw); - free(pathw); - if (handle == NULL) - return lasterror(); - vp_stack_push_num(&_result, "%p", handle); - return vp_stack_return(&_result); -} - -const char * -vp_dlclose(char *args) -{ - vp_stack_t stack; - HINSTANCE handle; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%p", &handle)); - - if (!FreeLibrary(handle)) - return lasterror(); - vp_stack_free(&_result); - return NULL; -} - -const char * -vp_dlversion(char *args) -{ - vp_stack_push_num(&_result, "%2d%02d", 9, 2); - return vp_stack_return(&_result); -} - -static int -str_to_oflag(const char *flags) -{ - int oflag = 0; - - if (strchr("rwa", flags[0])) { - if (strchr(flags, '+')) { - oflag = _O_RDWR; - } else { - oflag = flags[0] == 'r' ? _O_RDONLY : _O_WRONLY; - } - if (flags[0] == 'w' || flags[0] == 'a') { - oflag |= _O_CREAT | (flags[0] == 'w' ? _O_TRUNC : _O_APPEND); - } -#define VP_CHR_TO_OFLAG(_c, _f) do { \ - if (strchr(flags, (_c))) { oflag |= _ ## _f; } \ -} while (0) - -#ifdef _O_EXCL - VP_CHR_TO_OFLAG('x', O_EXCL); -#endif -#ifdef _O_CLOEXEC - VP_CHR_TO_OFLAG('e', O_CLOEXEC); -#endif -#ifdef _O_BINARY - VP_CHR_TO_OFLAG('b', O_BINARY); -#endif -#ifdef _O_TEXT - VP_CHR_TO_OFLAG('t', O_TEXT); -#endif -#ifdef _O_SEQUENTIAL - VP_CHR_TO_OFLAG('S', O_SEQUENTIAL); -#endif -#ifdef _O_RANDOM - VP_CHR_TO_OFLAG('R', O_RANDOM); -#endif - -#undef VP_CHR_TO_OFLAG - } else { - if (strstr(flags, "O_RDONLY")) { - oflag = _O_RDONLY; - } else if (strstr(flags, "O_WRONLY")) { - oflag = _O_WRONLY; - } else if (strstr(flags, "O_RDWR")) { - oflag = _O_RDWR; - } else { - return -1; - } -#define VP_STR_TO_OFLAG(_f) do { \ - if (strstr(flags, #_f)) { oflag |= _ ## _f; } \ -} while (0) - - VP_STR_TO_OFLAG(O_APPEND); - VP_STR_TO_OFLAG(O_CREAT); - VP_STR_TO_OFLAG(O_TRUNC); -#ifdef _O_EXCL - VP_STR_TO_OFLAG(O_EXCL); -#endif -#ifdef _O_NONBLOCK - VP_STR_TO_OFLAG(O_NONBLOCK); -#endif -#ifdef _O_SHLOCK - VP_STR_TO_OFLAG(O_SHLOCK); -#endif -#ifdef _O_EXLOCK - VP_STR_TO_OFLAG(O_EXLOCK); -#endif -#ifdef _O_DIRECT - VP_STR_TO_OFLAG(O_DIRECT); -#endif -#ifdef _O_FSYNC - VP_STR_TO_OFLAG(O_FSYNC); -#endif -#ifdef _O_NOFOLLOW - VP_STR_TO_OFLAG(O_NOFOLLOW); -#endif -#ifdef _O_TEMPORARY - VP_STR_TO_OFLAG(O_TEMPORARY); -#endif -#ifdef _O_RANDOM - VP_STR_TO_OFLAG(O_RANDOM); -#endif -#ifdef _O_SEQUENTIAL - VP_STR_TO_OFLAG(O_SEQUENTIAL); -#endif -#ifdef _O_BINARY - VP_STR_TO_OFLAG(O_BINARY); -#endif -#ifdef _O_TEXT - VP_STR_TO_OFLAG(O_TEXT); -#endif -#ifdef _O_INHERIT - VP_STR_TO_OFLAG(O_INHERIT); -#endif -#ifdef _O_SHORT_LIVED - VP_STR_TO_OFLAG(O_SHORT_LIVED); -#endif - -#undef VP_STR_TO_OFLAG - } - - return oflag; -} - -const char * -vp_file_open(char *args) -{ - vp_stack_t stack; - char *path; - LPWSTR pathw; - char *flags; - int mode; /* used when flags have O_CREAT */ - int oflag = 0; - int fd; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &path)); - VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &flags)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &mode)); - - oflag = str_to_oflag(flags); - if (oflag == -1) - return vp_stack_return_error(&_result, "open flag error."); - - pathw = utf8_to_utf16(path); - if (pathw == NULL) - return lasterror(); - - fd = _wopen(pathw, oflag, mode); - free(pathw); - if (fd == -1) { - return vp_stack_return_error(&_result, "open() error: %s", - strerror(errno)); - } - if (oflag & O_APPEND) { - /* Note: Windows7 ignores O_APPEND flag. why? */ - lseek(fd, 0, SEEK_END); - } - vp_stack_push_num(&_result, "%d", fd); - return vp_stack_return(&_result); -} - -const char * -vp_file_close(char *args) -{ - vp_stack_t stack; - int fd; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &fd)); - - if (close(fd) == -1) - return vp_stack_return_error(&_result, "close() error: %s", - strerror(errno)); - return NULL; -} - -const char * -vp_file_read(char *args) -{ - vp_stack_t stack; - int fd; - int cnt; - int timeout; - DWORD ret; - int n; - char *buf; - char *eof; - unsigned int size = 0; - HANDLE hFile; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &fd)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &cnt)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &timeout)); - - if (cnt < 0 || VP_READ_BUFSIZE < cnt) { - cnt = VP_READ_BUFSIZE; - } - - /* initialize buffer */ - _result.top = _result.buf; - vp_stack_push_num(&_result, "%d", 0); /* set eof to 0 */ - eof = _result.top - 1; - buf = _result.top; - *(buf++) = VP_EOV; - buf += VP_HEADER_SIZE; - - hFile = (HANDLE)_get_osfhandle(fd); - while (cnt > 0) { - ret = WaitForSingleObject(hFile, timeout); - if (ret == WAIT_FAILED) { - return vp_stack_return_error(&_result, "WaitForSingleObject() error: %s", - lasterror()); - } else if (ret == WAIT_TIMEOUT) { - /* timeout */ - break; - } - n = read(fd, buf, cnt); - if (n == -1) { - return vp_stack_return_error(&_result, "read() error: %s", - strerror(errno)); - } else if (n == 0) { - /* eof */ - *eof = '1'; - break; - } - /* decrease stack top for concatenate. */ - cnt -= n; - buf += n; - size += n; - /* try read more bytes without waiting */ - timeout = 0; - } - vp_encode_size(size, _result.top + 1); - _result.top = buf; - return vp_stack_return(&_result); -} - -const char * -vp_file_write(char *args) -{ - vp_stack_t stack; - int fd; - char *buf; - size_t size; - int timeout; - size_t nleft; - DWORD ret; - int n; - HANDLE hFile; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &fd)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &timeout)); - - size = vp_decode_size(stack.top); - buf = stack.top + VP_HEADER_SIZE; - - nleft = 0; - hFile = (HANDLE)_get_osfhandle(fd); - while (nleft < size) { - ret = WaitForSingleObject(hFile, timeout); - if (ret == WAIT_FAILED) { - return vp_stack_return_error(&_result, "WaitForSingleObject() error: %s", - lasterror()); - } else if (ret == WAIT_TIMEOUT) { - /* timeout */ - break; - } - n = write(fd, buf + nleft, (unsigned int)(size - nleft)); - if (n == -1) { - return vp_stack_return_error(&_result, "write() error: %s", - strerror(errno)); - } - nleft += n; - /* try write more bytes without waiting */ - timeout = 0; - } - vp_stack_push_num(&_result, "%u", nleft); - return vp_stack_return(&_result); -} - -/* - * http://support.microsoft.com/kb/190351/ - */ -const char * -vp_pipe_open(char *args) -{ -#define VP_GOTO_ERROR(_fmt) do { errfmt = (_fmt); goto error; } while(0) -#define VP_DUP_HANDLE(hIn, phOut, inherit) \ - if (!DuplicateHandle(GetCurrentProcess(), hIn, \ - GetCurrentProcess(), phOut, \ - 0, inherit, DUPLICATE_SAME_ACCESS)) { \ - VP_GOTO_ERROR("DuplicateHandle() error: %s"); \ - } - vp_stack_t stack; - int npipe, hstdin, hstderr, hstdout; - char *errfmt; - const char *errmsg; - char *cmdline; - LPWSTR cmdlinew; - HANDLE hInputWrite = INVALID_HANDLE_VALUE, hInputRead = INVALID_HANDLE_VALUE; - HANDLE hOutputWrite = INVALID_HANDLE_VALUE, hOutputRead = INVALID_HANDLE_VALUE; - HANDLE hErrorWrite = INVALID_HANDLE_VALUE, hErrorRead = INVALID_HANDLE_VALUE; - SECURITY_ATTRIBUTES sa; - PROCESS_INFORMATION pi; - STARTUPINFOW si; - BOOL ret; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &npipe)); - if (npipe != 2 && npipe != 3) - return vp_stack_return_error(&_result, "npipe range error"); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &hstdin)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &hstdout)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &hstderr)); - VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &cmdline)); - - sa.nLength = sizeof(SECURITY_ATTRIBUTES); - sa.lpSecurityDescriptor = NULL; - sa.bInheritHandle = TRUE; - - if (hstdin) { - /* Get handle. */ - VP_DUP_HANDLE((HANDLE)_get_osfhandle(hstdin), &hInputRead, TRUE); - } else { - HANDLE hInputWriteTmp; - - /* Create pipe. */ - if (!CreatePipe(&hInputRead, &hInputWrite, &sa, 0)) - VP_GOTO_ERROR("CreatePipe() error: %s"); - - VP_DUP_HANDLE(hInputWrite, &hInputWriteTmp, FALSE); - CloseHandle(hInputWrite); - hInputWrite = hInputWriteTmp; - } - - if (hstdout) { - /* Get handle. */ - VP_DUP_HANDLE((HANDLE)_get_osfhandle(hstdout), &hOutputWrite, TRUE); - } else { - HANDLE hOutputReadTmp; - - /* Create pipe. */ - if (!CreatePipe(&hOutputRead, &hOutputWrite, &sa, 0)) - VP_GOTO_ERROR("CreatePipe() error: %s"); - - VP_DUP_HANDLE(hOutputRead, &hOutputReadTmp, FALSE); - CloseHandle(hOutputRead); - hOutputRead = hOutputReadTmp; - } - - if (npipe == 2) { - VP_DUP_HANDLE(hOutputWrite, &hErrorWrite, TRUE); - } else { - if (hstderr) { - /* Get handle. */ - VP_DUP_HANDLE((HANDLE)_get_osfhandle(hstderr), &hErrorWrite, TRUE); - } else { - HANDLE hErrorReadTmp; - - /* Create pipe. */ - if (!CreatePipe(&hErrorRead, &hErrorWrite, &sa, 0)) - VP_GOTO_ERROR("CreatePipe() error: %s"); - - VP_DUP_HANDLE(hErrorRead, &hErrorReadTmp, FALSE); - CloseHandle(hErrorRead); - hErrorRead = hErrorReadTmp; - } - } - - ZeroMemory(&si, sizeof(STARTUPINFOW)); - si.cb = sizeof(STARTUPINFOW); - si.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW; - si.wShowWindow = SW_SHOW; - si.hStdInput = hInputRead; - si.hStdOutput = hOutputWrite; - si.hStdError = hErrorWrite; - - cmdlinew = utf8_to_utf16(cmdline); - if (cmdlinew == NULL) - VP_GOTO_ERROR("utf8_to_utf16() error: %s"); - - ret = CreateProcessW(NULL, cmdlinew, NULL, NULL, TRUE, - CREATE_NO_WINDOW, NULL, NULL, &si, &pi); - free(cmdlinew); - if (!ret) - VP_GOTO_ERROR("CreateProcess() error: %s"); - - CloseHandle(pi.hThread); - - CloseHandle(hInputRead); - CloseHandle(hOutputWrite); - CloseHandle(hErrorWrite); - - vp_stack_push_num(&_result, "%p", pi.hProcess); - vp_stack_push_num(&_result, "%d", hstdin ? - 0 : _open_osfhandle((size_t)hInputWrite, 0)); - vp_stack_push_num(&_result, "%d", hstdout ? - 0 : _open_osfhandle((size_t)hOutputRead, _O_RDONLY)); - if (npipe == 3) - vp_stack_push_num(&_result, "%d", hstderr ? - 0 : _open_osfhandle((size_t)hErrorRead, _O_RDONLY)); - return vp_stack_return(&_result); - -error: - errmsg = lasterror(); - if (hInputWrite != INVALID_HANDLE_VALUE) CloseHandle(hInputWrite); - if (hInputRead != INVALID_HANDLE_VALUE) CloseHandle(hInputRead); - if (hOutputWrite != INVALID_HANDLE_VALUE) CloseHandle(hOutputWrite); - if (hOutputRead != INVALID_HANDLE_VALUE) CloseHandle(hOutputRead); - if (hErrorWrite != INVALID_HANDLE_VALUE) CloseHandle(hErrorWrite); - if (hErrorRead != INVALID_HANDLE_VALUE) CloseHandle(hErrorRead); - return vp_stack_return_error(&_result, errfmt, errmsg); -#undef VP_DUP_HANDLE -#undef VP_GOTO_ERROR -} - -const char * -vp_pipe_close(char *args) -{ - vp_stack_t stack; - int fd; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &fd)); - - if (close(fd)) - return vp_stack_return_error(&_result, "close() error: %s", - lasterror()); - return NULL; -} - -const char * -vp_pipe_read(char *args) -{ - vp_stack_t stack; - int fd; - int cnt; - int timeout; - DWORD n; - DWORD err; - char *buf; - char *eof; - unsigned int size = 0; - HANDLE hPipe; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &fd)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &cnt)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &timeout)); - - if (cnt < 0 || VP_READ_BUFSIZE < cnt) { - cnt = VP_READ_BUFSIZE; - } - - /* initialize buffer */ - _result.top = _result.buf; - vp_stack_push_num(&_result, "%d", 0); /* set eof to 0 */ - eof = _result.top - 1; - buf = _result.top; - *(buf++) = VP_EOV; - buf += VP_HEADER_SIZE; - - hPipe = (HANDLE)_get_osfhandle(fd); - while (cnt > 0) { - if (!PeekNamedPipe(hPipe, NULL, 0, NULL, &n, NULL)) { - /* can be ERROR_HANDLE_EOF? */ - err = GetLastError(); - if (err == 0 || err == ERROR_BROKEN_PIPE) { - /* error or eof */ - if (err == ERROR_BROKEN_PIPE) { - *eof = '1'; - } - break; - } - return vp_stack_return_error(&_result, "PeekNamedPipe() error: %08X %s", - err, lasterror()); - } else if (n == 0) { - if (timeout-- <= 0) { - break; - } - Sleep(1); - continue; - } - n = read(fd, buf, cnt); - if (n == -1) { - return vp_stack_return_error(&_result, "read() error: %s", - strerror(errno)); - } - /* decrease stack top for concatenate. */ - cnt -= n; - buf += n; - size += n; - /* try read more bytes without waiting */ - timeout = 0; - } - vp_encode_size(size, _result.top + 1); - _result.top = buf; - return vp_stack_return(&_result); -} - -const char * -vp_pipe_write(char *args) -{ - return vp_file_write(args); -} - -const char * -vp_pty_open(char *args) -{ - return "vp_pty_open() is not available"; -} - -const char * -vp_pty_close(char *args) -{ - return "vp_pty_close() is not available"; -} - -const char * -vp_pty_read(char *args) -{ - return "vp_pty_read() is not available"; -} - -const char * -vp_pty_write(char *args) -{ - return "vp_pty_write() is not available"; -} - -const char * -vp_pty_get_winsize(char *args) -{ - return "vp_pty_get_winsize() is not available"; -} - -const char * -vp_pty_set_winsize(char *args) -{ - return "vp_pty_set_winsize() is not available"; -} - -const char * -vp_kill(char *args) -{ - vp_stack_t stack; - HANDLE handle; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%p", &handle)); - - /*if (!TerminateProcess(handle, 2) || !CloseHandle(handle))*/ - /*return vp_stack_return_error(&_result, "kill() error: %s",*/ - /*lasterror());*/ - if (!ExitRemoteProcess(handle, 2)) { - return vp_stack_return_error(&_result, "kill() error: %s", - lasterror()); - } - - vp_stack_push_num(&_result, "%d", 0); - return vp_stack_return(&_result); -} - -/* Improved kill function. */ -/* http://homepage3.nifty.com/k-takata/diary/2009-05.html */ -static BOOL ExitRemoteProcess(HANDLE hProcess, UINT_PTR uExitCode) -{ - LPTHREAD_START_ROUTINE pfnExitProcess = - (LPTHREAD_START_ROUTINE) GetProcAddress( - GetModuleHandle("kernel32.dll"), "ExitProcess"); - if ((hProcess != NULL) && (pfnExitProcess != NULL)) { - HANDLE hThread = CreateRemoteThread(hProcess, NULL, 0, - pfnExitProcess, (LPVOID) uExitCode, 0, NULL); - if (hThread != NULL) { - CloseHandle(hThread); - return TRUE; - } - } - return FALSE; -} - -const char * -vp_waitpid(char *args) -{ - vp_stack_t stack; - HANDLE handle; - DWORD exitcode; - DWORD ret; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%p", &handle)); - - ret = WaitForSingleObject(handle, 0); - if (ret == WAIT_OBJECT_0) { - /* The process has been exited. */ - if (!GetExitCodeProcess(handle, &exitcode)) { - return vp_stack_return_error(&_result, - "GetExitCodeProcess() error: %s", lasterror()); - } - } else if (ret == WAIT_TIMEOUT) { - exitcode = STILL_ACTIVE; - } else { - return vp_stack_return_error(&_result, - "WaitForSingleObject() error: %s", lasterror()); - } - - vp_stack_push_str(&_result, (ret == WAIT_TIMEOUT) ? "run" : "exit"); - vp_stack_push_num(&_result, "%u", exitcode); - return vp_stack_return(&_result); -} - -const char * -vp_close_handle(char *args) -{ - vp_stack_t stack; - HANDLE handle; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%p", &handle)); - - if (!CloseHandle(handle)) { - return vp_stack_return_error(&_result, - "CloseHandle() error: %s", lasterror()); - } - return NULL; -} - -/* - * This is based on socket.diff.gz written by Yasuhiro Matsumoto. - * see: http://marc.theaimsgroup.com/?l=vim-dev&m=105289857008664&w=2 - */ -static int sockets_number = 0; - -static int -detain_winsock() -{ - WSADATA wsadata; - int res = 0; - - if (sockets_number == 0) { /* Need startup process. */ - res = WSAStartup(MAKEWORD(2, 0), &wsadata); - if(res) return res; /* Fail */ - } - ++sockets_number; - return res; -} - -static int -release_winsock() -{ - int res = 0; - - if (sockets_number != 0) { - res = WSACleanup(); - if(res) return res; /* Fail */ - - --sockets_number; - } - return res; -} - - -const char * -vp_socket_open(char *args) -{ - vp_stack_t stack; - char *host; - char *port; - int port_nr; - int n; - unsigned short nport; - int sock; - struct sockaddr_in sockaddr; - struct hostent *hostent; - struct servent *servent; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &host)); - VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &port)); - - if (detain_winsock()) { - return vp_stack_return_error(&_result, "WSAStartup() error: %s", - lasterror()); - } - - if (sscanf(port, "%d%n", &port_nr, &n) == 1 && port[n] == '\0') { - nport = htons((u_short)port_nr); - } else { - servent = getservbyname(port, NULL); - if (servent == NULL) - return vp_stack_return_error(&_result, "getservbyname() error: %s", - port); - nport = servent->s_port; - } - - sock = (int)socket(PF_INET, SOCK_STREAM, 0); - hostent = gethostbyname(host); - sockaddr.sin_family = AF_INET; - sockaddr.sin_port = nport; - sockaddr.sin_addr = *((struct in_addr*)*hostent->h_addr_list); - - if (connect(sock, (struct sockaddr*)&sockaddr, sizeof(struct sockaddr_in)) - == -1) { - return vp_stack_return_error(&_result, "connect() error: %s", - strerror(errno)); - } - - vp_stack_push_num(&_result, "%d", sock); - return vp_stack_return(&_result); -} - -const char * -vp_socket_close(char *args) -{ - vp_stack_t stack; - int sock; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &sock)); - - if (closesocket(sock) == SOCKET_ERROR) { - return vp_stack_return_error(&_result, "closesocket() error: %d", - WSAGetLastError()); - } - release_winsock(); - return NULL; -} - -const char * -vp_socket_read(char *args) -{ - vp_stack_t stack; - int sock; - int cnt; - int timeout; - struct timeval tv; - int n; - char *buf; - char *eof; - unsigned int size = 0; - fd_set fdset; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &sock)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &cnt)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &timeout)); - tv.tv_sec = timeout / 1000; - tv.tv_usec = (timeout - tv.tv_sec * 1000) * 1000; - - if (cnt < 0 || VP_READ_BUFSIZE < cnt) { - cnt = VP_READ_BUFSIZE; - } - - /* initialize buffer */ - _result.top = _result.buf; - vp_stack_push_num(&_result, "%d", 0); /* set eof to 0 */ - eof = _result.top - 1; - buf = _result.top; - *(buf++) = VP_EOV; - buf += VP_HEADER_SIZE; - - while (cnt > 0) { - FD_ZERO(&fdset); - FD_SET((unsigned)sock, &fdset); - - n = select(0, &fdset, NULL, NULL, (timeout == -1) ? NULL : &tv); - if (n == SOCKET_ERROR) { - return vp_stack_return_error(&_result, "select() error: %d", - WSAGetLastError()); - } else if (n == 0) { - /* timeout */ - break; - } - n = recv(sock, buf, cnt, 0); - if (n == -1) { - return vp_stack_return_error(&_result, "recv() error: %s", - strerror(errno)); - } else if (n == 0) { - /* eof */ - *eof = '1'; - break; - } - /* decrease stack top for concatenate. */ - cnt -= n; - buf += n; - size += n; - /* try read more bytes without waiting */ - timeout = 0; - tv.tv_sec = 0; - tv.tv_usec = 0; - } - vp_encode_size(size, _result.top + 1); - _result.top = buf; - return vp_stack_return(&_result); -} - -const char * -vp_socket_write(char *args) -{ - vp_stack_t stack; - int sock; - char *buf; - size_t size; - int timeout; - struct timeval tv; - size_t nleft; - int n; - fd_set fdset; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &sock)); - VP_RETURN_IF_FAIL(vp_stack_pop_num(&stack, "%d", &timeout)); - tv.tv_sec = timeout / 1000; - tv.tv_usec = (timeout - tv.tv_sec * 1000) * 1000; - - size = vp_decode_size(stack.top); - buf = stack.top + VP_HEADER_SIZE; - - nleft = 0; - while (nleft < size) { - FD_ZERO(&fdset); - FD_SET((unsigned)sock, &fdset); - - n = select(0, NULL, &fdset, NULL, (timeout == -1) ? NULL : &tv); - if (n == SOCKET_ERROR) { - return vp_stack_return_error(&_result, "select() error: %d", - WSAGetLastError()); - } else if (n == 0) { - /* timeout */ - break; - } - n = send(sock, buf + nleft, (int)(size - nleft), 0); - if (n == -1) - return vp_stack_return_error(&_result, "send() error: %s", - strerror(errno)); - nleft += n; - /* try write more bytes without waiting */ - timeout = 0; - tv.tv_sec = 0; - tv.tv_usec = 0; - } - vp_stack_push_num(&_result, "%u", nleft); - return vp_stack_return(&_result); -} - - -/* - * Added by Richard Emberson - * Check to see if a host exists. - */ -const char * -vp_host_exists(char *args) -{ - vp_stack_t stack; - char *host; - struct hostent *hostent; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &host)); - - if(detain_winsock()) - { - return vp_stack_return_error(&_result, "WSAStartup() error: %s", - lasterror()); - } - hostent = gethostbyname(host); - release_winsock(); - - if (hostent) { - vp_stack_push_num(&_result, "%d", 1); - } else { - vp_stack_push_num(&_result, "%d", 0); - } - - return vp_stack_return(&_result); -} - - -/* Referenced from */ -/* http://www.syuhitu.org/other/dir.html */ -const char * -vp_readdir(char *args) -{ - vp_stack_t stack; - char *dirname; - LPWSTR dirnamew; - WCHAR buf[1024]; - - WIN32_FIND_DATAW fd; - HANDLE h; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &dirname)); - - dirnamew = utf8_to_utf16(dirname); - if (dirnamew == NULL) - return lasterror(); - _snwprintf(buf, lengthof(buf), L"%s\\*", dirnamew); - buf[lengthof(buf) - 1] = 0; - - /* Get handle. */ - h = FindFirstFileExW(buf, -#if WINVER >= 0x601 - FindExInfoBasic, -#else - FindExInfoStandard, -#endif - &fd, - FindExSearchNameMatch, NULL, 0 - ); - - if (h == INVALID_HANDLE_VALUE) { - free(dirnamew); - return vp_stack_return_error(&_result, - "FindFirstFileEx() error: %s", - lasterror()); - } - - do { - if (wcscmp(fd.cFileName, L".") && wcscmp(fd.cFileName, L"..")) { - char *p; - _snwprintf(buf, lengthof(buf), L"%s/%s", dirnamew, fd.cFileName); - buf[lengthof(buf) - 1] = 0; - p = utf16_to_utf8(buf); - if (p) { - vp_stack_push_str(&_result, p); - free(p); - } - } - } while (FindNextFileW(h, &fd)); - free(dirnamew); - - FindClose(h); - return vp_stack_return(&_result); -} - -const char * -vp_delete_trash(char *args) -{ - vp_stack_t stack; - char *filename; - LPWSTR filenamew; - LPWSTR buf; - size_t len; - SHFILEOPSTRUCTW fs; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &filename)); - - filenamew = utf8_to_utf16(filename); - if (filenamew == NULL) - return lasterror(); - - len = wcslen(filenamew); - - buf = malloc(sizeof(WCHAR) * (len + 2)); - if (buf == NULL) { - free(filenamew); - return vp_stack_return_error(&_result, "malloc() error: %s", - "Memory cannot allocate"); - } - - /* Copy filename + '\0\0' */ - wcscpy(buf, filenamew); - buf[len + 1] = 0; - free(filenamew); - - ZeroMemory(&fs, sizeof(SHFILEOPSTRUCTW)); - fs.hwnd = NULL; - fs.wFunc = FO_DELETE; - fs.pFrom = buf; - fs.pTo = NULL; - fs.fFlags = FOF_ALLOWUNDO | FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_SILENT; - - vp_stack_push_num(&_result, "%d", SHFileOperationW(&fs)); - - free(buf); - - return vp_stack_return(&_result); -} - -const char * -vp_open(char *args) -{ - vp_stack_t stack; - char *path; - LPWSTR pathw; - size_t ret; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &path)); - - pathw = utf8_to_utf16(path); - if (pathw == NULL) - return lasterror(); - - ret = (size_t)ShellExecuteW(NULL, L"open", pathw, NULL, NULL, SW_SHOWNORMAL); - free(pathw); - if (ret < 32) { - return vp_stack_return_error(&_result, "ShellExecute() error: %s", - lasterror()); - } - - return NULL; -} - -const char * -vp_decode(char *args) -{ - vp_stack_t stack; - size_t len; - char *str; - char *p, *q; - - VP_RETURN_IF_FAIL(vp_stack_from_args(&stack, args)); - VP_RETURN_IF_FAIL(vp_stack_pop_str(&stack, &str)); - - len = strlen(str); - if (len % 2 != 0) { - return "vp_decode: invalid data length"; - } - - VP_RETURN_IF_FAIL(vp_stack_reserve(&_result, - (_result.top - _result.buf) + (len / 2) + sizeof(VP_EOV_STR))); - - for (p = str, q = _result.top; p < str + len; ) { - char hb, lb; - - hb = CHR2XD[(int)*(p++)]; - lb = CHR2XD[(int)*(p++)]; - if (hb >= 0 && lb >= 0) { - *(q++) = (char)((hb << 4) | lb); - } - } - *(q++) = VP_EOV; - *q = '\0'; - _result.top = q; - - return vp_stack_return(&_result); -} - -const char * -vp_get_signals(char *args) -{ - const char *signames[] = { - "SIGABRT", - "SIGFPE", - "SIGILL", - "SIGINT", - "SIGSEGV", - "SIGTERM", - "SIGALRM", - "SIGCHLD", - "SIGCONT", - "SIGHUP", - "SIGKILL", - "SIGPIPE", - "SIGQUIT", - "SIGSTOP", - "SIGTSTP", - "SIGTTIN", - "SIGTTOU", - "SIGUSR1", - "SIGUSR2" - }; - size_t i; - - for (i = 0; i < lengthof(signames); ++i) - vp_stack_push_num(&_result, "%s:%d", signames[i], i + 1); - return vp_stack_return(&_result); -} - -/* - * vim:set sw=4 sts=4 et: - */ === removed file 'vim/bundle/vimproc.vim/src/ptytty.c' --- vim/bundle/vimproc.vim/src/ptytty.c 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/src/ptytty.c 1970-01-01 00:00:00 +0000 @@ -1,171 +0,0 @@ -/* vim:set sw=4 sts=4 et: */ - -/* for ptsname_r */ -#if defined __ANDROID__ -# define _GNU_SOURCE -#endif - -#include -#include - -#include -#include -#include -#if defined __sun__ -# include -#endif -#include -#include - -#include "ptytty.h" - -static int -ptsname_compat(int fd, char **buf) -{ -#if defined __ANDROID__ - static char b[16]; - - if (ptsname_r(fd, b, sizeof(b)) == -1) - return -1; - *buf = b; -#else - if ((*buf = ptsname(fd)) == NULL) - return -1; -#endif - return 0; -} - -static int -_internal_get_pty(int *master, char **path) -{ - if ((*master = open("/dev/ptmx", O_RDWR|O_NOCTTY)) == -1) - return -1; - if (grantpt(*master) != 0) - return -1; - if (unlockpt(*master) != 0) - return -1; - if (ptsname_compat(*master, path) == -1) - return -1; - - return 0; -} - -static int -_internal_get_tty(int *slave, const char *path, - struct termios *termp, struct winsize *winp, int ctty) -{ - if (path != NULL) { - if ((*slave = open(path, O_RDWR|O_NOCTTY)) == -1) - return -1; - } -#ifdef TIOCSCTTY - if (ctty && ioctl(*slave, TIOCSCTTY, NULL) == -1) - return -1; -#endif -#ifdef I_PUSH - if (ioctl(*slave, I_PUSH, "ptem") == -1) - return -1; - if (ioctl(*slave, I_PUSH, "ldterm") == -1) - return -1; -#if defined __sun__ - if (ioctl(*slave, I_PUSH, "ttcompat") == -1) - return -1; -#endif -#endif - - if (termp != NULL) - tcsetattr(*slave, TCSAFLUSH, termp); - if (winp != NULL) - ioctl(*slave, TIOCSWINSZ, winp); - - return 0; -} - -static int -_internal_login_tty(int fd, const char *path, - struct termios *termp, struct winsize *winp) -{ - setsid(); - - if (_internal_get_tty(&fd, path, termp, winp, 1) != 0) - return -1; - - dup2(fd, 0); - dup2(fd, 1); - dup2(fd, 2); - if (fd > 2) - close(fd); - return 0; - -} - -int -openpty(int *amaster, int *aslave, char *name, - struct termios *termp, struct winsize *winp) -{ - char *path = NULL; - int master = -1, slave = -1; - - if (amaster == NULL || aslave == NULL) - return -1; - - if (_internal_get_pty(&master, &path) != 0) - goto out; - if (_internal_get_tty(&slave, path, termp, winp, 0) != 0) - goto out; - if (name != NULL) - strcpy(name, path); - - *amaster = master; - *aslave = slave; - return 0; - -out: - if (master != -1) - close(master); - if (slave != -1) - close(slave); - return -1; -} - -int -forkpty(int *amaster, char *name, - struct termios *termp, struct winsize *winp) -{ - char *path; - int master = -1; - pid_t pid; - - if (amaster == NULL) - return -1; - - if (_internal_get_pty(&master, &path) != 0) - goto out; - if (name != NULL) - strcpy(name, path); - - if ((pid = fork()) == -1) - goto out; - if (pid == 0) { - close(master); - - if (_internal_login_tty(-1, path, termp, winp) != 0) - _exit(EXIT_FAILURE); - - return 0; - } - - *amaster = master; - return pid; - -out: - if (master != -1) - close(master); - return -1; -} - -int -login_tty(int fd) -{ - return _internal_login_tty(fd, NULL, NULL, NULL); -} === removed file 'vim/bundle/vimproc.vim/src/ptytty.h' --- vim/bundle/vimproc.vim/src/ptytty.h 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/src/ptytty.h 1970-01-01 00:00:00 +0000 @@ -1,10 +0,0 @@ -#ifndef VP_PTYTTY_H_ -#define VP_PTYTTY_H_ - -#include - -int openpty(int *, int *, char *, struct termios *, struct winsize *); -int forkpty(int *, char *, struct termios *, struct winsize *); -int login_tty(int); - -#endif /* VP_PTYTTY_H_ */ === removed file 'vim/bundle/vimproc.vim/src/vimstack.c' --- vim/bundle/vimproc.vim/src/vimstack.c 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/src/vimstack.c 1970-01-01 00:00:00 +0000 @@ -1,295 +0,0 @@ -/* 2006-06-23 - * vim:set sw=4 sts=4 et: - */ -#include -#include -#include -#include -#include -#include - -/* - * Function arguments and return values are stored in stack. Each value consists of DataSize, Data, - * and EOV. DataSize is a 32-bit integer encoded into a 5-byte string. - * Number should be stored as String. - * - * Return values not started with EOV are error message, except NULL - * which indicates no result. - * - * Successful Result: - * EOV | DataSize0, Data0, EOV | DataSize1, Data1, EOV | ... | NUL - * or - * NULL - * - * Error Result: - * String - */ - -/* End Of Value */ -#define VP_EOV '\xFF' -#define VP_EOV_STR "\xFF" - -#define VP_NUM_BUFSIZE 64 -#define VP_NUMFMT_BUFSIZE 16 -#define VP_INITIAL_BUFSIZE 512 -#define VP_ERRMSG_SIZE 512 -#define VP_HEADER_SIZE 5 - -#define VP_RETURN_IF_FAIL(expr) \ - do { \ - const char *vp_err = expr; \ - if (vp_err) return vp_err; \ - } while (0) - -/* buf:|EOV|var|var|top:free buffer|buf+size */ -typedef struct vp_stack_t { - size_t size; /* stack size */ - char *buf; /* stack buffer */ - char *top; /* stack top */ -} vp_stack_t; - -/* use for initialize */ -#define VP_STACK_NULL {0, NULL, NULL} - -static const char CHR2XD[0x100] = { - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x00 - 0x0F */ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x10 - 0x1F */ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x20 - 0x2F */ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, /* 0x30 - 0x3F */ - -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x40 - 0x4F */ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x50 - 0x5F */ - -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x60 - 0x6F */ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x70 - 0x7F */ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x80 - 0x8F */ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x90 - 0x9F */ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xA0 - 0xAF */ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xB0 - 0xBF */ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xC0 - 0xCF */ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xD0 - 0xDF */ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xE0 - 0xEF */ - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xF0 - 0xFF */ -}; - -#if 0 -static const char *XD2CHR = - "00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" - "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" - "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2A" "2B" "2C" "2D" "2E" "2F" - "30" "31" "32" "33" "34" "35" "36" "37" "38" "39" "3A" "3B" "3C" "3D" "3E" "3F" - "40" "41" "42" "43" "44" "45" "46" "47" "48" "49" "4A" "4B" "4C" "4D" "4E" "4F" - "50" "51" "52" "53" "54" "55" "56" "57" "58" "59" "5A" "5B" "5C" "5D" "5E" "5F" - "60" "61" "62" "63" "64" "65" "66" "67" "68" "69" "6A" "6B" "6C" "6D" "6E" "6F" - "70" "71" "72" "73" "74" "75" "76" "77" "78" "79" "7A" "7B" "7C" "7D" "7E" "7F" - "80" "81" "82" "83" "84" "85" "86" "87" "88" "89" "8A" "8B" "8C" "8D" "8E" "8F" - "90" "91" "92" "93" "94" "95" "96" "97" "98" "99" "9A" "9B" "9C" "9D" "9E" "9F" - "A0" "A1" "A2" "A3" "A4" "A5" "A6" "A7" "A8" "A9" "AA" "AB" "AC" "AD" "AE" "AF" - "B0" "B1" "B2" "B3" "B4" "B5" "B6" "B7" "B8" "B9" "BA" "BB" "BC" "BD" "BE" "BF" - "C0" "C1" "C2" "C3" "C4" "C5" "C6" "C7" "C8" "C9" "CA" "CB" "CC" "CD" "CE" "CF" - "D0" "D1" "D2" "D3" "D4" "D5" "D6" "D7" "D8" "D9" "DA" "DB" "DC" "DD" "DE" "DF" - "E0" "E1" "E2" "E3" "E4" "E5" "E6" "E7" "E8" "E9" "EA" "EB" "EC" "ED" "EE" "EF" - "F0" "F1" "F2" "F3" "F4" "F5" "F6" "F7" "F8" "F9" "FA" "FB" "FC" "FD" "FE" "FF"; -#endif - -static void vp_stack_free(vp_stack_t *stack); -static const char *vp_stack_from_args(vp_stack_t *stack, char *args); -static const char *vp_stack_return(vp_stack_t *stack); -static const char *vp_stack_return_error(vp_stack_t *stack, const char *fmt, ...); -static const char *vp_stack_reserve(vp_stack_t *stack, size_t needsize); -static const char *vp_stack_pop_num(vp_stack_t *stack, const char *fmt, void *ptr); -static const char *vp_stack_pop_str(vp_stack_t *stack, char **str); -static const char *vp_stack_push_num(vp_stack_t *stack, const char *fmt, ...); -static const char *vp_stack_push_str(vp_stack_t *stack, const char *str); - -#define vp_stack_used(stack) ((stack)->top - (stack)->buf) - - -/* Encode a 32-bit integer into a 5-byte string. */ -static char * -vp_encode_size(unsigned int size, char *buf) -{ - if (buf == NULL) - return NULL; - buf[0] = ((size >> 28) & 0x7f) | 0x80; - buf[1] = ((size >> 21) & 0x7f) | 0x80; - buf[2] = ((size >> 14) & 0x7f) | 0x80; - buf[3] = ((size >> 7) & 0x7f) | 0x80; - buf[4] = ( size & 0x7f) | 0x80; - return buf; -} - -/* Decode a 32-bit integer from a 5-byte string. */ -unsigned int -vp_decode_size(const char *buf) -{ - if (buf == NULL) - return 0; - return ((unsigned int) (buf[0] & 0x7f) << 28) - + ((unsigned int) (buf[1] & 0x7f) << 21) - + ((unsigned int) (buf[2] & 0x7f) << 14) - + ((unsigned int) (buf[3] & 0x7f) << 7) - + ((unsigned int) (buf[4] & 0x7f)); -} - -static void -vp_stack_free(vp_stack_t *stack) -{ - if (stack->buf != NULL) { - free((void *)stack->buf); - stack->size = 0; - stack->buf = NULL; - stack->top = NULL; - } -} - -/* make readonly stack from arguments */ -static const char * -vp_stack_from_args(vp_stack_t *stack, char *args) -{ - if (args == NULL || args[0] == '\0') { - stack->size = 0; - stack->buf = NULL; - stack->top = NULL; - } else { - stack->size = strlen(args); /* don't count end of NUL. */ - stack->buf = args; - stack->top = stack->buf; - if (stack->top[0] != VP_EOV) - return "vp_stack_from_buf: no EOV"; - stack->top++; - } - return NULL; -} - -/* clear stack top and return stack buffer */ -static const char * -vp_stack_return(vp_stack_t *stack) -{ - size_t needsize; - const char *ret; - - /* add the last EOV and NUL */ - needsize = vp_stack_used(stack) + 1; - ret = vp_stack_reserve(stack, needsize); - if (ret != NULL) - return ret; - - stack->top[0] = VP_EOV; - stack->top[1] = '\0'; - - /* Clear the stack. */ - stack->top = stack->buf; - return stack->buf; -} - -/* push error message and return */ -static const char * -vp_stack_return_error(vp_stack_t *stack, const char *fmt, ...) -{ - va_list ap; - size_t needsize; - int ret; - - /* Initialize buffer */ - stack->top = stack->buf; - needsize = VP_ERRMSG_SIZE; - if (vp_stack_reserve(stack, needsize) != NULL) - return fmt; - - va_start(ap, fmt); - ret = vsnprintf(stack->top, stack->size, fmt, ap); - stack->top[ret] = '\0'; - va_end(ap); - /* Clear the stack. */ - stack->top = stack->buf; - return stack->buf; -} - -/* ensure stack buffer is needsize or more bytes */ -static const char * -vp_stack_reserve(vp_stack_t *stack, size_t needsize) -{ - if (needsize > stack->size) { - size_t newsize; - char *newbuf; - - newsize = (stack->size == 0) ? VP_INITIAL_BUFSIZE : (stack->size * 2); - while (needsize > newsize) { - newsize *= 2; - if (newsize <= stack->size) /* paranoid check */ - return "vp_stack_reserve: too big"; - } - if ((newbuf = (char *)realloc(stack->buf, newsize)) == NULL) - return "vp_stack_reserve: NOMEM"; - stack->top = newbuf + vp_stack_used(stack); - stack->buf = newbuf; - stack->size = newsize; - } - return NULL; -} - -static const char * -vp_stack_pop_num(vp_stack_t *stack, const char *fmt, void *ptr) -{ - char *str; - const char *ret; - - if ((size_t)vp_stack_used(stack) == stack->size) - return "vp_stack_pop_num: stack empty"; - - ret = vp_stack_pop_str(stack, &str); - if (ret != NULL) - return ret; - - if (sscanf(str, fmt, ptr) != 1) - return "vp_stack_pop_num: sscanf error"; - - return NULL; -} - -/* str will be invalid after vp_stack_push_*() */ -static const char * -vp_stack_pop_str(vp_stack_t *stack, char **str) -{ - unsigned int size; - - if ((size_t)vp_stack_used(stack) == stack->size) - return "vp_stack_pop_str: stack empty"; - - size = vp_decode_size(stack->top); - *str = stack->top + VP_HEADER_SIZE; - stack->top += VP_HEADER_SIZE + size + 1; - stack->top[-1] = '\0'; /* Overwrite EOV. */ - return NULL; -} - -static const char * -vp_stack_push_num(vp_stack_t *stack, const char *fmt, ...) -{ - va_list ap; - char buf[VP_NUM_BUFSIZE]; - - va_start(ap, fmt); - if (vsprintf(buf, fmt, ap) < 0) { - va_end(ap); - return "vp_stack_push_num: vsprintf error"; - } - va_end(ap); - return vp_stack_push_str(stack, buf); -} - -static const char * -vp_stack_push_str(vp_stack_t *stack, const char *str) -{ - size_t needsize; - unsigned int size; - - size = strlen(str); - needsize = vp_stack_used(stack) + 1 + VP_HEADER_SIZE + size + 1; - VP_RETURN_IF_FAIL(vp_stack_reserve(stack, needsize)); - stack->top[0] = VP_EOV; /* Set previous EOV. */ - sprintf(stack->top + 1 + VP_HEADER_SIZE, "%s", str); - vp_encode_size(size, stack->top + 1); - stack->top += 1 + VP_HEADER_SIZE + size; - stack->top[0] = '\0'; - return NULL; -} === modified file 'vim/bundle/vimproc.vim/test/fopen.vim' --- vim/bundle/vimproc.vim/test/fopen.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/test/fopen.vim 2015-08-25 11:01:00 +0000 @@ -5,17 +5,17 @@ let s:filename = 'test.txt' let s:contents = ['foo', 'bar'] -function! s:suite.before_each() abort +function! s:suite.before_each() call writefile(s:contents, s:filename, 'b') endfunction -function! s:suite.after_each() abort +function! s:suite.after_each() if filereadable(s:filename) call delete(s:filename) endif endfunction -function! s:suite.read() abort +function! s:suite.read() let file = vimproc#fopen(s:filename) let res = file.read() @@ -30,7 +30,7 @@ \ split(res, '\r\n\|\r\|\n')) endfunction -function! s:suite.read_lines() abort +function! s:suite.read_lines() let file = vimproc#fopen(s:filename, 'r') let res = file.read_lines() @@ -44,7 +44,7 @@ \ readfile(s:filename, 'b'), res) endfunction -function! s:suite.read_line() abort +function! s:suite.read_line() let file = vimproc#fopen(s:filename, 'r', 0) let res = [] while !file.eof @@ -60,7 +60,7 @@ call s:assert.equals(readfile(s:filename), res) endfunction -function! s:suite.write() abort +function! s:suite.write() let file = vimproc#fopen(s:filename, 'w') let res = "hello\nvimproc\n.vim" @@ -76,7 +76,7 @@ \ split(res, '\r\n\|\r\|\n')) endfunction -function! s:suite.append() abort +function! s:suite.append() let file = vimproc#fopen(s:filename, 'a') let res = "\nhello\nvimproc\n.vim" @@ -92,7 +92,7 @@ \ s:contents + split(res, '\r\n\|\r\|\n')) endfunction -function! s:suite.read_write() abort +function! s:suite.read_write() let file = vimproc#fopen(s:filename, 'r+') let res = file.read() @@ -113,7 +113,7 @@ \ s:contents + split(res, '\r\n\|\r\|\n')) endfunction -function! s:suite.with_oflag() abort +function! s:suite.with_oflag() let file = vimproc#fopen(s:filename, 'O_RDONLY') let res = file.read() @@ -156,7 +156,7 @@ \ split(res . res2, '\r\n\|\r\|\n')) endfunction -function! s:suite.invalid_fmode() abort +function! s:suite.invalid_fmode() let file = vimproc#fopen(s:filename, 'r') Throws /write() error/ file.write('foo') === modified file 'vim/bundle/vimproc.vim/test/functions.vim' --- vim/bundle/vimproc.vim/test/functions.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/test/functions.vim 2015-08-25 11:01:00 +0000 @@ -1,7 +1,7 @@ let s:suite = themis#suite('functions') let s:assert = themis#helper('assert') -function! s:suite.functions() abort +function! s:suite.functions() let errmsg_save = v:exception call s:assert.true(vimproc#kill(9999, 0)) call s:assert.not_equals(errmsg_save, vimproc#get_last_errmsg()) === modified file 'vim/bundle/vimproc.vim/test/lexer.vim' --- vim/bundle/vimproc.vim/test/lexer.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/test/lexer.vim 2015-08-25 11:01:00 +0000 @@ -1,7 +1,7 @@ let s:suite = themis#suite('lexer') let s:assert = themis#helper('assert') -function! s:suite.token() abort +function! s:suite.token() let lex = vimproc#lexer#init_lexer('1234 5678') call s:assert.true(lex.advance()) call s:assert.equals(lex.token(), g:vimproc#lexer#token_type.int) @@ -9,7 +9,7 @@ call s:assert.equals(lex.token(), g:vimproc#lexer#token_type.int) endfunction -function! s:suite.value() abort +function! s:suite.value() let lex = vimproc#lexer#init_lexer('1234 5678') call s:assert.true(lex.advance()) call s:assert.equals(lex.value(), 1234) === modified file 'vim/bundle/vimproc.vim/test/parser.vim' --- vim/bundle/vimproc.vim/test/parser.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/test/parser.vim 2015-08-25 11:01:00 +0000 @@ -1,7 +1,7 @@ let s:suite = themis#suite('parser') let s:assert = themis#helper('assert') -function! s:suite.escape() abort +function! s:suite.escape() call s:assert.equals( \ vimproc#parser#split_args('echo "\""'), \ ['echo', '"']) @@ -12,7 +12,7 @@ call s:assert.equals(vimproc#shellescape('ho''ge'), "'ho''ge'") endfunction -function! s:suite.comment() abort +function! s:suite.comment() call s:assert.equals( \ vimproc#parser#split_args('echo file#1.txt'), \ ['echo', 'file#1.txt']) @@ -21,7 +21,7 @@ \ ['echo', 'file']) endfunction -function! s:suite.quote() abort +function! s:suite.quote() let is_catched = 0 try call vimproc#parser#split_args('echo "\"') @@ -31,7 +31,7 @@ call s:assert.equals(is_catched, 1) endfunction -function! s:suite.join() abort +function! s:suite.join() let is_catched = 0 try call vimproc#parser#split_args('echo \') @@ -41,7 +41,7 @@ call s:assert.equals(is_catched, 1) endfunction -function! s:suite.parse_statements() abort +function! s:suite.parse_statements() let statements = \ vimproc#parser#split_statements( \ '"/usr/bin/clang++" --std=c++0x `pkg-config'. @@ -54,7 +54,7 @@ \ ]) endfunction -function! s:suite.backquote() abort +function! s:suite.backquote() call s:assert.equals( \ vimproc#parser#split_args('echo `echo "hoge" "piyo" "hogera"`'), \ [ 'echo', 'hoge', 'piyo', 'hogera' ]) @@ -64,7 +64,7 @@ \ [ 'echo', system('curl -fs https://gist.github.com/raw/4349265/sudden-vim.py')]) endfunction -function! s:suite.slash_convertion() abort +function! s:suite.slash_convertion() " For Vital.DateTime call s:assert.equals(vimproc#parser#split_args( \ printf('reg query "%s" /v Bias', @@ -74,20 +74,17 @@ \ '/v', 'Bias']) endfunction -function! s:suite.block_convertion() abort +function! s:suite.block_convertion() call s:assert.equals(vimproc#parser#parse_pipe( \ 'grep -inH --exclude-dir={foo} -R vim .')[0].args, - \ ['grep', '-inH', - \ '--exclude-dir=f', '--exclude-dir=o', - \ '-R', 'vim', '.']) + \ ['grep', '-inH', '--exclude-dir=foo', '-R', 'vim', '.']) call s:assert.equals(vimproc#parser#parse_pipe( \ 'grep -inH --exclude-dir={foo,bar,baz} -R vim .')[0].args, - \ ['grep', '-inH', - \ '--exclude-dir=foo', '--exclude-dir=bar', '--exclude-dir=baz', - \ '-R', 'vim', '.']) + \ ['grep', '-inH', '--exclude-dir=foo', '--exclude-dir=bar', + \ '--exclude-dir=baz', '-R', 'vim', '.']) endfunction -function! s:suite.parse_redirection() abort +function! s:suite.parse_redirection() call s:assert.equals(vimproc#parser#parse_pipe( \ 'echo "foo" > hoge\piyo'), \ [{ 'args' : ['echo', 'foo'], 'fd' : === modified file 'vim/bundle/vimproc.vim/test/popen.vim' --- vim/bundle/vimproc.vim/test/popen.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/test/popen.vim 2015-08-25 11:01:00 +0000 @@ -1,14 +1,14 @@ let s:suite = themis#suite('popen') let s:assert = themis#helper('assert') -function! s:suite.popen2() abort +function! s:suite.popen2() if !vimproc#util#is_windows() && !executable('ls') - call s:assert.skip('ls command is not installed.') + echo 'ls command is not installed.' return endif if vimproc#util#is_windows() - let cmd = ['cmd', '/c', 'DIR', '/B'] + let cmd = ['DIR', '/B'] else let cmd = ['ls'] endif @@ -36,7 +36,7 @@ unlet sub if vimproc#util#is_windows() - let cmd = ['cmd', '/c', 'DIR', '/B', '/A'] + let cmd = ['DIR', '/B', '/A'] else let cmd = ['ls', '-la'] endif @@ -64,9 +64,9 @@ unlet sub endfunction -function! s:suite.popen3() abort +function! s:suite.popen3() if vimproc#util#is_windows() - let cmd = ['cmd', '/c', 'DIR', '/B'] + let cmd = ['DIR', '/B'] else let cmd = ['ls'] endif @@ -94,17 +94,14 @@ unlet sub endfunction -function! s:suite.redirection1() abort +function! s:suite.redirection() let output = vimproc#system('echo "foo" > test.txt | echo "bar"') call s:assert.equals(output, "bar\n") - sleep 3 call s:assert.equals(readfile('test.txt'), ['foo']) if filereadable('test.txt') call delete('test.txt') endif -endfunction -function! s:suite.redirection2() abort let sub = vimproc#ptyopen('echo "foo" > test.txt | echo "bar"') let res = '' while !sub.stdout.eof @@ -112,7 +109,7 @@ endwhile " Newline conversion. let res = substitute(res, '\r\n', '\n', 'g') - sleep 3 + call s:assert.equals(output, "bar\n") call s:assert.equals(readfile('test.txt'), ['foo']) if filereadable('test.txt') call delete('test.txt') === modified file 'vim/bundle/vimproc.vim/test/socket.vim' --- vim/bundle/vimproc.vim/test/socket.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/test/socket.vim 2015-08-25 11:01:00 +0000 @@ -1,7 +1,7 @@ let s:suite = themis#suite('socket') let s:assert = themis#helper('assert') -function! s:suite.socket() abort +function! s:suite.socket() call s:assert.true(vimproc#host_exists( \ 'www.yahoo.com')) call s:assert.true(vimproc#host_exists( === modified file 'vim/bundle/vimproc.vim/test/system.vim' --- vim/bundle/vimproc.vim/test/system.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/test/system.vim 2015-08-25 11:01:00 +0000 @@ -1,84 +1,30 @@ let s:suite = themis#suite('system') let s:assert = themis#helper('assert') -function! s:check_ls() abort +function! s:suite.system() if !executable('ls') - call s:assert.skip('ls command is not installed.') + echo 'ls command is not installed.' + return endif -endfunction -function! s:suite.system1() abort - call s:check_ls() call s:assert.equals(vimproc#system('ls'), system('ls')) -endfunction - -function! s:suite.system2() abort - call s:check_ls() call s:assert.equals(vimproc#system(['ls']), system('ls')) -endfunction - -function! s:suite.cmd_system1() abort - call s:check_ls() call s:assert.equals(vimproc#cmd#system('ls'), system('ls')) -endfunction - -function! s:suite.cmd_system2() abort - call s:check_ls() call s:assert.equals(vimproc#cmd#system(['ls']), system('ls')) -endfunction - -function! s:suite.cmd_system3() abort call s:assert.equals( \ vimproc#cmd#system(['echo', '"Foo"']), - \ "\"Foo\"\n") -endfunction - -function! s:suite.system_passwd1() abort - if vimproc#util#is_windows() - call s:assert.skip('') - endif + \ system('echo "\"Foo\""')) call s:assert.equals( - \ vimproc#system_passwd('echo -n test'), - \ system('echo -n test')) -endfunction - -function! s:suite.system_passwd2() abort - if vimproc#util#is_windows() - call s:assert.skip('') - endif + \ vimproc#system_passwd('echo -n "test"'), + \ system('echo -n "test"')) call s:assert.equals( \ vimproc#system_passwd(['echo', '-n', 'test']), - \ system('echo -n test')) -endfunction - -function! s:suite.system_and1() abort - if vimproc#util#is_windows() - call s:assert.skip('') - endif - call s:check_ls() + \ system('echo -n "test"')) call s:assert.equals(vimproc#system('ls&'), '') -endfunction - -function! s:suite.system_and2() abort - if vimproc#util#is_windows() - call s:assert.skip('') - endif - call s:check_ls() call s:assert.equals(vimproc#system('ls&'), \ vimproc#system_bg('ls')) -endfunction - -function! s:suite.system_bg1() abort - call s:check_ls() call s:assert.equals(vimproc#system_bg('ls'), '') -endfunction - -function! s:suite.system_bg2() abort - call s:check_ls() call s:assert.equals(vimproc#system_bg(['ls']), '') -endfunction - -function! s:suite.password_pattern() abort call s:assert.match( \ 'Enter passphrase for key ''.ssh/id_rsa''', \ g:vimproc_password_pattern) === removed file 'vim/bundle/vimproc.vim/tools/appveyor.bat' --- vim/bundle/vimproc.vim/tools/appveyor.bat 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/tools/appveyor.bat 1970-01-01 00:00:00 +0000 @@ -1,113 +0,0 @@ -@echo off -:: Batch file for building/testing vimproc on AppVeyor - -cd %APPVEYOR_BUILD_FOLDER% -if /I "%1"=="test" ( - set _target=_test -) else ( - set _target= -) - -for %%i in (msvc mingw msys2 cygwin) do if "%compiler%"=="%%i" goto %compiler%%_target% - -echo Unknown build target. -exit 1 - -:msvc -:: ---------------------------------------------------------------------- -:: Using VC10 with nmake -::call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %ARCH% -call :install_vim -call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" %ENV% - -@echo on -nmake -f make_msvc.mak nodebug=1 CPU=%CPU% - -@echo off -goto :eof - -:msvc_test -set THEMIS_VIM=%APPVEYOR_BUILD_FOLDER%\vim74-kaoriya-win%BIT%\vim.exe -@echo on -themis\bin\themis - -@echo off -goto :eof - - -:mingw -:: ---------------------------------------------------------------------- -:: Using MinGW -call :install_vim -@echo on -path C:\MinGW\bin;C:\MinGW\msys\1.0\bin;%path% -make -f make_mingw32.mak - -@echo off -goto :eof - -:mingw_test -set THEMIS_VIM=%APPVEYOR_BUILD_FOLDER%\vim74-kaoriya-win%BIT%\vim.exe -@echo on -themis\bin\themis - -@echo off -goto :eof - - -:msys2 -:: ---------------------------------------------------------------------- -:: Using MSYS2 -call :install_vim -@echo on -PATH C:\%MSYS2_DIR%\%MSYSTEM%\bin;C:\%MSYS2_DIR%\usr\bin;%PATH% -set CHERE_INVOKING=yes -:: Install and update necessary packages -rem bash -lc "for i in {1..3}; do update-core && break || sleep 15; done" -rem bash -lc "for i in {1..3}; do pacman --noconfirm -Su mingw-w64-%MSYS2_ARCH%-{gcc,make} make && break || sleep 15; done" - -bash -lc "make" - -@echo off -goto :eof - -:msys2_test -set THEMIS_VIM=%APPVEYOR_BUILD_FOLDER%\vim74-kaoriya-win%BIT%\vim.exe -@echo on -themis\bin\themis - -@echo off -goto :eof - - -:cygwin -:: ---------------------------------------------------------------------- -:: Using Cygwin -@echo on -c:\cygwin\setup-x86.exe -qnNdO -R C:/cygwin -s http://cygwin.mirror.constant.com -l C:/cygwin/var/cache/setup -P vim -PATH c:\cygwin\bin;%PATH% -set CHERE_INVOKING=yes -bash -lc "" -bash -lc "make" - -@echo off -goto :eof - -:cygwin_test -@echo on -rem bash -lc "git clone -q https://github.com/thinca/vim-themis.git themis --depth=1" -rem bash -lc "themis/bin/themis" - -@echo off -goto :eof - - -:install_vim -:: ---------------------------------------------------------------------- -:: Install Vim and themis -echo Downloading Vim -py tools\dl-kaoriya-vim.py --arch win%BIT% --filename vim.zip -echo Installing Vim -7z x vim.zip > nul -git clone -q https://github.com/thinca/vim-themis.git themis --depth=1 -exit /b === removed file 'vim/bundle/vimproc.vim/tools/dl-kaoriya-vim.py' --- vim/bundle/vimproc.vim/tools/dl-kaoriya-vim.py 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/tools/dl-kaoriya-vim.py 1970-01-01 00:00:00 +0000 @@ -1,71 +0,0 @@ -#!/usr/bin/python3 - -# Download the latest KaoriYa Vim from the GitHub release - -import argparse -import calendar -import io -import json -import os -import sys -import time -import urllib.request, urllib.error - -# Repository Name -repo_name = 'koron/vim-kaoriya' -gh_release_url = 'https://api.github.com/repos/' + repo_name + '/releases/latest' - -# Parse arguments -parser = argparse.ArgumentParser( - description='Download the latest KaoriYa Vim from the GitHub release') -parser.add_argument('-f', '--force', action='store_true', - help='overwrite the download file') -parser.add_argument('-n', '--filename', type=str, action='store', - help='filename to save') -parser.add_argument('-a', '--arch', type=str, action='store', - choices=['all', 'win32', 'win64'], default='all', - help='architecture to download') -parser.add_argument('--auth', type=str, action='store', - default=os.getenv('AUTH_TOKEN'), - metavar="TOKEN", help='GitHub API token (Environment variable AUTH_TOKEN can be also used.)') -args = parser.parse_args() - -if args.filename and args.arch == 'all': - parser.error('-a must be specified when you specify -n.') - -# Get information of GitHub release -# see: https://developer.github.com/v3/repos/releases/ -if args.auth: - # Unauthenticated requests are limited up to 60 requests per hour. - # Authenticated requests are allowed up to 5,000 requests per hour. - # See: https://developer.github.com/v3/#rate-limiting - request = urllib.request.Request(gh_release_url) - request.add_header("Authorization", "token " + args.auth) -else: - request = gh_release_url -try: - response = urllib.request.urlopen(request) -except urllib.error.HTTPError as err: - print('GitHub release not found. (%s)' % err.reason, file=sys.stderr) - exit(1) - -rel_info = json.load(io.StringIO(str(response.read(), 'utf-8'))) -print('Last release:', rel_info['name']) -print('Created at:', rel_info['created_at']) - -# Download the files -for asset in rel_info['assets']: - if args.filename: - name = args.filename - else: - name = asset['name'] - if args.arch != 'all' and asset['name'].find(args.arch) < 0: - continue - if os.path.isfile(name) and not args.force: - print('File exists:', name) - continue - print('Downloading to:', name) - urllib.request.urlretrieve(asset['browser_download_url'], name) - # Set timestamp - asset_time = time.strptime(asset['updated_at'], '%Y-%m-%dT%H:%M:%SZ') - os.utime(name, times=(time.time(), calendar.timegm(asset_time))) === modified file 'vim/bundle/vimproc.vim/tools/update-dll-mingw.bat' --- vim/bundle/vimproc.vim/tools/update-dll-mingw.bat 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimproc.vim/tools/update-dll-mingw.bat 2015-08-25 11:01:00 +0000 @@ -47,10 +47,10 @@ rem Build failed. rem Try to delete old DLLs. - if exist lib\%vimproc_dllname%.old del lib\%vimproc_dllname%.old - if exist lib\%vimproc_dllname% del lib\%vimproc_dllname% + if exist autoload\%vimproc_dllname%.old del autoload\%vimproc_dllname%.old + if exist autoload\%vimproc_dllname% del autoload\%vimproc_dllname% rem If the DLL couldn't delete (may be it is in use), rename it. - if exist lib\%vimproc_dllname% ren lib\%vimproc_dllname% %vimproc_dllname%.old + if exist autoload\%vimproc_dllname% ren autoload\%vimproc_dllname% %vimproc_dllname%.old mingw32-make -f make_mingw%vimproc_arch%.mak %1 %2 %3 %4 %5 %6 %7 %8 %9 ) === modified file 'vim/bundle/vimshell.vim/.git/config' (properties changed: -x to +x) === modified file 'vim/bundle/vimshell.vim/.git/hooks/applypatch-msg.sample' --- vim/bundle/vimshell.vim/.git/hooks/applypatch-msg.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/.git/hooks/applypatch-msg.sample 2015-08-25 11:01:00 +0000 @@ -10,6 +10,6 @@ # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup -commitmsg="$(git rev-parse --git-path hooks/commit-msg)" -test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} +test -x "$GIT_DIR/hooks/commit-msg" && + exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} : === modified file 'vim/bundle/vimshell.vim/.git/hooks/pre-applypatch.sample' --- vim/bundle/vimshell.vim/.git/hooks/pre-applypatch.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/.git/hooks/pre-applypatch.sample 2015-08-25 11:01:00 +0000 @@ -9,6 +9,6 @@ # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup -precommit="$(git rev-parse --git-path hooks/pre-commit)" -test -x "$precommit" && exec "$precommit" ${1+"$@"} +test -x "$GIT_DIR/hooks/pre-commit" && + exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} : === modified file 'vim/bundle/vimshell.vim/.git/hooks/pre-push.sample' --- vim/bundle/vimshell.vim/.git/hooks/pre-push.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/.git/hooks/pre-push.sample 2015-08-25 11:01:00 +0000 @@ -24,6 +24,7 @@ z40=0000000000000000000000000000000000000000 +IFS=' ' while read local_ref local_sha remote_ref remote_sha do if [ "$local_sha" = $z40 ] === modified file 'vim/bundle/vimshell.vim/.git/hooks/update.sample' --- vim/bundle/vimshell.vim/.git/hooks/update.sample 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/.git/hooks/update.sample 2015-08-25 11:01:00 +0000 @@ -1,6 +1,6 @@ #!/bin/sh # -# An example hook script to block unannotated tags from entering. +# An example hook script to blocks unannotated tags from entering. # Called by "git receive-pack" with arguments: refname sha1-old sha1-new # # To enable this hook, rename this file to "update". === modified file 'vim/bundle/vimshell.vim/.git/index' Binary files vim/bundle/vimshell.vim/.git/index 2016-08-04 08:15:51 +0000 and vim/bundle/vimshell.vim/.git/index 2015-08-25 11:01:00 +0000 differ === modified file 'vim/bundle/vimshell.vim/.git/logs/HEAD' --- vim/bundle/vimshell.vim/.git/logs/HEAD 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/.git/logs/HEAD 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 c71ffb48b9ea2c718facd2eaad431f59503e58aa Jan Pobrislo 1470298390 +0200 clone: from https://github.com/Shougo/vimshell.vim +0000000000000000000000000000000000000000 d95caeeef40529d5e9d9562c940ab66f9e7c5796 Jan Pobrislo 1440500298 +0200 clone: from https://github.com/Shougo/vimshell.vim === modified file 'vim/bundle/vimshell.vim/.git/logs/refs/heads/master' --- vim/bundle/vimshell.vim/.git/logs/refs/heads/master 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/.git/logs/refs/heads/master 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 c71ffb48b9ea2c718facd2eaad431f59503e58aa Jan Pobrislo 1470298390 +0200 clone: from https://github.com/Shougo/vimshell.vim +0000000000000000000000000000000000000000 d95caeeef40529d5e9d9562c940ab66f9e7c5796 Jan Pobrislo 1440500298 +0200 clone: from https://github.com/Shougo/vimshell.vim === modified file 'vim/bundle/vimshell.vim/.git/logs/refs/remotes/origin/HEAD' --- vim/bundle/vimshell.vim/.git/logs/refs/remotes/origin/HEAD 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/.git/logs/refs/remotes/origin/HEAD 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -0000000000000000000000000000000000000000 c71ffb48b9ea2c718facd2eaad431f59503e58aa Jan Pobrislo 1470298390 +0200 clone: from https://github.com/Shougo/vimshell.vim +0000000000000000000000000000000000000000 d95caeeef40529d5e9d9562c940ab66f9e7c5796 Jan Pobrislo 1440500298 +0200 clone: from https://github.com/Shougo/vimshell.vim === removed file 'vim/bundle/vimshell.vim/.git/objects/pack/pack-56d4f104e35a3aa4a1ef7fec4bcedae884e39063.idx' Binary files vim/bundle/vimshell.vim/.git/objects/pack/pack-56d4f104e35a3aa4a1ef7fec4bcedae884e39063.idx 2016-08-04 08:15:51 +0000 and vim/bundle/vimshell.vim/.git/objects/pack/pack-56d4f104e35a3aa4a1ef7fec4bcedae884e39063.idx 1970-01-01 00:00:00 +0000 differ === removed file 'vim/bundle/vimshell.vim/.git/objects/pack/pack-56d4f104e35a3aa4a1ef7fec4bcedae884e39063.pack' Binary files vim/bundle/vimshell.vim/.git/objects/pack/pack-56d4f104e35a3aa4a1ef7fec4bcedae884e39063.pack 2016-08-04 08:15:51 +0000 and vim/bundle/vimshell.vim/.git/objects/pack/pack-56d4f104e35a3aa4a1ef7fec4bcedae884e39063.pack 1970-01-01 00:00:00 +0000 differ === added file 'vim/bundle/vimshell.vim/.git/objects/pack/pack-feef7d7581dfea951cb8033d510629fcfe4ba78e.idx' Binary files vim/bundle/vimshell.vim/.git/objects/pack/pack-feef7d7581dfea951cb8033d510629fcfe4ba78e.idx 1970-01-01 00:00:00 +0000 and vim/bundle/vimshell.vim/.git/objects/pack/pack-feef7d7581dfea951cb8033d510629fcfe4ba78e.idx 2015-08-25 11:01:00 +0000 differ === added file 'vim/bundle/vimshell.vim/.git/objects/pack/pack-feef7d7581dfea951cb8033d510629fcfe4ba78e.pack' Binary files vim/bundle/vimshell.vim/.git/objects/pack/pack-feef7d7581dfea951cb8033d510629fcfe4ba78e.pack 1970-01-01 00:00:00 +0000 and vim/bundle/vimshell.vim/.git/objects/pack/pack-feef7d7581dfea951cb8033d510629fcfe4ba78e.pack 2015-08-25 11:01:00 +0000 differ === modified file 'vim/bundle/vimshell.vim/.git/packed-refs' --- vim/bundle/vimshell.vim/.git/packed-refs 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/.git/packed-refs 2015-08-25 11:01:00 +0000 @@ -1,2 +1,2 @@ # pack-refs with: peeled fully-peeled -c71ffb48b9ea2c718facd2eaad431f59503e58aa refs/remotes/origin/master +d95caeeef40529d5e9d9562c940ab66f9e7c5796 refs/remotes/origin/master === modified file 'vim/bundle/vimshell.vim/.git/refs/heads/master' --- vim/bundle/vimshell.vim/.git/refs/heads/master 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/.git/refs/heads/master 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -c71ffb48b9ea2c718facd2eaad431f59503e58aa +d95caeeef40529d5e9d9562c940ab66f9e7c5796 === modified file 'vim/bundle/vimshell.vim/.git/shallow' --- vim/bundle/vimshell.vim/.git/shallow 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/.git/shallow 2015-08-25 11:01:00 +0000 @@ -1,1 +1,1 @@ -c71ffb48b9ea2c718facd2eaad431f59503e58aa +d95caeeef40529d5e9d9562c940ab66f9e7c5796 === modified file 'vim/bundle/vimshell.vim/.travis.yml' --- vim/bundle/vimshell.vim/.travis.yml 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/.travis.yml 2015-08-25 11:01:00 +0000 @@ -1,5 +1,3 @@ -sudo: false - before_script: - git clone https://github.com/syngan/vim-vimlint /tmp/vim-vimlint - git clone https://github.com/ynkdir/vim-vimlparser /tmp/vim-vimlparser === modified file 'vim/bundle/vimshell.vim/autoload/neocomplcache/sources/vimshell_complete.vim' --- vim/bundle/vimshell.vim/autoload/neocomplcache/sources/vimshell_complete.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/neocomplcache/sources/vimshell_complete.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! neocomplcache#sources#vimshell_complete#define() abort "{{{ +function! neocomplcache#sources#vimshell_complete#define() "{{{ return s:source endfunction"}}} @@ -40,11 +40,11 @@ \ 'sorters' : [], \} -function! s:source.get_keyword_pos(cur_text) abort "{{{ +function! s:source.get_keyword_pos(cur_text) "{{{ return vimshell#complete#get_keyword_position() endfunction"}}} -function! s:source.get_complete_words(cur_keyword_pos, cur_keyword_str) abort "{{{ +function! s:source.get_complete_words(cur_keyword_pos, cur_keyword_str) "{{{ return vimshell#complete#gather_candidates(a:cur_keyword_str) endfunction"}}} === modified file 'vim/bundle/vimshell.vim/autoload/neocomplete/sources/vimshell.vim' --- vim/bundle/vimshell.vim/autoload/neocomplete/sources/vimshell.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/neocomplete/sources/vimshell.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! neocomplete#sources#vimshell#define() abort "{{{ +function! neocomplete#sources#vimshell#define() "{{{ return s:source endfunction"}}} @@ -40,11 +40,11 @@ \ 'sorters' : [], \} -function! s:source.get_complete_position(context) abort "{{{ +function! s:source.get_complete_position(context) "{{{ return vimshell#complete#get_keyword_position() endfunction"}}} -function! s:source.gather_candidates(context) abort "{{{ +function! s:source.gather_candidates(context) "{{{ return vimshell#complete#gather_candidates(a:context.complete_str) endfunction"}}} === modified file 'vim/bundle/vimshell.vim/autoload/neocomplete/sources/vimshell_history.vim' --- vim/bundle/vimshell.vim/autoload/neocomplete/sources/vimshell_history.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/neocomplete/sources/vimshell_history.vim 2015-08-25 11:01:00 +0000 @@ -23,7 +23,7 @@ " }}} "============================================================================= -function! neocomplete#sources#vimshell_history#define() abort "{{{ +function! neocomplete#sources#vimshell_history#define() "{{{ return s:source endfunction "}}} @@ -37,14 +37,14 @@ \ 'mark' : '[history]', \ } -function! s:source.hooks.on_post_filter(context) abort "{{{ +function! s:source.hooks.on_post_filter(context) "{{{ for candidate in a:context.candidates let candidate.abbr = \ substitute(candidate.word, '\s\+$', '>-', '') endfor endfunction"}}} -function! s:source.get_complete_position(context) abort "{{{ +function! s:source.get_complete_position(context) "{{{ if neocomplete#is_auto_complete() || !vimshell#check_prompt() return -1 endif @@ -52,7 +52,7 @@ return vimshell#get_prompt_length() endfunction "}}} -function! s:source.gather_candidates(context) abort "{{{ +function! s:source.gather_candidates(context) "{{{ return filter(reverse(vimshell#history#read()), \ 'stridx(v:val, a:context.complete_str) >= 0') endfunction "}}} === modified file 'vim/bundle/vimshell.vim/autoload/unite/kinds/vimshell_history.vim' --- vim/bundle/vimshell.vim/autoload/unite/kinds/vimshell_history.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/unite/kinds/vimshell_history.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! unite#kinds#vimshell_history#define() abort "{{{ +function! unite#kinds#vimshell_history#define() "{{{ return s:kind endfunction"}}} @@ -45,7 +45,7 @@ \ 'is_quit' : 0, \ 'is_selectable' : 1, \ } -function! s:kind.action_table.delete.func(candidates) abort "{{{ +function! s:kind.action_table.delete.func(candidates) "{{{ let current_histories = \ a:candidates[0].action__current_histories for candidate in a:candidates @@ -63,7 +63,7 @@ \ 'is_invalidate_cache' : 1, \ 'is_quit' : 0, \ } -function! s:kind.action_table.edit.func(candidate) abort "{{{ +function! s:kind.action_table.edit.func(candidate) "{{{ let current_histories = \ a:candidate.action__current_histories let history = input('Please edit history: ', @@ -82,7 +82,7 @@ \ 'description' : 'execute history', \ 'is_selectable' : 1, \ } -function! s:kind.action_table.execute.func(candidates) abort "{{{ +function! s:kind.action_table.execute.func(candidates) "{{{ let candidate = deepcopy(a:candidates[0]) let candidate.action__complete_word = \ join(map(copy(a:candidates), @@ -96,7 +96,7 @@ \ 'description' : 'insert history', \ 'is_selectable' : 1, \ } -function! s:kind.action_table.insert.func(candidates) abort "{{{ +function! s:kind.action_table.insert.func(candidates) "{{{ if !vimshell#check_prompt() call vimshell#echo_error('Not in command line.') return @@ -118,7 +118,7 @@ \ 'is_invalidate_cache' : 1, \ 'is_quit' : 0, \ } -function! s:kind.action_table.unite__new_candidate.func(candidate) abort "{{{ +function! s:kind.action_table.unite__new_candidate.func(candidate) "{{{ let current_histories = \ a:candidate.action__current_histories let history = input('Please input new history: ', === modified file 'vim/bundle/vimshell.vim/autoload/unite/sources/vimshell_external_history.vim' --- vim/bundle/vimshell.vim/autoload/unite/sources/vimshell_external_history.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/unite/sources/vimshell_external_history.vim 2015-08-25 11:01:00 +0000 @@ -31,7 +31,7 @@ \) "}}} -function! unite#sources#vimshell_external_history#define() abort "{{{ +function! unite#sources#vimshell_external_history#define() "{{{ return s:source endfunction "}}} @@ -45,7 +45,7 @@ \ 'filters' : ['matcher_default', 'sorter_nothing', 'converter_default'], \ } -function! s:source.hooks.on_init(args, context) abort "{{{ +function! s:source.hooks.on_init(args, context) "{{{ let a:context.source__current_histories = filereadable( \ g:unite_source_vimshell_external_history_path) ? \ readfile(g:unite_source_vimshell_external_history_path) : [] @@ -54,7 +54,7 @@ \"^\\%(\\d\\+/\\)\\+[:[:digit:]; ]\\+\\|^[:[:digit:]; ]\\+", "", "g")') let a:context.source__cur_keyword_pos = vimshell#get_prompt_length() endfunction"}}} -function! s:source.hooks.on_syntax(args, context) abort "{{{ +function! s:source.hooks.on_syntax(args, context) "{{{ let save_current_syntax = get(b:, 'current_syntax', '') unlet! b:current_syntax @@ -67,7 +67,7 @@ let b:current_syntax = save_current_syntax endtry endfunction"}}} -function! s:source.hooks.on_post_filter(args, context) abort "{{{ +function! s:source.hooks.on_post_filter(args, context) "{{{ let a:context.candidates = vimshell#util#uniq_by( \ a:context.candidates, 'v:val.word') @@ -91,7 +91,7 @@ return a:context.candidates endfunction"}}} -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ return map(reverse(copy(a:context.source__current_histories)), \ '{ "word" : v:val }') endfunction "}}} === modified file 'vim/bundle/vimshell.vim/autoload/unite/sources/vimshell_history.vim' --- vim/bundle/vimshell.vim/autoload/unite/sources/vimshell_history.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/unite/sources/vimshell_history.vim 2015-08-25 11:01:00 +0000 @@ -23,7 +23,7 @@ " }}} "============================================================================= -function! unite#sources#vimshell_history#define() abort "{{{ +function! unite#sources#vimshell_history#define() "{{{ return s:source endfunction "}}} @@ -39,13 +39,13 @@ let s:current_histories = [] -function! s:source.hooks.on_init(args, context) abort "{{{ +function! s:source.hooks.on_init(args, context) "{{{ call unite#sources#vimshell_history#_change_histories( \ vimshell#history#read()) let a:context.source__cur_keyword_pos = vimshell#get_prompt_length() let a:context.source__history_path = vimshell#history#get_history_path() endfunction"}}} -function! s:source.hooks.on_syntax(args, context) abort "{{{ +function! s:source.hooks.on_syntax(args, context) "{{{ let save_current_syntax = get(b:, 'current_syntax', '') unlet! b:current_syntax @@ -58,7 +58,7 @@ let b:current_syntax = save_current_syntax endtry endfunction"}}} -function! s:source.hooks.on_close(args, context) abort "{{{ +function! s:source.hooks.on_close(args, context) "{{{ let a:context.source__cur_keyword_pos = vimshell#get_prompt_length() if vimshell#history#read(a:context.source__history_path) \ !=# s:current_histories @@ -66,7 +66,7 @@ \ a:context.source__history_path) endif endfunction"}}} -function! s:source.hooks.on_post_filter(args, context) abort "{{{ +function! s:source.hooks.on_post_filter(args, context) "{{{ let cnt = 0 for candidate in a:context.candidates @@ -84,12 +84,12 @@ endfor endfunction"}}} -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ return reverse(map(copy(s:current_histories), \ "{ 'word' : v:val, }")) endfunction "}}} -function! unite#sources#vimshell_history#start_complete(is_insert) abort "{{{ +function! unite#sources#vimshell_history#start_complete(is_insert) "{{{ if !exists(':Unite') call vimshell#echo_error('unite.vim is not installed.') call vimshell#echo_error('Please install unite.vim Ver.1.5 or above.') @@ -110,7 +110,7 @@ \ }) endfunction "}}} -function! unite#sources#vimshell_history#_change_histories(histories) abort "{{{ +function! unite#sources#vimshell_history#_change_histories(histories) "{{{ let s:current_histories = a:histories endfunction "}}} === modified file 'vim/bundle/vimshell.vim/autoload/unite/sources/vimshell_zsh_complete.vim' --- vim/bundle/vimshell.vim/autoload/unite/sources/vimshell_zsh_complete.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/unite/sources/vimshell_zsh_complete.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:script_path = expand(':p:h') \ .'/vimshell_zsh_complete/complete.zsh' -function! unite#sources#vimshell_zsh_complete#define() abort "{{{ +function! unite#sources#vimshell_zsh_complete#define() "{{{ return (executable('zsh') && !vimshell#util#is_windows()) ? \ s:source : {} endfunction "}}} @@ -39,7 +39,7 @@ \ 'is_listed' : 0, \ } -function! s:source.hooks.on_init(args, context) abort "{{{ +function! s:source.hooks.on_init(args, context) "{{{ let a:context.source__input = vimshell#get_cur_text() try @@ -61,7 +61,7 @@ let a:context.source__cur_keyword_pos = pos endfunction"}}} -function! s:source.hooks.on_syntax(args, context) abort "{{{ +function! s:source.hooks.on_syntax(args, context) "{{{ syntax match uniteSource__VimshellZshCompleteDescriptionLine / -- .*$/ \ contained containedin=uniteSource__VimshellZshComplete syntax match uniteSource__VimshellZshCompleteDescription /.*$/ @@ -71,12 +71,12 @@ highlight default link uniteSource__VimshellZshCompleteMarker Special highlight default link uniteSource__VimshellZshCompleteDescription Comment endfunction"}}} -function! s:source.hooks.on_close(args, context) abort "{{{ +function! s:source.hooks.on_close(args, context) "{{{ if has_key(a:context, 'source__proc') call a:context.source__proc.waitpid() endif endfunction"}}} -function! s:source.hooks.on_post_filter(args, context) abort "{{{ +function! s:source.hooks.on_post_filter(args, context) "{{{ for candidate in a:context.candidates let candidate.kind = 'completion' let candidate.action__complete_word = candidate.word @@ -84,7 +84,7 @@ \ a:context.source__cur_keyword_pos endfor endfunction"}}} -function! s:source.gather_candidates(args, context) abort "{{{ +function! s:source.gather_candidates(args, context) "{{{ let a:context.source__proc = vimproc#plineopen3('zsh -i -f', 1) call a:context.source__proc.stdin.write( @@ -96,7 +96,7 @@ return [] endfunction "}}} -function! s:source.async_gather_candidates(args, context) abort "{{{ +function! s:source.async_gather_candidates(args, context) "{{{ if !has_key(a:context, 'source__proc') return [] endif @@ -127,7 +127,7 @@ return s:convert_lines(lines) endfunction "}}} -function! unite#sources#vimshell_zsh_complete#start_complete(is_insert) abort "{{{ +function! unite#sources#vimshell_zsh_complete#start_complete(is_insert) "{{{ if !exists(':Unite') call vimshell#echo_error('unite.vim is not installed.') call vimshell#echo_error( @@ -158,7 +158,7 @@ \ }) endfunction "}}} -function! s:convert_lines(lines) abort +function! s:convert_lines(lines) let _ = [] for line in filter(copy(a:lines), \ "v:val !~ '\\r' && v:val !~ '^% '") === modified file 'vim/bundle/vimshell.vim/autoload/vimshell.vim' --- vim/bundle/vimshell.vim/autoload/vimshell.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell.vim 2015-08-25 11:01:00 +0000 @@ -30,11 +30,11 @@ runtime! plugin/vimshell.vim endif -function! vimshell#version() abort "{{{ +function! vimshell#version() "{{{ return str2nr(printf('%02d%02d', 11, 1)) endfunction"}}} -function! vimshell#echo_error(string) abort "{{{ +function! vimshell#echo_error(string) "{{{ echohl Error | echo a:string | echohl None endfunction"}}} @@ -45,78 +45,78 @@ "}}} " vimshell plugin utility functions. "{{{ -function! vimshell#available_commands(...) abort "{{{ +function! vimshell#available_commands(...) "{{{ call vimshell#init#_internal_commands(get(a:000, 0, '')) return vimshell#variables#internal_commands() endfunction"}}} -function! vimshell#print(fd, string) abort "{{{ +function! vimshell#print(fd, string) "{{{ return vimshell#interactive#print_buffer(a:fd, a:string) endfunction"}}} -function! vimshell#print_line(fd, string) abort "{{{ +function! vimshell#print_line(fd, string) "{{{ return vimshell#interactive#print_buffer(a:fd, a:string . "\n") endfunction"}}} -function! vimshell#error_line(fd, string) abort "{{{ +function! vimshell#error_line(fd, string) "{{{ return vimshell#interactive#error_buffer(a:fd, a:string . "\n") endfunction"}}} -function! vimshell#print_prompt(...) abort "{{{ +function! vimshell#print_prompt(...) "{{{ return call('vimshell#view#_print_prompt', a:000) endfunction"}}} -function! vimshell#print_secondary_prompt() abort "{{{ +function! vimshell#print_secondary_prompt() "{{{ return call('vimshell#view#_print_secondary_prompt', a:000) endfunction"}}} -function! vimshell#start_insert(...) abort "{{{ +function! vimshell#start_insert(...) "{{{ return call('vimshell#view#_start_insert', a:000) endfunction"}}} -function! vimshell#get_prompt(...) abort "{{{ +function! vimshell#get_prompt(...) "{{{ return call('vimshell#view#_get_prompt', a:000) endfunction"}}} -function! vimshell#get_secondary_prompt() abort "{{{ +function! vimshell#get_secondary_prompt() "{{{ return get(vimshell#get_context(), \ 'secondary_prompt', get(g:, 'vimshell_secondary_prompt', '%% ')) endfunction"}}} -function! vimshell#get_user_prompt() abort "{{{ +function! vimshell#get_user_prompt() "{{{ return get(vimshell#get_context(), \ 'user_prompt', get(g:, 'vimshell_user_prompt', '')) endfunction"}}} -function! vimshell#get_right_prompt() abort "{{{ +function! vimshell#get_right_prompt() "{{{ return get(vimshell#get_context(), \ 'right_prompt', get(g:, 'vimshell_right_prompt', '')) endfunction"}}} -function! vimshell#get_cur_text() abort "{{{ +function! vimshell#get_cur_text() "{{{ return vimshell#interactive#get_cur_text() endfunction"}}} -function! vimshell#get_cur_line() abort "{{{ +function! vimshell#get_cur_line() "{{{ let cur_text = matchstr(getline('.'), \ '^.*\%'.col('.').'c' . (mode() ==# 'i' ? '' : '.')) return cur_text endfunction"}}} -function! vimshell#check_prompt(...) abort "{{{ +function! vimshell#check_prompt(...) "{{{ return call('vimshell#view#_check_prompt', a:000) endfunction"}}} -function! vimshell#set_execute_file(exts, program) abort "{{{ +function! vimshell#set_execute_file(exts, program) "{{{ return vimshell#util#set_dictionary_helper(g:vimshell_execute_file_list, \ a:exts, a:program) endfunction"}}} -function! vimshell#open(filename) abort "{{{ +function! vimshell#open(filename) "{{{ call vimproc#open(a:filename) endfunction"}}} -function! vimshell#cd(directory) abort "{{{ +function! vimshell#cd(directory) "{{{ return vimshell#view#_cd(a:directory) endfunction"}}} -function! vimshell#execute_current_line(is_insert) abort "{{{ +function! vimshell#execute_current_line(is_insert) "{{{ return &filetype ==# 'vimshell' ? \ vimshell#mappings#execute_line(a:is_insert) : \ vimshell#int_mappings#execute_line(a:is_insert) endfunction"}}} -function! vimshell#next_prompt(context, ...) abort "{{{ +function! vimshell#next_prompt(context, ...) "{{{ return call('vimshell#view#_next_prompt', [a:context] + a:000) endfunction"}}} -function! vimshell#is_interactive() abort "{{{ +function! vimshell#is_interactive() "{{{ let is_valid = get(get(b:interactive, 'process', {}), 'is_valid', 0) return b:interactive.type ==# 'interactive' \ || (b:interactive.type ==# 'vimshell' && is_valid) endfunction"}}} -function! vimshell#get_data_directory() abort "{{{ +function! vimshell#get_data_directory() "{{{ let data_directory = vimshell#util#set_default( \ 'g:vimshell_data_directory', \ ($XDG_CACHE_HOME != '' ? @@ -133,13 +133,13 @@ "}}} " User helper functions. -function! vimshell#execute(cmdline, ...) abort "{{{ +function! vimshell#execute(cmdline, ...) "{{{ return call('vimshell#helpers#execute', [a:cmdline] + a:000) endfunction"}}} -function! vimshell#execute_async(cmdline, ...) abort "{{{ +function! vimshell#execute_async(cmdline, ...) "{{{ return call('vimshell#helpers#execute_async', [a:cmdline] + a:000) endfunction"}}} -function! vimshell#set_context(context) abort "{{{ +function! vimshell#set_context(context) "{{{ let context = vimshell#init#_context(a:context) let s:context = context if exists('b:vimshell') @@ -150,7 +150,7 @@ endif endif endfunction"}}} -function! vimshell#get_context() abort "{{{ +function! vimshell#get_context() "{{{ if exists('b:vimshell') return extend(copy(b:vimshell.context), \ get(b:vimshell.continuation, 'context', {})) @@ -168,25 +168,25 @@ return s:context endfunction"}}} -function! vimshell#set_alias(name, value) abort "{{{ +function! vimshell#set_alias(name, value) "{{{ return vimshell#helpers#set_alias(a:name, a:value) endfunction"}}} -function! vimshell#set_galias(name, value) abort "{{{ +function! vimshell#set_galias(name, value) "{{{ return vimshell#helpers#set_galias(a:name, a:value) endfunction"}}} -function! vimshell#set_syntax(syntax_name) abort "{{{ +function! vimshell#set_syntax(syntax_name) "{{{ let b:interactive.syntax = a:syntax_name endfunction"}}} -function! vimshell#get_status_string() abort "{{{ +function! vimshell#get_status_string() "{{{ return !exists('b:vimshell') ? '' : ( \ (!empty(b:vimshell.continuation) ? '[async] ' : '') . \ b:vimshell.current_dir) endfunction"}}} -function! vimshell#complete(arglead, cmdline, cursorpos) abort "{{{ +function! vimshell#complete(arglead, cmdline, cursorpos) "{{{ return vimshell#helpers#complete(a:arglead, a:cmdline, a:cursorpos) endfunction"}}} -function! vimshell#get_prompt_length(...) abort "{{{ +function! vimshell#get_prompt_length(...) "{{{ return len(matchstr(get(a:000, 0, getline('.')), \ vimshell#get_context().prompt_pattern)) endfunction"}}} === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/altercmd.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/altercmd.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/altercmd.vim 2015-08-25 11:01:00 +0000 @@ -23,7 +23,7 @@ " }}} "============================================================================= -function! vimshell#altercmd#define(original, alternative) abort "{{{ +function! vimshell#altercmd#define(original, alternative) "{{{ execute 'inoreabbrev ' a:original \ '(join(vimshell#helpers#get_current_args()) ==# "' . a:original . '") &&' \ 'empty(b:vimshell.continuation) ?' @@ -31,11 +31,11 @@ let b:vimshell.altercmd_table[a:original] = a:alternative endfunction"}}} -function! s:SID_PREFIX() abort +function! s:SID_PREFIX() return matchstr(expand(''), '\d\+_\zeSID_PREFIX$') endfunction -function! s:recursive_expand_altercmd(string) abort +function! s:recursive_expand_altercmd(string) " Recursive expand altercmd. let abbrev = b:vimshell.altercmd_table[a:string] let expanded = {} === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/alias.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/alias.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/alias.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'special', \ 'description' : 'alias {alias-name} = {command}', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ let args = join(a:args) if empty(a:args) @@ -61,6 +61,6 @@ endif endfunction"}}} -function! vimshell#commands#alias#define() abort +function! vimshell#commands#alias#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/bg.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/bg.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/bg.vim 2015-08-25 11:01:00 +0000 @@ -30,7 +30,7 @@ \ 'kind' : 'execute', \ 'description' : 'bg [{option}...] {command}', \} -function! s:command.execute(commands, context) abort "{{{ +function! s:command.execute(commands, context) "{{{ " Execute command in background. if empty(a:commands) return @@ -120,15 +120,15 @@ return vimshell#commands#bg#init(a:commands, a:context, options, interactive) endfunction"}}} -function! s:command.complete(args) abort "{{{ +function! s:command.complete(args) "{{{ return vimshell#complete#helper#command_args(a:args) endfunction"}}} -function! vimshell#commands#bg#define() abort +function! vimshell#commands#bg#define() return s:command endfunction -function! vimshell#commands#bg#init(commands, context, options, interactive) abort "{{{ +function! vimshell#commands#bg#init(commands, context, options, interactive) "{{{ " Save current directiory. let cwd = getcwd() @@ -199,7 +199,7 @@ endif endfunction"}}} -function! s:on_execute() abort "{{{ +function! s:on_execute() "{{{ setlocal modifiable echo 'Running command.' call vimshell#interactive#execute_process_out(mode() ==# 'i') @@ -207,12 +207,12 @@ echo '' setlocal nomodifiable endfunction"}}} -function! s:on_exit() abort "{{{ +function! s:on_exit() "{{{ if !b:interactive.process.is_valid call vimshell#util#delete_buffer() endif endfunction "}}} -function! s:event_bufwin_enter() abort "{{{ +function! s:event_bufwin_enter() "{{{ if has('conceal') setlocal conceallevel=3 setlocal concealcursor=nvi === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/build.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/build.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/build.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'internal', \ 'description' : 'build [{builder-name}, {args}]', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ let args = vimshell#parser#getopt(a:args, {})[0] let old_pos = [ tabpagenr(), winnr(), bufnr('%'), getpos('.')] @@ -47,7 +47,7 @@ endif endfunction"}}} -function! s:command.complete(args) abort "{{{ +function! s:command.complete(args) "{{{ if len(a:args) == 1 \ && exists('*unite#sources#build#get_builders_name') return vimshell#complete#helper#keyword_simple_filter( @@ -57,6 +57,6 @@ return [] endfunction"}}} -function! vimshell#commands#build#define() abort +function! vimshell#commands#build#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/cd.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/cd.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/cd.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'internal', \ 'description' : 'cd {directory-path} [{substitute-pattern}]', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ " Change the working directory. if empty(a:args) @@ -104,7 +104,7 @@ call vimshell#hook#call('chpwd', context, getcwd()) endif endfunction"}}} -function! s:command.complete(args) abort "{{{ +function! s:command.complete(args) "{{{ if a:args[-1] =~ '^-\d*$' let ret = vimshell#complete#helper#directory_stack(a:args[-1][1:]) for keyword in ret @@ -118,6 +118,6 @@ return ret endfunction"}}} -function! vimshell#commands#cd#define() abort +function! vimshell#commands#cd#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/cdup.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/cdup.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/cdup.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'internal', \ 'description' : 'cdup {ancestor-directory-name}', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ " Move to parent directory. if empty(a:args) @@ -58,10 +58,10 @@ \ [directory], a:context) endfunction"}}} -function! s:command.complete(args) abort "{{{ +function! s:command.complete(args) "{{{ return split(b:vimshell.current_dir, '/') endfunction"}}} -function! vimshell#commands#cdup#define() abort +function! vimshell#commands#cdup#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/clear.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/clear.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/clear.vim 2015-08-25 11:01:00 +0000 @@ -28,13 +28,13 @@ \ 'kind' : 'internal', \ 'description' : 'clear', \} -function! s:command.execute(args, context) abort +function! s:command.execute(args, context) " Clean up the screen. % delete _ call vimshell#terminal#clear_highlight() endfunction -function! vimshell#commands#clear#define() abort +function! vimshell#commands#clear#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/dirs.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/dirs.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/dirs.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'internal', \ 'description' : 'dirs [{max}]', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ " Print directory stack. let cnt = 0 @@ -55,6 +55,6 @@ endwhile endfunction"}}} -function! vimshell#commands#dirs#define() abort +function! vimshell#commands#dirs#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/echo.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/echo.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/echo.vim 2015-08-25 11:01:00 +0000 @@ -28,11 +28,11 @@ \ 'kind' : 'internal', \ 'description' : 'echo [{argument}...]', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ " Echo arguments. call vimshell#print(a:context.fd, join(a:args) . "\n") endfunction"}}} -function! vimshell#commands#echo#define() abort +function! vimshell#commands#echo#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/eval.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/eval.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/eval.vim 2015-08-25 11:01:00 +0000 @@ -28,15 +28,16 @@ \ 'kind' : 'internal', \ 'description' : 'eval {expression}', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ " Evaluate arguments. let line = join(a:args) - let context = vimshell#init#_context({ + let context = { \ 'has_head_spaces' : line =~ '^\s\+', - \ 'is_interactive' : a:context.is_interactive, - \ 'is_insert' : a:context.is_insert, - \}) + \ 'is_interactive' : a:context.is_interactive, + \ 'is_insert' : a:context.is_insert, + \ 'fd' : { 'stdin' : '', 'stdout': '', 'stderr': ''}, + \} try call vimshell#parser#eval_script(line, context) @@ -47,6 +48,6 @@ endtry endfunction"}}} -function! vimshell#commands#eval#define() abort +function! vimshell#commands#eval#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/exe.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/exe.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/exe.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'execute', \ 'description' : 'exe [{option}...] {command}', \} -function! s:command.execute(commands, context) abort "{{{ +function! s:command.execute(commands, context) "{{{ if empty(a:commands) return endif @@ -101,15 +101,15 @@ let b:vimshell.system_variables['status'] = b:interactive.status endfunction"}}} -function! s:command.complete(args) abort "{{{ +function! s:command.complete(args) "{{{ return vimshell#complete#helper#command_args(a:args) endfunction"}}} -function! vimshell#commands#exe#define() abort +function! vimshell#commands#exe#define() return s:command endfunction -function! s:init_process(commands, context, options) abort "{{{ +function! s:init_process(commands, context, options) "{{{ if !empty(b:interactive.process) && b:interactive.process.is_valid " Delete zombie process. call vimshell#interactive#force_exit() === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/exit.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/exit.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/exit.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'internal', \ 'description' : 'exit', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ " Exit vimshell. if a:context.is_interactive let context = deepcopy(vimshell#get_context()) @@ -45,6 +45,6 @@ stopinsert endfunction"}}} -function! vimshell#commands#exit#define() abort +function! vimshell#commands#exit#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/export.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/export.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/export.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'internal', \ 'description' : 'export {variable-name}={value} ...', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ " Make directory and change the working directory. if empty(a:args) " Print environment variables. @@ -51,10 +51,10 @@ execute printf('let $%s = %s', varname, string(arg[len(varname)+1:])) endfor endfunction"}}} -function! s:command.complete(args) abort "{{{ +function! s:command.complete(args) "{{{ return vimshell#complete#helper#environments(get(a:args, -1, '')) endfunction"}}} -function! vimshell#commands#export#define() abort +function! vimshell#commands#export#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/galias.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/galias.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/galias.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'special', \ 'description' : 'galias {global-alias-name} = {command}', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ let args = join(a:args) if empty(a:args) @@ -59,6 +59,6 @@ endif endfunction"}}} -function! vimshell#commands#galias#define() abort +function! vimshell#commands#galias#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/gcd.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/gcd.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/gcd.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'internal', \ 'description' : 'gcd [{directory-path}]', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ " Change the global working directory. let dir = empty(a:args)? getcwd() : a:args[0] @@ -37,6 +37,6 @@ return vimshell#helpers#execute_internal_command('cd', [ dir ], a:context) endfunction"}}} -function! vimshell#commands#gcd#define() abort +function! vimshell#commands#gcd#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/gendoc.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/gendoc.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/gendoc.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'internal', \ 'description' : 'gendoc {command} {args}', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ " Generate cached doc. if empty(a:args) @@ -46,6 +46,6 @@ call vimshell#help#set_cached_doc(cached_doc) endfunction"}}} -function! vimshell#commands#gendoc#define() abort +function! vimshell#commands#gendoc#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/gexe.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/gexe.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/gexe.vim 2015-08-25 11:01:00 +0000 @@ -28,16 +28,16 @@ \ 'kind' : 'internal', \ 'description' : 'gexe {command}', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ let command = join(a:args) let command = vimproc#util#iconv(command, &encoding, 'char') call vimproc#system_gui(command) endfunction"}}} -function! s:command.complete(args) abort "{{{ +function! s:command.complete(args) "{{{ return vimshell#complete#helper#command_args(a:args) endfunction"}}} -function! vimshell#commands#gexe#define() abort +function! vimshell#commands#gexe#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/h.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/h.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/h.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'internal', \ 'description' : 'h [{pattern}]', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ " Execute from history. let histories = vimshell#history#read() @@ -79,6 +79,6 @@ endtry endfunction"}}} -function! vimshell#commands#h#define() abort +function! vimshell#commands#h#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/histdel.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/histdel.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/histdel.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'internal', \ 'description' : 'histdel {history-number}', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ " Delete from history. if empty(a:args) @@ -62,6 +62,6 @@ call vimshell#history#write(new_hist) endfunction"}}} -function! vimshell#commands#histdel#define() abort +function! vimshell#commands#histdel#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/history.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/history.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/history.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'internal', \ 'description' : 'history [{search-string}]', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ let histories = vimshell#history#read() let arguments = join(a:args, ' ') @@ -68,6 +68,6 @@ endfor endfunction"}}} -function! vimshell#commands#history#define() abort +function! vimshell#commands#history#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/iexe.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/iexe.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/iexe.vim 2015-08-25 11:01:00 +0000 @@ -30,7 +30,7 @@ \ 'kind' : 'execute', \ 'description' : 'iexe [{options}...] {command}', \} -function! s:command.execute(commands, context) abort "{{{ +function! s:command.execute(commands, context) "{{{ " Interactive execute command. if empty(a:commands) return @@ -177,7 +177,7 @@ call vimshell#view#_simple_insert() endif endfunction"}}} -function! s:command.complete(args) abort "{{{ +function! s:command.complete(args) "{{{ if len(a:args) == 1 return vimshell#complete#helper#executables(a:args[-1]) elseif vimshell#util#is_windows() && @@ -189,7 +189,7 @@ return vimshell#complete#helper#args(a:args[1], a:args[2:]) endfunction"}}} -function! vimshell#commands#iexe#define() abort +function! vimshell#commands#iexe#define() return s:command endfunction @@ -269,7 +269,7 @@ \ g:vimshell_interactive_monochrome_commands, 'earthquake', '1') "}}} -function! s:default_settings() abort "{{{ +function! s:default_settings() "{{{ " Common. call vimshell#init#_default_settings() @@ -277,7 +277,7 @@ call vimshell#int_mappings#define_default_mappings() endfunction"}}} -function! s:default_syntax() abort "{{{ +function! s:default_syntax() "{{{ " Set syntax. syntax match InteractiveError \ '!!![^!].*!!!' contains=InteractiveErrorHidden @@ -294,7 +294,7 @@ endif endfunction"}}} -function! vimshell#commands#iexe#init(context, interactive, new_pos, old_pos, is_insert) abort "{{{ +function! vimshell#commands#iexe#init(context, interactive, new_pos, old_pos, is_insert) "{{{ " Save current directiory. let cwd = getcwd() @@ -339,7 +339,7 @@ endif endfunction"}}} -function! s:event_bufwin_enter() abort "{{{ +function! s:event_bufwin_enter() "{{{ if has('conceal') setlocal conceallevel=3 setlocal concealcursor=nvi === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/less.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/less.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/less.vim 2015-08-25 11:01:00 +0000 @@ -30,7 +30,7 @@ \ 'kind' : 'execute', \ 'description' : 'less [{option}...] {command}', \} -function! s:command.execute(commands, context) abort "{{{ +function! s:command.execute(commands, context) "{{{ " Execute command in background. if empty(a:commands) return @@ -86,15 +86,15 @@ return s:init(a:commands, a:context, options, interactive) endfunction"}}} -function! s:command.complete(args) abort "{{{ +function! s:command.complete(args) "{{{ return vimshell#complete#helper#command_args(a:args) endfunction"}}} -function! vimshell#commands#less#define() abort +function! vimshell#commands#less#define() return s:command endfunction -function! s:init(commands, context, options, interactive) abort "{{{ +function! s:init(commands, context, options, interactive) "{{{ " Save current directiory. let cwd = getcwd() @@ -221,32 +221,32 @@ endif endfunction"}}} -function! s:next_line() abort "{{{ +function! s:next_line() "{{{ if line('.') == line('$') call s:print_output(2) endif call cursor(line('.')+1, 0) endfunction "}}} -function! s:next_screen() abort "{{{ +function! s:next_screen() "{{{ if line('.') == line('$') call s:print_output(winheight(0)) else execute "normal! \" endif endfunction "}}} -function! s:next_half_screen() abort "{{{ +function! s:next_half_screen() "{{{ if line('.') == line('$') call s:print_output(winheight(0)/2) else execute "normal! \" endif endfunction "}}} -function! s:last_screen() abort "{{{ +function! s:last_screen() "{{{ call s:print_output(-1) endfunction "}}} -function! s:print_output(line_num) abort "{{{ +function! s:print_output(line_num) "{{{ setlocal modifiable call cursor(line('$'), 0) === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/let.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/let.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/let.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'special', \ 'description' : 'let ${var-name} = {expression}', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ let args = join(a:args) if args !~ '^$$\?\h\w*' @@ -60,6 +60,6 @@ execute 'let ' . varname . expression endfunction"}}} -function! vimshell#commands#let#define() abort +function! vimshell#commands#let#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/ls.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/ls.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/ls.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'internal', \ 'description' : 'ls [{argument}...]', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ " Check ls command. if !executable('ls') call vimshell#error_line(a:context.fd, @@ -47,6 +47,6 @@ call vimshell#helpers#execute_internal_command('exe', arguments, a:context) endfunction"}}} -function! vimshell#commands#ls#define() abort +function! vimshell#commands#ls#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/mkcd.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/mkcd.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/mkcd.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'internal', \ 'description' : 'mkcd {directory-name}', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ " Make directory and change the working directory. if empty(a:args) @@ -53,6 +53,6 @@ return vimshell#helpers#execute_internal_command('cd', a:args, a:context) endfunction"}}} -function! vimshell#commands#mkcd#define() abort +function! vimshell#commands#mkcd#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/nop.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/nop.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/nop.vim 2015-08-25 11:01:00 +0000 @@ -28,10 +28,10 @@ \ 'kind' : 'internal', \ 'description' : 'nop', \} -function! s:command.execute(args, context) abort +function! s:command.execute(args, context) " No operation. endfunction -function! vimshell#commands#nop#define() abort +function! vimshell#commands#nop#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/open.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/open.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/open.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'internal', \ 'description' : 'open {filename}', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ " Open file. call vimshell#open(join(a:args)) @@ -36,6 +36,6 @@ return endfunction"}}} -function! vimshell#commands#open#define() abort +function! vimshell#commands#open#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/popd.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/popd.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/popd.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'internal', \ 'description' : 'popd [{directory-stack-number}]', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ " Pop directory. if empty(b:vimshell.directory_stack) @@ -58,10 +58,10 @@ return vimshell#helpers#execute_internal_command('cd', \ [ b:vimshell.directory_stack[pop] ], a:context) endfunction"}}} -function! s:command.complete(args) abort "{{{ +function! s:command.complete(args) "{{{ return vimshell#complete#helper#directory_stack(a:args[-1]) endfunction"}}} -function! vimshell#commands#popd#define() abort +function! vimshell#commands#popd#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/pwd.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/pwd.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/pwd.vim 2015-08-25 11:01:00 +0000 @@ -28,12 +28,12 @@ \ 'kind' : 'internal', \ 'description' : 'pwd', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ " Print the working directory. call vimshell#print_line(a:context.fd, getcwd()) endfunction"}}} -function! vimshell#commands#pwd#define() abort +function! vimshell#commands#pwd#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/repeat.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/repeat.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/repeat.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'internal', \ 'description' : 'repeat {cnt} {command}', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ " Repeat command. if len(a:args) < 2 || a:args[0] !~ '\d\+' @@ -47,6 +47,6 @@ endwhile endfunction"}}} -function! vimshell#commands#repeat#define() abort +function! vimshell#commands#repeat#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/scp.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/scp.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/scp.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'external', \ 'description' : 'scp {src} {dest}', \} -function! s:command.complete(args) abort "{{{ +function! s:command.complete(args) "{{{ let arglead = get(a:args, -1, '') let cmdline = join(a:args) let cursorpos = len(cmdline) @@ -54,6 +54,6 @@ return _ endfunction"}}} -function! vimshell#commands#scp#define() abort +function! vimshell#commands#scp#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/sexe.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/sexe.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/sexe.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'special', \ 'description' : 'sexe {command}', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ let [args, options] = vimshell#parser#getopt(a:args, \{ 'arg=' : ['--encoding'] \}) @@ -103,6 +103,6 @@ return endfunction"}}} -function! vimshell#commands#sexe#define() abort +function! vimshell#commands#sexe#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/shell.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/shell.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/shell.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'internal', \ 'description' : 'shell', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ " Starts shell in terminal. if g:vimshell_use_terminal_command == '' call vimshell#error_line(a:context.fd, @@ -40,6 +40,6 @@ \ g:vimshell_use_terminal_command, &shell)) endfunction"}}} -function! vimshell#commands#shell#define() abort +function! vimshell#commands#shell#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/source.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/source.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/source.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'internal', \ 'description' : 'source files...', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ if len(a:args) < 1 return endif @@ -39,6 +39,6 @@ endfor endfunction"}}} -function! vimshell#commands#source#define() abort +function! vimshell#commands#source#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/source_shellcmd.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/source_shellcmd.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/source_shellcmd.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'internal', \ 'description' : 'source shellcmd...', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ if len(a:args) < 1 return endif @@ -55,6 +55,6 @@ call vimshell#util#set_variables(variables) endfunction"}}} -function! vimshell#commands#source_shellcmd#define() abort +function! vimshell#commands#source_shellcmd#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/ssh.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/ssh.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/ssh.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'external', \ 'description' : 'ssh {hostname}', \} -function! s:command.complete(args) abort "{{{ +function! s:command.complete(args) "{{{ if !exists('*unite#get_all_sources') \ || empty(unite#get_all_sources('ssh')) return [] @@ -41,6 +41,6 @@ \ arglead, cmdline, len(cmdline)) endfunction"}}} -function! vimshell#commands#ssh#define() abort +function! vimshell#commands#ssh#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/sudo.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/sudo.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/sudo.vim 2015-08-25 11:01:00 +0000 @@ -23,7 +23,7 @@ " }}} "============================================================================= -function! vimshell#commands#sudo#define() abort +function! vimshell#commands#sudo#define() return s:command endfunction @@ -33,11 +33,11 @@ \ 'description' : 'sudo {command}', \} -function! s:command.complete(args) abort "{{{ +function! s:command.complete(args) "{{{ return vimshell#complete#helper#command_args(a:args) endfunction"}}} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ " Execute GUI program. if empty(a:args) call vimshell#error_line( === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/time.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/time.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/time.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'internal', \ 'description' : 'time {command}', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ " Repeat command. if len(a:args) < 1 @@ -47,6 +47,6 @@ call vimshell#print(a:context.fd, printf('time = %s', reltimestr(reltime(start)))) endfunction"}}} -function! vimshell#commands#time#define() abort +function! vimshell#commands#time#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/vexe.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/vexe.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/vexe.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'special', \ 'description' : 'vexe {expression}', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ " Execute vim command. let [args, options] = vimshell#parser#getopt(a:args, { \ 'noarg' : ['--insert'], @@ -78,6 +78,6 @@ endif endfunction"}}} -function! vimshell#commands#vexe#define() abort +function! vimshell#commands#vexe#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/view.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/view.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/view.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'internal', \ 'description' : 'view [{filename}]', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ let [args, options] = vimshell#parser#getopt(a:args, { \ 'arg=' : ['--split'], \ }, { @@ -90,6 +90,6 @@ endif endfunction"}}} -function! vimshell#commands#view#define() abort +function! vimshell#commands#view#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/vim.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/vim.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/vim.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'internal', \ 'description' : 'vim [{filename}]', \} -function! s:command_vim.execute(args, context) abort "{{{ +function! s:command_vim.execute(args, context) "{{{ let [args, options] = vimshell#parser#getopt(a:args, { \ 'arg=' : ['--split'], \ }, { @@ -72,7 +72,7 @@ endif endfunction"}}} -function! vimshell#commands#vim#define() abort +function! vimshell#commands#vim#define() let s:command_vi = deepcopy(s:command_vim) let s:command_vi.name = 'vi' let s:command_vi.description = 'vi [{filename}]' === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/vimdiff.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/vimdiff.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/vimdiff.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'internal', \ 'description' : 'vimdiff {filename1} {filename2}', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ let [args, options] = vimshell#parser#getopt(a:args, { \ 'arg=' : ['--split'], \ }, { @@ -67,6 +67,6 @@ endif endfunction"}}} -function! vimshell#commands#vimdiff#define() abort +function! vimshell#commands#vimdiff#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/vimsh.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/vimsh.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/vimsh.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'internal', \ 'description' : 'vimsh [{filename}]', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ " Create new vimshell or execute script. if empty(a:args) let bufnr = bufnr('%') @@ -48,9 +48,10 @@ return endif - let context = vimshell#init#_context({ + let context = { \ 'has_head_spaces' : 0, 'is_interactive' : 0, - \ }) + \ 'fd' : { 'stdin' : '', 'stdout': '', 'stderr': ''}, + \ } let i = 0 let lines = readfile(filename) let max = len(lines) @@ -84,6 +85,6 @@ endwhile endfunction"}}} -function! vimshell#commands#vimsh#define() abort +function! vimshell#commands#vimsh#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/whereis.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/whereis.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/whereis.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'internal', \ 'description' : 'whereis command', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ if empty(a:args) return endif @@ -37,7 +37,7 @@ call vimshell#print_line(a:context.fd, arg) endfor endfunction"}}} -function! s:command.complete(args) abort "{{{ +function! s:command.complete(args) "{{{ if len(a:args) == 1 return vimshell#complete#helper#executables(a:args[-1]) endif @@ -45,6 +45,6 @@ return [] endfunction"}}} -function! vimshell#commands#whereis#define() abort +function! vimshell#commands#whereis#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/commands/which.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/commands/which.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/commands/which.vim 2015-08-25 11:01:00 +0000 @@ -28,7 +28,7 @@ \ 'kind' : 'internal', \ 'description' : 'which command', \} -function! s:command.execute(args, context) abort "{{{ +function! s:command.execute(args, context) "{{{ if empty(a:args) return endif @@ -47,7 +47,7 @@ call vimshell#print_line(a:context.fd, line) endfunction"}}} -function! s:command.complete(args) abort "{{{ +function! s:command.complete(args) "{{{ if len(a:args) == 1 return vimshell#complete#helper#executables(a:args[-1]) endif @@ -55,6 +55,6 @@ return [] endfunction"}}} -function! vimshell#commands#which#define() abort +function! vimshell#commands#which#define() return s:command endfunction === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/complete.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/complete.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/complete.vim 2015-08-25 11:01:00 +0000 @@ -24,7 +24,7 @@ "============================================================================= " Complete function. This provides simple file completion. -function! vimshell#complete#start() abort "{{{ +function! vimshell#complete#start() "{{{ if &l:omnifunc == '' setlocal omnifunc=vimshell#complete#omnifunc endif @@ -33,7 +33,7 @@ return '' endfunction"}}} -function! vimshell#complete#omnifunc(findstart, base) abort "{{{ +function! vimshell#complete#omnifunc(findstart, base) "{{{ if a:findstart return vimshell#complete#get_keyword_position() else @@ -41,7 +41,7 @@ endif endfunction"}}} -function! vimshell#complete#get_keyword_position() abort "{{{ +function! vimshell#complete#get_keyword_position() "{{{ if !vimshell#check_prompt() || !empty(b:vimshell.continuation) " Ignore. return -1 @@ -76,7 +76,7 @@ return pos endfunction"}}} -function! vimshell#complete#gather_candidates(complete_str) abort "{{{ +function! vimshell#complete#gather_candidates(complete_str) "{{{ let cur_text = vimshell#get_cur_text() try @@ -85,10 +85,6 @@ return [] endtry - if a:complete_str =~ '\*' - return [] - endif - if empty(args) let args = [''] endif @@ -108,7 +104,7 @@ return s:get_omni_list(_) endfunction"}}} -function! s:get_complete_commands(cur_keyword_str) abort "{{{ +function! s:get_complete_commands(cur_keyword_str) "{{{ if a:cur_keyword_str =~ '/' " Filename completion. return vimshell#complete#helper#files(a:cur_keyword_str) @@ -137,7 +133,7 @@ return _ endfunction"}}} -function! s:get_complete_args(cur_keyword_str, args) abort "{{{ +function! s:get_complete_args(cur_keyword_str, args) "{{{ " Get command name. let command = fnamemodify(a:args[0], ':t:r') @@ -146,7 +142,7 @@ return vimshell#complete#helper#args(command, a:args[1:]) endfunction"}}} -function! s:get_omni_list(list) abort "{{{ +function! s:get_omni_list(list) "{{{ let omni_list = [] " Convert string list. === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/complete/helper.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/complete/helper.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/complete/helper.vim 2015-08-25 11:01:00 +0000 @@ -23,7 +23,7 @@ " }}} "============================================================================= -function! vimshell#complete#helper#files(cur_keyword_str, ...) abort "{{{ +function! vimshell#complete#helper#files(cur_keyword_str, ...) "{{{ " vimshell#complete#helper#files(cur_keyword_str [, path]) if a:0 > 1 @@ -52,7 +52,7 @@ return list endfunction"}}} -function! vimshell#complete#helper#directories(cur_keyword_str) abort "{{{ +function! vimshell#complete#helper#directories(cur_keyword_str) "{{{ let ret = [] for keyword in filter(vimshell#complete#helper#files(a:cur_keyword_str), \ 'isdirectory(v:val.orig) || @@ -66,7 +66,7 @@ return ret endfunction"}}} -function! vimshell#complete#helper#cdpath_directories(cur_keyword_str) abort "{{{ +function! vimshell#complete#helper#cdpath_directories(cur_keyword_str) "{{{ " Check dup. let check = {} for keyword in filter(vimshell#complete#helper#files(a:cur_keyword_str, &cdpath), @@ -88,7 +88,7 @@ return ret endfunction"}}} -function! vimshell#complete#helper#directory_stack(cur_keyword_str) abort "{{{ +function! vimshell#complete#helper#directory_stack(cur_keyword_str) "{{{ if !exists('b:vimshell') return [] endif @@ -104,7 +104,7 @@ return ret endfunction"}}} -function! vimshell#complete#helper#aliases(cur_keyword_str) abort "{{{ +function! vimshell#complete#helper#aliases(cur_keyword_str) "{{{ if !exists('b:vimshell') return [] endif @@ -129,7 +129,7 @@ return ret endfunction"}}} -function! vimshell#complete#helper#internals(cur_keyword_str) abort "{{{ +function! vimshell#complete#helper#internals(cur_keyword_str) "{{{ let commands = vimshell#available_commands(a:cur_keyword_str) let ret = [] for keyword in vimshell#complete#helper#keyword_simple_filter( @@ -140,7 +140,7 @@ return ret endfunction"}}} -function! vimshell#complete#helper#executables(cur_keyword_str, ...) abort "{{{ +function! vimshell#complete#helper#executables(cur_keyword_str, ...) "{{{ if a:cur_keyword_str =~ '[/\\]' let files = vimshell#complete#helper#files(a:cur_keyword_str) else @@ -178,7 +178,7 @@ return ret endfunction"}}} -function! vimshell#complete#helper#buffers(cur_keyword_str) abort "{{{ +function! vimshell#complete#helper#buffers(cur_keyword_str) "{{{ let ret = [] let bufnumber = 1 while bufnumber <= bufnr('$') @@ -194,7 +194,7 @@ return ret endfunction"}}} -function! vimshell#complete#helper#args(command, args) abort "{{{ +function! vimshell#complete#helper#args(command, args) "{{{ let commands = vimshell#available_commands(a:command) " Get complete words. @@ -216,7 +216,7 @@ return complete_words endfunction"}}} -function! vimshell#complete#helper#command_args(args) abort "{{{ +function! vimshell#complete#helper#command_args(args) "{{{ " command args... if len(a:args) == 1 " Commands. @@ -226,7 +226,7 @@ return vimshell#complete#helper#args(a:args[0], a:args[1:]) endif endfunction"}}} -function! vimshell#complete#helper#variables(cur_keyword_str) abort "{{{ +function! vimshell#complete#helper#variables(cur_keyword_str) "{{{ let _ = [] let _ += map(copy(vimshell#complete#helper#environments( @@ -240,7 +240,7 @@ return vimshell#complete#helper#keyword_simple_filter(_, a:cur_keyword_str) endfunction"}}} -function! vimshell#complete#helper#environments(cur_keyword_str) abort "{{{ +function! vimshell#complete#helper#environments(cur_keyword_str) "{{{ if !exists('s:envlist') " Get environment variables list. let s:envlist = map(split(system('set'), '\n'), @@ -251,21 +251,21 @@ \ copy(s:envlist), a:cur_keyword_str) endfunction"}}} -function! vimshell#complete#helper#call_omnifunc(omnifunc) abort "{{{ +function! vimshell#complete#helper#call_omnifunc(omnifunc) "{{{ " Set complete function. let &l:omnifunc = a:omnifunc return "\\\" endfunction"}}} -function! vimshell#complete#helper#restore_omnifunc(omnifunc) abort "{{{ +function! vimshell#complete#helper#restore_omnifunc(omnifunc) "{{{ if &l:omnifunc !=# a:omnifunc let &l:omnifunc = a:omnifunc endif endfunction"}}} -function! vimshell#complete#helper#compare_rank(i1, i2) abort "{{{ +function! vimshell#complete#helper#compare_rank(i1, i2) "{{{ return a:i1.rank < a:i2.rank ? 1 : a:i1.rank == a:i2.rank ? 0 : -1 endfunction"}}} -function! vimshell#complete#helper#keyword_filter(list, cur_keyword_str) abort "{{{ +function! vimshell#complete#helper#keyword_filter(list, cur_keyword_str) "{{{ let cur_keyword = substitute(a:cur_keyword_str, '\\\zs.', '\0', 'g') if &ignorecase let expr = printf('stridx(tolower(v:val.word), %s) == 0', @@ -277,7 +277,7 @@ return filter(a:list, expr) endfunction"}}} -function! vimshell#complete#helper#keyword_simple_filter(list, cur_keyword_str) abort "{{{ +function! vimshell#complete#helper#keyword_simple_filter(list, cur_keyword_str) "{{{ let cur_keyword = substitute(a:cur_keyword_str, '\\\zs.', '\0', 'g') let expr = &ignorecase ? \ printf('stridx(tolower(v:val), %s) == 0', @@ -288,7 +288,7 @@ return filter(a:list, expr) endfunction"}}} -function! vimshell#complete#helper#get_files(path, complete_str) abort "{{{ +function! vimshell#complete#helper#get_files(path, complete_str) "{{{ let candidates = s:get_glob_files(a:path, a:complete_str) if a:path == '' let candidates = vimshell#complete#helper#keyword_filter( @@ -300,7 +300,7 @@ \ '!v:val.action__is_directory')) endfunction"}}} -function! s:get_glob_files(path, complete_str) abort "{{{ +function! s:get_glob_files(path, complete_str) "{{{ let path = ',,' . substitute(a:path, '\.\%(,\|$\)\|,,', '', 'g') let complete_str = vimshell#util#substitute_path_separator( === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/handlers.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/handlers.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/handlers.vim 2015-08-25 11:01:00 +0000 @@ -26,7 +26,7 @@ let s:save_cpo = &cpo set cpo&vim -function! vimshell#handlers#_on_bufwin_enter(bufnr) abort "{{{ +function! vimshell#handlers#_on_bufwin_enter(bufnr) "{{{ if a:bufnr != bufnr('%') && bufwinnr(a:bufnr) > 0 let winnr = winnr() execute bufwinnr(a:bufnr) 'wincmd w' @@ -83,7 +83,7 @@ endtry endfunction"}}} -function! vimshell#handlers#_restore_statusline() abort "{{{ +function! vimshell#handlers#_restore_statusline() "{{{ if &filetype !=# 'vimshell' || !g:vimshell_force_overwrite_statusline return endif === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/help.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/help.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/help.vim 2015-08-25 11:01:00 +0000 @@ -29,7 +29,7 @@ \ 'rank' : 10, \ 'filetypes' : { 'vimshell' : 1 }, \ } -function! s:doc_dict.search(cur_text) abort "{{{ +function! s:doc_dict.search(cur_text) "{{{ " Get command name. try let args = vimshell#helpers#get_current_args(vimshell#get_cur_text()) @@ -66,17 +66,17 @@ endfunction"}}} "}}} -function! vimshell#help#init() abort "{{{ +function! vimshell#help#init() "{{{ if exists('g:loaded_echodoc') && g:loaded_echodoc call echodoc#register('vimshell', s:doc_dict) endif call s:load_cached_doc() endfunction"}}} -function! vimshell#help#get_cached_doc() abort "{{{ +function! vimshell#help#get_cached_doc() "{{{ return s:cached_doc endfunction"}}} -function! vimshell#help#set_cached_doc(cache) abort "{{{ +function! vimshell#help#set_cached_doc(cache) "{{{ if vimshell#util#is_sudo() return endif @@ -86,7 +86,7 @@ call writefile(values(map(deepcopy(s:cached_doc), 'v:key."!!!".v:val')), doc_path) endfunction"}}} -function! s:load_cached_doc() abort "{{{ +function! s:load_cached_doc() "{{{ let s:cached_doc = {} if vimshell#util#is_sudo() return === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/helpers.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/helpers.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/helpers.vim 2015-08-25 11:01:00 +0000 @@ -26,21 +26,18 @@ let s:save_cpo = &cpo set cpo&vim -function! vimshell#helpers#get_editor_name() abort "{{{ +function! vimshell#helpers#get_editor_name() "{{{ if !exists('g:vimshell_editor_command') " Set editor command. let g:vimshell_editor_command = g:vimshell_cat_command - if (has('nvim') && executable('nvr')) - \ || (has('clientserver') && (has('gui_running') || has('gui'))) + if has('clientserver') && (has('gui_running') || has('gui')) if has('gui_macvim') " MacVim check. - let macvim1 = '/Applications/MacVim.app/Contents/MacOS/Vim' - let macvim2 = expand('~/Applications/MacVim.app/Contents/MacOS/Vim') - if executable(macvim1) - let progname = macvim1 - elseif executable(macvim2) - let progname = macvim2 + if executable('/Applications/MacVim.app/Contents/MacOS/Vim') + let progname = 'Applications/MacVim.app/Contents/MacOS/Vim' + elseif executable(expand('~/Applications/MacVim.app/Contents/MacOS/Vim')) + let progname = expand('~/Applications/MacVim.app/Contents/MacOS/Vim') else echoerr 'You installed MacVim in not default directory!'. \ ' You must set g:vimshell_editor_command manually.' @@ -49,24 +46,19 @@ let progname = '/Applications/MacVim.app/Contents/MacOS/Vim' else - let progname = has('nvim') ? 'nvr' : - \ has('gui_running') ? v:progname : 'vim' - endif - - if !has('nvim') - let progname .= ' -g' - endif - - let g:vimshell_editor_command = - \ printf('%s %s --remote-tab-wait-silent', - \ progname, (v:servername == '' ? '' : - \ ' --servername='.v:servername)) + let progname = has('gui_running') ? v:progname : 'vim' + endif + + let progname .= ' -g' + + let g:vimshell_editor_command = printf('%s %s --remote-tab-wait-silent', + \ progname, (v:servername == '' ? '' : ' --servername='.v:servername)) endif endif return g:vimshell_editor_command endfunction"}}} -function! vimshell#helpers#execute_internal_command(command, args, context) abort "{{{ +function! vimshell#helpers#execute_internal_command(command, args, context) "{{{ if empty(a:context) let context = { 'has_head_spaces' : 0, 'is_interactive' : 1 } else @@ -91,7 +83,7 @@ return internal.execute(a:args, context) endif endfunction"}}} -function! vimshell#helpers#imdisable() abort "{{{ +function! vimshell#helpers#imdisable() "{{{ " Disable input method. if exists('g:loaded_eskk') && eskk#is_enabled() call eskk#disable() @@ -101,7 +93,7 @@ let &l:iminsert = 0 endif endfunction"}}} -function! vimshell#helpers#get_current_args(...) abort "{{{ +function! vimshell#helpers#get_current_args(...) "{{{ let cur_text = a:0 == 0 ? vimshell#get_cur_text() : a:1 let statements = vimproc#parser#split_statements(cur_text) @@ -122,7 +114,7 @@ return args endfunction"}}} -function! vimshell#helpers#split(command) abort "{{{ +function! vimshell#helpers#split(command) "{{{ let old_pos = [ tabpagenr(), winnr(), bufnr('%'), getpos('.') ] if a:command != '' let command = @@ -135,7 +127,7 @@ return [new_pos, old_pos] endfunction"}}} -function! vimshell#helpers#restore_pos(pos) abort "{{{ +function! vimshell#helpers#restore_pos(pos) "{{{ if tabpagenr() != a:pos[0] execute 'tabnext' a:pos[0] endif @@ -150,7 +142,7 @@ call setpos('.', a:pos[3]) endfunction"}}} -function! vimshell#helpers#execute(cmdline, ...) abort "{{{ +function! vimshell#helpers#execute(cmdline, ...) "{{{ if !empty(b:vimshell.continuation) " Kill process. call vimshell#interactive#hang_up(bufname('%')) @@ -170,7 +162,7 @@ return b:vimshell.system_variables.status endfunction"}}} -function! vimshell#helpers#execute_async(cmdline, ...) abort "{{{ +function! vimshell#helpers#execute_async(cmdline, ...) "{{{ if !empty(b:vimshell.continuation) " Kill process. call vimshell#interactive#hang_up(bufname('%')) @@ -193,7 +185,7 @@ return 1 endtry endfunction"}}} -function! vimshell#helpers#get_command_path(program) abort "{{{ +function! vimshell#helpers#get_command_path(program) "{{{ " Command search. try return vimproc#get_command_name(a:program) @@ -202,11 +194,11 @@ return '' endtry endfunction"}}} -function! vimshell#helpers#get_winwidth() abort "{{{ +function! vimshell#helpers#get_winwidth() "{{{ return winwidth(0) - &l:numberwidth - &l:foldcolumn endfunction"}}} -function! vimshell#helpers#set_alias(name, value) abort "{{{ +function! vimshell#helpers#set_alias(name, value) "{{{ if !exists('b:vimshell') let b:vimshell = {} endif @@ -221,10 +213,10 @@ let b:vimshell.alias_table[a:name] = a:value endif endfunction"}}} -function! vimshell#helpers#get_alias(name) abort "{{{ +function! vimshell#helpers#get_alias(name) "{{{ return get(b:vimshell.alias_table, a:name, '') endfunction"}}} -function! vimshell#helpers#set_galias(name, value) abort "{{{ +function! vimshell#helpers#set_galias(name, value) "{{{ if !exists('b:vimshell') let b:vimshell = {} endif @@ -239,19 +231,19 @@ let b:vimshell.galias_table[a:name] = a:value endif endfunction"}}} -function! vimshell#helpers#get_galias(name) abort "{{{ +function! vimshell#helpers#get_galias(name) "{{{ return get(b:vimshell.galias_table, a:name, '') endfunction"}}} -function! vimshell#helpers#get_program_pattern() abort "{{{ +function! vimshell#helpers#get_program_pattern() "{{{ return \'^\s*\%([^[:blank:]]\|\\[^[:alnum:]._-]\)\+\ze\%(\s*\%(=\s*\)\?\)' endfunction"}}} -function! vimshell#helpers#get_alias_pattern() abort "{{{ +function! vimshell#helpers#get_alias_pattern() "{{{ return '^\s*[[:alnum:].+#_@!%:-]\+' endfunction"}}} -function! vimshell#helpers#complete(arglead, cmdline, cursorpos) abort "{{{ +function! vimshell#helpers#complete(arglead, cmdline, cursorpos) "{{{ let _ = [] " Option names completion. @@ -268,7 +260,7 @@ return sort(_) endfunction"}}} -function! vimshell#helpers#vimshell_execute_complete(arglead, cmdline, cursorpos) abort "{{{ +function! vimshell#helpers#vimshell_execute_complete(arglead, cmdline, cursorpos) "{{{ " Get complete words. let cmdline = a:cmdline[len(matchstr( \ a:cmdline, vimshell#helpers#get_program_pattern())):] @@ -282,7 +274,7 @@ return map(vimshell#complete#helper#command_args(args), 'v:val.word') endfunction"}}} -function! vimshell#helpers#check_cursor_is_end() abort "{{{ +function! vimshell#helpers#check_cursor_is_end() "{{{ return vimshell#get_cur_line() ==# getline('.') endfunction"}}} === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/history.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/history.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/history.vim 2015-08-25 11:01:00 +0000 @@ -23,7 +23,7 @@ " }}} "============================================================================= -function! vimshell#history#append(command) abort "{{{ +function! vimshell#history#append(command) "{{{ " Reduce blanks. let command = substitute(a:command, '\s\+', ' ', 'g') @@ -66,7 +66,7 @@ call vimshell#history#write(histories) endfunction"}}} -function! vimshell#history#read(...) abort "{{{ +function! vimshell#history#read(...) "{{{ if vimshell#util#is_sudo() return [] endif @@ -75,7 +75,7 @@ return filereadable(history_path) ? \ readfile(history_path) : [] endfunction"}}} -function! vimshell#history#write(list, ...) abort "{{{ +function! vimshell#history#write(list, ...) "{{{ if vimshell#util#is_sudo() return [] endif @@ -86,7 +86,7 @@ call writefile(a:list, history_path) endfunction"}}} -function! vimshell#history#get_history_path() abort "{{{ +function! vimshell#history#get_history_path() "{{{ if &filetype ==# 'vimshell' && \ (empty(b:vimshell.continuation) || !vimshell#check_prompt()) let history_path = vimshell#get_data_directory() . '/command-history' === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/hook.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/hook.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/hook.vim 2015-08-25 11:01:00 +0000 @@ -23,7 +23,7 @@ " }}} "============================================================================= -function! vimshell#hook#call(hook_point, context, args) abort "{{{ +function! vimshell#hook#call(hook_point, context, args) "{{{ " There are cases when this variable doesn't " exist " USE: 'b:interactive.is_close_immediately = 1' to replicate @@ -47,7 +47,7 @@ call call(table[key], [a:args, context], {}) endfor endfunction"}}} -function! vimshell#hook#call_filter(hook_point, context, cmdline) abort "{{{ +function! vimshell#hook#call_filter(hook_point, context, cmdline) "{{{ if !exists('b:interactive') || !a:context.is_interactive \ || !has_key(b:interactive.hook_functions_table, a:hook_point) return a:cmdline @@ -71,7 +71,7 @@ return cmdline endfunction"}}} -function! vimshell#hook#set(hook_point, func_list) abort "{{{ +function! vimshell#hook#set(hook_point, func_list) "{{{ if !exists('b:interactive') return endif @@ -88,14 +88,14 @@ let cnt += 1 endfor endfunction"}}} -function! vimshell#hook#get(hook_point) abort "{{{ +function! vimshell#hook#get(hook_point) "{{{ if !exists('b:interactive') return endif return get(b:interactive.hook_functions_table, a:hook_point, {}) endfunction"}}} -function! vimshell#hook#add(hook_point, hook_name, func) abort "{{{ +function! vimshell#hook#add(hook_point, hook_name, func) "{{{ if !exists('b:interactive') return endif @@ -106,7 +106,7 @@ let b:interactive.hook_functions_table[a:hook_point][a:hook_name] = a:func endfunction"}}} -function! vimshell#hook#remove(hook_point, hook_name) abort "{{{ +function! vimshell#hook#remove(hook_point, hook_name) "{{{ if !exists('b:interactive') return endif === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/init.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/init.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/init.vim 2015-08-25 11:01:00 +0000 @@ -33,7 +33,7 @@ let s:manager = vimshell#util#get_vital().import('Vim.Buffer') -function! vimshell#init#_start(path, ...) abort "{{{ +function! vimshell#init#_start(path, ...) "{{{ " Check vimproc. "{{{ if !vimshell#util#has_vimproc() call vimshell#echo_error(v:errmsg) @@ -111,7 +111,7 @@ call s:create_shell(path, context) endfunction"}}} -function! vimshell#init#_context(context) abort "{{{ +function! vimshell#init#_context(context) "{{{ let default_context = { \ 'buffer_name' : 'default', \ 'quit' : 0, @@ -185,7 +185,7 @@ return context endfunction"}}} -function! vimshell#init#_internal_commands(command) abort "{{{ +function! vimshell#init#_internal_commands(command) "{{{ " Initialize internal commands table. let internal_commands = vimshell#variables#internal_commands() @@ -219,7 +219,7 @@ return get(internal_commands, a:command, {}) endfunction"}}} -function! vimshell#init#_default_settings() abort "{{{ +function! vimshell#init#_default_settings() "{{{ " Common. setlocal bufhidden=hide setlocal buftype=nofile @@ -241,14 +241,14 @@ endif endfunction"}}} -function! vimshell#init#tab_variable() abort "{{{ +function! vimshell#init#tab_variable() "{{{ let t:vimshell = { \ 'last_vimshell_bufnr' : -1, \ 'last_interactive_bufnr' : -1, \ } endfunction"}}} -function! s:create_shell(path, context) abort "{{{ +function! s:create_shell(path, context) "{{{ let path = a:path if path == '' " Use current directory. @@ -316,7 +316,7 @@ endif"}}} endfunction"}}} -function! s:switch_vimshell(bufnr, context, path) abort "{{{ +function! s:switch_vimshell(bufnr, context, path) "{{{ if bufwinnr(a:bufnr) > 0 execute bufwinnr(a:bufnr) 'wincmd w' else @@ -353,7 +353,7 @@ endif endfunction"}}} -function! s:initialize_vimshell(path, context) abort "{{{ +function! s:initialize_vimshell(path, context) "{{{ " Load history. let g:vimshell#hist_buffer = vimshell#history#read() @@ -418,7 +418,7 @@ call vimshell#handlers#_restore_statusline() endfunction"}}} -function! s:default_settings() abort "{{{ +function! s:default_settings() "{{{ " Common. call vimshell#init#_default_settings() @@ -435,7 +435,7 @@ " Define mappings. call vimshell#mappings#define_default_mappings() endfunction"}}} -function! s:get_postfix(prefix, is_create) abort "{{{ +function! s:get_postfix(prefix, is_create) "{{{ let buffers = get(a:000, 0, range(1, bufnr('$'))) let buflist = vimshell#util#sort_by(filter(map(buffers, \ 'bufname(v:val)'), 'stridx(v:val, a:prefix) >= 0'), === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/int_mappings.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/int_mappings.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/int_mappings.vim 2015-08-25 11:01:00 +0000 @@ -23,7 +23,7 @@ " }}} "============================================================================= -function! vimshell#int_mappings#define_default_mappings() abort "{{{ +function! vimshell#int_mappings#define_default_mappings() "{{{ " Plugin key-mappings. "{{{ nnoremap (vimshell_int_previous_prompt) \ :call previous_prompt() @@ -126,7 +126,7 @@ endfunction"}}} " vimshell interactive key-mappings functions. -function! s:delete_backward_char(is_auto_select) abort "{{{ +function! s:delete_backward_char(is_auto_select) "{{{ if !pumvisible() let prefix = '' elseif a:is_auto_select || @@ -145,24 +145,24 @@ return prefix endif endfunction"}}} -function! s:previous_prompt() abort "{{{ +function! s:previous_prompt() "{{{ let prompts = sort(filter(map(keys(b:interactive.prompt_history), 'str2nr(v:val)'), \ 'v:val < line(".")')) if !empty(prompts) call cursor(prompts[-1], len(vimshell#interactive#get_prompt()) + 1) endif endfunction"}}} -function! s:next_prompt() abort "{{{ +function! s:next_prompt() "{{{ let prompts = sort(filter(map(keys(b:interactive.prompt_history), \ 'str2nr(v:val)'), 'v:val > line(".")')) if !empty(prompts) call cursor(prompts[0], len(vimshell#interactive#get_prompt()) + 1) endif endfunction"}}} -function! s:move_head() abort "{{{ +function! s:move_head() "{{{ call vimshell#int_mappings#_insert_head() endfunction"}}} -function! s:delete_backward_line() abort "{{{ +function! s:delete_backward_line() "{{{ if !pumvisible() let prefix = '' elseif vimshell#util#is_auto_select() @@ -177,7 +177,7 @@ return prefix . repeat("\", len) endfunction"}}} -function! vimshell#int_mappings#execute_line(is_insert) abort "{{{ +function! vimshell#int_mappings#execute_line(is_insert) "{{{ call vimshell#util#disable_auto_complete() if !has_key(b:interactive.prompt_history, line('.')) @@ -196,7 +196,7 @@ call vimshell#helpers#imdisable() endfunction"}}} -function! vimshell#int_mappings#_paste_prompt() abort "{{{ +function! vimshell#int_mappings#_paste_prompt() "{{{ if !has_key(b:interactive.prompt_history, line('.')) return endif @@ -207,7 +207,7 @@ call cursor(line('$'), 0) call cursor(0, col('$')) endfunction"}}} -function! s:restart_command() abort "{{{ +function! s:restart_command() "{{{ if exists('b:interactive') && !empty(b:interactive.process) && b:interactive.process.is_valid " Delete zombie process. call vimshell#interactive#force_exit() @@ -235,7 +235,7 @@ call vimshell#view#_start_insert() endfunction"}}} -function! vimshell#int_mappings#command_complete() abort "{{{ +function! vimshell#int_mappings#command_complete() "{{{ let prompt = vimshell#interactive#get_prompt() let cur_text = vimshell#interactive#get_cur_text() call setline('.', prompt) @@ -254,7 +254,7 @@ let b:interactive.prompt_history[prompt_linenr] = \ getline(prompt_linenr) endfunction "}}} -function! s:insert_enter() abort "{{{ +function! s:insert_enter() "{{{ if !has_key(b:interactive.prompt_history, line('.')) && line('.') != line('$') startinsert return @@ -271,11 +271,11 @@ startinsert endfunction"}}} -function! vimshell#int_mappings#_insert_head() abort "{{{ +function! vimshell#int_mappings#_insert_head() "{{{ call cursor(0, 1) call s:insert_enter() endfunction"}}} -function! s:append_enter() abort "{{{ +function! s:append_enter() "{{{ if vimshell#helpers#check_cursor_is_end() call s:append_end() else @@ -283,13 +283,13 @@ call s:insert_enter() endif endfunction"}}} -function! s:append_end() abort "{{{ +function! s:append_end() "{{{ call s:insert_enter() startinsert! endfunction"}}} -function! s:send_intrrupt() abort "{{{ +function! s:send_intrrupt() "{{{ endfunction"}}} -function! vimshell#int_mappings#clear() abort "{{{ +function! vimshell#int_mappings#clear() "{{{ set modifiable " Clean up the screen. === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/interactive.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/interactive.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/interactive.vim 2015-08-25 11:01:00 +0000 @@ -32,6 +32,8 @@ autocmd VimLeave * call s:vimleave() autocmd CursorMovedI * \ call s:check_all_output(0) + autocmd CursorHold,CursorHoldI * + \ call s:check_all_output(1) autocmd BufWinEnter,WinEnter * \ call s:winenter() autocmd BufWinLeave,WinLeave * @@ -47,19 +49,13 @@ \ call s:enable_auto_complete() endif -let s:use_timer = has('timers') -if s:use_timer - autocmd vimshell CursorHold,CursorHoldI * - \ call s:check_all_output(1) -endif - call vimshell#commands#iexe#define() " Dummy. -function! vimshell#interactive#init() abort "{{{ +function! vimshell#interactive#init() "{{{ endfunction"}}} -function! vimshell#interactive#get_cur_text() abort "{{{ +function! vimshell#interactive#get_cur_text() "{{{ if !exists('b:interactive') return vimshell#get_cur_line() endif @@ -67,12 +63,12 @@ " Get cursor text without prompt. return s:chomp_prompt(vimshell#get_cur_line(), line('.'), b:interactive) endfunction"}}} -function! vimshell#interactive#get_cur_line(line, ...) abort "{{{ +function! vimshell#interactive#get_cur_line(line, ...) "{{{ " Get cursor text without prompt. let interactive = a:0 > 0 ? a:1 : b:interactive return s:chomp_prompt(getline(a:line), a:line, interactive) endfunction"}}} -function! vimshell#interactive#get_prompt(...) abort "{{{ +function! vimshell#interactive#get_prompt(...) "{{{ let line = get(a:000, 0, line('.')) let interactive = get(a:000, 1, \ exists('b:interactive') ? b:interactive : {}) @@ -83,11 +79,11 @@ " Get prompt line. return get(get(b:interactive, 'prompt_history', {}), line, '') endfunction"}}} -function! s:chomp_prompt(cur_text, line, interactive) abort "{{{ +function! s:chomp_prompt(cur_text, line, interactive) "{{{ return a:cur_text[len(vimshell#get_prompt(a:line, a:interactive)): ] endfunction"}}} -function! vimshell#interactive#execute_pty_inout(is_insert) abort "{{{ +function! vimshell#interactive#execute_pty_inout(is_insert) "{{{ let in = vimshell#interactive#get_cur_line(line('.')) call vimshell#history#append(in) if in !~ "\$" @@ -98,11 +94,11 @@ call s:iexe_send_string(in, a:is_insert, line('.')) endfunction"}}} -function! vimshell#interactive#iexe_send_string(string, is_insert, ...) abort "{{{ +function! vimshell#interactive#iexe_send_string(string, is_insert, ...) "{{{ let linenr = get(a:000, 0, line('$')) call s:iexe_send_string(a:string, 1, linenr) endfunction"}}} -function! vimshell#interactive#send_input() abort "{{{ +function! vimshell#interactive#send_input() "{{{ let input = input('Please input send string: ', vimshell#interactive#get_cur_line(line('.'))) call vimshell#helpers#imdisable() call setline('.', vimshell#interactive#get_prompt() . ' ') @@ -110,8 +106,8 @@ call cursor(0, col('$')-1) call vimshell#interactive#iexe_send_string(input, 1) endfunction"}}} -function! vimshell#interactive#send_char(char) abort "{{{ - if !s:is_valid(b:interactive) +function! vimshell#interactive#send_char(char) "{{{ + if !b:interactive.process.is_valid return endif @@ -130,7 +126,7 @@ call vimshell#interactive#execute_process_out(1) endfunction"}}} -function! vimshell#interactive#send_region(line1, line2, string) abort "{{{ +function! vimshell#interactive#send_region(line1, line2, string) "{{{ let string = a:string if string == '' let string = join(getline(a:line1, a:line2), "\") @@ -139,7 +135,7 @@ return vimshell#interactive#send(string) endfunction"}}} -function! vimshell#interactive#send(expr) abort "{{{ +function! vimshell#interactive#send(expr) "{{{ if !exists('t:vimshell') call vimshell#init#tab_variable() endif @@ -245,12 +241,12 @@ stopinsert noautocmd call vimshell#helpers#restore_pos(old_pos) endfunction"}}} -function! vimshell#interactive#send_string(...) abort "{{{ +function! vimshell#interactive#send_string(...) "{{{ echohl WarningMsg | echomsg 'vimshell#interactive#send_string() is deprecated; use vimshell#interactive#send() instead' | echohl None return call('vimshell#interactive#send', a:000) endfunction"}}} -function! s:iexe_send_string(string, is_insert, linenr) abort "{{{ - if !s:is_valid(b:interactive) +function! s:iexe_send_string(string, is_insert, linenr) "{{{ + if !b:interactive.process.is_valid return endif @@ -293,7 +289,7 @@ " Call postinput hook. call vimshell#hook#call('postinput', context, in) endfunction"}}} -function! vimshell#interactive#set_send_buffer(bufname) abort "{{{ +function! vimshell#interactive#set_send_buffer(bufname) "{{{ if !exists('t:vimshell') call vimshell#init#tab_variable() endif @@ -302,13 +298,11 @@ let t:vimshell.last_interactive_bufnr = bufnr(bufname) endfunction"}}} -function! vimshell#interactive#execute_process_out(is_insert) abort "{{{ - if !s:is_valid(b:interactive) +function! vimshell#interactive#execute_process_out(is_insert) "{{{ + if !b:interactive.process.is_valid return endif - call s:timer_start() - " Check cache. let read = b:interactive.stderr_cache if !b:interactive.process.stderr.eof @@ -331,7 +325,7 @@ call vimshell#interactive#exit() endif endfunction"}}} -function! s:set_output_pos(is_insert) abort "{{{ +function! s:set_output_pos(is_insert) "{{{ " There are cases when this variable doesn't exist " USE: 'b:interactive.is_close_immediately = 1' to replicate if !exists('b:interactive') @@ -348,8 +342,8 @@ endif endfunction"}}} -function! vimshell#interactive#quit_buffer() abort "{{{ - if s:is_valid(b:interactive) +function! vimshell#interactive#quit_buffer() "{{{ + if get(b:interactive.process, 'is_valid', 0) echohl WarningMsg let input = input('Process is running. Force exit? [y/N] ') echohl None @@ -371,8 +365,8 @@ close endif endfunction"}}} -function! vimshell#interactive#exit() abort "{{{ - if !s:is_valid(b:interactive) +function! vimshell#interactive#exit() "{{{ + if !b:interactive.process.is_valid return endif @@ -407,8 +401,8 @@ endif endif endfunction"}}} -function! vimshell#interactive#force_exit() abort "{{{ - if !s:is_valid(b:interactive) +function! vimshell#interactive#force_exit() "{{{ + if !b:interactive.process.is_valid return endif @@ -426,14 +420,16 @@ stopinsert endif endfunction"}}} -function! vimshell#interactive#hang_up(afile) abort "{{{ +function! vimshell#interactive#hang_up(afile) "{{{ let interactive = getbufvar(a:afile, 'interactive') let vimshell = getbufvar(a:afile, 'vimshell') - if !s:is_valid(interactive) + if type(interactive) == type('') return endif - call s:kill_process(interactive) + if get(interactive.process, 'is_valid', 0) + call s:kill_process(interactive) + endif let interactive.process.is_valid = 0 if interactive.type ==# 'vimshell' @@ -452,30 +448,49 @@ stopinsert endif endfunction"}}} -" function! vimshell#interactive#decode_signal(signal) {{{ -let s:_signal_decode_table = { - \ 2: 'SIGINT', - \ 3: 'SIGQUIT', - \ 4: 'SIGILL', - \ 6: 'SIGABRT', - \ 8: 'SIGFPE', - \ 9: 'SIGKILL', - \ 11: 'SIGSEGV', - \ 13: 'SIGPIPE', - \ 14: 'SIGALRM', - \ 15: 'SIGTERM', - \ 10: 'SIGUSR1', - \ 12: 'SIGUSR2', - \ 17: 'SIGCHLD', - \ 18: 'SIGCONT', - \ 19: 'SIGSTOP', - \ 20: 'SIGTSTP', - \ 21: 'SIGTTIN', - \ 22: 'SIGTTOU'} -function! vimshell#interactive#decode_signal(signal) abort - return get(s:_signal_decode_table, a:signal, 'UNKNOWN') -endfunction " }}} -function! vimshell#interactive#read(fd) abort "{{{ +function! vimshell#interactive#decode_signal(signal) "{{{ + if a:signal == 2 + return 'SIGINT' + elseif a:signal == 3 + return 'SIGQUIT' + elseif a:signal == 4 + return 'SIGILL' + elseif a:signal == 6 + return 'SIGABRT' + elseif a:signal == 8 + return 'SIGFPE' + elseif a:signal == 9 + return 'SIGKILL' + elseif a:signal == 11 + return 'SIGSEGV' + elseif a:signal == 13 + return 'SIGPIPE' + elseif a:signal == 14 + return 'SIGALRM' + elseif a:signal == 15 + return 'SIGTERM' + elseif a:signal == 10 + return 'SIGUSR1' + elseif a:signal == 12 + return 'SIGUSR2' + elseif a:signal == 17 + return 'SIGCHLD' + elseif a:signal == 18 + return 'SIGCONT' + elseif a:signal == 19 + return 'SIGSTOP' + elseif a:signal == 20 + return 'SIGTSTP' + elseif a:signal == 21 + return 'SIGTTIN' + elseif a:signal == 22 + return 'SIGTTOU' + else + return 'UNKNOWN' + endif +endfunction"}}} + +function! vimshell#interactive#read(fd) "{{{ if empty(a:fd) || a:fd.stdin == '' return '' endif @@ -497,7 +512,7 @@ return join(readfile(a:fd.stdin), ff) . ff endif endfunction"}}} -function! vimshell#interactive#print_buffer(fd, string) abort "{{{ +function! vimshell#interactive#print_buffer(fd, string) "{{{ if a:string == '' || !exists('b:interactive') \|| !&l:modifiable return @@ -531,7 +546,7 @@ let b:interactive.prompt_history[line('.')] = getline('.') endif endfunction"}}} -function! vimshell#interactive#error_buffer(fd, string) abort "{{{ +function! vimshell#interactive#error_buffer(fd, string) "{{{ if a:string == '' return endif @@ -572,7 +587,7 @@ let b:interactive.prompt_history[line('.')] = getline('.') endif endfunction"}}} -function! s:check_password_input(string) abort "{{{ +function! s:check_password_input(string) "{{{ let current_line = substitute(getline('.'), '!!!', '', 'g') if !exists('g:vimproc_password_pattern') @@ -610,7 +625,7 @@ endtry endfunction"}}} -function! s:check_scrollback() abort "{{{ +function! s:check_scrollback() "{{{ let prompt_nr = get(b:interactive, 'prompt_nr', 0) let output_lines = line('.') - prompt_nr if output_lines > g:vimshell_scrollback_limit @@ -624,7 +639,7 @@ endif endfunction"}}} -function! vimshell#interactive#get_default_encoding(commands) abort "{{{ +function! vimshell#interactive#get_default_encoding(commands) "{{{ if empty(a:commands[0].args) return '' endif @@ -644,26 +659,25 @@ endfunction"}}} " Autocmd functions. -function! s:check_all_output(is_hold) abort "{{{ +function! s:check_all_output(is_hold) "{{{ if vimshell#util#is_cmdwin() return endif - let interactive = {} + let updated = 0 + if mode() ==# 'n' - for bufnr in filter(range(1, bufnr('$')), - \ "type(getbufvar(v:val, 'interactive')) == type({})") + for bufnr in filter(map(range(1, winnr('$')), 'winbufnr(v:val)'), + \ "type(getbufvar(v:val, 'interactive')) == type({})") + let interactive = getbufvar(bufnr, 'interactive') + let updated = 1 + " Check output. - call s:check_output(getbufvar(bufnr, 'interactive'), - \ bufnr, bufnr('%')) - if bufwinnr(bufnr) > 0 - let interactive = getbufvar(bufnr, 'interactive') - endif + call s:check_output(interactive, bufnr, bufnr('%')) endfor elseif mode() ==# 'i' \ && exists('b:interactive') && line('.') == line('$') - let interactive = b:interactive - call s:check_output(interactive, bufnr('%'), bufnr('%')) + call s:check_output(b:interactive, bufnr('%'), bufnr('%')) endif if !s:is_insert_char_pre && exists('b:interactive') @@ -672,11 +686,38 @@ call vimshell#util#enable_auto_complete() endif - if !s:use_timer - call s:dummy_output(interactive, a:is_hold) + if exists('b:interactive') || updated + if g:vimshell_interactive_update_time > 0 + \ && &updatetime > g:vimshell_interactive_update_time + " Change updatetime. + let s:update_time_save = &updatetime + let &updatetime = g:vimshell_interactive_update_time + endif + + " Ignore key sequences. + if mode() ==# 'n' + call feedkeys("g\" . (v:count > 0 ? v:count : ''), 'n') + elseif mode() ==# 'i' + if exists('b:interactive') && + \ !empty(b:interactive.process) + \ && b:interactive.process.is_valid + let is_complete_hold = vimshell#util#is_complete_hold() + if a:is_hold != is_complete_hold + setlocal modifiable + " Prevent screen flick + set vb t_vb= + call feedkeys("]\", 'n') + endif + endif + endif + elseif g:vimshell_interactive_update_time > 0 + \ && &updatetime == g:vimshell_interactive_update_time + \ && &filetype !=# 'unite' + " Restore updatetime. + let &updatetime = s:update_time_save endif endfunction"}}} -function! s:check_output(interactive, bufnr, bufnr_save) abort "{{{ +function! s:check_output(interactive, bufnr, bufnr_save) "{{{ " Output cache. if exists('b:interactive') && (s:is_skk_enabled() \ || (b:interactive.type ==# 'interactive' @@ -768,7 +809,7 @@ execute bufwinnr(a:bufnr_save) . 'wincmd w' endif endfunction"}}} -function! s:cache_output(interactive) abort "{{{ +function! s:cache_output(interactive) "{{{ if empty(a:interactive.process) || \ !a:interactive.process.is_valid return 0 @@ -792,85 +833,24 @@ return a:interactive.stdout_cache != '' || \ a:interactive.stderr_cache != '' endfunction"}}} -function! s:is_skk_enabled() abort "{{{ +function! s:is_skk_enabled() "{{{ return (exists('b:skk_on') && b:skk_on) \ || (exists('*eskk#is_enabled') && eskk#is_enabled()) endfunction"}}} -function! s:enable_auto_complete() abort "{{{ +function! s:enable_auto_complete() "{{{ if exists('b:interactive') && v:char != ']' call vimshell#util#enable_auto_complete() endif endfunction"}}} -function! s:dummy_output(interactive, is_hold) abort "{{{ - if s:is_valid(a:interactive) - if g:vimshell_interactive_update_time > 0 - \ && &updatetime > g:vimshell_interactive_update_time - " Change updatetime. - let s:update_time_save = &updatetime - let &updatetime = g:vimshell_interactive_update_time - endif - - if mode() ==# 'n' - call feedkeys("g\" . (v:count > 0 ? v:count : ''), 'n') - elseif mode() ==# 'i' - let is_complete_hold = vimshell#util#is_complete_hold() - if a:is_hold != is_complete_hold - \ || !has('gui_running') || has('nvim') - setlocal modifiable - " Prevent screen flick - if has('nvim') - " In neovim, t_vb does not work - set novisualbell t_vb= - else - set visualbell t_vb= - endif - call feedkeys("]\", 'n') - endif - endif - elseif g:vimshell_interactive_update_time > 0 - \ && &updatetime == g:vimshell_interactive_update_time - \ && &filetype !=# 'unite' - " Restore updatetime. - let &updatetime = s:update_time_save - endif -endfunction"}}} -function! s:timer_handler(timer) abort "{{{ - call s:check_all_output(0) -endfunction"}}} -function! s:timer_start() abort "{{{ - if !exists('s:timer') && s:use_timer - let s:timer = timer_start((g:vimshell_interactive_update_time > 0 ? - \ g:vimshell_interactive_update_time : &updatetime), - \ function('s:timer_handler'), {'repeat': -1}) - autocmd vimshell VimLeavePre * call s:timer_stop() - endif -endfunction"}}} -function! s:timer_stop() abort "{{{ - if exists('s:timer') - call timer_stop(s:timer) - unlet s:timer - endif -endfunction"}}} - -function! s:winenter() abort "{{{ + +function! s:winenter() "{{{ if exists('b:interactive') call vimshell#terminal#set_title() - if !exists('b:vimshell') || !empty(b:vimshell.continuation) - call s:timer_start() - endif - endif - - let check_interactive = empty(filter(range(1, bufnr('$')), - \ "s:is_valid(getbufvar(v:val, 'interactive'))")) - if check_interactive - \ && (!exists('b:interactive') || (exists('b:vimshell') - \ && empty(b:vimshell.continuation))) - call s:timer_stop() endif call s:resize() endfunction"}}} -function! s:winleave(bufname) abort "{{{ +function! s:winleave(bufname) "{{{ if !exists('b:interactive') return endif @@ -883,7 +863,7 @@ call vimshell#terminal#restore_title() endfunction"}}} -function! s:vimleave() abort "{{{ +function! s:vimleave() "{{{ " Kill all processes. for interactive in map(filter(range(1, bufnr('$')), \ "type(getbufvar(v:val, 'interactive')) == type({}) @@ -893,21 +873,14 @@ call s:kill_process(interactive) endfor endfunction"}}} -function! s:resize() abort "{{{ +function! s:resize() "{{{ if exists('b:interactive') && !empty(b:interactive.process) call b:interactive.process.set_winsize( \ vimshell#helpers#get_winwidth(), g:vimshell_scrollback_limit) endif endfunction"}}} -function! s:is_valid(interactive) abort "{{{ - return type(a:interactive) == type({}) - \ && !empty(a:interactive) - \ && !empty(a:interactive.process) - \ && a:interactive.process.is_valid -endfunction"}}} - -function! s:kill_process(interactive) abort "{{{ +function! s:kill_process(interactive) "{{{ " Get status. let [cond, status] = a:interactive.process.waitpid() if cond != 'exit' === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/mappings.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/mappings.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/mappings.vim 2015-08-25 11:01:00 +0000 @@ -24,7 +24,7 @@ "============================================================================= " Define default mappings. -function! vimshell#mappings#define_default_mappings() abort "{{{ +function! vimshell#mappings#define_default_mappings() "{{{ " Plugin keymappings "{{{ nnoremap (vimshell_enter) \ :call vimshell#execute_current_line(0) @@ -52,8 +52,6 @@ \ :call hangup(0) nnoremap (vimshell_interrupt) \ :call interrupt(0) - inoremap (vimshell_send_eof) - \ :call vimshell#execute_current_line(1) nnoremap (vimshell_insert_enter) \ :call insert_enter() nnoremap (vimshell_insert_head) @@ -111,8 +109,8 @@ \ :call hide() inoremap (vimshell_history_unite) \ unite#sources#vimshell_history#start_complete(!0) - inoremap (vimshell_history_complete) - \ start_history_complete() + inoremap (vimshell_history_neocomplete) + \ neocomplete#start_manual_complete('vimshell/history') "}}} if get(g:, 'vimshell_no_default_keymappings', 0) @@ -161,13 +159,13 @@ " History completion. imap (vimshell_history_unite) - inoremap pumvisible() ? "\" : - \ start_history_complete() - inoremap pumvisible() ? "\" : - \ start_history_complete() - inoremap pumvisible() ? "\" : - \ start_history_complete() - inoremap pumvisible() ? "\" : + inoremap pumvisible() ? "\" : + \ start_history_complete() + inoremap pumvisible() ? "\" : + \ start_history_complete() + inoremap pumvisible() ? "\" : + \ start_history_complete() + inoremap pumvisible() ? "\" : \ start_history_complete() " Command completion. @@ -186,19 +184,18 @@ imap (vimshell_insert_last_word) " Interrupt. imap (vimshell_interrupt) - imap (vimshell_send_eof) " Delete char. imap (vimshell_delete_backward_char) imap (vimshell_delete_backward_char) " Delete line. imap (vimshell_delete_forward_line) endfunction"}}} -function! vimshell#mappings#smart_map(vimshell_map, execute_map) abort +function! vimshell#mappings#smart_map(vimshell_map, execute_map) return empty(b:vimshell.continuation) ? a:vimshell_map : a:execute_map endfunction " VimShell key-mappings functions. -function! s:push_current_line() abort "{{{ +function! s:push_current_line() "{{{ " Check current line. if !vimshell#check_prompt() return @@ -217,7 +214,7 @@ call vimshell#view#_simple_insert() endfunction"}}} -function! s:push_and_execute(command) abort "{{{ +function! s:push_and_execute(command) "{{{ " Check current line. if !vimshell#check_prompt() return @@ -231,7 +228,7 @@ call vimshell#mappings#execute_line(1) endfunction"}}} -function! vimshell#mappings#execute_line(is_insert) abort "{{{ +function! vimshell#mappings#execute_line(is_insert) "{{{ let oldpos = getpos('.') let b:interactive.output_pos = getpos('.') @@ -269,7 +266,7 @@ endif endif endfunction"}}} -function! s:execute_command_line(is_insert, oldpos) abort "{{{ +function! s:execute_command_line(is_insert, oldpos) "{{{ " Get command line. let line = vimshell#view#_get_prompt_command() let context = { @@ -358,7 +355,7 @@ call vimshell#start_insert(a:is_insert) endfunction"}}} -function! s:previous_prompt() abort "{{{ +function! s:previous_prompt() "{{{ if empty(b:vimshell.continuation) call s:search_prompt('bWn') else @@ -369,7 +366,7 @@ endif endif endfunction"}}} -function! s:next_prompt() abort "{{{ +function! s:next_prompt() "{{{ if empty(b:vimshell.continuation) call s:search_prompt('Wn') else @@ -380,7 +377,7 @@ endif endif endfunction"}}} -function! s:search_prompt(flag) abort "{{{ +function! s:search_prompt(flag) "{{{ let col = col('.') call cursor(0, 1) let pos = searchpos(vimshell#get_context().prompt_pattern . '.\?', a:flag) @@ -391,7 +388,7 @@ call cursor(0, col) endif endfunction"}}} -function! s:delete_previous_output() abort "{{{ +function! s:delete_previous_output() "{{{ let prompt_pattern = vimshell#get_context().prompt_pattern let nprompt = vimshell#get_user_prompt() != '' ? \ '^\[%\] ' : prompt_pattern @@ -419,11 +416,11 @@ call vimshell#terminal#clear_highlight() endfunction"}}} -function! s:insert_last_word() abort "{{{ +function! s:insert_last_word() "{{{ let word = '' let histories = vimshell#history#read() if !empty(histories) - for w in reverse(split(histories[-1], '[^\\]\zs\s')) + for w in reverse(split(histories[0], '[^\\]\zs\s')) if w =~ '[[:alpha:]_/\\]\{2,}' let word = w break @@ -433,7 +430,7 @@ call setline(line('.'), getline('.') . word) startinsert! endfunction"}}} -function! vimshell#mappings#_paste_prompt() abort "{{{ +function! vimshell#mappings#_paste_prompt() "{{{ if !empty(b:vimshell.continuation) return vimshell#int_mappings#_paste_prompt() endif @@ -449,7 +446,7 @@ " Set prompt line. call vimshell#view#_set_prompt_command(command) endfunction"}}} -function! s:move_head() abort "{{{ +function! s:move_head() "{{{ if !vimshell#check_prompt() normal! ^ return @@ -457,11 +454,11 @@ call cursor(0, vimshell#get_prompt_length() + 1) endfunction"}}} -function! s:move_end_argument() abort "{{{ +function! s:move_end_argument() "{{{ let pos = searchpos('\\\@" : '') \ . repeat("\", len(wildcard)) . join(expanded) endfunction"}}} -function! s:hide() abort "{{{ +function! s:hide() "{{{ " Switch buffer. if winnr('$') != 1 close @@ -512,7 +509,7 @@ call vimshell#util#alternate_buffer() endif endfunction"}}} -function! s:exit() abort "{{{ +function! s:exit() "{{{ let context = deepcopy(vimshell#get_context()) call vimshell#interactive#quit_buffer() @@ -521,7 +518,7 @@ tabclose endif endfunction"}}} -function! s:delete_backward_char() abort "{{{ +function! s:delete_backward_char() "{{{ if !pumvisible() let prefix = '' elseif vimshell#util#is_auto_select() @@ -538,14 +535,14 @@ return prefix endif endfunction"}}} -function! s:delete_another_backward_char() abort "{{{ +function! s:delete_another_backward_char() "{{{ return vimshell#get_cur_text() != '' ? \ s:delete_backward_char() : \ winnr('$') != 1 ? \ "\:close\" : \ "\:buffer #\" endfunction"}}} -function! s:delete_backward_line() abort "{{{ +function! s:delete_backward_line() "{{{ if !pumvisible() let prefix = '' elseif vimshell#util#is_auto_select() @@ -558,7 +555,7 @@ return prefix . repeat("\", len) endfunction"}}} -function! s:hangup(is_insert) abort "{{{ +function! s:hangup(is_insert) "{{{ if empty(b:vimshell.continuation) call vimshell#print_prompt() call vimshell#start_insert(a:is_insert) @@ -578,7 +575,7 @@ call vimshell#print_prompt(context) call vimshell#start_insert(a:is_insert) endfunction"}}} -function! s:interrupt(is_insert) abort "{{{ +function! s:interrupt(is_insert) "{{{ if empty(b:vimshell.continuation) call vimshell#print_prompt() call vimshell#start_insert(a:is_insert) @@ -590,7 +587,7 @@ stopinsert endif endfunction"}}} -function! s:insert_enter() abort "{{{ +function! s:insert_enter() "{{{ if !vimshell#check_prompt() || !empty(b:vimshell.continuation) startinsert return @@ -615,7 +612,7 @@ startinsert endfunction"}}} -function! s:insert_head() abort "{{{ +function! s:insert_head() "{{{ if !empty(b:vimshell.continuation) return vimshell#int_mappings#_insert_head() endif @@ -623,7 +620,7 @@ call cursor(0, 1) call s:insert_enter() endfunction"}}} -function! s:append_enter() abort "{{{ +function! s:append_enter() "{{{ if vimshell#helpers#check_cursor_is_end() call s:append_end() else @@ -631,11 +628,11 @@ call s:insert_enter() endif endfunction"}}} -function! s:append_end() abort "{{{ +function! s:append_end() "{{{ call s:insert_enter() startinsert! endfunction"}}} -function! s:execute_by_background(is_insert) abort "{{{ +function! s:execute_by_background(is_insert) "{{{ if empty(b:vimshell.continuation) return endif @@ -663,11 +660,8 @@ call vimshell#commands#iexe#init(context, interactive, \ new_pos, old_pos, a:is_insert) endfunction"}}} -function! s:start_history_complete() abort "{{{ - return - \ exists('*deoplete#mappings#manual_complete') ? - \ deoplete#mappings#manual_complete('vimshell_history') : - \ exists('*neocomplete#start_manual_complete') ? +function! s:start_history_complete() "{{{ + return exists('*neocomplete#start_manual_complete') ? \ neocomplete#start_manual_complete('vimshell/history') : \ '' endfunction"}}} === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/parser.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/parser.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/parser.vim 2015-08-25 11:01:00 +0000 @@ -23,16 +23,14 @@ " }}} "============================================================================= -function! vimshell#parser#check_script(script) abort "{{{ +function! vimshell#parser#check_script(script) "{{{ " Parse check only. " Split statements. for statement in vimproc#parser#split_statements(a:script) call vimproc#parser#split_args(vimshell#parser#parse_alias(statement)) endfor endfunction"}}} -function! vimshell#parser#eval_script(script, context) abort "{{{ - let context = vimshell#init#_context(a:context) - +function! vimshell#parser#eval_script(script, context) "{{{ " Split statements. let statements = vimproc#parser#parse_statements(a:script) let max = len(statements) @@ -43,14 +41,13 @@ let i = 0 while i < max try - let ret = s:execute_statement(statements[i].statement, context) + let ret = s:execute_statement(statements[i].statement, a:context) catch /^exe: Process started./ " Change continuation. let b:vimshell.continuation = { - \ 'statements' : statements[i : ], 'context' : context, + \ 'statements' : statements[i : ], 'context' : a:context, \ 'script' : a:script, \ } - call vimshell#interactive#execute_process_out(0) return 1 endtry @@ -68,7 +65,7 @@ return 0 endfunction"}}} -function! vimshell#parser#execute_command(commands, context) abort "{{{ +function! vimshell#parser#execute_command(commands, context) "{{{ if empty(a:commands) return 0 endif @@ -104,6 +101,15 @@ let args = [program[1:]] + args endif return vimshell#helpers#execute_internal_command('h', args, context) + elseif a:commands[-1].args[-1] =~ '&$' + " Convert to internal "bg" command. + let commands[-1].args[-1] = commands[-1].args[-1][:-2] + if commands[-1].args[-1] == '' + " Delete empty arg. + call remove(commands[-1].args, -1) + endif + + return vimshell#helpers#execute_internal_command('bg', commands, context) elseif len(a:commands) > 1 if a:commands[-1].args[0] == 'less' " Execute less(Syntax sugar). @@ -149,7 +155,7 @@ endif"}}} endfunction "}}} -function! vimshell#parser#execute_continuation(is_insert) abort "{{{ +function! vimshell#parser#execute_continuation(is_insert) "{{{ " Execute pipe. call vimshell#interactive#execute_process_out(a:is_insert) @@ -232,13 +238,10 @@ if b:interactive.syntax !=# &filetype " Set highlight. - let start = searchpos( - \ b:vimshell.context.prompt_pattern, 'bWn')[0] + let start = searchpos(context.prompt_pattern, 'bWn')[0] if start > 0 - call s:highlight_with(start + 1, - \ printf('"\ze\%%(^\[%%\]\|%s\)"', - \ b:vimshell.context.prompt_pattern), - \ b:interactive.syntax) + call s:highlight_with(start + 1, printf('"\ze\%%(^\[%%\]\|%s\)"', + \ context.prompt_pattern), b:interactive.syntax) endif let b:interactive.syntax = &filetype @@ -247,7 +250,7 @@ call vimshell#next_prompt(context, a:is_insert) endfunction "}}} -function! s:execute_statement(statement, context) abort "{{{ +function! s:execute_statement(statement, context) "{{{ let statement = vimshell#parser#parse_alias(a:statement) " Call preexec filter. @@ -262,16 +265,6 @@ let fd = { 'stdin' : '', 'stdout' : '', 'stderr' : '' } let commands = [ { 'args' : \ split(substitute(statement, '^:', 'vexe ', '')), 'fd' : fd } ] - elseif statement =~ '&$' - " Convert to internal "bg" command. - let commands = vimproc#parser#parse_pipe(statement) - let commands[-1].args[-1] = commands[-1].args[-1][:-2] - if commands[-1].args[-1] == '' - " Delete empty arg. - call remove(commands[-1].args, -1) - endif - - call insert(commands[-1].args, 'bg') elseif has_key(internal_commands, program) \ && internal_commands[program].kind ==# 'special' " Special commands. @@ -286,7 +279,7 @@ "}}} " Parse helper. -function! vimshell#parser#parse_alias(statement) abort "{{{ +function! vimshell#parser#parse_alias(statement) "{{{ let statement = s:parse_galias(a:statement) let program = matchstr(statement, vimshell#helpers#get_program_pattern()) if statement != '' && program == '' @@ -303,7 +296,7 @@ return statement endfunction"}}} -function! vimshell#parser#parse_program(statement) abort "{{{ +function! vimshell#parser#parse_program(statement) "{{{ " Get program. let program = matchstr(a:statement, vimshell#helpers#get_program_pattern()) if program == '' @@ -319,7 +312,7 @@ return program endfunction"}}} -function! s:parse_galias(script) abort "{{{ +function! s:parse_galias(script) "{{{ if !exists('b:vimshell') return a:script endif @@ -371,7 +364,7 @@ return join(args) endfunction"}}} -function! s:recursive_expand_alias(alias_name, args) abort "{{{ +function! s:recursive_expand_alias(alias_name, args) "{{{ " Recursive expand alias. let alias = b:vimshell.alias_table[a:alias_name] let expanded = {} @@ -423,11 +416,11 @@ endfunction"}}} " Misc. -function! vimshell#parser#check_wildcard() abort "{{{ +function! vimshell#parser#check_wildcard() "{{{ let args = vimshell#helpers#get_current_args() return !empty(args) && args[-1] =~ '[[*?]\|^\\[()|]' endfunction"}}} -function! vimshell#parser#getopt(args, optsyntax, ...) abort "{{{ +function! vimshell#parser#getopt(args, optsyntax, ...) "{{{ let default_values = get(a:000, 0, {}) " Initialize. @@ -489,7 +482,7 @@ return [args, options] endfunction"}}} -function! s:highlight_with(start, end, syntax) abort "{{{ +function! s:highlight_with(start, end, syntax) "{{{ let cnt = get(b:, 'highlight_count', 0) if globpath(&runtimepath, 'syntax/' . a:syntax . '.vim') == '' return === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/term_mappings.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/term_mappings.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/term_mappings.vim 2015-08-25 11:01:00 +0000 @@ -23,7 +23,7 @@ " }}} "============================================================================= -function! vimshell#term_mappings#define_default_mappings() abort "{{{ +function! vimshell#term_mappings#define_default_mappings() "{{{ " Plugin key-mappings. "{{{ nnoremap (vimshell_term_interrupt) \ :call vimshell#interactive#hang_up(bufname('%')) @@ -112,19 +112,19 @@ imap imap (vimshell_term_send_input) endfunction"}}} -function! vimshell#term_mappings#send_key(key) abort "{{{ +function! vimshell#term_mappings#send_key(key) "{{{ return printf("\:call vimshell#interactive#send_char(%s)\", char2nr(a:key)) endfunction"}}} -function! vimshell#term_mappings#send_keys(keys) abort "{{{ +function! vimshell#term_mappings#send_keys(keys) "{{{ return printf("\:call vimshell#interactive#send_char(%s)\", string(map(split(a:keys, '\zs'), 'char2nr(v:val)'))) endfunction"}}} " vimshell interactive key-mappings functions. -function! s:start_insert() abort "{{{ +function! s:start_insert() "{{{ setlocal modifiable startinsert endfunction "}}} -function! s:execute_line() abort "{{{ +function! s:execute_line() "{{{ " Search cursor file. let filename = unite#util#substitute_path_separator(substitute( \ expand(''), ' ', '\\ ', 'g')) === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/terminal.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/terminal.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/terminal.vim 2015-08-25 11:01:00 +0000 @@ -23,7 +23,7 @@ " }}} "============================================================================= -function! vimshell#terminal#init() abort "{{{ +function! vimshell#terminal#init() "{{{ let b:interactive.terminal = { \ 'syntax_names' : {}, \ 'syntax_commands' : {}, @@ -43,7 +43,7 @@ call vimshell#terminal#init_highlight() endfunction"}}} -function! vimshell#terminal#init_highlight() abort "{{{ +function! vimshell#terminal#init_highlight() "{{{ if s:use_conceal() syntax match vimshellEscapeSequenceConceal \ contained conceal '\e\[[0-9;]*m' @@ -63,7 +63,7 @@ \ terminal.syntax_highlights[syntax_name] endfor endfunction"}}} -function! vimshell#terminal#print(string, is_error) abort "{{{ +function! vimshell#terminal#print(string, is_error) "{{{ if !has_key(b:interactive, 'terminal') call vimshell#terminal#init() endif @@ -121,21 +121,21 @@ call s:set_cursor() endfunction"}}} -function! vimshell#terminal#set_title() abort "{{{ +function! vimshell#terminal#set_title() "{{{ if !has_key(b:interactive, 'terminal') call vimshell#terminal#init() endif let &titlestring = b:interactive.terminal.titlestring endfunction"}}} -function! vimshell#terminal#restore_title() abort "{{{ +function! vimshell#terminal#restore_title() "{{{ if !has_key(b:interactive, 'terminal') call vimshell#terminal#init() endif let &titlestring = b:interactive.terminal.titlestring_save endfunction"}}} -function! vimshell#terminal#clear_highlight() abort "{{{ +function! vimshell#terminal#clear_highlight() "{{{ if !s:use_conceal() return endif @@ -157,7 +157,7 @@ let &l:wrap = b:interactive.terminal.wrap endfunction"}}} -function! s:check_str(string) abort "{{{ +function! s:check_str(string) "{{{ " Optimize checkstr. let string = b:interactive.terminal.buffer . a:string let b:interactive.terminal.buffer = '' @@ -287,7 +287,7 @@ return newstr endfunction "}}} -function! s:optimized_print(string, is_error) abort "{{{ +function! s:optimized_print(string, is_error) "{{{ " Strip . let string = substitute(substitute( \ a:string, "\", '', 'g'), '\r\+\n', '\n', 'g') @@ -309,7 +309,7 @@ \ s:get_virtual_col(line('.'), col('.')) call s:set_cursor() endfunction"}}} -function! s:print_with_redraw(is_error, lines) abort "{{{ +function! s:print_with_redraw(is_error, lines) "{{{ let cnt = 1 for line in a:lines if cnt != 1 || @@ -333,7 +333,7 @@ let cnt += 1 endfor endfunction"}}} -function! s:print_simple(is_error, lines) abort "{{{ +function! s:print_simple(is_error, lines) "{{{ let lines = a:lines if a:is_error @@ -361,7 +361,7 @@ call cursor(line('.') + len(lines), 0) call cursor(0, col('$')) endfunction"}}} -function! s:set_cursor() abort "{{{ +function! s:set_cursor() "{{{ " Get real pos(0 origin). let [line, col] = s:get_real_pos( \ s:virtual.line, s:virtual.col) @@ -383,7 +383,7 @@ redraw endfunction"}}} -function! s:is_no_echoback() abort "{{{ +function! s:is_no_echoback() "{{{ return b:interactive.type ==# 'interactive' \ && vimshell#util#is_windows() \ && has_key(b:interactive, 'command') @@ -391,9 +391,9 @@ \ b:interactive.command, 0) endfunction"}}} -function! s:init_terminal() abort "{{{ +function! s:init_terminal() "{{{ endfunction"}}} -function! s:output_string(string) abort "{{{ +function! s:output_string(string) "{{{ if s:virtual.line == b:interactive.echoback_linenr if s:is_no_echoback() " no echoback command. @@ -428,10 +428,10 @@ call s:set_screen_string(s:virtual.line, s:virtual.col, string) endfunction"}}} -function! s:sortfunc(i1, i2) abort "{{{ +function! s:sortfunc(i1, i2) "{{{ return a:i1 == a:i2 ? 0 : a:i1 > a:i2 ? 1 : -1 endfunction"}}} -function! s:scroll_up(number) abort "{{{ +function! s:scroll_up(number) "{{{ let line = b:interactive.terminal.region_bottom let end = b:interactive.terminal.region_top - a:number while line >= end @@ -447,7 +447,7 @@ let i += 1 endwhile endfunction"}}} -function! s:scroll_down(number) abort "{{{ +function! s:scroll_down(number) "{{{ let line = b:interactive.terminal.region_top let end = b:interactive.terminal.region_bottom - a:number while line <= end @@ -463,12 +463,12 @@ let i += 1 endwhile endfunction"}}} -function! s:use_conceal() abort "{{{ +function! s:use_conceal() "{{{ return has('conceal') endfunction"}}} " Note: Real pos is 0 origin. -function! s:get_real_pos(line, col) abort "{{{ +function! s:get_real_pos(line, col) "{{{ let current_line = get(s:virtual.lines, a:line, getline(a:line)) if a:col <= 1 && current_line !~ '\e\[[0-9;]*m' return [a:line, 0] @@ -477,7 +477,7 @@ return [a:line, vimshell#terminal#get_col( \ get(s:virtual.lines, a:line, getline(a:line)), -1, -1, a:col, 0)] endfunction"}}} -function! s:get_virtual_col(line, col) abort "{{{ +function! s:get_virtual_col(line, col) "{{{ let current_line = get(s:virtual.lines, a:line, getline(a:line)) if a:col <= 0 && current_line !~ '\e\[[0-9;]*m' return [a:line, 1] @@ -486,7 +486,7 @@ return [a:line, vimshell#terminal#get_col( \ get(s:virtual.lines, a:line, getline(a:line)), -1, -1, a:col, 1)] endfunction"}}} -function! s:set_screen_string(line, col, string) abort "{{{ +function! s:set_screen_string(line, col, string) "{{{ let [line, col] = s:get_real_pos(a:line, a:col) call s:set_screen_pos(line, col) @@ -506,7 +506,7 @@ \ string([a:col, col, s:virtual.col, a:string]) endif endfunction"}}} -function! s:set_screen_pos(line, col) abort "{{{ +function! s:set_screen_pos(line, col) "{{{ if a:line == '' return endif @@ -519,7 +519,7 @@ \ repeat(' ', a:col - len(s:virtual.lines[a:line])) endif endfunction"}}} -function! vimshell#terminal#get_col(line, start_virtual, start_real, max_col, is_virtual) abort "{{{ +function! vimshell#terminal#get_col(line, start_virtual, start_real, max_col, is_virtual) "{{{ " is_virtual -> a:col : real col. " not -> a:col : virtual col. let virtual_col = a:start_virtual < 0 ? 1 : a:start_virtual @@ -570,15 +570,15 @@ " Escape sequence functions. let s:escape = {} -function! s:escape.ignore(matchstr) abort "{{{ +function! s:escape.ignore(matchstr) "{{{ endfunction"}}} " Color table. "{{{ let s:color_table = [ 0x00, 0x5F, 0x87, 0xAF, 0xD7, 0xFF ] let s:grey_table = [ - \ 0x08, 0x12, 0x1C, 0x26, 0x30, 0x3A, 0x44, 0x4E, - \ 0x58, 0x62, 0x6C, 0x76, 0x80, 0x8A, 0x94, 0x9E, - \ 0xA8, 0xB2, 0xBC, 0xC6, 0xD0, 0xDA, 0xE4, 0xEE + \0x08, 0x12, 0x1C, 0x26, 0x30, 0x3A, 0x44, 0x4E, + \0x58, 0x62, 0x6C, 0x76, 0x80, 0x8A, 0x94, 0x9E, + \0xA8, 0xB2, 0xBC, 0xC6, 0xD0, 0xDA, 0xE4, 0xEE \] let s:highlight_table = { \ '0' : ' cterm=NONE ctermfg=NONE ctermbg=NONE gui=NONE guifg=NONE guibg=NONE', @@ -599,7 +599,7 @@ \ '39' : ' ctermfg=NONE guifg=NONE', \ '49' : ' ctermbg=NONE guibg=NONE', \}"}}} -function! s:escape.highlight(matchstr) abort "{{{ +function! s:escape.highlight(matchstr) "{{{ if g:vimshell_disable_escape_highlight \ || (b:interactive.type == 'interactive' && \ get(g:vimshell_interactive_monochrome_commands, @@ -725,7 +725,7 @@ " Note: When use concealed text, wrapped text is wrong... setlocal nowrap endfunction"}}} -function! s:escape.move_cursor(matchstr) abort "{{{ +function! s:escape.move_cursor(matchstr) "{{{ let params = matchstr(a:matchstr, '[0-9;]\+') if params == '' let args = [1, 1] @@ -745,7 +745,7 @@ let [line, col] = s:get_real_pos(s:virtual.line, s:virtual.col) call s:set_screen_pos(line, col) endfunction"}}} -function! s:escape.move_cursor_column(matchstr) abort "{{{ +function! s:escape.move_cursor_column(matchstr) "{{{ let n = matchstr(a:matchstr, '\d\+') if n == '' let n = 1 @@ -756,7 +756,7 @@ let [line, col] = s:get_real_pos(s:virtual.line, s:virtual.col) call s:set_screen_pos(line, col) endfunction"}}} -function! s:escape.setup_scrolling_region(matchstr) abort "{{{ +function! s:escape.setup_scrolling_region(matchstr) "{{{ let args = split(matchstr(a:matchstr, '[0-9;]\+'), ';', 1) let top = empty(args) ? 0 : args[0] @@ -773,7 +773,7 @@ let b:interactive.terminal.region_top = top let b:interactive.terminal.region_bottom = bottom endfunction"}}} -function! s:escape.clear_line(matchstr) abort "{{{ +function! s:escape.clear_line(matchstr) "{{{ let [line, col] = s:get_real_pos(s:virtual.line, s:virtual.col) call s:set_screen_pos(line, col) @@ -791,7 +791,7 @@ let s:virtual.col = 1 endif endfunction"}}} -function! s:escape.clear_screen(matchstr) abort "{{{ +function! s:escape.clear_screen(matchstr) "{{{ let param = matchstr(a:matchstr, '\d\+') if param == '' || param == '0' " Clear screen from cursor down. @@ -820,7 +820,7 @@ call vimshell#terminal#clear_highlight() endif endfunction"}}} -function! s:escape.move_up(matchstr) abort "{{{ +function! s:escape.move_up(matchstr) "{{{ let n = matchstr(a:matchstr, '\d\+') if n == '' let n = 1 @@ -837,7 +837,7 @@ endif endif endfunction"}}} -function! s:escape.move_down(matchstr) abort "{{{ +function! s:escape.move_down(matchstr) "{{{ let n = matchstr(a:matchstr, '\d\+') if n == '' let n = 1 @@ -851,7 +851,7 @@ let s:virtual.line += n endif endfunction"}}} -function! s:escape.move_right(matchstr) abort "{{{ +function! s:escape.move_right(matchstr) "{{{ let n = matchstr(a:matchstr, '\d\+') if n == '' let n = 1 @@ -859,7 +859,7 @@ let s:virtual.col += n endfunction"}}} -function! s:escape.move_left(matchstr) abort "{{{ +function! s:escape.move_left(matchstr) "{{{ let n = matchstr(a:matchstr, '\d\+') if n == '' let n = 1 @@ -870,40 +870,40 @@ let s:virtual.col = 1 endif endfunction"}}} -function! s:escape.move_down_head1(matchstr) abort "{{{ +function! s:escape.move_down_head1(matchstr) "{{{ call s:control.newline() endfunction"}}} -function! s:escape.move_down_head(matchstr) abort "{{{ +function! s:escape.move_down_head(matchstr) "{{{ call s:scroll_down(a:matchstr) let s:virtual.col = 1 endfunction"}}} -function! s:escape.move_up_head(matchstr) abort "{{{ +function! s:escape.move_up_head(matchstr) "{{{ let param = matchstr(a:matchstr, '\d\+') if param != '0' call s:scroll_up(a:matchstr) endif let s:virtual.col = 1 endfunction"}}} -function! s:escape.scroll_up1(matchstr) abort "{{{ +function! s:escape.scroll_up1(matchstr) "{{{ call s:scroll_up(1) endfunction"}}} -function! s:escape.scroll_down1(matchstr) abort "{{{ +function! s:escape.scroll_down1(matchstr) "{{{ call s:scroll_down(1) endfunction"}}} -function! s:escape.move_col(matchstr) abort "{{{ +function! s:escape.move_col(matchstr) "{{{ let num = matchstr(a:matchstr, '\d\+') let s:virtual.col = num if s:virtual.col < 1 let s:virtual.col = 1 endif endfunction"}}} -function! s:escape.save_pos(matchstr) abort "{{{ +function! s:escape.save_pos(matchstr) "{{{ let b:interactive.terminal.save_pos = [s:virtual.line, s:virtual.col] endfunction"}}} -function! s:escape.restore_pos(matchstr) abort "{{{ +function! s:escape.restore_pos(matchstr) "{{{ let [s:virtual.line, s:virtual.col] = b:interactive.terminal.save_pos endfunction"}}} -function! s:escape.change_title(matchstr) abort "{{{ +function! s:escape.change_title(matchstr) "{{{ let title = matchstr(a:matchstr, '^k\zs.\{-}\ze\e\\') if empty(title) let title = matchstr(a:matchstr, '^][02];\zs.\{-}\ze'."\") @@ -912,10 +912,10 @@ let &titlestring = title let b:interactive.terminal.titlestring = title endfunction"}}} -function! s:escape.print_control_sequence(matchstr) abort "{{{ +function! s:escape.print_control_sequence(matchstr) "{{{ call s:output_string("\") endfunction"}}} -function! s:escape.change_cursor_shape(matchstr) abort "{{{ +function! s:escape.change_cursor_shape(matchstr) "{{{ if !exists('+guicursor') || b:interactive.type !=# 'terminal' return endif @@ -932,7 +932,7 @@ set guicursor=i:hor20-Cursor/lCursor-blinkon0 endif endfunction"}}} -function! s:escape.change_character_set(matchstr) abort "{{{ +function! s:escape.change_character_set(matchstr) "{{{ if a:matchstr =~ '^[()]0' " Line drawing set. if a:matchstr =~ '^(' @@ -942,10 +942,10 @@ endif endif endfunction"}}} -function! s:escape.reset(matchstr) abort "{{{ +function! s:escape.reset(matchstr) "{{{ call vimshell#terminal#init() endfunction"}}} -function! s:escape.delete_chars(matchstr) abort "{{{ +function! s:escape.delete_chars(matchstr) "{{{ let n = matchstr(a:matchstr, '\d\+') if n == '' let n = 1 @@ -957,9 +957,9 @@ " Control sequence functions. let s:control = {} -function! s:control.ignore() abort "{{{ +function! s:control.ignore() "{{{ endfunction"}}} -function! s:control.newline() abort "{{{ +function! s:control.newline() "{{{ let s:virtual.col = 1 if b:interactive.type !=# 'terminal' @@ -969,7 +969,7 @@ call s:escape.move_down(1) endfunction"}}} -function! s:control.delete_backword_char() abort "{{{ +function! s:control.delete_backword_char() "{{{ if s:virtual.line == b:interactive.echoback_linenr return endif @@ -991,7 +991,7 @@ call s:escape.move_left(1) endfunction"}}} -function! s:control.delete_multi_backword_char() abort "{{{ +function! s:control.delete_multi_backword_char() "{{{ if s:virtual.line == b:interactive.echoback_linenr return endif @@ -1012,16 +1012,16 @@ call s:escape.move_left(2) endfunction"}}} -function! s:control.carriage_return() abort "{{{ +function! s:control.carriage_return() "{{{ let s:virtual.col = 1 endfunction"}}} -function! s:control.bell() abort "{{{ +function! s:control.bell() "{{{ echo 'Ring!' endfunction"}}} -function! s:control.shift_in() abort "{{{ +function! s:control.shift_in() "{{{ let b:interactive.terminal.current_character_set = b:interactive.terminal.standard_character_set endfunction"}}} -function! s:control.shift_out() abort "{{{ +function! s:control.shift_out() "{{{ let b:interactive.terminal.current_character_set = b:interactive.terminal.alternate_character_set endfunction"}}} === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/util.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/util.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/util.vim 2015-08-25 11:01:00 +0000 @@ -23,55 +23,51 @@ " }}} "============================================================================= -function! vimshell#util#get_vital() abort "{{{ - if !exists('s:V') - let s:V = vital#vimshell#of() - endif +let s:V = vital#of('vimshell') + +function! vimshell#util#get_vital() "{{{ return s:V endfunction"}}} -function! s:get_prelude() abort "{{{ +function! s:get_prelude() "{{{ if !exists('s:Prelude') let s:Prelude = vimshell#util#get_vital().import('Prelude') endif return s:Prelude endfunction"}}} -function! s:get_list() abort "{{{ +function! s:get_list() "{{{ if !exists('s:List') let s:List = vimshell#util#get_vital().import('Data.List') endif return s:List endfunction"}}} -function! s:get_process() abort "{{{ +function! s:get_process() "{{{ if !exists('s:Process') let s:Process = vimshell#util#get_vital().import('Process') endif return s:Process endfunction"}}} -function! s:get_string() abort "{{{ - if !exists('s:String') - let s:String = vimshell#util#get_vital().import('Data.String') - endif - return s:String -endfunction"}}} - -function! vimshell#util#truncate_smart(...) abort "{{{ - return call(s:get_string().truncate_skipping, a:000) -endfunction"}}} -function! vimshell#util#truncate(...) abort "{{{ - return call(s:get_string().truncate, a:000) -endfunction"}}} -function! vimshell#util#strchars(...) abort "{{{ - return call(s:get_string().strchars, a:000) -endfunction"}}} -function! vimshell#util#strwidthpart(...) abort "{{{ - return call(s:get_string().strwidthpart, a:000) -endfunction"}}} -function! vimshell#util#strwidthpart_reverse(...) abort "{{{ - return call(s:get_string().strwidthpart_reverse, a:000) + +function! vimshell#util#truncate_smart(...) "{{{ + return call(s:get_prelude().truncate_smart, a:000) +endfunction"}}} + +function! vimshell#util#truncate(...) "{{{ + return call(s:get_prelude().truncate, a:000) +endfunction"}}} + +function! vimshell#util#strchars(string) "{{{ + return len(substitute(a:string, '.', 'x', 'g')) +endfunction"}}} + +function! vimshell#util#strwidthpart(...) "{{{ + return call(s:get_prelude().strwidthpart, a:000) +endfunction"}}} +function! vimshell#util#strwidthpart_reverse(...) "{{{ + return call(s:get_prelude().strwidthpart_reverse, a:000) endfunction"}}} " Use builtin function. -function! vimshell#util#strwidthpart_len(str, width) abort "{{{ +function! vimshell#util#strwidthpart_len(str, width) "{{{ let ret = a:str let width = strwidth(a:str) while width > a:width @@ -82,7 +78,7 @@ return width endfunction"}}} -function! vimshell#util#strwidthpart_len_reverse(str, width) abort "{{{ +function! vimshell#util#strwidthpart_len_reverse(str, width) "{{{ let ret = a:str let width = strwidth(a:str) while width > a:width @@ -94,20 +90,20 @@ return width endfunction"}}} -function! s:buflisted(bufnr) abort "{{{ +function! s:buflisted(bufnr) "{{{ return exists('t:tabpagebuffer') ? \ has_key(t:tabpagebuffer, a:bufnr) && buflisted(a:bufnr) : \ buflisted(a:bufnr) endfunction"}}} -function! vimshell#util#expand(path) abort "{{{ +function! vimshell#util#expand(path) "{{{ return s:get_prelude().substitute_path_separator( \ (a:path =~ '^\~') ? substitute(a:path, '^\~', expand('~'), '') : \ (a:path =~ '^\$\h\w*') ? substitute(a:path, \ '^\$\h\w*', '\=eval(submatch(0))', '') : \ a:path) endfunction"}}} -function! vimshell#util#set_default(var, val, ...) abort "{{{ +function! vimshell#util#set_default(var, val, ...) "{{{ if !exists(a:var) || type({a:var}) != type(a:val) let alternate_var = get(a:000, 0, '') @@ -117,43 +113,43 @@ return {a:var} endfunction"}}} -function! vimshell#util#set_default_dictionary_helper(variable, keys, value) abort "{{{ +function! vimshell#util#set_default_dictionary_helper(variable, keys, value) "{{{ for key in split(a:keys, '\s*,\s*') if !has_key(a:variable, key) let a:variable[key] = a:value endif endfor endfunction"}}} -function! vimshell#util#set_dictionary_helper(variable, keys, value) abort "{{{ +function! vimshell#util#set_dictionary_helper(variable, keys, value) "{{{ for key in split(a:keys, '\s*,\s*') let a:variable[key] = a:value endfor endfunction"}}} -function! vimshell#util#substitute_path_separator(...) abort "{{{ +function! vimshell#util#substitute_path_separator(...) "{{{ return call(s:get_prelude().substitute_path_separator, a:000) endfunction"}}} -function! vimshell#util#is_windows(...) abort "{{{ +function! vimshell#util#is_windows(...) "{{{ return call(s:get_prelude().is_windows, a:000) endfunction"}}} -function! vimshell#util#escape_file_searching(...) abort "{{{ +function! vimshell#util#escape_file_searching(...) "{{{ return call(s:get_prelude().escape_file_searching, a:000) endfunction"}}} -function! vimshell#util#sort_by(...) abort "{{{ +function! vimshell#util#sort_by(...) "{{{ return call(s:get_list().sort_by, a:000) endfunction"}}} -function! vimshell#util#uniq(...) abort "{{{ +function! vimshell#util#uniq(...) "{{{ return call(s:get_list().uniq, a:000) endfunction"}}} -function! vimshell#util#uniq_by(...) abort "{{{ +function! vimshell#util#uniq_by(...) "{{{ return call(s:get_list().uniq_by, a:000) endfunction"}}} -function! vimshell#util#has_vimproc(...) abort "{{{ +function! vimshell#util#has_vimproc(...) "{{{ return call(s:get_process().has_vimproc, a:000) endfunction"}}} -function! vimshell#util#input_yesno(message) abort "{{{ +function! vimshell#util#input_yesno(message) "{{{ let yesno = input(a:message . ' [yes/no]: ') while yesno !~? '^\%(y\%[es]\|n\%[o]\)$' redraw @@ -170,39 +166,39 @@ return yesno =~? 'y\%[es]' endfunction"}}} -function! vimshell#util#is_cmdwin() abort "{{{ +function! vimshell#util#is_cmdwin() "{{{ return bufname('%') ==# '[Command Line]' endfunction"}}} -function! vimshell#util#is_auto_select() abort "{{{ - return get(g:, 'neocomplcache_enable_auto_select', 0) - \ || get(g:, 'neocomplete#enable_auto_select', 0) - \ || &completeopt =~# 'noinsert' +function! vimshell#util#is_auto_select() "{{{ + return get(g:, 'neocomplcache_enable_auto_select', 0) || + \ get(g:, 'neocomplete#enable_auto_select', 0) endfunction"}}} -function! vimshell#util#is_complete_hold() abort "{{{ +function! vimshell#util#is_complete_hold() "{{{ return (get(g:, 'neocomplcache_enable_cursor_hold_i', 0) \ && !get(g:, 'neocomplcache_enable_insert_char_pre', 0)) || - \ get(g:, 'neocomplete#enable_cursor_hold_i', 0) + \ (get(g:, 'neocomplete#enable_cursor_hold_i', 0) + \ && !get(g:, 'neocomplete#enable_insert_char_pre', 0)) endfunction"}}} -function! vimshell#util#is_auto_delimiter() abort "{{{ +function! vimshell#util#is_auto_delimiter() "{{{ return get(g:, 'neocomplcache_enable_auto_delimiter', 0) || \ get(g:, 'neocomplete#enable_auto_delimiter', 0) endfunction"}}} " Sudo check. -function! vimshell#util#is_sudo() abort "{{{ +function! vimshell#util#is_sudo() "{{{ return $SUDO_USER != '' && $USER !=# $SUDO_USER \ && $HOME !=# expand('~'.$USER) \ && $HOME ==# expand('~'.$SUDO_USER) endfunction"}}} -function! vimshell#util#path2project_directory(...) abort +function! vimshell#util#path2project_directory(...) return call(s:get_prelude().path2project_directory, a:000) endfunction -function! vimshell#util#enable_auto_complete() abort "{{{ +function! vimshell#util#enable_auto_complete() "{{{ if exists(':NeoCompleteUnlock') NeoCompleteUnlock endif @@ -210,7 +206,7 @@ NeoComplcacheUnLock endif endfunction"}}} -function! vimshell#util#disable_auto_complete() abort "{{{ +function! vimshell#util#disable_auto_complete() "{{{ " Skip next auto completion. if exists(':NeoCompleteLock') NeoCompleteLock @@ -220,7 +216,7 @@ endif endfunction"}}} -function! vimshell#util#alternate_buffer() abort "{{{ +function! vimshell#util#alternate_buffer() "{{{ if bufnr('%') != bufnr('#') && s:buflisted(bufnr('#')) buffer # return @@ -237,31 +233,29 @@ execute 'buffer' ((current < len(listed_buffer) / 2) ? \ listed_buffer[current+1] : listed_buffer[current-1]) endfunction"}}} -function! vimshell#util#delete_buffer(...) abort "{{{ +function! vimshell#util#delete_buffer(...) "{{{ let bufnr = get(a:000, 0, bufnr('%')) call vimshell#util#alternate_buffer() execute 'silent bwipeout!' bufnr endfunction"}}} -function! s:buflisted(bufnr) abort "{{{ +function! s:buflisted(bufnr) "{{{ return exists('t:tabpagebuffer') ? \ has_key(t:tabpagebuffer, a:bufnr) && buflisted(a:bufnr) : \ buflisted(a:bufnr) endfunction"}}} -function! vimshell#util#glob(pattern, ...) abort "{{{ +function! vimshell#util#glob(pattern, ...) "{{{ if a:pattern =~ "'" " Use glob('*'). let cwd = getcwd() let base = vimshell#util#substitute_path_separator( \ fnamemodify(a:pattern, ':h')) - try - execute (haslocaldir() ? 'lcd' : 'cd') fnameescape(base) - - let files = map(split(vimshell#util#substitute_path_separator( - \ glob('*')), '\n'), "base . '/' . v:val") - finally - execute (haslocaldir() ? 'lcd' : 'cd') fnameescape(cwd) - endtry + execute 'lcd' fnameescape(base) + + let files = map(split(vimshell#util#substitute_path_separator( + \ glob('*')), '\n'), "base . '/' . v:val") + + execute 'lcd' fnameescape(cwd) return files endif @@ -283,7 +277,7 @@ return split(vimshell#util#substitute_path_separator(glob(glob)), '\n') endif endfunction"}}} -function! vimshell#util#get_vimshell_winnr(buffer_name) abort "{{{ +function! vimshell#util#get_vimshell_winnr(buffer_name) "{{{ for winnr in filter(range(1, winnr('$')), \ "getbufvar(winbufnr(v:val), '&filetype') ==# 'vimshell'") let buffer_context = get(getbufvar( @@ -297,25 +291,25 @@ return -1 endfunction"}}} -function! vimshell#util#head_match(checkstr, headstr) abort "{{{ +function! vimshell#util#head_match(checkstr, headstr) "{{{ return stridx(a:checkstr, a:headstr) == 0 endfunction"}}} -function! vimshell#util#tail_match(checkstr, tailstr) abort "{{{ +function! vimshell#util#tail_match(checkstr, tailstr) "{{{ return a:tailstr == '' || a:checkstr ==# a:tailstr \|| a:checkstr[: -len(a:tailstr)-1] ==# a:tailstr endfunction"}}} -function! vimshell#util#resolve(filename) abort "{{{ +function! vimshell#util#resolve(filename) "{{{ return ((vimshell#util#is_windows() && fnamemodify(a:filename, ':e') ==? 'LNK') \ || getftype(a:filename) ==# 'link') ? \ substitute(resolve(a:filename), '\\', '/', 'g') : a:filename endfunction"}}} -function! vimshell#util#escape_match(str) abort "{{{ +function! vimshell#util#escape_match(str) "{{{ return escape(a:str, '~" \.^$[]') endfunction"}}} -function! vimshell#util#system(...) abort "{{{ +function! vimshell#util#system(...) "{{{ return call(s:get_process().system, a:000) endfunction"}}} -function! vimshell#util#set_variables(variables) abort "{{{ +function! vimshell#util#set_variables(variables) "{{{ let variables_save = {} for [key, value] in items(a:variables) let save_value = exists(key) ? eval(key) : '' @@ -326,7 +320,7 @@ return variables_save endfunction"}}} -function! vimshell#util#restore_variables(variables) abort "{{{ +function! vimshell#util#restore_variables(variables) "{{{ for [key, value] in items(a:variables) execute 'let' key '=' string(value) endfor === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/variables.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/variables.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/variables.vim 2015-08-25 11:01:00 +0000 @@ -26,14 +26,14 @@ let s:save_cpo = &cpo set cpo&vim -function! vimshell#variables#internal_commands() abort "{{{ +function! vimshell#variables#internal_commands() "{{{ if !exists('s:internal_commands') let s:internal_commands = {} endif return s:internal_commands endfunction"}}} -function! vimshell#variables#options() abort "{{{ +function! vimshell#variables#options() "{{{ if !exists('s:vimshell_options') let s:vimshell_options = [ \ '-buffer-name=', '-toggle', '-create', === modified file 'vim/bundle/vimshell.vim/autoload/vimshell/view.vim' --- vim/bundle/vimshell.vim/autoload/vimshell/view.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vimshell/view.vim 2015-08-25 11:01:00 +0000 @@ -31,7 +31,7 @@ \ get(g:, 'vimshell_enable_stay_insert', 1) "}}} -function! vimshell#view#_get_prompt(...) abort "{{{ +function! vimshell#view#_get_prompt(...) "{{{ let line = get(a:000, 0, line('.')) let interactive = get(a:000, 1, \ (exists('b:interactive') ? b:interactive : {})) @@ -51,7 +51,7 @@ return vimshell#interactive#get_prompt(line, interactive) endfunction"}}} -function! vimshell#view#_set_prompt_command(string) abort "{{{ +function! vimshell#view#_set_prompt_command(string) "{{{ if !vimshell#check_prompt() " Search prompt. let lnum = searchpos(vimshell#get_context().prompt_pattern, 'bnW')[0] @@ -61,7 +61,7 @@ call setline(lnum, vimshell#get_prompt() . a:string) endfunction"}}} -function! vimshell#view#_get_prompt_command(...) abort "{{{ +function! vimshell#view#_get_prompt_command(...) "{{{ " Get command without prompt. if a:0 > 0 return a:1[vimshell#get_prompt_length(a:1) :] @@ -94,7 +94,7 @@ return line endfunction"}}} -function! vimshell#view#_set_highlight() abort "{{{ +function! vimshell#view#_set_highlight() "{{{ " Set syntax. let prompt_pattern = '/' . \ escape(vimshell#get_context().prompt_pattern, '/') . '/' @@ -112,7 +112,7 @@ \vimshellArguments,vimshellQuoted,vimshellString, \vimshellVariable,vimshellSpecial,vimshellComment endfunction"}}} -function! vimshell#view#_close(buffer_name) abort "{{{ +function! vimshell#view#_close(buffer_name) "{{{ let quit_winnr = -1 if a:buffer_name != '' let quit_winnr = vimshell#util#get_vimshell_winnr(a:buffer_name) @@ -133,7 +133,7 @@ return quit_winnr > 0 endfunction"}}} -function! vimshell#view#_print_prompt(...) abort "{{{ +function! vimshell#view#_print_prompt(...) "{{{ if &filetype !=# 'vimshell' || line('.') != line('$') \ || !empty(b:vimshell.continuation) return @@ -172,7 +172,7 @@ call cursor(0, col('$')) let &modified = 0 endfunction"}}} -function! vimshell#view#_print_secondary_prompt() abort "{{{ +function! vimshell#view#_print_secondary_prompt() "{{{ if &filetype !=# 'vimshell' || line('.') != line('$') return endif @@ -183,7 +183,7 @@ call cursor(0, col('$')) let &modified = 0 endfunction"}}} -function! vimshell#view#_start_insert(...) abort "{{{ +function! vimshell#view#_start_insert(...) "{{{ if &filetype !=# 'vimshell' return endif @@ -200,7 +200,7 @@ call vimshell#helpers#imdisable() endif endfunction"}}} -function! vimshell#view#_simple_insert(...) abort "{{{ +function! vimshell#view#_simple_insert(...) "{{{ let is_insert = (a:0 == 0)? 1 : a:1 if is_insert && g:vimshell_enable_stay_insert @@ -211,7 +211,7 @@ call cursor(0, col('$')) endif endfunction"}}} -function! vimshell#view#_cd(directory) abort "{{{ +function! vimshell#view#_cd(directory) "{{{ let directory = fnameescape(a:directory) if vimshell#util#is_windows() " Substitute path sepatator. @@ -224,7 +224,7 @@ call unite#sources#directory_mru#_append() endif endfunction"}}} -function! vimshell#view#_next_prompt(context, ...) abort "{{{ +function! vimshell#view#_next_prompt(context, ...) "{{{ if &filetype !=# 'vimshell' return endif @@ -269,7 +269,7 @@ stopinsert endfunction"}}} -function! s:insert_user_and_right_prompt() abort "{{{ +function! s:insert_user_and_right_prompt() "{{{ let user_prompt = vimshell#get_user_prompt() if user_prompt != '' for user in split(eval(user_prompt), "\\n", 1) @@ -331,7 +331,7 @@ let b:vimshell.prompts_save[line('$')] = prompts_save endfunction"}}} -function! vimshell#view#_check_prompt(...) abort "{{{ +function! vimshell#view#_check_prompt(...) "{{{ if &filetype !=# 'vimshell' || !empty(b:vimshell.continuation) return call('vimshell#get_prompt', a:000) != '' endif @@ -339,11 +339,11 @@ let line = a:0 == 0 ? getline('.') : getline(a:1) return line =~# vimshell#get_context().prompt_pattern endfunction"}}} -function! vimshell#view#_check_secondary_prompt(...) abort "{{{ +function! vimshell#view#_check_secondary_prompt(...) "{{{ let line = a:0 == 0 ? getline('.') : getline(a:1) return vimshell#util#head_match(line, vimshell#get_secondary_prompt()) endfunction"}}} -function! vimshell#view#_check_user_prompt(...) abort "{{{ +function! vimshell#view#_check_user_prompt(...) "{{{ let line = a:0 == 0 ? line('.') : a:1 if !vimshell#util#head_match(getline(line-1), '[%] ') " Not found. @@ -361,7 +361,7 @@ return line endfunction"}}} -function! s:get_prompt_linenr() abort "{{{ +function! s:get_prompt_linenr() "{{{ if b:interactive.type !=# 'interactive' \ && b:interactive.type !=# 'vimshell' return 0 === modified file 'vim/bundle/vimshell.vim/autoload/vital.vim' --- vim/bundle/vimshell.vim/autoload/vital.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vital.vim 2015-08-25 11:01:00 +0000 @@ -1,4 +1,4 @@ -function! vital#of(name) abort +function! vital#of(name) let files = globpath(&runtimepath, 'autoload/vital/' . a:name . '.vital') let file = split(files, "\n") if empty(file) === modified file 'vim/bundle/vimshell.vim/autoload/vital/_vimshell.vim' --- vim/bundle/vimshell.vim/autoload/vital/_vimshell.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vital/_vimshell.vim 2015-08-25 11:01:00 +0000 @@ -1,5 +1,203 @@ -let s:_plugin_name = expand(':t:r') - -function! vital#{s:_plugin_name}#new() abort - return vital#{s:_plugin_name[1:]}#of() +let s:self_version = expand(':t:r') + +" Note: The extra argument to globpath() was added in Patch 7.2.051. +let s:globpath_third_arg = v:version > 702 || v:version == 702 && has('patch51') + +let s:loaded = {} + +function! s:import(name, ...) + let target = {} + let functions = [] + for a in a:000 + if type(a) == type({}) + let target = a + elseif type(a) == type([]) + let functions = a + endif + unlet a + endfor + let module = s:_import(a:name) + if empty(functions) + call extend(target, module, 'keep') + else + for f in functions + if has_key(module, f) && !has_key(target, f) + let target[f] = module[f] + endif + endfor + endif + return target +endfunction + +function! s:load(...) dict + for arg in a:000 + let [name; as] = type(arg) == type([]) ? arg[: 1] : [arg, arg] + let target = split(join(as, ''), '\W\+') + let dict = self + while 1 <= len(target) + let ns = remove(target, 0) + if !has_key(dict, ns) + let dict[ns] = {} + endif + if type(dict[ns]) == type({}) + let dict = dict[ns] + else + unlet dict + break + endif + endwhile + + if exists('dict') + call extend(dict, s:_import(name)) + endif + unlet arg + endfor + return self +endfunction + +function! s:unload() + let s:loaded = {} +endfunction + +function! s:_import(name) + if type(a:name) == type(0) + return s:_build_module(a:name) + endif + let path = s:_get_module_path(a:name) + if path ==# '' + throw 'vital: module not found: ' . a:name + endif + let sid = get(s:_scripts(), path, 0) + if !sid + try + execute 'source' fnameescape(path) + catch /^Vim\%((\a\+)\)\?:E484/ + throw 'vital: module not found: ' . a:name + catch /^Vim\%((\a\+)\)\?:E127/ + " Ignore. + endtry + + let sid = s:_scripts()[path] + endif + return s:_build_module(sid) +endfunction + +function! s:_get_module_path(name) + if s:_is_absolute_path(a:name) && filereadable(a:name) + return s:_unify_path(a:name) + endif + if a:name ==# '' + let tailpath = printf('autoload/vital/%s.vim', s:self_version) + elseif a:name =~# '\v^\u\w*%(\.\u\w*)*$' + let target = '/' . substitute(a:name, '\W\+', '/', 'g') + let tailpath = printf('autoload/vital/%s%s.vim', s:self_version, target) + else + throw 'vital: Invalid module name: ' . a:name + endif + + if s:globpath_third_arg + let paths = split(globpath(&runtimepath, tailpath, 1), "\n") + else + let paths = split(globpath(&runtimepath, tailpath), "\n") + endif + call filter(paths, 'filereadable(v:val)') + return s:_unify_path(get(paths, 0, '')) +endfunction + +function! s:_scripts() + let scripts = {} + for line in filter(split(s:_redir('scriptnames'), "\n"), + \ 'stridx(v:val, s:self_version) > 0') + let list = matchlist(line, '^\s*\(\d\+\):\s\+\(.\+\)\s*$') + if !empty(list) + let scripts[s:_unify_path(list[2])] = list[1] - 0 + endif + endfor + return scripts +endfunction + +if filereadable(expand(':r') . '.VIM') + function! s:_unify_path(path) + " Note: On windows, vim can't expand path names from 8.3 formats. + " So if getting full path via and $HOME was set as 8.3 format, + " vital load duplicated scripts. Below's :~ avoid this issue. + return tolower(fnamemodify(resolve(fnamemodify( + \ a:path, ':p:gs?[\\/]\+?/?')), ':~')) + endfunction +else + function! s:_unify_path(path) + return resolve(fnamemodify(a:path, ':p:gs?[\\/]\+?/?')) + endfunction +endif + +" Copy from System.Filepath +if has('win16') || has('win32') || has('win64') + function! s:_is_absolute_path(path) + return a:path =~? '^[a-z]:[/\\]' + endfunction +else + function! s:_is_absolute_path(path) + return a:path[0] ==# '/' + endfunction +endif + +function! s:_build_module(sid) + if has_key(s:loaded, a:sid) + return copy(s:loaded[a:sid]) + endif + let functions = s:_get_functions(a:sid) + + let prefix = '' . a:sid . '_' + let module = {} + for func in functions + let module[func] = function(prefix . func) + endfor + if has_key(module, '_vital_loaded') + let V = vital#{s:self_version}#new() + if has_key(module, '_vital_depends') + call call(V.load, module._vital_depends(), V) + endif + try + call module._vital_loaded(V) + catch + " FIXME: Show an error message for debug. + endtry + endif + if !get(g:, 'vital_debug', 0) + call filter(module, 'v:key =~# "^\\a"') + endif + let s:loaded[a:sid] = module + return copy(module) +endfunction + +if exists('+regexpengine') + function! s:_get_functions(sid) + let funcs = s:_redir(printf("function /\\%%#=2^\%d_", a:sid)) + let map_pat = '' . a:sid . '_\zs\w\+' + return map(split(funcs, "\n"), 'matchstr(v:val, map_pat)') + endfunction +else + function! s:_get_functions(sid) + let prefix = '' . a:sid . '_' + let funcs = s:_redir('function') + let filter_pat = '^\s*function ' . prefix + let map_pat = prefix . '\zs\w\+' + return map(filter(split(funcs, "\n"), + \ 'stridx(v:val, prefix) > 0 && v:val =~# filter_pat'), + \ 'matchstr(v:val, map_pat)') + endfunction +endif + +function! s:_redir(cmd) + let [save_verbose, save_verbosefile] = [&verbose, &verbosefile] + set verbose=0 verbosefile= + redir => res + silent! execute a:cmd + redir END + let [&verbose, &verbosefile] = [save_verbose, save_verbosefile] + return res +endfunction + +function! vital#{s:self_version}#new() + return s:_import('') endfunction === removed file 'vim/bundle/vimshell.vim/autoload/vital/_vimshell/Data/Dict.vim' --- vim/bundle/vimshell.vim/autoload/vital/_vimshell/Data/Dict.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vital/_vimshell/Data/Dict.vim 1970-01-01 00:00:00 +0000 @@ -1,116 +0,0 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_vimshell#Data#Dict#import() abort - return map({'pick': '', 'clear': '', 'max_by': '', 'foldl': '', 'swap': '', 'omit': '', 'min_by': '', 'foldr': '', 'make_index': '', 'make': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_vimshell#Data#Dict#import() abort', printf("return map({'pick': '', 'clear': '', 'max_by': '', 'foldl': '', 'swap': '', 'omit': '', 'min_by': '', 'foldr': '', 'make_index': '', 'make': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ -" Utilities for dictionary. - -let s:save_cpo = &cpo -set cpo&vim - -" Makes a dict from keys and values -function! s:make(keys, values, ...) abort - let dict = {} - let fill = a:0 ? a:1 : 0 - for i in range(len(a:keys)) - let key = type(a:keys[i]) == type('') ? a:keys[i] : string(a:keys[i]) - if key ==# '' - throw "vital: Data.Dict: Can't use an empty string for key." - endif - let dict[key] = get(a:values, i, fill) - endfor - return dict -endfunction - -" Swaps keys and values -function! s:swap(dict) abort - return s:make(values(a:dict), keys(a:dict)) -endfunction - -" Makes a index dict from a list -function! s:make_index(list, ...) abort - let value = a:0 ? a:1 : 1 - return s:make(a:list, [], value) -endfunction - -function! s:pick(dict, keys) abort - let new_dict = {} - for key in a:keys - if has_key(a:dict, key) - let new_dict[key] = a:dict[key] - endif - endfor - return new_dict -endfunction - -function! s:omit(dict, keys) abort - let new_dict = copy(a:dict) - for key in a:keys - if has_key(a:dict, key) - call remove(new_dict, key) - endif - endfor - return new_dict -endfunction - -function! s:clear(dict) abort - for key in keys(a:dict) - call remove(a:dict, key) - endfor - return a:dict -endfunction - -function! s:_max_by(dict, expr) abort - let dict = s:swap(map(copy(a:dict), a:expr)) - let key = dict[max(keys(dict))] - return [key, a:dict[key]] -endfunction - -function! s:max_by(dict, expr) abort - if empty(a:dict) - throw 'vital: Data.Dict: Empty dictionary' - endif - return s:_max_by(a:dict, a:expr) -endfunction - -function! s:min_by(dict, expr) abort - if empty(a:dict) - throw 'vital: Data.Dict: Empty dictionary' - endif - return s:_max_by(a:dict, '-(' . a:expr . ')') -endfunction - -function! s:_foldl(f, init, xs) abort - let memo = a:init - for [k, v] in a:xs - let expr = substitute(a:f, 'v:key', string(k), 'g') - let expr = substitute(expr, 'v:val', string(v), 'g') - let expr = substitute(expr, 'v:memo', string(memo), 'g') - unlet memo - let memo = eval(expr) - endfor - return memo -endfunction - -function! s:foldl(f, init, dict) abort - return s:_foldl(a:f, a:init, items(a:dict)) -endfunction - -function! s:foldr(f, init, dict) abort - return s:_foldl(a:f, a:init, reverse(items(a:dict))) -endfunction - -let &cpo = s:save_cpo -unlet s:save_cpo - -" vim:set et ts=2 sts=2 sw=2 tw=0: === modified file 'vim/bundle/vimshell.vim/autoload/vital/_vimshell/Data/List.vim' --- vim/bundle/vimshell.vim/autoload/vital/_vimshell/Data/List.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vital/_vimshell/Data/List.vim 2015-08-25 11:01:00 +0000 @@ -1,55 +1,40 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_vimshell#Data#List#import() abort - return map({'combinations': '', 'and': '', 'sort_by': '', 'foldr1': '', 'sort': '', 'flatten': '', 'has_index': '', 'find_indices': '', 'any': '', 'unshift': '', 'span': '', 'pop': '', 'binary_search': '', 'uniq_by': '', 'or': '', 'all': '', 'zip': '', 'find_last_index': '', 'find': '', 'partition': '', 'map_accum': '', 'permutations': '', 'break': '', 'max_by': '', 'foldl': '', 'foldr': '', 'find_index': '', 'group_by': '', 'take_while': '', 'conj': '', 'push': '', 'char_range': '', 'cons': '', 'foldl1': '', 'intersect': '', 'concat': '', 'shift': '', 'clear': '', 'has_common_items': '', 'product': '', 'zip_fill': '', 'uniq': '', 'has': '', 'min_by': '', 'with_index': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_vimshell#Data#List#import() abort', printf("return map({'combinations': '', 'and': '', 'sort_by': '', 'foldr1': '', 'sort': '', 'flatten': '', 'has_index': '', 'find_indices': '', 'any': '', 'unshift': '', 'span': '', 'pop': '', 'binary_search': '', 'uniq_by': '', 'or': '', 'all': '', 'zip': '', 'find_last_index': '', 'find': '', 'partition': '', 'map_accum': '', 'permutations': '', 'break': '', 'max_by': '', 'foldl': '', 'foldr': '', 'find_index': '', 'group_by': '', 'take_while': '', 'conj': '', 'push': '', 'char_range': '', 'cons': '', 'foldl1': '', 'intersect': '', 'concat': '', 'shift': '', 'clear': '', 'has_common_items': '', 'product': '', 'zip_fill': '', 'uniq': '', 'has': '', 'min_by': '', 'with_index': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ " Utilities for list. let s:save_cpo = &cpo set cpo&vim -function! s:pop(list) abort +function! s:pop(list) return remove(a:list, -1) endfunction -function! s:push(list, val) abort +function! s:push(list, val) call add(a:list, a:val) return a:list endfunction -function! s:shift(list) abort +function! s:shift(list) return remove(a:list, 0) endfunction -function! s:unshift(list, val) abort +function! s:unshift(list, val) return insert(a:list, a:val) endfunction -function! s:cons(x, xs) abort +function! s:cons(x, xs) return [a:x] + a:xs endfunction -function! s:conj(xs, x) abort +function! s:conj(xs, x) return a:xs + [a:x] endfunction " Removes duplicates from a list. -function! s:uniq(list) abort +function! s:uniq(list) return s:uniq_by(a:list, 'v:val') endfunction " Removes duplicates from a list. -function! s:uniq_by(list, f) abort +function! s:uniq_by(list, f) let list = map(copy(a:list), printf('[v:val, %s]', a:f)) let i = 0 let seen = {} @@ -65,7 +50,7 @@ return map(list, 'v:val[0]') endfunction -function! s:clear(list) abort +function! s:clear(list) if !empty(a:list) unlet! a:list[0 : len(a:list) - 1] endif @@ -74,7 +59,7 @@ " Concatenates a list of lists. " XXX: Should we verify the input? -function! s:concat(list) abort +function! s:concat(list) let memo = [] for Value in a:list let memo += Value @@ -83,7 +68,7 @@ endfunction " Take each elements from lists to a new list. -function! s:flatten(list, ...) abort +function! s:flatten(list, ...) let limit = a:0 > 0 ? a:1 : -1 let memo = [] if limit == 0 @@ -102,7 +87,7 @@ " Sorts a list with expression to compare each two values. " a:a and a:b can be used in {expr}. -function! s:sort(list, expr) abort +function! s:sort(list, expr) if type(a:expr) == type(function('function')) return sort(a:list, a:expr) endif @@ -110,14 +95,14 @@ return sort(a:list, 's:_compare') endfunction -function! s:_compare(a, b) abort +function! s:_compare(a, b) return eval(s:expr) endfunction " Sorts a list using a set of keys generated by mapping the values in the list " through the given expr. " v:val is used in {expr} -function! s:sort_by(list, expr) abort +function! s:sort_by(list, expr) let pairs = map(a:list, printf('[v:val, %s]', a:expr)) return map(s:sort(pairs, \ 'a:a[1] ==# a:b[1] ? 0 : a:a[1] ># a:b[1] ? 1 : -1'), 'v:val[0]') @@ -126,7 +111,7 @@ " Returns a maximum value in {list} through given {expr}. " Returns 0 if {list} is empty. " v:val is used in {expr} -function! s:max_by(list, expr) abort +function! s:max_by(list, expr) if empty(a:list) return 0 endif @@ -138,13 +123,13 @@ " Returns 0 if {list} is empty. " v:val is used in {expr} " FIXME: -0x80000000 == 0x80000000 -function! s:min_by(list, expr) abort +function! s:min_by(list, expr) return s:max_by(a:list, '-(' . a:expr . ')') endfunction " Returns List of character sequence between [a:from, a:to] " e.g.: s:char_range('a', 'c') returns ['a', 'b', 'c'] -function! s:char_range(from, to) abort +function! s:char_range(from, to) return map( \ range(char2nr(a:from), char2nr(a:to)), \ 'nr2char(v:val)' @@ -153,21 +138,21 @@ " Returns true if a:list has a:value. " Returns false otherwise. -function! s:has(list, value) abort +function! s:has(list, value) return index(a:list, a:value) isnot -1 endfunction " Returns true if a:list[a:index] exists. " Returns false otherwise. " NOTE: Returns false when a:index is negative number. -function! s:has_index(list, index) abort +function! s:has_index(list, index) " Return true when negative index? " let index = a:index >= 0 ? a:index : len(a:list) + a:index return 0 <= a:index && a:index < len(a:list) endfunction " similar to Haskell's Data.List.span -function! s:span(f, xs) abort +function! s:span(f, xs) let border = len(a:xs) for i in range(len(a:xs)) if !eval(substitute(a:f, 'v:val', string(a:xs[i]), 'g')) @@ -179,54 +164,42 @@ endfunction " similar to Haskell's Data.List.break -function! s:break(f, xs) abort +function! s:break(f, xs) return s:span(printf('!(%s)', a:f), a:xs) endfunction " similar to Haskell's Data.List.takeWhile -function! s:take_while(f, xs) abort +function! s:take_while(f, xs) return s:span(a:f, a:xs)[0] endfunction " similar to Haskell's Data.List.partition -function! s:partition(f, xs) abort +function! s:partition(f, xs) return [filter(copy(a:xs), a:f), filter(copy(a:xs), '!(' . a:f . ')')] endfunction " similar to Haskell's Prelude.all -function! s:all(f, xs) abort +function! s:all(f, xs) return !s:any(printf('!(%s)', a:f), a:xs) endfunction " similar to Haskell's Prelude.any -function! s:any(f, xs) abort +function! s:any(f, xs) return !empty(filter(map(copy(a:xs), a:f), 'v:val')) endfunction " similar to Haskell's Prelude.and -function! s:and(xs) abort +function! s:and(xs) return s:all('v:val', a:xs) endfunction " similar to Haskell's Prelude.or -function! s:or(xs) abort +function! s:or(xs) return s:any('v:val', a:xs) endfunction -function! s:map_accum(expr, xs, init) abort - let memo = [] - let init = a:init - for x in a:xs - let expr = substitute(a:expr, 'v:memo', init, 'g') - let expr = substitute(expr, 'v:val', x, 'g') - let [tmp, init] = eval(expr) - call add(memo, tmp) - endfor - return memo -endfunction - " similar to Haskell's Prelude.foldl -function! s:foldl(f, init, xs) abort +function! s:foldl(f, init, xs) let memo = a:init for x in a:xs let expr = substitute(a:f, 'v:val', string(x), 'g') @@ -238,33 +211,33 @@ endfunction " similar to Haskell's Prelude.foldl1 -function! s:foldl1(f, xs) abort +function! s:foldl1(f, xs) if len(a:xs) == 0 - throw 'vital: Data.List: foldl1' + throw 'foldl1' endif return s:foldl(a:f, a:xs[0], a:xs[1:]) endfunction " similar to Haskell's Prelude.foldr -function! s:foldr(f, init, xs) abort +function! s:foldr(f, init, xs) return s:foldl(a:f, a:init, reverse(copy(a:xs))) endfunction " similar to Haskell's Prelude.fold11 -function! s:foldr1(f, xs) abort +function! s:foldr1(f, xs) if len(a:xs) == 0 - throw 'vital: Data.List: foldr1' + throw 'foldr1' endif return s:foldr(a:f, a:xs[-1], a:xs[0:-2]) endfunction " similar to python's zip() -function! s:zip(...) abort +function! s:zip(...) return map(range(min(map(copy(a:000), 'len(v:val)'))), "map(copy(a:000), 'v:val['.v:val.']')") endfunction " similar to zip(), but goes until the longer one. -function! s:zip_fill(xs, ys, filler) abort +function! s:zip_fill(xs, ys, filler) if empty(a:xs) && empty(a:ys) return [] elseif empty(a:ys) @@ -277,13 +250,14 @@ endfunction " Inspired by Ruby's with_index method. -function! s:with_index(list, ...) abort +function! s:with_index(list, ...) let base = a:0 > 0 ? a:1 : 0 - return map(copy(a:list), '[v:val, v:key + base]') + return s:zip(a:list, range(base, len(a:list)+base-1)) endfunction " similar to Ruby's detect or Haskell's find. -function! s:find(list, default, f) abort +" TODO spec and doc +function! s:find(list, default, f) for x in a:list if eval(substitute(a:f, 'v:val', string(x), 'g')) return x @@ -292,165 +266,12 @@ return a:default endfunction -" Returns the index of the first element which satisfies the given expr. -function! s:find_index(xs, f, ...) abort - let len = len(a:xs) - let start = a:0 > 0 ? (a:1 < 0 ? len + a:1 : a:1) : 0 - let default = a:0 > 1 ? a:2 : -1 - if start >=# len || start < 0 - return default - endif - for i in range(start, len - 1) - if eval(substitute(a:f, 'v:val', string(a:xs[i]), 'g')) - return i - endif - endfor - return default -endfunction - -" Returns the index of the last element which satisfies the given expr. -function! s:find_last_index(xs, f, ...) abort - let len = len(a:xs) - let start = a:0 > 0 ? (a:1 < 0 ? len + a:1 : a:1) : len - 1 - let default = a:0 > 1 ? a:2 : -1 - if start >=# len || start < 0 - return default - endif - for i in range(start, 0, -1) - if eval(substitute(a:f, 'v:val', string(a:xs[i]), 'g')) - return i - endif - endfor - return default -endfunction - -" Similar to find_index but returns the list of indices satisfying the given expr. -function! s:find_indices(xs, f, ...) abort - let len = len(a:xs) - let start = a:0 > 0 ? (a:1 < 0 ? len + a:1 : a:1) : 0 - let result = [] - if start >=# len || start < 0 - return result - endif - for i in range(start, len - 1) - if eval(substitute(a:f, 'v:val', string(a:xs[i]), 'g')) - call add(result, i) - endif - endfor - return result -endfunction - " Return non-zero if a:list1 and a:list2 have any common item(s). " Return zero otherwise. -function! s:has_common_items(list1, list2) abort +function! s:has_common_items(list1, list2) return !empty(filter(copy(a:list1), 'index(a:list2, v:val) isnot -1')) endfunction -function! s:intersect(list1, list2) abort - let items = [] - " for funcref - for X in a:list1 - if index(a:list2, X) != -1 && index(items, X) == -1 - let items += [X] - endif - endfor - return items -endfunction - -" similar to Ruby's group_by. -function! s:group_by(xs, f) abort - let result = {} - let list = map(copy(a:xs), printf('[v:val, %s]', a:f)) - for x in list - let Val = x[0] - let key = type(x[1]) !=# type('') ? string(x[1]) : x[1] - if has_key(result, key) - call add(result[key], Val) - else - let result[key] = [Val] - endif - unlet Val - endfor - return result -endfunction - -function! s:_default_compare(a, b) abort - return a:a <# a:b ? -1 : a:a ># a:b ? 1 : 0 -endfunction - -function! s:binary_search(list, value, ...) abort - let Predicate = a:0 >= 1 ? a:1 : 's:_default_compare' - let dic = a:0 >= 2 ? a:2 : {} - let start = 0 - let end = len(a:list) - 1 - - while 1 - if start > end - return -1 - endif - - let middle = (start + end) / 2 - - let compared = call(Predicate, [a:value, a:list[middle]], dic) - - if compared < 0 - let end = middle - 1 - elseif compared > 0 - let start = middle + 1 - else - return middle - endif - endwhile -endfunction - -function! s:product(lists) abort - let result = [[]] - for pool in a:lists - let tmp = [] - for x in result - let tmp += map(copy(pool), 'x + [v:val]') - endfor - let result = tmp - endfor - return result -endfunction - -function! s:permutations(list, ...) abort - if a:0 > 1 - throw 'vital: Data.List: too many arguments' - endif - let r = a:0 == 1 ? a:1 : len(a:list) - if r > len(a:list) - return [] - elseif r < 0 - throw 'vital: Data.List: {r} must be non-negative integer' - endif - let n = len(a:list) - let result = [] - for indices in s:product(map(range(r), 'range(n)')) - if len(s:uniq(indices)) == r - call add(result, map(indices, 'a:list[v:val]')) - endif - endfor - return result -endfunction - -function! s:combinations(list, r) abort - if a:r > len(a:list) - return [] - elseif a:r < 0 - throw 'vital: Data:List: {r} must be non-negative integer' - endif - let n = len(a:list) - let result = [] - for indices in s:permutations(range(n), a:r) - if s:sort(copy(indices), 'a:a - a:b') == indices - call add(result, map(indices, 'a:list[v:val]')) - endif - endfor - return result -endfunction - let &cpo = s:save_cpo unlet s:save_cpo === removed file 'vim/bundle/vimshell.vim/autoload/vital/_vimshell/Data/String.vim' --- vim/bundle/vimshell.vim/autoload/vital/_vimshell/Data/String.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vital/_vimshell/Data/String.vim 1970-01-01 00:00:00 +0000 @@ -1,661 +0,0 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_vimshell#Data#String#import() abort - return map({'starts_with': '', 'split3': '', 'chop': '', 'unescape': '', 'split_posix_text': '', 'replace': '', 'scan': '', 'strchars': '', 'strwidthpart': '', 'common_head': '', 'reverse': '', 'escape_pattern': '', 'trim_end': '', '_vital_depends': '', 'wrap': '', 'join_posix_lines': '', 'contains_multibyte': '', 'truncate_skipping': '', 'split_leftright': '', 'ends_with': '', 'nsplit': '', 'substitute_last': '', 'strwidthpart_reverse': '', 'unescape_pattern': '', 'levenshtein_distance': '', 'trim_start': '', 'nr2hex': '', 'remove_ansi_sequences': '', 'iconv': '', 'pad_left': '', 'nr2enc_char': '', 'lines': '', 'repair_posix_text': '', 'nr2byte': '', 'trim': '', 'diffidx': '', 'truncate': '', 'split_by_displaywidth': '', 'padding_by_displaywidth': '', 'hash': '', 'chomp': '', 'pad_between_letters': '', 'wcswidth': '', 'dstring': '', 'pad_both_sides': '', 'justify_equal_spacing': '', 'pad_right': '', 'replace_first': '', '_vital_loaded': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_vimshell#Data#String#import() abort', printf("return map({'starts_with': '', 'split3': '', 'chop': '', 'unescape': '', 'split_posix_text': '', 'replace': '', 'scan': '', 'strchars': '', 'strwidthpart': '', 'common_head': '', 'reverse': '', 'escape_pattern': '', 'trim_end': '', '_vital_depends': '', 'wrap': '', 'join_posix_lines': '', 'contains_multibyte': '', 'truncate_skipping': '', 'split_leftright': '', 'ends_with': '', 'nsplit': '', 'substitute_last': '', 'strwidthpart_reverse': '', 'unescape_pattern': '', 'levenshtein_distance': '', 'trim_start': '', 'nr2hex': '', 'remove_ansi_sequences': '', 'iconv': '', 'pad_left': '', 'nr2enc_char': '', 'lines': '', 'repair_posix_text': '', 'nr2byte': '', 'trim': '', 'diffidx': '', 'truncate': '', 'split_by_displaywidth': '', 'padding_by_displaywidth': '', 'hash': '', 'chomp': '', 'pad_between_letters': '', 'wcswidth': '', 'dstring': '', 'pad_both_sides': '', 'justify_equal_spacing': '', 'pad_right': '', 'replace_first': '', '_vital_loaded': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ -" Utilities for string. - -let s:save_cpo = &cpo -set cpo&vim - -function! s:_vital_loaded(V) abort - let s:V = a:V - let s:L = s:V.import('Data.List') -endfunction - -function! s:_vital_depends() abort - return ['Data.List'] -endfunction - -" Substitute a:from => a:to by string. -" To substitute by pattern, use substitute() instead. -function! s:replace(str, from, to) abort - return s:_replace(a:str, a:from, a:to, 'g') -endfunction - -" Substitute a:from => a:to only once. -" cf. s:replace() -function! s:replace_first(str, from, to) abort - return s:_replace(a:str, a:from, a:to, '') -endfunction - -" implement of replace() and replace_first() -function! s:_replace(str, from, to, flags) abort - return substitute(a:str, '\V'.escape(a:from, '\'), escape(a:to, '\'), a:flags) -endfunction - -function! s:scan(str, pattern) abort - let list = [] - call substitute(a:str, a:pattern, '\=add(list, submatch(0)) == [] ? "" : ""', 'g') - return list -endfunction - -function! s:reverse(str) abort - return join(reverse(split(a:str, '.\zs')), '') -endfunction - -function! s:starts_with(str, prefix) abort - return stridx(a:str, a:prefix) == 0 -endfunction - -function! s:ends_with(str, suffix) abort - let idx = strridx(a:str, a:suffix) - return 0 <= idx && idx + len(a:suffix) == len(a:str) -endfunction - -function! s:common_head(strs) abort - if empty(a:strs) - return '' - endif - let len = len(a:strs) - if len == 1 - return a:strs[0] - endif - let strs = len == 2 ? a:strs : sort(copy(a:strs)) - let pat = substitute(strs[0], '.', '\="[" . escape(submatch(0), "^\\") . "]"', 'g') - return pat ==# '' ? '' : matchstr(strs[-1], '\C^\%[' . pat . ']') -endfunction - -" Split to two elements of List. ([left, right]) -" e.g.: s:split3('neocomplcache', 'compl') returns ['neo', 'compl', 'cache'] -function! s:split_leftright(expr, pattern) abort - let [left, _, right] = s:split3(a:expr, a:pattern) - return [left, right] -endfunction - -function! s:split3(expr, pattern) abort - let ERROR = ['', '', ''] - if a:expr ==# '' || a:pattern ==# '' - return ERROR - endif - let begin = match(a:expr, a:pattern) - if begin is -1 - return ERROR - endif - let end = matchend(a:expr, a:pattern) - let left = begin <=# 0 ? '' : a:expr[: begin - 1] - let right = a:expr[end :] - return [left, a:expr[begin : end-1], right] -endfunction - -" Slices into strings determines the number of substrings. -" e.g.: s:nsplit("neo compl cache", 2, '\s') returns ['neo', 'compl cache'] -function! s:nsplit(expr, n, ...) abort - let pattern = get(a:000, 0, '\s') - let keepempty = get(a:000, 1, 1) - let ret = [] - let expr = a:expr - if a:n <= 1 - return [expr] - endif - while 1 - let pos = match(expr, pattern) - if pos == -1 - if expr !~ pattern || keepempty - call add(ret, expr) - endif - break - elseif pos >= 0 - let left = pos > 0 ? expr[:pos-1] : '' - if pos > 0 || keepempty - call add(ret, left) - endif - let ml = len(matchstr(expr, pattern)) - if pos == 0 && ml == 0 - let pos = 1 - endif - let expr = expr[pos+ml :] - endif - if len(expr) == 0 - break - endif - if len(ret) == a:n - 1 - call add(ret, expr) - break - endif - endwhile - return ret -endfunction - -" Returns the number of character in a:str. -" NOTE: This returns proper value -" even if a:str contains multibyte character(s). -" s:strchars(str) {{{ -if exists('*strchars') - function! s:strchars(str) abort - return strchars(a:str) - endfunction -else - function! s:strchars(str) abort - return strlen(substitute(copy(a:str), '.', 'x', 'g')) - endfunction -endif "}}} - -" Returns the bool of contains any multibyte character in s:str -function! s:contains_multibyte(str) abort "{{{ - return strlen(a:str) != s:strchars(a:str) -endfunction "}}} - -" Remove last character from a:str. -" NOTE: This returns proper value -" even if a:str contains multibyte character(s). -function! s:chop(str) abort "{{{ - return substitute(a:str, '.$', '', '') -endfunction "}}} - -" Remove last \r,\n,\r\n from a:str. -function! s:chomp(str) abort "{{{ - return substitute(a:str, '\%(\r\n\|[\r\n]\)$', '', '') -endfunction "}}} - -" wrap() and its internal functions -" * _split_by_wcswidth_once() -" * _split_by_wcswidth() -" * _concat() -" * wrap() -" -" NOTE _concat() is just a copy of Data.List.concat(). -" FIXME don't repeat yourself -function! s:_split_by_wcswidth_once(body, x) abort - let fst = s:strwidthpart(a:body, a:x) - let snd = s:strwidthpart_reverse(a:body, s:wcswidth(a:body) - s:wcswidth(fst)) - return [fst, snd] -endfunction - -function! s:_split_by_wcswidth(body, x) abort - let memo = [] - let body = a:body - while s:wcswidth(body) > a:x - let [tmp, body] = s:_split_by_wcswidth_once(body, a:x) - call add(memo, tmp) - endwhile - call add(memo, body) - return memo -endfunction - -function! s:trim(str) abort - return matchstr(a:str,'^\s*\zs.\{-}\ze\s*$') -endfunction - -function! s:trim_start(str) abort - return matchstr(a:str,'^\s*\zs.\{-}$') -endfunction - -function! s:trim_end(str) abort - return matchstr(a:str,'^.\{-}\ze\s*$') -endfunction - -function! s:wrap(str,...) abort - let _columns = a:0 > 0 ? a:1 : &columns - return s:L.concat( - \ map(split(a:str, '\r\n\|[\r\n]'), 's:_split_by_wcswidth(v:val, _columns - 1)')) -endfunction - -function! s:nr2byte(nr) abort - if a:nr < 0x80 - return nr2char(a:nr) - elseif a:nr < 0x800 - return nr2char(a:nr/64+192).nr2char(a:nr%64+128) - else - return nr2char(a:nr/4096%16+224).nr2char(a:nr/64%64+128).nr2char(a:nr%64+128) - endif -endfunction - -function! s:nr2enc_char(charcode) abort - if &encoding ==# 'utf-8' - return nr2char(a:charcode) - endif - let char = s:nr2byte(a:charcode) - if strlen(char) > 1 - let char = strtrans(iconv(char, 'utf-8', &encoding)) - endif - return char -endfunction - -function! s:nr2hex(nr) abort - let n = a:nr - let r = '' - while n - let r = '0123456789ABCDEF'[n % 16] . r - let n = n / 16 - endwhile - return r -endfunction - -" If a ==# b, returns -1. -" If a !=# b, returns first index of different character. -function! s:diffidx(a, b) abort - return a:a ==# a:b ? -1 : strlen(s:common_head([a:a, a:b])) -endfunction - -function! s:substitute_last(expr, pat, sub) abort - return substitute(a:expr, printf('.*\zs%s', a:pat), a:sub, '') -endfunction - -function! s:dstring(expr) abort - let x = substitute(string(a:expr), "^'\\|'$", '', 'g') - let x = substitute(x, "''", "'", 'g') - return printf('"%s"', escape(x, '"')) -endfunction - -function! s:lines(str) abort - return split(a:str, '\r\?\n') -endfunction - -function! s:_pad_with_char(str, left, right, char) abort - return repeat(a:char, a:left). a:str. repeat(a:char, a:right) -endfunction - -function! s:pad_left(str, width, ...) abort - let char = get(a:, 1, ' ') - if strdisplaywidth(char) != 1 - throw "vital: Data.String: Can't use non-half-width characters for padding." - endif - let left = max([0, a:width - strdisplaywidth(a:str)]) - return s:_pad_with_char(a:str, left, 0, char) -endfunction - -function! s:pad_right(str, width, ...) abort - let char = get(a:, 1, ' ') - if strdisplaywidth(char) != 1 - throw "vital: Data.String: Can't use non-half-width characters for padding." - endif - let right = max([0, a:width - strdisplaywidth(a:str)]) - return s:_pad_with_char(a:str, 0, right, char) -endfunction - -function! s:pad_both_sides(str, width, ...) abort - let char = get(a:, 1, ' ') - if strdisplaywidth(char) != 1 - throw "vital: Data.String: Can't use non-half-width characters for padding." - endif - let space = max([0, a:width - strdisplaywidth(a:str)]) - let left = space / 2 - let right = space - left - return s:_pad_with_char(a:str, left, right, char) -endfunction - -function! s:pad_between_letters(str, width, ...) abort - let char = get(a:, 1, ' ') - if strdisplaywidth(char) != 1 - throw "vital: Data.String: Can't use non-half-width characters for padding." - endif - let letters = split(a:str, '\zs') - let each_width = a:width / len(letters) - let str = join(map(letters, 's:pad_both_sides(v:val, each_width, char)'), '') - if a:width - strdisplaywidth(str) > 0 - return char. s:pad_both_sides(str, a:width - 1, char) - endif - return str -endfunction - -function! s:justify_equal_spacing(str, width, ...) abort - let char = get(a:, 1, ' ') - if strdisplaywidth(char) != 1 - throw "vital: Data.String: Can't use non-half-width characters for padding." - endif - let letters = split(a:str, '\zs') - let first_letter = letters[0] - " {width w/o the first letter} / {length w/o the first letter} - let each_width = (a:width - strdisplaywidth(first_letter)) / (len(letters) - 1) - let remainder = (a:width - strdisplaywidth(first_letter)) % (len(letters) - 1) - return first_letter. join(s:L.concat([ -\ map(letters[1:remainder], 's:pad_left(v:val, each_width + 1, char)'), -\ map(letters[remainder + 1:], 's:pad_left(v:val, each_width, char)') -\ ]), '') -endfunction - -function! s:levenshtein_distance(str1, str2) abort - let letters1 = split(a:str1, '\zs') - let letters2 = split(a:str2, '\zs') - let length1 = len(letters1) - let length2 = len(letters2) - let distances = map(range(1, length1 + 1), 'map(range(1, length2 + 1), ''0'')') - - for i1 in range(0, length1) - let distances[i1][0] = i1 - endfor - for i2 in range(0, length2) - let distances[0][i2] = i2 - endfor - - for i1 in range(1, length1) - for i2 in range(1, length2) - let cost = (letters1[i1 - 1] ==# letters2[i2 - 1]) ? 0 : 1 - - let distances[i1][i2] = min([ - \ distances[i1 - 1][i2 ] + 1, - \ distances[i1 ][i2 - 1] + 1, - \ distances[i1 - 1][i2 - 1] + cost, - \]) - endfor - endfor - - return distances[length1][length2] -endfunction - -function! s:padding_by_displaywidth(expr, width, float) abort - let padding_char = ' ' - let n = a:width - strdisplaywidth(a:expr) - if n <= 0 - let n = 0 - endif - if a:float < 0 - return a:expr . repeat(padding_char, n) - elseif 0 < a:float - return repeat(padding_char, n) . a:expr - else - if n % 2 is 0 - return repeat(padding_char, n / 2) . a:expr . repeat(padding_char, n / 2) - else - return repeat(padding_char, (n - 1) / 2) . a:expr . repeat(padding_char, (n - 1) / 2) . padding_char - endif - endif -endfunction - -function! s:split_by_displaywidth(expr, width, float, is_wrap) abort - if a:width is 0 - return [''] - endif - - let lines = [] - - let cs = split(a:expr, '\zs') - let cs_index = 0 - - let text = '' - while cs_index < len(cs) - if cs[cs_index] is# "\n" - let text = s:padding_by_displaywidth(text, a:width, a:float) - let lines += [text] - let text = '' - else - let w = strdisplaywidth(text . cs[cs_index]) - - if w < a:width - let text .= cs[cs_index] - elseif a:width < w - let text = s:padding_by_displaywidth(text, a:width, a:float) - else - let text .= cs[cs_index] - endif - - if a:width <= w - let lines += [text] - let text = '' - if a:is_wrap - if a:width < w - if a:width < strdisplaywidth(cs[cs_index]) - while get(cs, cs_index, "\n") isnot# "\n" - let cs_index += 1 - endwhile - continue - else - let text = cs[cs_index] - endif - endif - else - while get(cs, cs_index, "\n") isnot# "\n" - let cs_index += 1 - endwhile - continue - endif - endif - - endif - let cs_index += 1 - endwhile - - if !empty(text) - let lines += [ s:padding_by_displaywidth(text, a:width, a:float) ] - endif - - return lines -endfunction - -function! s:hash(str) abort - if exists('*sha256') - return sha256(a:str) - else - " This gives up sha256ing but just adds up char with index. - let sum = 0 - for i in range(len(a:str)) - let sum += char2nr(a:str[i]) * (i + 1) - endfor - - return printf('%x', sum) - endif -endfunction - -function! s:truncate(str, width) abort - " Original function is from mattn. - " http://github.com/mattn/googlereader-vim/tree/master - - if a:str =~# '^[\x00-\x7f]*$' - return len(a:str) < a:width ? - \ printf('%-'.a:width.'s', a:str) : strpart(a:str, 0, a:width) - endif - - let ret = a:str - let width = s:wcswidth(a:str) - if width > a:width - let ret = s:strwidthpart(ret, a:width) - let width = s:wcswidth(ret) - endif - - if width < a:width - let ret .= repeat(' ', a:width - width) - endif - - return ret -endfunction - -function! s:truncate_skipping(str, max, footer_width, separator) abort - let width = s:wcswidth(a:str) - if width <= a:max - let ret = a:str - else - let header_width = a:max - s:wcswidth(a:separator) - a:footer_width - let ret = s:strwidthpart(a:str, header_width) . a:separator - \ . s:strwidthpart_reverse(a:str, a:footer_width) - endif - return s:truncate(ret, a:max) -endfunction - -function! s:strwidthpart(str, width) abort - if a:width <= 0 - return '' - endif - let strarr = split(a:str, '\zs') - let width = s:wcswidth(a:str) - let index = len(strarr) - let diff = (index + 1) / 2 - let rightindex = index - 1 - while width > a:width - let index = max([rightindex - diff + 1, 0]) - let partwidth = s:wcswidth(join(strarr[(index):(rightindex)], '')) - if width - partwidth >= a:width || diff <= 1 - let width -= partwidth - let rightindex = index - 1 - endif - if diff > 1 - let diff = diff / 2 - endif - endwhile - return index ? join(strarr[:index - 1], '') : '' -endfunction - -function! s:strwidthpart_reverse(str, width) abort - if a:width <= 0 - return '' - endif - let strarr = split(a:str, '\zs') - let width = s:wcswidth(a:str) - let strlen = len(strarr) - let diff = (strlen + 1) / 2 - let leftindex = 0 - let index = -1 - while width > a:width - let index = min([leftindex + diff, strlen]) - 1 - let partwidth = s:wcswidth(join(strarr[(leftindex):(index)], '')) - if width - partwidth >= a:width || diff <= 1 - let width -= partwidth - let leftindex = index + 1 - endif - if diff > 1 - let diff = diff / 2 - endif - endwhile - return index < strlen ? join(strarr[(index + 1):], '') : '' -endfunction - -if v:version >= 703 - " Use builtin function. - function! s:wcswidth(str) abort - return strwidth(a:str) - endfunction -else - function! s:wcswidth(str) abort - if a:str =~# '^[\x00-\x7f]*$' - return strlen(a:str) - endif - let mx_first = '^\(.\)' - let str = a:str - let width = 0 - while 1 - let ucs = char2nr(substitute(str, mx_first, '\1', '')) - if ucs == 0 - break - endif - let width += s:_wcwidth(ucs) - let str = substitute(str, mx_first, '', '') - endwhile - return width - endfunction - - " UTF-8 only. - function! s:_wcwidth(ucs) abort - let ucs = a:ucs - if (ucs >= 0x1100 - \ && (ucs <= 0x115f - \ || ucs == 0x2329 - \ || ucs == 0x232a - \ || (ucs >= 0x2e80 && ucs <= 0xa4cf - \ && ucs != 0x303f) - \ || (ucs >= 0xac00 && ucs <= 0xd7a3) - \ || (ucs >= 0xf900 && ucs <= 0xfaff) - \ || (ucs >= 0xfe30 && ucs <= 0xfe6f) - \ || (ucs >= 0xff00 && ucs <= 0xff60) - \ || (ucs >= 0xffe0 && ucs <= 0xffe6) - \ || (ucs >= 0x20000 && ucs <= 0x2fffd) - \ || (ucs >= 0x30000 && ucs <= 0x3fffd) - \ )) - return 2 - endif - return 1 - endfunction -endif - -function! s:remove_ansi_sequences(text) abort - return substitute(a:text, '\e\[\%(\%(\d;\)\?\d\{1,2}\)\?[mK]', '', 'g') -endfunction - -function! s:escape_pattern(str) abort - " escape characters for no-magic - return escape(a:str, '^$~.*[]\') -endfunction - -function! s:unescape_pattern(str) abort - " unescape characters for no-magic - return s:unescape(a:str, '^$~.*[]\') -endfunction - -function! s:unescape(str, chars) abort - let chars = map(split(a:chars, '\zs'), 'escape(v:val, ''^$~.*[]\'')') - return substitute(a:str, '\\\(' . join(chars, '\|') . '\)', '\1', 'g') -endfunction - -function! s:iconv(expr, from, to) abort - if a:from ==# '' || a:to ==# '' || a:from ==? a:to - return a:expr - endif - let result = iconv(a:expr, a:from, a:to) - return empty(result) ? a:expr : result -endfunction - -" NOTE: -" A definition of a TEXT file is "A file that contains characters organized -" into one or more lines." -" A definition of a LINE is "A sequence of zero or more non- s -" plus a terminating " -" That's why {stdin} always ends with ideally. However, there are -" some programs which does not follow the POSIX rule and a Vim's way to join -" List into TEXT; join({text}, "\n"); does not add to the end of -" the last line. -" That's why add a trailing if it does not exist. -" REF: -" http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_392 -" http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_205 -" :help split() -" NOTE: -" it does nothing if the text is a correct POSIX text -function! s:repair_posix_text(text, ...) abort - let newline = get(a:000, 0, "\n") - return a:text =~# '\n$' ? a:text : a:text . newline -endfunction - -" NOTE: -" A definition of a TEXT file is "A file that contains characters organized -" into one or more lines." -" A definition of a LINE is "A sequence of zero or more non- s -" plus a terminating " -" REF: -" http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_392 -" http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_205 -function! s:join_posix_lines(lines, ...) abort - let newline = get(a:000, 0, "\n") - return join(a:lines, newline) . newline -endfunction - -" NOTE: -" A definition of a TEXT file is "A file that contains characters organized -" into one or more lines." -" A definition of a LINE is "A sequence of zero or more non- s -" plus a terminating " -" TEXT into List; split({text}, '\r\?\n', 1); add an extra empty line at the -" end of List because the end of TEXT ends with and keepempty=1 is -" specified. (btw. keepempty=0 cannot be used because it will remove -" emptylines in the head and the tail). -" That's why removing a trailing before proceeding to 'split' is required -" REF: -" http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_392 -" http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_205 -function! s:split_posix_text(text, ...) abort - let newline = get(a:000, 0, '\r\?\n') - let text = substitute(a:text, newline . '$', '', '') - return split(text, newline, 1) -endfunction - -let &cpo = s:save_cpo -unlet s:save_cpo -" vim:set et ts=2 sts=2 sw=2 tw=0: === modified file 'vim/bundle/vimshell.vim/autoload/vital/_vimshell/Prelude.vim' --- vim/bundle/vimshell.vim/autoload/vital/_vimshell/Prelude.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vital/_vimshell/Prelude.vim 2015-08-25 11:01:00 +0000 @@ -1,34 +1,25 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_vimshell#Prelude#import() abort - return map({'escape_pattern': '', 'is_funcref': '', 'path2directory': '', 'wcswidth': '', 'is_string': '', 'input_helper': '', 'is_number': '', 'is_cygwin': '', 'path2project_directory': '', 'strwidthpart_reverse': '', 'input_safe': '', 'is_list': '', 'truncate_skipping': '', 'glob': '', 'truncate': '', 'is_dict': '', 'set_default': '', 'is_numeric': '', 'getchar_safe': '', 'substitute_path_separator': '', 'is_mac': '', 'strwidthpart': '', 'getchar': '', 'is_unix': '', 'is_windows': '', 'globpath': '', 'escape_file_searching': '', 'is_float': '', 'smart_execute_command': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_vimshell#Prelude#import() abort', printf("return map({'escape_pattern': '', 'is_funcref': '', 'path2directory': '', 'wcswidth': '', 'is_string': '', 'input_helper': '', 'is_number': '', 'is_cygwin': '', 'path2project_directory': '', 'strwidthpart_reverse': '', 'input_safe': '', 'is_list': '', 'truncate_skipping': '', 'glob': '', 'truncate': '', 'is_dict': '', 'set_default': '', 'is_numeric': '', 'getchar_safe': '', 'substitute_path_separator': '', 'is_mac': '', 'strwidthpart': '', 'getchar': '', 'is_unix': '', 'is_windows': '', 'globpath': '', 'escape_file_searching': '', 'is_float': '', 'smart_execute_command': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ let s:save_cpo = &cpo set cpo&vim +" glob() wrapper which returns List +" and 'wildignore' does not affect +" this function's return value. if v:version ># 703 || \ (v:version is 703 && has('patch465')) - function! s:glob(expr) abort + function! s:glob(expr) return glob(a:expr, 1, 1) endfunction else - function! s:glob(expr) abort + function! s:glob(expr) let R = glob(a:expr, 1) return split(R, '\n') endfunction endif -function! s:globpath(path, expr) abort +" globpath() wrapper which returns List +" and 'suffixes' and 'wildignore' does not affect +" this function's return value. +function! s:globpath(path, expr) let R = globpath(a:path, a:expr, 1) return split(R, '\n') endfunction @@ -42,7 +33,7 @@ \ s:__TYPE_DICT, \ s:__TYPE_FLOAT] = [ \ type(3), - \ type(''), + \ type(""), \ type(function('tr')), \ type([]), \ type({}), @@ -51,41 +42,44 @@ " This doesn't match to anything. " Number or Float -function! s:is_numeric(Value) abort +function! s:is_numeric(Value) let _ = type(a:Value) return _ ==# s:__TYPE_NUMBER \ || _ ==# s:__TYPE_FLOAT endfunction " Number -function! s:is_number(Value) abort +function! s:is_number(Value) return type(a:Value) ==# s:__TYPE_NUMBER endfunction " Float -function! s:is_float(Value) abort +function! s:is_float(Value) return type(a:Value) ==# s:__TYPE_FLOAT endfunction " String -function! s:is_string(Value) abort +function! s:is_string(Value) return type(a:Value) ==# s:__TYPE_STRING endfunction " Funcref -function! s:is_funcref(Value) abort +function! s:is_funcref(Value) return type(a:Value) ==# s:__TYPE_FUNCREF endfunction " List -function! s:is_list(Value) abort +function! s:is_list(Value) return type(a:Value) ==# s:__TYPE_LIST endfunction " Dictionary -function! s:is_dict(Value) abort +function! s:is_dict(Value) return type(a:Value) ==# s:__TYPE_DICT endfunction -function! s:truncate_skipping(str, max, footer_width, separator) abort - call s:_warn_deprecated('truncate_skipping', 'Data.String.truncate_skipping') +function! s:truncate_smart(str, max, footer_width, separator) + echoerr 'Prelude.truncate_smart() is obsolete. Use its truncate_skipping() instead; they are equivalent.' + return s:truncate_skipping(a:str, a:max, a:footer_width, a:separator) +endfunction +function! s:truncate_skipping(str, max, footer_width, separator) let width = s:wcswidth(a:str) if width <= a:max let ret = a:str @@ -98,12 +92,10 @@ return s:truncate(ret, a:max) endfunction -function! s:truncate(str, width) abort +function! s:truncate(str, width) " Original function is from mattn. " http://github.com/mattn/googlereader-vim/tree/master - call s:_warn_deprecated('truncate', 'Data.String.truncate') - if a:str =~# '^[\x00-\x7f]*$' return len(a:str) < a:width ? \ printf('%-'.a:width.'s', a:str) : strpart(a:str, 0, a:width) @@ -123,9 +115,7 @@ return ret endfunction -function! s:strwidthpart(str, width) abort - call s:_warn_deprecated('strwidthpart', 'Data.String.strwidthpart') - +function! s:strwidthpart(str, width) if a:width <= 0 return '' endif @@ -139,9 +129,7 @@ return ret endfunction -function! s:strwidthpart_reverse(str, width) abort - call s:_warn_deprecated('strwidthpart_reverse', 'Data.String.strwidthpart_reverse') - +function! s:strwidthpart_reverse(str, width) if a:width <= 0 return '' endif @@ -158,14 +146,11 @@ if v:version >= 703 " Use builtin function. - function! s:wcswidth(str) abort - call s:_warn_deprecated('wcswidth', 'Data.String.wcswidth') + function! s:wcswidth(str) return strwidth(a:str) endfunction else - function! s:wcswidth(str) abort - call s:_warn_deprecated('wcswidth', 'Data.String.wcswidth') - + function! s:wcswidth(str) if a:str =~# '^[\x00-\x7f]*$' return strlen(a:str) end @@ -185,7 +170,7 @@ endfunction " UTF-8 only. - function! s:_wcwidth(ucs) abort + function! s:_wcwidth(ucs) let ucs = a:ucs if (ucs >= 0x1100 \ && (ucs <= 0x115f @@ -214,90 +199,100 @@ \ (!isdirectory('/proc') && executable('sw_vers'))) let s:is_unix = has('unix') -function! s:is_windows() abort +function! s:is_windows() return s:is_windows endfunction -function! s:is_cygwin() abort +function! s:is_cygwin() return s:is_cygwin endfunction -function! s:is_mac() abort +function! s:is_mac() return s:is_mac endfunction -function! s:is_unix() abort +function! s:is_unix() return s:is_unix endfunction -function! s:_warn_deprecated(name, alternative) abort - try - echohl Error - echomsg 'Prelude.' . a:name . ' is deprecated! Please use ' . a:alternative . ' instead.' - finally - echohl None - endtry -endfunction - -function! s:smart_execute_command(action, word) abort - execute a:action . ' ' . (a:word ==# '' ? '' : '`=a:word`') -endfunction - -function! s:escape_file_searching(buffer_name) abort +function! s:_deprecated(fname, newname) + echomsg printf("Vital.Prelude.%s is deprecated! Please use %s instead.", + \ a:fname, a:newname) +endfunction + +function! s:print_error(message) + call s:_deprecated('print_error', 'Vital.Vim.Message.error') + + echohl ErrorMsg + for m in split(a:message, "\n") + echomsg m + endfor + echohl None +endfunction + +function! s:smart_execute_command(action, word) + execute a:action . ' ' . (a:word == '' ? '' : '`=a:word`') +endfunction + +function! s:escape_file_searching(buffer_name) return escape(a:buffer_name, '*[]?{}, ') endfunction -function! s:escape_pattern(str) abort - call s:_warn_deprecated( - \ 'escape_pattern', - \ 'Data.String.escape_pattern', - \) +function! s:escape_pattern(str) return escape(a:str, '~"\.^$[]*') endfunction -function! s:getchar(...) abort +function! s:getchar(...) let c = call('getchar', a:000) return type(c) == type(0) ? nr2char(c) : c endfunction -function! s:getchar_safe(...) abort +function! s:getchar_safe(...) let c = s:input_helper('getchar', a:000) - return type(c) == type('') ? c : nr2char(c) + return type(c) == type("") ? c : nr2char(c) endfunction -function! s:input_safe(...) abort +function! s:input_safe(...) return s:input_helper('input', a:000) endfunction -function! s:input_helper(funcname, args) abort +function! s:input_helper(funcname, args) let success = 0 if inputsave() !=# success - throw 'vital: Prelude: inputsave() failed' + throw 'inputsave() failed' endif try return call(a:funcname, a:args) finally if inputrestore() !=# success - throw 'vital: Prelude: inputrestore() failed' + throw 'inputrestore() failed' endif endtry endfunction -function! s:set_default(var, val) abort +function! s:set_default(var, val) if !exists(a:var) || type({a:var}) != type(a:val) let {a:var} = a:val endif endfunction -function! s:substitute_path_separator(path) abort +function! s:set_dictionary_helper(variable, keys, pattern) + for key in split(a:keys, '\s*,\s*') + if !has_key(a:variable, key) + let a:variable[key] = a:pattern + endif + endfor +endfunction + +function! s:substitute_path_separator(path) return s:is_windows ? substitute(a:path, '\\', '/', 'g') : a:path endfunction -function! s:path2directory(path) abort +function! s:path2directory(path) return s:substitute_path_separator(isdirectory(a:path) ? a:path : fnamemodify(a:path, ':p:h')) endfunction -function! s:_path2project_directory_git(path) abort +function! s:_path2project_directory_git(path) let parent = a:path while 1 @@ -313,13 +308,13 @@ endwhile endfunction -function! s:_path2project_directory_svn(path) abort +function! s:_path2project_directory_svn(path) let search_directory = a:path let directory = '' let find_directory = s:escape_file_searching(search_directory) let d = finddir('.svn', find_directory . ';') - if d ==# '' + if d == '' return '' endif @@ -329,28 +324,28 @@ let parent_directory = s:path2directory( \ fnamemodify(directory, ':h')) - if parent_directory !=# '' + if parent_directory != '' let d = finddir('.svn', parent_directory . ';') - if d !=# '' + if d != '' let directory = s:_path2project_directory_svn(parent_directory) endif endif return directory endfunction -function! s:_path2project_directory_others(vcs, path) abort +function! s:_path2project_directory_others(vcs, path) let vcs = a:vcs let search_directory = a:path let find_directory = s:escape_file_searching(search_directory) let d = finddir(vcs, find_directory . ';') - if d ==# '' + if d == '' return '' endif return fnamemodify(d, ':p:h:h') endfunction -function! s:path2project_directory(path, ...) abort +function! s:path2project_directory(path, ...) let is_allow_empty = get(a:000, 0, 0) let search_directory = s:path2directory(a:path) let directory = '' @@ -364,25 +359,25 @@ else let directory = s:_path2project_directory_others(vcs, search_directory) endif - if directory !=# '' + if directory != '' break endif endfor " Search project file. - if directory ==# '' + if directory == '' for d in ['build.xml', 'prj.el', '.project', 'pom.xml', 'package.json', \ 'Makefile', 'configure', 'Rakefile', 'NAnt.build', \ 'P4CONFIG', 'tags', 'gtags'] let d = findfile(d, s:escape_file_searching(search_directory) . ';') - if d !=# '' + if d != '' let directory = fnamemodify(d, ':p:h') break endif endfor endif - if directory ==# '' + if directory == '' " Search /src/ directory. let base = s:substitute_path_separator(search_directory) if base =~# '/src/' @@ -390,7 +385,7 @@ endif endif - if directory ==# '' && !is_allow_empty + if directory == '' && !is_allow_empty " Use original path. let directory = search_directory endif === modified file 'vim/bundle/vimshell.vim/autoload/vital/_vimshell/Process.vim' --- vim/bundle/vimshell.vim/autoload/vital/_vimshell/Process.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vital/_vimshell/Process.vim 2015-08-25 11:01:00 +0000 @@ -1,18 +1,3 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_vimshell#Process#import() abort - return map({'shellescape': '', 'has_vimproc': '', 'system': '', 'iconv': '', 'spawn': '', 'get_last_status': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_vimshell#Process#import() abort', printf("return map({'shellescape': '', 'has_vimproc': '', 'system': '', 'iconv': '', 'spawn': '', 'get_last_status': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ " TODO: move all comments to doc file. " " @@ -27,26 +12,33 @@ " Because these variables are used when this script file is loaded. let s:is_windows = has('win16') || has('win32') || has('win64') || has('win95') let s:is_unix = has('unix') -" As of 7.4.122, the system()'s 1st argument is converted internally by Vim. -" Note that Patch 7.4.122 does not convert system()'s 2nd argument and -" return-value. We must convert them manually. -let s:need_trans = v:version < 704 || (v:version == 704 && !has('patch122')) - -let s:TYPE_DICT = type({}) -let s:TYPE_LIST = type([]) -let s:TYPE_STRING = type('') - -function! s:spawn(expr, ...) abort + + +" Execute program in the background from Vim. +" Return an empty string always. +" +" If a:expr is a List, shellescape() each argument. +" If a:expr is a String, the arguments are passed as-is. +" +" Windows: +" Using :!start , execute program without via cmd.exe. +" Spawning 'expr' with 'noshellslash' +" keep special characters from unwanted expansion. +" (see :help shellescape()) +" +" Unix: +" using :! , execute program in the background by shell. +function! s:spawn(expr, ...) let shellslash = 0 if s:is_windows let shellslash = &l:shellslash setlocal noshellslash endif try - if type(a:expr) is s:TYPE_LIST + if type(a:expr) is type([]) let special = 1 let cmdline = join(map(a:expr, 'shellescape(v:val, special)'), ' ') - elseif type(a:expr) is s:TYPE_STRING + elseif type(a:expr) is type("") let cmdline = a:expr if a:0 && a:1 " for :! command @@ -69,16 +61,16 @@ endfunction " iconv() wrapper for safety. -function! s:iconv(expr, from, to) abort - if a:from ==# '' || a:to ==# '' || a:from ==? a:to +function! s:iconv(expr, from, to) + if a:from == '' || a:to == '' || a:from ==? a:to return a:expr endif let result = iconv(a:expr, a:from, a:to) - return result !=# '' ? result : a:expr + return result != '' ? result : a:expr endfunction " Check vimproc. -function! s:has_vimproc() abort +function! s:has_vimproc() if !exists('s:exists_vimproc') try call vimproc#version() @@ -96,20 +88,21 @@ " use_vimproc: bool, " input: string, " timeout: bool, -" background: bool, " } -function! s:system(str, ...) abort - " Process optional arguments at first - " because use_vimproc is required later - " for a:str argument. +function! s:system(str, ...) + if type(a:str) is type([]) + let command = join(map(copy(a:str), 's:shellescape(v:val)'), ' ') + elseif type(a:str) is type("") + let command = a:str + else + throw 'Process.system(): invalid argument (value type:'.type(a:str).')' + endif + let command = s:iconv(command, &encoding, 'char') let input = '' let use_vimproc = s:has_vimproc() - let background = 0 - let args = [] + let args = [command] if a:0 ==# 1 - " {command} [, {dict}] - " a:1 = {dict} - if type(a:1) is s:TYPE_DICT + if type(a:1) is type({}) if has_key(a:1, 'use_vimproc') let use_vimproc = a:1.use_vimproc endif @@ -120,56 +113,37 @@ " ignores timeout unless you have vimproc. let args += [a:1.timeout] endif - if has_key(a:1, 'background') - let background = a:1.background - endif - elseif type(a:1) is s:TYPE_STRING - let args += [s:iconv(a:1, &encoding, 'char')] - else - throw 'Process.system(): invalid argument (value type:'.type(a:1).')' endif elseif a:0 >= 2 - " {command} [, {input} [, {timeout}]] - " a:000 = [{input} [, {timeout}]] let [input; rest] = a:000 - let input = s:iconv(input, &encoding, 'char') + let input = s:iconv(a:1, &encoding, 'char') let args += [input] + rest endif - " Process a:str argument. - if type(a:str) is s:TYPE_LIST - let expr = use_vimproc ? '"''" . v:val . "''"' : 's:shellescape(v:val)' - let command = join(map(copy(a:str), expr), ' ') - elseif type(a:str) is s:TYPE_STRING - let command = a:str + if use_vimproc + " vimproc's parser seems to treat # as a comment + let args[0] = escape(args[0], '#') + let funcname = 'vimproc#system' else - throw 'Process.system(): invalid argument (value type:'.type(a:str).')' - endif - if s:need_trans - let command = s:iconv(command, &encoding, 'char') - endif - let args = [command] + args - if background && (use_vimproc || !s:is_windows) - let args[0] = args[0] . ' &' - endif - - let funcname = use_vimproc ? 'vimproc#system' : 'system' + let funcname = 'system' + endif let output = call(funcname, args) let output = s:iconv(output, 'char', &encoding) + return output endfunction -function! s:get_last_status() abort +function! s:get_last_status() return s:has_vimproc() ? \ vimproc#get_last_status() : v:shell_error endfunction if s:is_windows - function! s:shellescape(command) abort + function! s:shellescape(command) return substitute(a:command, '[&()[\]{}^=;!''+,`~]', '^\0', 'g') endfunction else - function! s:shellescape(...) abort + function! s:shellescape(...) return call('shellescape', a:000) endfunction endif === modified file 'vim/bundle/vimshell.vim/autoload/vital/_vimshell/Vim/Buffer.vim' --- vim/bundle/vimshell.vim/autoload/vital/_vimshell/Vim/Buffer.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vital/_vimshell/Vim/Buffer.vim 2015-08-25 11:01:00 +0000 @@ -1,49 +1,27 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_vimshell#Vim#Buffer#import() abort - return map({'_vital_depends': '', 'read_content': '', 'get_selected_text': '', 'is_cmdwin': '', 'edit_content': '', 'open': '', 'get_last_selected': '', '_vital_loaded': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_vimshell#Vim#Buffer#import() abort', printf("return map({'_vital_depends': '', 'read_content': '', 'get_selected_text': '', 'is_cmdwin': '', 'edit_content': '', 'open': '', 'get_last_selected': '', '_vital_loaded': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ let s:save_cpo = &cpo set cpo&vim -function! s:_vital_loaded(V) abort +function! s:_vital_loaded(V) let s:V = a:V let s:P = s:V.import('Prelude') - let s:G = s:V.import('Vim.Guard') -endfunction - -function! s:_vital_depends() abort - return ['Prelude', 'Vim.Guard'] -endfunction - -if exists('*getcmdwintype') - function! s:is_cmdwin() abort - return getcmdwintype() !=# '' - endfunction -else - function! s:is_cmdwin() abort - return bufname('%') ==# '[Command Line]' - endfunction -endif - -function! s:open(buffer, opener) abort +endfunction + +function! s:_vital_depends() + return ['Prelude'] +endfunction + +function! s:is_cmdwin() + return bufname('%') ==# '[Command Line]' +endfunction + +function! s:open(buffer, opener) let save_wildignore = &wildignore let &wildignore = '' try if s:P.is_funcref(a:opener) let loaded = !bufloaded(a:buffer) call a:opener(a:buffer) - elseif a:buffer is 0 || a:buffer is# '' + elseif a:buffer is 0 || a:buffer is '' let loaded = 1 silent execute a:opener enew @@ -64,95 +42,19 @@ return loaded endfunction -function! s:get_selected_text(...) abort - echohl WarningMsg - echom "[WARN] s:get_selected_text() is deprecated. Use 's:get_last_selected()'." - echohl None - return call('s:get_last_selected', a:000) -endfunction +" Get selected text in visual mode. +function! s:get_selected_text() + let save_z = getreg('z', 1) + let save_z_type = getregtype('z') -" Get the last selected text in visual mode -" without using |gv| to avoid |textlock|. -" NOTE: -" * This function uses |gv| only when using |CTRL-V| -" because |gv| is the only way to get selected text -" when using $ . -" Please see #192 for the details. -" * If you don't care about |textlock|, -" you can use simple version of this function. -" https://github.com/vim-jp/vital.vim/commit/39aae80f3839fdbeebd838ff14d87327a6b889a9 -function! s:get_last_selected() abort - if visualmode() ==# "\" - let save = getreg('"', 1) - let save_type = getregtype('"') try - normal! gv""y - return @" + normal! gv"zy + return @z finally - call setreg('"', save, save_type) + call setreg('z', save_z, save_z_type) endtry - else - let [begin, end] = [getpos("'<"), getpos("'>")] - let lastchar = matchstr(getline(end[1])[end[2]-1 :], '.') - if begin[1] ==# end[1] - let lines = [getline(begin[1])[begin[2]-1 : end[2]-2]] - else - let lines = [getline(begin[1])[begin[2]-1 :]] - \ + (end[1] - begin[1] <# 2 ? [] : getline(begin[1]+1, end[1]-1)) - \ + [getline(end[1])[: end[2]-2]] - endif - return join(lines, "\n") . lastchar . (visualmode() ==# 'V' ? "\n" : '') - endif -endfunction - -function! s:read_content(content, ...) abort - let options = extend({ - \ 'tempfile': '', - \ 'fileformat': '', - \ 'encoding': '', - \ 'binary': 0, - \ 'nobinary': 0, - \ 'bad': '', - \ 'edit': 0, - \}, get(a:000, 0, {})) - let tempfile = empty(options.tempfile) ? tempname() : options.tempfile - let optnames = [ - \ empty(options.fileformat) ? '' : '++ff=' . options.fileformat, - \ empty(options.encoding) ? '' : '++enc=' . options.encoding, - \ empty(options.binary) ? '' : '++bin', - \ empty(options.nobinary) ? '' : '++nobin', - \ empty(options.bad) ? '' : '++bad=' . options.bad, - \ empty(options.edit) ? '' : '++edit', - \] - let optname = join(filter(optnames, '!empty(v:val)')) - try - call writefile(a:content, tempfile) - execute printf('keepalt keepjumps read %s%s', - \ empty(optname) ? '' : optname . ' ', - \ fnameescape(tempfile), - \) - finally - call delete(tempfile) - endtry -endfunction - -function! s:edit_content(content, ...) abort - let options = extend({ - \ 'edit': 1, - \}, get(a:000, 0, {})) - let guard = s:G.store('&l:modifiable') - let saved_view = winsaveview() - try - let &l:modifiable=1 - silent keepjumps %delete _ - silent call s:read_content(a:content, options) - silent keepjumps 1delete _ - finally - keepjump call winrestview(saved_view) - call guard.restore() - endtry - setlocal nomodified -endfunction +endfunction + let &cpo = s:save_cpo unlet s:save_cpo === removed file 'vim/bundle/vimshell.vim/autoload/vital/_vimshell/Vim/Guard.vim' --- vim/bundle/vimshell.vim/autoload/vital/_vimshell/Vim/Guard.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vital/_vimshell/Vim/Guard.vim 1970-01-01 00:00:00 +0000 @@ -1,235 +0,0 @@ -" ___vital___ -" NOTE: lines between '" ___vital___' is generated by :Vitalize. -" Do not mofidify the code nor insert new lines before '" ___vital___' -if v:version > 703 || v:version == 703 && has('patch1170') - function! vital#_vimshell#Vim#Guard#import() abort - return map({'_vital_depends': '', '_vital_created': '', 'store': '', '_vital_loaded': ''}, 'function("s:" . v:key)') - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - execute join(['function! vital#_vimshell#Vim#Guard#import() abort', printf("return map({'_vital_depends': '', '_vital_created': '', 'store': '', '_vital_loaded': ''}, \"function('%s_' . v:key)\")", s:_SID()), 'endfunction'], "\n") - delfunction s:_SID -endif -" ___vital___ -let s:save_cpo = &cpo -set cpo&vim - -" Use a Funcref as a special term _UNDEFINED -function! s:_undefined() abort - return 'undefined' -endfunction -let s:_UNDEFINED = function('s:_undefined') - -function! s:_vital_loaded(V) abort - let s:V = a:V - let s:Prelude = s:V.import('Prelude') - let s:List = s:V.import('Data.List') - let s:Dict = s:V.import('Data.Dict') -endfunction -function! s:_vital_depends() abort - return ['Prelude', 'Data.List', 'Data.Dict'] -endfunction -function! s:_vital_created(module) abort - " define constant variables - if !exists('s:const') - let s:const = {} - let s:const.is_local_variable_supported = - \ v:version > 703 || (v:version == 703 && has('patch560')) - " NOTE: - " The third argument is available from 7.4.242 but it had bug and that - " bug was fixed from 7.4.513 - let s:const.is_third_argument_of_getreg_supported = has('patch-7.4.513') - lockvar s:const - endif - call extend(a:module, s:const) -endfunction -function! s:_throw(msg) abort - throw printf('vital: Vim.Guard: %s', a:msg) -endfunction - -let s:option = {} -function! s:_new_option(name) abort - if a:name !~# '^&' - call s:_throw(printf( - \'An option name "%s" requires to be started from "&"', a:name - \)) - elseif !exists(a:name) - call s:_throw(printf( - \'An option name "%s" does not exist', a:name - \)) - endif - let option = copy(s:option) - let option.name = a:name - let option.value = eval(a:name) - return option -endfunction -function! s:option.restore() abort - execute printf('let %s = %s', self.name, string(self.value)) -endfunction - -let s:register = {} -function! s:_new_register(name) abort - if len(a:name) != 2 - call s:_throw(printf( - \'A register name "%s" requires to be "@" + a single character', a:name - \)) - elseif a:name !~# '^@' - call s:_throw(printf( - \'A register name "%s" requires to be started from "@"', a:name - \)) - elseif a:name =~# '^@[:.%]$' - call s:_throw(printf( - \'A register name "%s" is read only', a:name - \)) - elseif a:name !~# '^@[@0-9a-zA-Z#=*+~_/-]$' - call s:_throw(printf( - \'A register name "%s" does not exist. See ":help let-register"', a:name - \)) - endif - let name = a:name ==# '@@' ? '' : a:name[1] - let register = copy(s:register) - let register.name = name - if s:const.is_third_argument_of_getreg_supported - let register.value = getreg(name, 1, 1) - else - let register.value = getreg(name, 1) - endif - let register.type = getregtype(name) - return register -endfunction -function! s:register.restore() abort - call setreg(self.name, self.value, self.type) -endfunction - -let s:environment = {} -function! s:_new_environment(name) abort - if a:name !~# '^\$' - call s:_throw(printf( - \'An environment variable name "%s" requires to be started from "$"', a:name - \)) - elseif !exists(a:name) - call s:_throw(printf( - \'An environment variable name "%s" does not exist. While Vim cannot unlet environment variable, it requires to exist', a:name - \)) - endif - let environment = copy(s:environment) - let environment.name = a:name - let environment.value = eval(a:name) - return environment -endfunction -function! s:environment.restore() abort - execute printf('let %s = %s', self.name, string(self.value)) -endfunction - -let s:variable = {} -function! s:_new_variable(name, ...) abort - if a:0 == 0 - let m = matchlist(a:name, '^\([bwtg]:\)\(.*\)$') - if empty(m) - call s:_throw(printf( - \ join([ - \ 'An variable name "%s" requires to start from b:, w:, t:, or g:', - \ 'while no {namespace} is specified', - \ ]), - \ a:name, - \)) - endif - let [prefix, name] = m[1 : 2] - let namespace = eval(prefix) - else - let name = a:name - let namespace = a:1 - endif - let variable = copy(s:variable) - let variable.name = name - let variable.value = get(namespace, name, s:_UNDEFINED) - let variable.value = - \ type(variable.value) == type({}) || type(variable.value) == type([]) - \ ? deepcopy(variable.value) - \ : variable.value - let variable._namespace = namespace - return variable -endfunction -function! s:variable.restore() abort - " unlet the variable to prevent variable type mis-match in case - silent! unlet! self._namespace[self.name] - if type(self.value) == type(s:_UNDEFINED) && self.value == s:_UNDEFINED - " do nothing, leave the variable as undefined - else - let self._namespace[self.name] = self.value - endif -endfunction - -let s:instance = {} -function! s:_new_instance(instance, ...) abort - let shallow = get(a:000, 0, 0) - if !s:Prelude.is_list(a:instance) && !s:Prelude.is_dict(a:instance) - call s:_throw(printf( - \'An instance "%s" requires to be List or Dictionary', string(a:instance) - \)) - endif - let instance = copy(s:instance) - let instance.instance = a:instance - let instance.values = shallow ? copy(a:instance) : deepcopy(a:instance) - return instance -endfunction -function! s:instance.restore() abort - if s:Prelude.is_list(self.instance) - call s:List.clear(self.instance) - else - call s:Dict.clear(self.instance) - endif - call extend(self.instance, self.values) -endfunction - -let s:guard = {} -function! s:store(...) abort - let resources = [] - for meta in a:000 - if s:Prelude.is_list(meta) - if len(meta) == 1 - call add(resources, s:_new_instance(meta[0])) - elseif len(meta) == 2 - if s:Prelude.is_string(meta[0]) - call add(resources, call('s:_new_variable', meta)) - else - call add(resources, call('s:_new_instance', meta)) - endif - else - call s:_throw('List assignment requires one or two elements') - endif - elseif type(meta) == type('') - if meta =~# '^[bwtgls]:' - " Note: - " To improve an error message, handle l:XXX or s:XXX as well - call add(resources, s:_new_variable(meta)) - elseif meta =~# '^&' - call add(resources, s:_new_option(meta)) - elseif meta =~# '^@' - call add(resources, s:_new_register(meta)) - elseif meta =~# '^\$' - call add(resources, s:_new_environment(meta)) - else - call s:_throw(printf( - \ 'Unknown value "%s" was specified', - \ meta - \)) - endif - endif - unlet meta - endfor - let guard = copy(s:guard) - let guard._resources = resources - return guard -endfunction -function! s:guard.restore() abort - for resource in self._resources - call resource.restore() - endfor -endfunction - -let &cpo = s:save_cpo -unlet! s:save_cpo -" vim:set et ts=2 sts=2 sw=2 tw=0 fdm=marker: === removed file 'vim/bundle/vimshell.vim/autoload/vital/vimshell.vim' --- vim/bundle/vimshell.vim/autoload/vital/vimshell.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vital/vimshell.vim 1970-01-01 00:00:00 +0000 @@ -1,305 +0,0 @@ -let s:plugin_name = expand(':t:r') -let s:vital_base_dir = expand(':h') -let s:project_root = expand(':h:h:h') -let s:has_latest_module = isdirectory(expand(':h') . '/__latest__') -let s:is_vital_vim = s:plugin_name is# '_latest__' - -let s:loaded = {} -let s:cache_sid = {} - -" function() wrapper -if v:version > 703 || v:version == 703 && has('patch1170') - function! s:_function(fstr) abort - return function(a:fstr) - endfunction -else - function! s:_SID() abort - return matchstr(expand(''), '\zs\d\+\ze__SID$') - endfunction - let s:_s = '' . s:_SID() . '_' - function! s:_function(fstr) abort - return function(substitute(a:fstr, 's:', s:_s, 'g')) - endfunction -endif - -function! vital#{s:plugin_name}#of() abort - return s:new(s:plugin_name) -endfunction - -let s:Vital = {} - -function! s:new(plugin_name) abort - let base = deepcopy(s:Vital) - let base.plugin_name = a:plugin_name - return base -endfunction - -function! s:vital_files() abort - if !exists('s:vital_files') - let s:vital_files = map( - \ s:is_vital_vim ? s:_global_vital_files() : s:_self_vital_files(), - \ 'fnamemodify(v:val, ":p:gs?[\\\\/]?/?")') - endif - return copy(s:vital_files) -endfunction -let s:Vital.vital_files = s:_function('s:vital_files') - -function! s:import(name, ...) abort dict - let target = {} - let functions = [] - for a in a:000 - if type(a) == type({}) - let target = a - elseif type(a) == type([]) - let functions = a - endif - unlet a - endfor - let module = self._import(a:name) - if empty(functions) - call extend(target, module, 'keep') - else - for f in functions - if has_key(module, f) && !has_key(target, f) - let target[f] = module[f] - endif - endfor - endif - return target -endfunction -let s:Vital.import = s:_function('s:import') - -function! s:load(...) abort dict - for arg in a:000 - let [name; as] = type(arg) == type([]) ? arg[: 1] : [arg, arg] - let target = split(join(as, ''), '\W\+') - let dict = self - let dict_type = type({}) - while !empty(target) - let ns = remove(target, 0) - if !has_key(dict, ns) - let dict[ns] = {} - endif - if type(dict[ns]) == dict_type - let dict = dict[ns] - else - unlet dict - break - endif - endwhile - if exists('dict') - call extend(dict, self._import(name)) - endif - unlet arg - endfor - return self -endfunction -let s:Vital.load = s:_function('s:load') - -function! s:unload() abort dict - let s:loaded = {} - let s:cache_sid = {} - unlet! s:vital_files -endfunction -let s:Vital.unload = s:_function('s:unload') - -function! s:exists(name) abort dict - let b = exists(printf('*vital#_%s#%s#import', self.plugin_name, substitute(a:name, '\.', '#', 'g'))) - if b - return b - endif - let name_path = substitute(a:name, '\.', '/', 'g') - let path = printf('%s/_%s/%s.vim', s:vital_base_dir, self.plugin_name, name_path) - let b = filereadable(path) - if b - return b - endif - let path = printf('%s/_%s/%s.vim', s:vital_base_dir, '_latest__', name_path) - let b = filereadable(path) -endfunction -let s:Vital.exists = s:_function('s:exists') - -function! s:search(pattern) abort dict - let paths = s:_extract_files(a:pattern, self.vital_files()) - let modules = sort(map(paths, 's:_file2module(v:val)')) - return s:_uniq(modules) -endfunction -let s:Vital.search = s:_function('s:search') - -function! s:_self_vital_files() abort - let builtin = printf('%s/__%s__/', s:vital_base_dir, s:plugin_name) - let installed = printf('%s/_%s/', s:vital_base_dir, s:plugin_name) - let base = builtin . ',' . installed - return split(globpath(base, '**/*.vim', 1), "\n") -endfunction - -function! s:_global_vital_files() abort - let pattern = 'autoload/vital/__latest__/**/*.vim' - return split(globpath(&runtimepath, pattern, 1), "\n") -endfunction - -function! s:_extract_files(pattern, files) abort - let tr = {'.': '/', '*': '[^/]*', '**': '.*'} - let target = substitute(a:pattern, '\.\|\*\*\?', '\=tr[submatch(0)]', 'g') - let regexp = printf('autoload/vital/[^/]\+/%s.vim$', target) - return filter(a:files, 'v:val =~# regexp') -endfunction - -function! s:_file2module(file) abort - let filename = fnamemodify(a:file, ':p:gs?[\\/]?/?') - let tail = matchstr(filename, 'autoload/vital/_\w\+/\zs.*\ze\.vim$') - return join(split(tail, '[\\/]\+'), '.') -endfunction - -" @param {string} name e.g. Data.List -function! s:_import(name) abort dict - if has_key(s:loaded, a:name) - return copy(s:loaded[a:name]) - endif - let module = self._get_module(a:name) - if has_key(module, '_vital_created') - call module._vital_created(module) - endif - let export_module = filter(copy(module), 'v:key =~# "^\\a"') - " Cache module before calling module.vital_loaded() to avoid cyclic - " dependences but remove the cache if module._vital_loaded() fails. - " let s:loaded[a:name] = export_module - let s:loaded[a:name] = export_module - if has_key(module, '_vital_loaded') - try - call module._vital_loaded(vital#{s:plugin_name}#of()) - catch - unlet s:loaded[a:name] - throw 'vital: fail to call ._vital_loaded(): ' . v:exception - endtry - endif - return copy(s:loaded[a:name]) -endfunction -let s:Vital._import = s:_function('s:_import') - -" s:_get_module() returns module object wihch has all script local functions. -function! s:_get_module(name) abort dict - try - let module = vital#_{self.plugin_name}#{substitute(a:name, '\.', '#', 'g')}#import() - catch /E117: Unknown function:/ - if !s:has_latest_module - throw 'vital: module not found: ' . a:name - endif - " Retry to support loading self modules. - let module = s:_get_latest_module(a:name) - endtry - return module -endfunction -let s:Vital._get_module = s:_function('s:_get_module') - -function! s:_get_latest_module(name) abort - return s:sid2sfuncs(s:_module_sid(a:name)) -endfunction - -function! s:_module_sid(name) abort - let module_path = substitute(a:name, '\.', '/', 'g') . '.vim' - let module_rel_path = 'autoload/vital/__*__/' . module_path - let module_full_path = s:_unify_path(get(split(globpath(s:_module_sid_base_dir(), module_rel_path, 1), "\n"), 0, '')) - if !filereadable(module_full_path) - throw 'vital: module not found: ' . a:name - endif - let p = substitute('autoload/vital/__\w\+__/' . module_path, '/', '[/\\\\]\\+', 'g') - let sid = s:_sid(module_full_path, p) - if !sid - call s:_source(module_full_path) - let sid = s:_sid(module_full_path, p) - if !sid - throw 'vital: cannot get from path' - endif - endif - return sid -endfunction - -function! s:_module_sid_base_dir() abort - return s:is_vital_vim ? &rtp : s:project_root -endfunction - -function! s:_source(path) abort - execute 'source' fnameescape(a:path) -endfunction - -" @vimlint(EVL102, 1, l:_) -" @vimlint(EVL102, 1, l:__) -function! s:_sid(fullpath, filter_pattern) abort - if has_key(s:cache_sid, a:fullpath) - return s:cache_sid[a:fullpath] - endif - for line in filter(split(s:_redir(':scriptnames'), "\n"), 'v:val =~# a:filter_pattern') - let [_, sid, path; __] = matchlist(line, '^\s*\(\d\+\):\s\+\(.\+\)\s*$') - if s:_unify_path(path) is# a:fullpath - let s:cache_sid[a:fullpath] = sid - return s:cache_sid[a:fullpath] - endif - endfor - return 0 -endfunction - -function! s:_redir(cmd) abort - let [save_verbose, save_verbosefile] = [&verbose, &verbosefile] - set verbose=0 verbosefile= - redir => res - silent! execute a:cmd - redir END - let [&verbose, &verbosefile] = [save_verbose, save_verbosefile] - return res -endfunction - -if filereadable(expand(':r') . '.VIM') - let s:_unify_path_cache = {} - " resolve() is slow, so we cache results. - " Note: On windows, vim can't expand path names from 8.3 formats. - " So if getting full path via and $HOME was set as 8.3 format, - " vital load duplicated scripts. Below's :~ avoid this issue. - function! s:_unify_path(path) abort - if has_key(s:_unify_path_cache, a:path) - return s:_unify_path_cache[a:path] - endif - let value = tolower(fnamemodify(resolve(fnamemodify( - \ a:path, ':p')), ':~:gs?[\\/]?/?')) - let s:_unify_path_cache[a:path] = value - return value - endfunction -else - function! s:_unify_path(path) abort - return resolve(fnamemodify(a:path, ':p:gs?[\\/]?/?')) - endfunction -endif - -" copied and modified from Vim.ScriptLocal -let s:SNR = join(map(range(len("\")), '"[\\x" . printf("%0x", char2nr("\"[v:val])) . "]"'), '') -function! s:sid2sfuncs(sid) abort - let fs = split(s:_redir(printf(':function /^%s%s_', s:SNR, a:sid)), "\n") - let r = {} - let pattern = printf('\m^function\s%d_\zs\w\{-}\ze(', a:sid) - for fname in map(fs, 'matchstr(v:val, pattern)') - let r[fname] = function(s:_sfuncname(a:sid, fname)) - endfor - return r -endfunction - -"" Return funcname of script local functions with SID -function! s:_sfuncname(sid, funcname) abort - return printf('%s_%s', a:sid, a:funcname) -endfunction - -if exists('*uniq') - function! s:_uniq(list) abort - return uniq(a:list) - endfunction -else - function! s:_uniq(list) abort - let i = len(a:list) - 1 - while 0 < i - if a:list[i] ==# a:list[i - 1] - call remove(a:list, i) - endif - let i -= 1 - endwhile - return a:list - endfunction -endif === modified file 'vim/bundle/vimshell.vim/autoload/vital/vimshell.vital' --- vim/bundle/vimshell.vim/autoload/vital/vimshell.vital 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/autoload/vital/vimshell.vital 2015-08-25 11:01:00 +0000 @@ -1,8 +1,7 @@ vimshell -1a385f58a58571e4cb6309831ad4d7260180bc71 +450727f Prelude Vim.Buffer Data.List Process -Data.String === modified file 'vim/bundle/vimshell.vim/doc/vimshell.txt' --- vim/bundle/vimshell.vim/doc/vimshell.txt 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/doc/vimshell.txt 2015-08-25 11:01:00 +0000 @@ -401,8 +401,8 @@ g:vimshell_interactive_update_time When |vimshell-internal-iexe| is in Insert mode, this value controls the timing of auto update. - Note: |vimshell-internal-iexe| changes 'updatetime' based on - this value if Vim does not support |+timers|. + |vimshell-internal-iexe| changes 'updatetime' based on this + value. If it is 0, this feature is disabled. Default value is 200. @@ -563,9 +563,6 @@ (vimshell_interrupt) *(vimshell_interrupt)* Send interrupt. -(vimshell_send_eof) *(vimshell_send_eof)* - Send EOF. - (vimshell_insert_head) *(vimshell_insert_head)* *(vimshell_insert_enter)* (vimshell_insert_enter) @@ -653,11 +650,10 @@ Execute vimshell history by unite interface. Note: To use it, you must install |unite.vim| plugin. - *i_(vimshell_history_complete)* -(vimshell_history_complete) - Execute vimshell history by the completion interface. - Note: To use it, you must install |neocomplete| or |deoplete| - plugin. + *i_(vimshell_history_neocomplete)* +(vimshell_history_neocomplete) + Execute vimshell history by neocomplete interface. + Note: To use it, you must install |neocomplete| plugin. *vimshell_default_key_mappings* Normal mode default key mappings. @@ -693,8 +689,8 @@ -------- ----------------------------- (vimshell_enter) (vimshell_history_unite) -/ (vimshell_history_complete) -/ (vimshell_history_complete) +/ (vimshell_history_neocomplete) +/ (vimshell_history_neocomplete) (vimshell_command_complete) (vimshell_move_head) (vimshell_delete_backward_line) @@ -703,7 +699,6 @@ (other) (vimshell_push_current_line) (vimshell_insert_last_word) (vimshell_interrupt) - (vimshell_send_eof) (vimshell_delete_backward_char) (vimshell_delete_backward_char) (vimshell_delete_forward_line) @@ -1593,9 +1588,10 @@ Q: I want to execute history by completion interface. -A: You can use |(vimshell_history_complete)| mapping. +A: You can use |(vimshell_history_neocomplete)| mapping. +Note: |neocomplete| is required. > - imap (vimshell_history_complete) + imap (vimshell_history_neocomplete) < Q: vimshell does not use escape sequence color. === removed directory 'vim/bundle/vimshell.vim/ftdetect' === removed file 'vim/bundle/vimshell.vim/ftdetect/vimshrc.vim' --- vim/bundle/vimshell.vim/ftdetect/vimshrc.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/ftdetect/vimshrc.vim 1970-01-01 00:00:00 +0000 @@ -1,2 +0,0 @@ -" Detect vimshell rc file. -autocmd BufNewFile,BufRead *.vimsh,.vimshrc,vimshrc set filetype=vimshrc === modified file 'vim/bundle/vimshell.vim/plugin/vimshell.vim' --- vim/bundle/vimshell.vim/plugin/vimshell.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/plugin/vimshell.vim 2015-08-25 11:01:00 +0000 @@ -127,45 +127,31 @@ \ get(g:, 'vimshell_interactive_cygwin_home', '') "}}} -command! -nargs=? -complete=customlist,vimshell#complete - \ VimShell +command! -nargs=? -complete=customlist,vimshell#complete VimShell \ call s:call_vimshell({}, ) -command! -nargs=? -complete=customlist,vimshell#complete - \ VimShellCreate +command! -nargs=? -complete=customlist,vimshell#complete VimShellCreate \ call s:call_vimshell({'create' : 1}, ) -command! -nargs=? -complete=customlist,vimshell#complete - \ VimShellPop +command! -nargs=? -complete=customlist,vimshell#complete VimShellPop \ call s:call_vimshell({'toggle' : 1, 'popup' : 1}, ) -command! -nargs=? -complete=customlist,vimshell#complete - \ VimShellTab +command! -nargs=? -complete=customlist,vimshell#complete VimShellTab \ tabnew | call s:call_vimshell({'tab' : 1}, ) -command! -nargs=? -complete=customlist,vimshell#complete - \ VimShellCurrentDir +command! -nargs=? -complete=customlist,vimshell#complete VimShellCurrentDir \ call s:call_vimshell({}, . ' ' . getcwd()) -command! -nargs=? -complete=customlist,vimshell#complete - \ VimShellBufferDir +command! -nargs=? -complete=customlist,vimshell#complete VimShellBufferDir \ call s:call_vimshell({}, . ' ' . \ vimshell#util#substitute_path_separator( \ fnamemodify(bufname('%'), ':p:h'))) -command! -nargs=* - \ -complete=customlist,vimshell#helpers#vimshell_execute_complete - \ VimShellExecute +command! -nargs=* -complete=customlist,vimshell#helpers#vimshell_execute_complete VimShellExecute \ call s:vimshell_execute() -command! -nargs=* - \ -complete=customlist,vimshell#helpers#vimshell_execute_complete - \ VimShellInteractive +command! -nargs=* -complete=customlist,vimshell#helpers#vimshell_execute_complete VimShellInteractive \ call s:vimshell_interactive() -command! -range -nargs=? - \ VimShellSendString +command! -range -nargs=? VimShellSendString \ call vimshell#interactive#send_region(, , ) -command! -bar -complete=buffer -nargs=1 - \ VimShellSendBuffer +command! -complete=buffer -nargs=1 VimShellSendBuffer \ call vimshell#interactive#set_send_buffer() -command! -nargs=? -bar - \ VimShellClose - \ call vimshell#view#_close() +command! -nargs=? VimShellClose call vimshell#view#_close() " Plugin keymappings "{{{ nnoremap (vimshell_split_switch) @@ -179,7 +165,7 @@ "}}} " Command functions: -function! s:vimshell_execute(args) abort "{{{ +function! s:vimshell_execute(args) "{{{ let context = { \ 'has_head_spaces' : 0, \ 'is_interactive' : 0, @@ -204,7 +190,7 @@ return endtry endfunction"}}} -function! s:vimshell_interactive(args) abort "{{{ +function! s:vimshell_interactive(args) "{{{ if a:args == '' call vimshell#commands#iexe#define() @@ -242,7 +228,7 @@ endtry endfunction"}}} -function! s:call_vimshell(default, args) abort "{{{ +function! s:call_vimshell(default, args) "{{{ let args = [] let options = a:default for arg in split(a:args, '\%(\\\@ -# License: MIT license {{{ -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# }}} -#============================================================================= - -import re -import deoplete.util - -from .base import Base - -class Source(Base): - def __init__(self, vim): - Base.__init__(self, vim) - - self.name = 'vimshell_history' - self.mark = '[history]' - self.filetypes = ['vimshell'] - self.is_bytepos = True - self.rank = 500 - self.max_pattern_length = -1 - - def get_complete_position(self, context): - if not self.vim.call('vimshell#check_prompt'): - return -1 - return self.vim.call('vimshell#get_prompt_length') - - def gather_candidates(self, context): - return self.vim.call('vimshell#history#read') - === modified file 'vim/bundle/vimshell.vim/test/commands.vim' --- vim/bundle/vimshell.vim/test/commands.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/test/commands.vim 2015-08-25 11:01:00 +0000 @@ -1,7 +1,7 @@ let s:suite = themis#suite('parser') let s:assert = themis#helper('assert') -function! s:suite.internal() abort +function! s:suite.internal() VimShellCreate let $FOO = '' === modified file 'vim/bundle/vimshell.vim/test/config.vim' --- vim/bundle/vimshell.vim/test/config.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/test/config.vim 2015-08-25 11:01:00 +0000 @@ -1,7 +1,7 @@ let s:suite = themis#suite('parser') let s:assert = themis#helper('assert') -function! s:suite.prompt() abort +function! s:suite.prompt() let g:vimshell_prompt = "'% ' " let g:vimshell_secondary_prompt = 'aaa ' VimShellCreate -toggle @@ -17,7 +17,7 @@ let g:vimshell_user_prompt = "" endfunction -function! s:suite.options() abort +function! s:suite.options() VimShellCreate -toggle -prompt=foo\ bar call s:assert.equals(vimshell#get_prompt(), 'foo bar') VimShellCreate -toggle === modified file 'vim/bundle/vimshell.vim/test/parser.vim' --- vim/bundle/vimshell.vim/test/parser.vim 2016-08-04 08:15:51 +0000 +++ vim/bundle/vimshell.vim/test/parser.vim 2015-08-25 11:01:00 +0000 @@ -1,7 +1,7 @@ let s:suite = themis#suite('parser') let s:assert = themis#helper('assert') -function! s:suite.alias() abort +function! s:suite.alias() VimShellCreate call vimshell#set_alias('l2', 'll') call vimshell#set_alias('ll', 'ls -l') @@ -10,7 +10,7 @@ VimShellCreate -toggle endfunction -function! s:suite.getopt() abort +function! s:suite.getopt() call s:assert.equals(vimshell#parser#getopt(['foo', 'bar'], { \ 'noarg' : ['--insert'], \ }), [['foo', 'bar'], {}])