Giter Club home page Giter Club logo

Comments (7)

cwegener avatar cwegener commented on August 30, 2024 1

Let me put it another way, why should a syntax highlighting plugin for vim involve itself with file encoding in the first place? I think that file encoding is a choice that each author makes themselves and the file encoding decisions should be separated from syntax highlighting.

from vim-ps1.

cwegener avatar cwegener commented on August 30, 2024

Can you please reverse PR#26 since the change in PR#26 is unduly impacting vim-ps1 users.
I have provided a solution to the problem reported by @anthony-geoghegan in PR#26.

from vim-ps1.

heaths avatar heaths commented on August 30, 2024

This is not forcing users to use UTF-8. Setting the BOM merely prefixes the script with the BOM of whatever encoding you're using, which provides a directive to the decoder when sniffing would not produce the right results. If you use Unicode for your scripts, placing a BOM would cause no harm. So I fail to see how this is "unduly impacting vim-ps1 users". Can you clarify?

from vim-ps1.

cwegener avatar cwegener commented on August 30, 2024

No, it's not forcing UTF-8, but it is instead unconditionally changing every single UTF-8 PS1 file that is being edited to change the encoding from UTF-8 to UTF-8-with-BOM. And UTF-8-with-BOM is not a recommended encoding as per Unicode standard.

from vim-ps1.

heaths avatar heaths commented on August 30, 2024

While it may not be recommended in general, there are cases where it is (or something in its place, like a ContentType) or even necessary. I have reached out to the PowerShell team to see what they recommend for scripts. Windows has a long history of ANSI assumptions.

from vim-ps1.

heaths avatar heaths commented on August 30, 2024

I heard back from the PowerShell team and they are moving to BOM-less scripts. I will revert the bomb change.

from vim-ps1.

heaths avatar heaths commented on August 30, 2024

To your last question, though: these are strictly for syntax highlighting. Quite a few of the ftplugins for various file formats do other things too, like some common compiler options.

from vim-ps1.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.