syntax for EOF ruby/python/other lang in vimscript

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

syntax for EOF ruby/python/other lang in vimscript

Ni Va
Hi,


Like :h ruby says, I use this kind of script ruby interface below.



How can i make vim switch automatically to ruby syntax in EOF section and rest of time stay in vim syntax ?
Thank you


Example Vim script: >

        function! RedGem()
        ruby << EOF
        class Garnet
                def initialize(s)
                        @buffer = Vim::Buffer.current
                        vimputs(s)
                end
                def vimputs(s)
                        @buffer.append(@buffer.count,s)
                end
        end
        gem = Garnet.new("pretty")
        EOF
        endfunction


--
--
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: syntax for EOF ruby/python/other lang in vimscript

Andy Wokula
Am 10.02.2018 um 17:40 schrieb Ni Va:

> Hi,
>
> Like :h ruby says, I use this kind of script ruby interface below.
>
> How can i make vim switch automatically to ruby syntax in EOF section and rest of time stay in vim syntax ?
> Thank you
>
>
> Example Vim script: >
>
> function! RedGem()
> ruby << EOF
> class Garnet
> def initialize(s)
> @buffer = Vim::Buffer.current
> vimputs(s)
> end
> def vimputs(s)
> @buffer.append(@buffer.count,s)
> end
> end
> gem = Garnet.new("pretty")
> EOF
> endfunction

Configurable:
     :h ft-vim-syntax

--
Andy

--
--
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: syntax for EOF ruby/python/other lang in vimscript

Ni Va

Thank y ou.


Le 10 févr. 2018 19:29, "'Andy Wokula' via vim_use" <[hidden email]> a écrit :
Am 10.02.2018 um 17:40 schrieb Ni Va:
Hi,

Like :h ruby says, I use this kind of script ruby interface below.

How can i make vim switch automatically to ruby syntax in EOF section and rest of time stay in vim syntax ?
Thank you


Example Vim script: >

        function! RedGem()
        ruby << EOF
        class Garnet
                def initialize(s)
                        @buffer = Vim::Buffer.current
                        vimputs(s)
                end
                def vimputs(s)
                        @buffer.append(@buffer.count,s)
                end
        end
        gem = Garnet.new("pretty")
        EOF
        endfunction

Configurable:
    :h ft-vim-syntax

--
Andy

--
--
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 a topic in the Google Groups "vim_use" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/Ce0aESekw8Q/unsubscribe.
To unsubscribe from this group and all its topics, 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.