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

Re: mixed filetypes (was: Smarter Indent)

Expand Messages
  • Yakov Lerner
    ... I believe this all can be done using CursorMoved event, in the script-land. An idea for ambitious plugin ? Yakov
    Message 1 of 1 , Sep 6, 2006
    • 0 Attachment
      On 9/6/06, Benji Fisher <benji@...> wrote:
      > On Wed, Sep 06, 2006 at 11:54:23AM +0000, Yakov Lerner wrote:
      > > On 8/7/06, Benji Fisher <benji@...> wrote:
      > > >
      > > > Let me take this opportunity to try once again to drum up support
      > > >for an idea that I have proposed before. IMO it is too restrictive to
      > > >make options (such as syntax highlighting, 'textwidth', and
      > > >indent-related options) apply to a whole file. There should be a
      > > >convenient, consistent way to tell vim to treat different sections of a
      > > >file as having different file types. Examples:
      > > >
      > > >* code snippets in an e-mail
      > > >* PHP in an HTML file (or vice-versa)
      > > >* perl/python/ruby inside a vim script
      > > >* comments, text, and math inside LaTeX/plain TeX/conTeXt
      > >
      > > True. I use perl -e perl scripts embedded into shell scripts,
      > > and I am missing perl syntax inside shell scripts. OTOH,
      > > it is possible in vim. What is missing here is some doc
      > > section in the syntax.vim doc. Doc sestion that'd describe
      > > the official recommended method of embedding one syntax
      > > (filetype) into another; like
      > > php syntax includes the html syntax.
      >
      > Syntax coloring can be made to work, but what about options, key
      > mappings, etc.? If you use omnicompletion in your perl files, wouldn't
      > you like it to work when you are embedding perl in a shell script?

      I believe this all can be done using CursorMoved event, in the script-land.
      An idea for ambitious plugin ?

      Yakov
    Your message has been successfully submitted and would be delivered to recipients shortly.