Friday, March 15, 2019

Re: Keeping endofline representation in xml fileformat dos file

Le vendredi 15 mars 2019 14:50:35 UTC+1, niva...@gmail.com a écrit :
> Le vendredi 15 mars 2019 10:46:51 UTC+1, Christian Brabandt a écrit :
> > On Do, 14 Mär 2019, nivaemail@gmail.com wrote:
> >
> > > Hi All,
> > >
> > >
> > > I'm wokring on that kind of files'content, initially configured with ff=dos, ffs=unix,dos
> > >
> > > <?xml version="1.0" encoding="utf-8"?>
> > > <PROP ID="script" VALUE="&apos; Init properties
> > > Option Explicit
> > >
> > > Dim varName1, vaName2
> > > Dim nameOfBar
> > > &apos; array creation of components
> > > fnameOfBar = split(Parent.somefoobar, &quot;|&quot;)
> > > "/>
> > >
> > >
> > > 1/ Instead of the whole content up above, I see only one line with ^M in place of endline CR LF.
> > >
> > >
> > > 2/ Copying this inline containing ^M in new buffer opened with setlocal ffs=unix, I do this substitution %s/^M/^M/g
> > >
> > > Then I see all content in different lines.
> > >
> > >
> > > 3/ After editing the script, I would like to restitute the modified content into original file in one line : all content inline with end of line replaced by ^M. As at the origin.
> > >
> > > But all attempts fails, even these that say to pass by changing ffs at opening time and writing time.
> > >
> > > https://stackoverflow.com/questions/3852868/how-to-make-vim-show-m-and-substitute-it
> > > https://superuser.com/questions/357760/vi-on-linux-show-m-line-endings-for-dos-format-files
> > >
> > >
> > > Is someone can give me right way to restitute the text content inline containing ^M displayed.
> >
> > Can you provide an example file?
> >
> >
> > Best,
> > Christian
> > --
> > Es ist nicht genug, der Natur die Daumenschrauben anzulegen.
> > Man muß auch hinhören, wenn sie aussagt.
> > -- Arthur Schopenhauer
>
> When I download attached file sample.xml, Vim open it in fileformat=dos and display ^M chars..
>
> Do you want another sample ?

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: