Loading ...
Sorry, an error occurred while loading the content.

96917RE: Vim Tips wiki celebrates with a CSV tip

Expand Messages
  • nh_wzg
    Oct 8, 2008
    • 0 Attachment
      John Beckett-2 wrote:
      >
      >
      > Can't you provide a simpler example? You should be able to make, say, a
      > four-line
      > example where each line is well under 70 characters.
      >
      > Then tell us exactly what command fails. Is it ":Sort 1" which attempts to
      > sort the
      > lines based on the value in column 1??
      >
      >
      Thanks for your reply.A simpler example:
      =====BEGIN=====
      md51,fullname1,fullname2
      44029A87AD3484711FACB7945D242A95,0401.CS_,0401.csv
      FFFBC075AA7E1756E35B5AF2E8BE7DEB,DISK.SY_,disk.sys
      FFF68CFBFA883D81731A6B344A25B782,CGA80852.FO_,cga80852.fon
      FFF5CBFC71FB5C80AAD9F834B3FB5062,IMESHARE.DL_,imeshare.dll
      FF9BDB807FC99B2B6156742AC2F9F2AB,COADMIN.DL_,coadmin.dll
      FFE31887684AED0F7B124378D942D3AC,CB32.EX_,cb32.exe
      FF5EA7161307D7170C39D31629239CDF,BOPOMOFO.UC_,bopomofo.UCE
      FF762A792EFCB11C917A2682352F71D1,HPCRDP.CA_,hpcrdp.cat
      FF04598C86B5DF9B78F122ABCB266790,AGT0419.HL_,Agt0419.hlp
      FF39047446FC1C46FC0C1FA4071063CB,DG18D50.IC_,Dg18d50.icm
      10D0BA441255894A51C8B3308EB11638,0410.CS_,0410.csv
      FF36362448658F15D2B6E3B593CA1B3F,BUSY_I.CU_,busy_i.cur
      FECC01645D83F150EBE2924887E30B91,DMUTIL.DL_,dmutil.dll
      FF6223C000741845CE8CD0C6336021D1,D3DXOF.DL_,d3dxof.dll
      45158FF10F952BCFC590ECB2C80D487E,0414.CS_,0414.csv
      FF32B826D2F3C5E41DCAF8B272AB0BF3,INETSRV.MI_,inetsrv.mib
      3ECA13B43EF48F80F0179856A73A3BA6,0416.CS_,0416.csv
      59D691289820021216E6CDCAD74743D4,0419.CS_,0419.csv
      FEC5273EB05873C93DA9BE16A94AEE94,AGT0401.DL_,Agt0401.dll
      FE82CCD0D5BD8F6FDE7D48252C25F271,CATSRVUT.DL_,catsrvut.dll
      FE97D798B2BC6CB4306B21E078AA6214,C_437.NL_,c_437.nls
      FE0399122F5DB5158E28AF73A1ED94A1,CDOSYS.DL_,cdosys.dll
      FE385CA3249BF6D30C031DEACE045AD3,DBMSRPCN.DL_,DBmsRPCn.dll
      =====END=====
      After the ":Sort 2",the result is:
      ====RESULT BEGIN=====
      md51,fullname1,fullname2
      44029A87AD3484711FACB7945D242A95,0401.CS_,0401.csv
      FEC5273EB05873C93DA9BE16A94AEE94,AGT0401.DL_,Agt0401.dll
      59D691289820021216E6CDCAD74743D4,0419.CS_,0419.csv
      3ECA13B43EF48F80F0179856A73A3BA6,0416.CS_,0416.csv
      45158FF10F952BCFC590ECB2C80D487E,0414.CS_,0414.csv
      FF36362448658F15D2B6E3B593CA1B3F,BUSY_I.CU_,busy_i.cur
      FF5EA7161307D7170C39D31629239CDF,BOPOMOFO.UC_,bopomofo.UCE
      10D0BA441255894A51C8B3308EB11638,0410.CS_,0410.csv
      FF04598C86B5DF9B78F122ABCB266790,AGT0419.HL_,Agt0419.hlp
      FE385CA3249BF6D30C031DEACE045AD3,DBMSRPCN.DL_,DBmsRPCn.dll
      FE0399122F5DB5158E28AF73A1ED94A1,CDOSYS.DL_,cdosys.dll
      FFE31887684AED0F7B124378D942D3AC,CB32.EX_,cb32.exe
      FE97D798B2BC6CB4306B21E078AA6214,C_437.NL_,c_437.nls
      FF6223C000741845CE8CD0C6336021D1,D3DXOF.DL_,d3dxof.dll
      FF9BDB807FC99B2B6156742AC2F9F2AB,COADMIN.DL_,coadmin.dll
      FE82CCD0D5BD8F6FDE7D48252C25F271,CATSRVUT.DL_,catsrvut.dll
      FF39047446FC1C46FC0C1FA4071063CB,DG18D50.IC_,Dg18d50.icm
      FFF68CFBFA883D81731A6B344A25B782,CGA80852.FO_,cga80852.fon
      FFFBC075AA7E1756E35B5AF2E8BE7DEB,DISK.SY_,disk.sys
      FECC01645D83F150EBE2924887E30B91,DMUTIL.DL_,dmutil.dll
      FF762A792EFCB11C917A2682352F71D1,HPCRDP.CA_,hpcrdp.cat
      FFF5CBFC71FB5C80AAD9F834B3FB5062,IMESHARE.DL_,imeshare.dll
      FF32B826D2F3C5E41DCAF8B272AB0BF3,INETSRV.MI_,inetsrv.mib
      ====RESULT END=====
      The sorted result of field 2 is wrong.But when I use about 4-lines example,
      the sorted result of field 2 is correct.
      It seems the field sort operation have some limits I can not figure out.
      --
      View this message in context: http://www.nabble.com/Vim-Tips-wiki-celebrates-with-a-CSV-tip-tp18768619p19890956.html
      Sent from the Vim - General mailing list archive at Nabble.com.


      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Show all 25 messages in this topic