Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-4456

Please support obtaining the file markup format from vim modelines (BB-5100)

    XMLWordPrintable

Details

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      Right now, bitbucket can only display files with pretty specific (and custom) suffixes. It would be great if it could at least attempt a little to try to find out the file format by looking at its contents.

      AFAICS Pygments have no support for syntax coloring of markup files, so that shouldn't collide. I have been working on a [[https://bitbucket.org/mgorny/pymodeline/|modeline parser module]] for Python which could serve the purpose well. I will be happy to adjust the code to fit your needs.

      The use is quite straightforward:

      {{

      {\\ #!python import pymodeline ml = pymodeline.ModelineParser()\\ opts = ml.parse_buffer(f.read())\\ syn = opts.get('filetype', None) or opts.get('syntax', None) }

      }}

      Attachments

        Activity

          People

            Unassigned Unassigned
            5d60f5cce6bf mgorny
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: