Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vim on mac doesn't like the newline in line 7 #12

Open
cheng-xu opened this issue Sep 24, 2014 · 5 comments
Open

vim on mac doesn't like the newline in line 7 #12

cheng-xu opened this issue Sep 24, 2014 · 5 comments

Comments

@cheng-xu
Copy link

Error detected while processing /Users/cxu/.vim/ftdetect/ps1.vim:
line 7:
E492: Not an editor command: ^M

@Persistent13
Copy link
Contributor

I'm not sure if @PProvost is active on this as I created a patch for this sometime back.
You can see the details here.

@bartenbach
Copy link

Even if you delete the newline it doesn't seem to do anything when it loads. I'm on Linux though.

@praveenbhamidipati
Copy link

@Proxa, The way to fix the issue on Linux is to run dos2unix on all ps1.vim files in the package. Doing that solved the problem for me.

Note: If you are on Ubuntu, dos2unix might not be present by default. Install it using the command sudo apt-get install dos2unix.

@alex-harvey-z3q
Copy link

alex-harvey-z3q commented Sep 5, 2018

Running dos2unix fails on ps1.vim with:

dos2unix: Binary symbol found at line 17
dos2unix: Skipping binary file /home/ec2-user/.vim/bundle/powershell/indent/ps1.vim

You can work-around this by using -f:

dos2unix -f /home/ec2-user/.vim/bundle/powershell/indent/ps1.vim

@chucklebrother
Copy link

For anyone who doesnt have dos2unix readily available.

perl -pe 's/\r\n|\n|\r/\n/g' inputfile > outputfile # Convert to UNIX

Worked very nicely, and i now have Powershell syntax colouring in OSX native vim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants