Comments (7)
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.
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.
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.
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.
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.
I heard back from the PowerShell team and they are moving to BOM-less scripts. I will revert the bomb
change.
from vim-ps1.
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)
- Why the name of filetype is "ps1"? HOT 5
- vim on mac doesn't like the newline in line 7 HOT 5
- Doesn't work on gvim 7.4? HOT 8
- FileType detection not working with Vim 8.0 HOT 14
- Add to vim package index (vim-pi) HOT 1
- Indentation not correct when in block HOT 11
- Add option to only recognize functions that Start-Words-With-Capitals HOT 8
- Please help me install this plugin HOT 1
- Syntax highlighting isn't activated based on shebang
- Invalid ^M in config files HOT 2
- Unexpected highlighting for System.Data
- How do I close the terminal? HOT 3
- highlighting on cmdlet parameters HOT 1
- Simplify files for easier migration to vim/vim
- Use better versioning for tags HOT 2
- Why is 'formatoptions' j not enabled by default? HOT 2
- Indenting issues with commented lines (beginning with "#") HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-ps1.