Re: New features to vote on and sponsoring
Is this close enough? :command BDP bp | bd # :command BDN bn | bd # Yes. Thanks :-) Nico --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
spend vs. spent
I saw the word spend being used and wondered why it wasn't being spelled as spent. I decided to grep both words in all '.c' files I could find. Here is a sample of the result: $ find|grep \\.c$|xargs grep [^u]spend ./src/eval.c:proftime_T uf_tm_total;/* time spend in function + children */ ./src/eval.c:proftime_T uf_tm_self; /* time spend in function itself */ ./src/eval.c:proftime_T *uf_tml_total; /* time spend in a line + children */ ./src/eval.c:proftime_T *uf_tml_self; /* time spend in a line itself */ ./src/ex_cmds2.c:proftime_T sn_pr_total;/* time spend in script + children */ ./src/ex_cmds2.c:proftime_T sn_pr_self; /* time spend in script itself */ ./src/ex_cmds2.c:proftime_T sn_prl_total; /* time spend in a line + children */ ./src/ex_cmds2.c:proftime_T sn_prl_self;/* time spend in a line itself */ ./src/ex_cmds2.c: /* Grow the array before starting the timer, so that the time spend $ find|grep \\.c$|xargs grep spent ./src/eval.c:proftime_T uf_tm_children; /* time spent in children this call */ ./src/eval.c:proftime_T uf_tml_children; /* time spent in children for this line */ ./src/eval.c:proftime_T prof_child; /* time spent in a child */ ./src/eval.c: * Take care of time spent in a child. ./src/ex_cmds2.c:proftime_T sn_prl_children; /* time spent in children for this line */ ./src/ex_cmds2.c: * Count time spent in children after invoking another script or function. ./src/syntax.c: * To reduce the time spent in keepend(), remember at which level in the state IMO it is: To spend - spending - spent It's not in a real bug in the program source, but ... Adri --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Patch 7.1.235
Alexei Alexandrov wrote: Bram Moolenaar wrote: Patch 7.1.235 Problem:Pattern matching is slow when using a lot of simple patterns. Solution: Avoid allocating memory by not freeing it when it's not so much. (Alexei Alexandrov) Files: src/regexp.c Thanks a lot! You had to rework it somewhat as I can see, right? The only essential thing I added was freeing reg_tofree when it's long. I'm also curious what happens with the DFA regexp engine rework? It's still being worked on. It's probably not going to help for simple patterns, might even make it slower. But it will help a lot for patterns with things like .*. -- (letter from Mark to Mike, about the film's probable certificate) For an 'A' we would have to: Lose as many shits as possible; Take Jesus Christ out, if possible; Loose I fart in your general direction; Lose the oral sex; Lose oh, fuck off; Lose We make castanets out of your testicles Monty Python and the Holy Grail PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: spend vs. spent
Adri Verhoef wrote: I saw the word spend being used and wondered why it wasn't being spelled as spent. I decided to grep both words in all '.c' files I could find. Here is a sample of the result: $ find|grep \\.c$|xargs grep [^u]spend ./src/eval.c:proftime_T uf_tm_total;/* time spend in function + children */ ./src/eval.c:proftime_T uf_tm_self; /* time spend in function itself */ ./src/eval.c:proftime_T *uf_tml_total; /* time spend in a line + children */ ./src/eval.c:proftime_T *uf_tml_self; /* time spend in a line itself */ ./src/ex_cmds2.c:proftime_T sn_pr_total;/* time spend in script + children */ ./src/ex_cmds2.c:proftime_T sn_pr_self; /* time spend in script itself */ ./src/ex_cmds2.c:proftime_T sn_prl_total; /* time spend in a line + children */ ./src/ex_cmds2.c:proftime_T sn_prl_self;/* time spend in a line itself */ ./src/ex_cmds2.c: /* Grow the array before starting the timer, so that the time spend $ find|grep \\.c$|xargs grep spent ./src/eval.c:proftime_T uf_tm_children; /* time spent in children this call */ ./src/eval.c:proftime_T uf_tml_children; /* time spent in children for this line */ ./src/eval.c:proftime_T prof_child; /* time spent in a child */ ./src/eval.c: * Take care of time spent in a child. ./src/ex_cmds2.c:proftime_T sn_prl_children; /* time spent in children for this line */ ./src/ex_cmds2.c: * Count time spent in children after invoking another script or function. ./src/syntax.c: * To reduce the time spent in keepend(), remember at which level in the state IMO it is: To spend - spending - spent It's not in a real bug in the program source, but ... Yes, this was a typo. Thanks. -- Corn oil comes from corn and olive oil comes from olives, so where does baby oil come from? /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: How to save a UTF-8 file on Windows using a non-ASCII name
This is vim-dev maillist, better sending your question to [EMAIL PROTECTED] . PS. If you wanna save a UTF-8 content file, just :set fenc=utf-8 but not enc=utf-8. Good Luck! On 1/20/08, Fan Decheng [EMAIL PROTECTED] wrote: Here I mean on the Windows platform, using Vim 6.4 or 7.1. I've encountered this problem several times, but don't know whether there is a solution: 1. Use gvim to open a file with Chinese characters in its name. For example: 测 试.txt . 2. Type :set enc=utf-8 (without quotes). 3. Type :e to make the file content displayed using utf-8. 4. Type :wq to save the file. After these steps, the file is saved in the name ²âÊÔ.txt rather than the original name. Another thing that went wrong is 测试.txt.swp is left undeleted. I looked for any file name encoding options in vim but failed to find anything. Any ideas? -- Fan Decheng (Robbie Mosaic) [EMAIL PROTECTED] -- leal @ www.leal.cn --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: How to save a UTF-8 file on Windows using a non-ASCII name
Hi Fan, On Jan 20, 2008 3:03 PM, Fan Decheng [EMAIL PROTECTED] wrote: Here I mean on the Windows platform, using Vim 6.4 or 7.1. I've encountered this problem several times, but don't know whether there is a solution: 1. Use gvim to open a file with Chinese characters in its name. For example: 测 试.txt . 2. Type :set enc=utf-8 (without quotes). Here is a snippet from the Vim's reference: NOTE: Changing this option will not change the encoding of the existing text in Vim. It may cause non-ASCII text to become invalid. It should normally be kept at its default value, or set when Vim starts up. See |multibyte|. To reload the menus see |:menutrans|. Personally I think this should be a bug of Vim. However, as it had already been well-documented, I think you should follow the principles. 3. Type :e to make the file content displayed using utf-8. 4. Type :wq to save the file. After these steps, the file is saved in the name ²âÊÔ.txt rather than the original name. Another thing that went wrong is 测试.txt.swp is left undeleted. I looked for any file name encoding options in vim but failed to find anything. Please carefully read the documentations of the following options: fencs fenc encoding termencoding Any ideas? -- Fan Decheng (Robbie Mosaic) [EMAIL PROTECTED] Regards, L. F. --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: How to save a UTF-8 file on Windows using a non-ASCII name
Linxiao wrote: This is vim-dev maillist, better sending your question to [EMAIL PROTECTED] . PS. If you wanna save a UTF-8 content file, just :set fenc=utf-8 but not enc=utf-8. Good Luck! Tt, tt, tt... If 'encoding' is other than UTF-8 (or GB18030), Vim cannot represent all Unicode codepoints in memory; therefore, if you try to edit a UTF-8 file you run the risk of losing part of the data. (If you set 'enc' to UTF-16, UCS-2 or UCS-4 aka UTF-32, with any endianness, what Vim will use is actually UTF-8.) To edit UTF-8 data you should have both 'encoding' (= memory representation of the data) and 'fileencoding (= disk representation of the data) set to UTF-8. On 1/20/08, Fan Decheng [EMAIL PROTECTED] wrote: Here I mean on the Windows platform, using Vim 6.4 or 7.1. I've encountered this problem several times, but don't know whether there is a solution: 1. Use gvim to open a file with Chinese characters in its name. For example: 测 试.txt . 2. Type :set enc=utf-8 (without quotes). 3. Type :e to make the file content displayed using utf-8. 4. Type :wq to save the file. After these steps, the file is saved in the name ²âÊÔ.txt rather than the original name. Another thing that went wrong is 测试.txt.swp is left undeleted. I looked for any file name encoding options in vim but failed to find anything. Any ideas? -- Fan Decheng (Robbie Mosaic) [EMAIL PROTECTED] Best regards, Tony. -- During a grouse hunt in North Carolina two intrepid sportsmen were blasting away at a clump of trees near a stone wall. Suddenly a red-faced country squire popped his head over the wall and shouted, Hey, you almost hit my wife. Did I? cried the hunter, aghast. Terribly sorry. Have a shot at mine, over there. --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: How to save a UTF-8 file on Windows using a non-ASCII name
Hi Tony, On Jan 21, 2008 11:41 AM, Tony Mechelynck [EMAIL PROTECTED] wrote: Linxiao wrote: [...] Tt, tt, tt... If 'encoding' is other than UTF-8 (or GB18030), Vim cannot represent all Unicode codepoints in memory; therefore, if you try to edit a UTF-8 file you run the risk of losing part of the data. (If you set 'enc' to UTF-16, UCS-2 or UCS-4 aka UTF-32, with any endianness, what Vim will use is actually UTF-8.) I'm familiar with different shapes of malformed characters. In fact the *thread-host*'s problem was not caused by the code points losing. ²âÊÔ was generated by the following steps: 1. At first, the thread-host represents 测试 in GBK encoding. 2. Then he re-sets the encoding to UTF-8. So the filename information in Vim gets lost. Vim re-interprets the filename as Latin-1. 3. Vim converts the latin-1 string to UTF-8. 4. Vim saves the file to the disk with the new name. Windows will convert the UTF-8 string to UCS, of course. Now the new filename is exactly ²âÊÔ. Here is the illustration (my system charset is UTF-8): [EMAIL PROTECTED] ~]$ echo 测试 | iconv -f utf-8 -t gbk | iconv -f latin1 -t utf-8 ²âÊÔ To edit UTF-8 data you should have both 'encoding' (= memory representation of the data) and 'fileencoding (= disk representation of the data) set to UTF-8. [...] Best regards, Tony. -- During a grouse hunt in North Carolina two intrepid sportsmen were blasting away at a clump of trees near a stone wall. Suddenly a red-faced country squire popped his head over the wall and shouted, Hey, you almost hit my wife. Did I? cried the hunter, aghast. Terribly sorry. Have a shot at mine, over there. Regards, L. F. --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: How to save a UTF-8 file on Windows using a non-ASCII name
On Jan 21, 11:41 am, Tony Mechelynck [EMAIL PROTECTED] wrote: Linxiao wrote: This is vim-dev maillist, better sending your question to [EMAIL PROTECTED] . PS. If you wanna save a UTF-8 content file, just :set fenc=utf-8 but not enc=utf-8. Good Luck! Tt, tt, tt... If 'encoding' is other than UTF-8 (or GB18030), Vim cannot represent all Unicode codepoints in memory; therefore, if you try to edit a UTF-8 file you run the risk of losing part of the data. (If you set 'enc' to UTF-16, UCS-2 or UCS-4 aka UTF-32, with any endianness, what Vim will use is actually UTF-8.) To edit UTF-8 data you should have both 'encoding' (= memory representation of the data) and 'fileencoding (= disk representation of the data) set to UTF-8. Best regards, Tony. Thanks! I tried these: D:\testgvim :set fenc=utf-8 :set enc=utf-8 :e 测试.txt E37: No write since last change (add ! to override) :e! 测试.txt :set fenc? fileencoding=utf-8 :set enc? encoding=utf-8 It is all-right. Note that in the above test I opened gvim with an empty buffer first. Another test shows some problems that I should take care: D:\testgvim 测试.txt :set fenc? fileencoding= :set enc? enc=cp936 Of course, under this situation the file contents are in a wrong encoding. Then I tried these: :set enc=utf-8 After this, the window title has changed to: b2e2cad4.txt (D:\test) - GVIM :set fenc? fileencoding= :set enc? encoding=utf-8 I proceed with: :e The window title became: b2e2cad4.txt = (D:\test) - GVIM :set fenc? fileencoding=utf-8 :set enc? encoding=utf-8 However as I observed, the file name of the .swp file is still .测试.txt.swp. To make the window title correct and make the file non-read-only (writable), I typed: :e 测试.txt A new buffer is opened and the window title changed back to the original: 测试.txt = (D:\test) - GVIM Now every write to the file is OK. However after exiting gvim, the swap file is still there. Sorry for writing this long, just for some reference. I've read the help for `fencs', but I did't find it helpful to this situation. --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: How to save a UTF-8 file on Windows using a non-ASCII name
On Jan 21, 11:43 am, Edward L. Fox [EMAIL PROTECTED] wrote: Hi Fan, On Jan 20, 2008 3:03 PM, Fan Decheng [EMAIL PROTECTED] wrote: Here I mean on the Windows platform, using Vim 6.4 or 7.1. I've encountered this problem several times, but don't know whether there is a solution: 1. Use gvim to open a file with Chinese characters in its name. For example: 测 试.txt . 2. Type :set enc=utf-8 (without quotes). Here is a snippet from the Vim's reference: NOTE: Changing this option will not change the encoding of the existing text in Vim. It may cause non-ASCII text to become invalid. It should normally be kept at its default value, or set when Vim starts up. See |multibyte|. To reload the menus see |:menutrans|. Thanks. It seems that setting `encoding' before opening the file works. --~--~-~--~~~---~--~~ You received this message from the vim_dev maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---