Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8712319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:05:09+00:00 2026-06-13T05:05:09+00:00

I am using the method described in this screencast to keep my vimrc and

  • 0

I am using the method described in this screencast to keep my vimrc and plugins synced across multiple machines. The problem I’m running into is that one machine is running ubuntu and the other running win7.

I’ve found two types of problems so far. The first seems to be with line endings. To get my windows vimrc to be read on the linux box, I had to do :set fileformat=unix and write. But even after doing that, I am getting similar line-ending problems with all the plugins:

jg@jg-VirtualBox:~$ vim ~/.vimrc
Error detected while processing /home/jg/.vimrc:
line   11:
E484: Can't open file /home/jg/vimfiles/plugin/autotag.vim
Error detected while processing /home/jg/.vim/plugin/DrawIt.vim:
line   60:
E492: Not an editor command: ^M
line   62:
E15: Invalid expression: &cp^M
line 1290:
E171: Missing :endif
Error detected while processing /home/jg/.vim/plugin/auto_number.vim:
line    5:
E488: Trailing characters

I could do something like vim ~/.vim/**/*.vim to load them all and then :argdo set ff=unix | w to fix all the files in the same way, but that seems like a poor method, since any time I update the git repo with my vimfiles from one computer and pull it from the other, I’ll have to remember to do this file conversion. Is there a better way?

Finally, certain configuration details in the vimrc, such as the location of the location of certain binaries, will be different depending on the OS. What is the best way to handle these differences? Should I be peppering my .vimrc with if statements branching on has(“gui_win32”), or is there a better way?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T05:05:11+00:00Added an answer on June 13, 2026 at 5:05 am

    Yes, you’ll have to add branches in your vimrc to have machine/OS-specific settings. That’s not as dirty as it sounds: a single if/ifelse/endif is enough.

    Another approach is to keep your machine/OS specific settings in a separate non-version-controled file: because it is very localized, you don’t need to propagate its contents on other machines/OSes.

    You could put these settings in ~/.vim/vimrc.local and explicitely add this file to .gitignore or outside of the repo in ~/.vimrc.local and source that file from your vimrc.

    Vim has troubles with Windows line endings on Linux but it doesn’t have troubles dealing with Linux line endings on Windows. Just use Linux line endings everywhere and you’ll be fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My problem is best described with this screencast I recorded: http://www.youtube.com/watch?v=aI-p_jqzOdU I'm using the
I am using the method described in this question to load intial users for
I'm using the method described by Josh in this question to add a toolbar
Using the method described in this question , I can get a list of
So I setup C# parameter validation using the method described in this blog post.
when using this method public List<Field> getFieldWithoutId(List<Integer> idSections) throws Exception { try { Connection
I tried getting the latest photos fo my friends using a method described here:
I am trying to implement left array rotation using the method described here: http://www.cs.bell-labs.com/cm/cs/pearls/s02b.pdf
Using the method described in the MSDN for registering a Windows Service (ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.WIN32COM.v10.en/dllproc/base/createservice.htm) and
I am using the below method to do the described conversion. But the java.sql.Date

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.