Enable Syntax on Xml Large File only on drawed window

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Enable Syntax on Xml Large File only on drawed window

Ni Va
Hi,

After applying this http://vim.wikia.com/wiki/Faster_loading_of_large_files, my big xml file is quick loaded.

Then how can I set syn=xml only for drawed part of file in order to be as fast as possible to view colored part of file?

Thank you

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Enable Syntax on Xml Large File only on drawed window

Ben Fritz
On Tuesday, February 24, 2015 at 9:24:34 AM UTC-6, Ni Va wrote:
> Hi,
>
> After applying this http://vim.wikia.com/wiki/Faster_loading_of_large_files, my big xml file is quick loaded.
>
> Then how can I set syn=xml only for drawed part of file in order to be as fast as possible to view colored part of file?
>
> Thank you

You can't enable syntax highlighting for only part of a file. Syntax highlighting always applies to the entire file.

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Enable Syntax on Xml Large File only on drawed window

Gary Johnson-4
On 2015-02-24, Ben Fritz wrote:

> On Tuesday, February 24, 2015 at 9:24:34 AM UTC-6, Ni Va wrote:
> > Hi,
> >
> > After applying this
> > http://vim.wikia.com/wiki/Faster_loading_of_large_files, my big
> > xml file is quick loaded.
> >
> > Then how can I set syn=xml only for drawed part of file in order
> > to be as fast as possible to view colored part of file?
> >
> > Thank you
>
> You can't enable syntax highlighting for only part of a file.
> Syntax highlighting always applies to the entire file.

You can change where syntax synchronization starts, though, which
might help.  See

    :help :syn-sync

Regards,
Gary

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Enable Syntax on Xml Large File only on drawed window

Ethan Hereth
In reply to this post by Ben Fritz



On Tue, Feb 24, 2015 at 11:04 AM, Ben Fritz <[hidden email]> wrote:
On Tuesday, February 24, 2015 at 9:24:34 AM UTC-6, Ni Va wrote:
> Hi,
>
> After applying this http://vim.wikia.com/wiki/Faster_loading_of_large_files, my big xml file is quick loaded.
>
> Then how can I set syn=xml only for drawed part of file in order to be as fast as possible to view colored part of file?
>
> Thank you

You can't enable syntax highlighting for only part of a file. Syntax highlighting always applies to the entire file.

I don't know if this would be helpful or fit your work flow, but I just tried it and it seems to work ok with a C file anyway. You can try to use Christian Brabandt's NrrwRgn plugin to open the section of interest in a 'narrowed region' and then enable syntax highlighting in only that region. Doing this did not effect the syntax highlighting of the full file, only the narrowed section.

You might try it out and see if it suits your fancy.

Cheers,

Ethan Alan


--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Enable Syntax on Xml Large File only on drawed window

Ni Va
On Tuesday, February 24, 2015 at 5:26:52 PM UTC+1, Ethan Hereth wrote:

> On Tue, Feb 24, 2015 at 11:04 AM, Ben Fritz <[hidden email]> wrote:
> On Tuesday, February 24, 2015 at 9:24:34 AM UTC-6, Ni Va wrote:
>
> > Hi,
>
> >
>
> > After applying this http://vim.wikia.com/wiki/Faster_loading_of_large_files, my big xml file is quick loaded.
>
> >


>
> > Then how can I set syn=xml only for drawed part of file in order to be as fast as possible to view colored part of file?
>
> >
>
> > Thank you
>
>
>
> You can't enable syntax highlighting for only part of a file. Syntax highlighting always applies to the entire file.
>
>
>
> I don't know if this would be helpful or fit your work flow, but I just tried it and it seems to work ok with a C file anyway. You can try to use Christian Brabandt's NrrwRgn plugin to open the section of interest in a 'narrowed region' and then enable syntax highlighting in only that region. Doing this did not effect the syntax highlighting of the full file, only the narrowed section.
>
>
> You might try it out and see if it suits your fancy.
>
>
> Cheers,
>
>
> Ethan Alan
>
>
>
>
>
>
> --
>
> --
>
> 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 [hidden email].
>
> For more options, visit https://groups.google.com/d/optout.

Hi I resolevd it in vim74\syntax\xml.vim and just put maxlines=100

syn sync minlines=100
syn sync maxlines=100


Thank you !

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.