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

  • Home
  • SEARCH
  • 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 3241734
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:14:00+00:00 2026-05-17T18:14:00+00:00

When dealing with .vimrc configuration files in Linux and Windows (two systems I’ve been

  • 0

When dealing with .vimrc configuration files in Linux and Windows (two systems I’ve been using so far) and trying to keep configurations cross-platform, I’ve found mainly two solutions:

  1. Create a new folder for vim files in /home/user, so both systems have the same vim dirname (instead of default .vim in linux and vimfiles in Windows), and use set runtimepath to get this new folder;

    set runtimepath=~/vim_local,$VIMRUNTIME
    source ~/vim_local/vimrc

    Source

  2. Create a bunch of os conditions (like has("32")) in .vimrc when needed, based on platform or capabilities, but keeping the original unix names and creating symlinks in Windows home folder to the original files (vimfiles to .vim somewhere, maybe a .vim dir in Windows home, or even a dropbox folder). (I haven’t tested this approach in older Windows versions like XP).

Which solution do you prefer, and why? What are the disadvantages from each solution? Which other solutions do you have? (You can post your own .vimrc here as well to discuss.)

If you use some source control in your .vimrc configuration files, do you version your plugin files as well (so when “deploying” your config across computers, you only do a checkout/clone from your repository)? A lot of people are using pathogen and keeping each plugin inside it’s own folder (usually a git repo from github). Does it make sense to version control a plugin that is already a repository from elsewhere?

  • 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-05-17T18:14:00+00:00Added an answer on May 17, 2026 at 6:14 pm

    I use something approximating option 2, but probably considered option 3. I keep everything in a single folder called either ~/.vim or c:\vim\vimfiles. These are version controlled with Bazaar and held on a server with sftp access. When installing vim on a new Windows machine (with Bazaar), I put it in c:\vim\vim73 and do:

    bzr co sftp://<username>@<server>/path/to/vimfiles
    copy vimfiles\vimrc_linker.vim _vimrc
    

    On Linux machines I do:

    cd
    bzr co sftp://<username>@<server>/path/to/vimfiles .vim
    ln -s .vim/vimrc_linker.vim .vimrc
    

    vimrc_linker.vim contains one line:

    runtime vimrc
    

    which opens up the file called vimrc which is stored in .vim (or vimfiles on Windows). This allows me to keep my vimrc under the same version control as the rest of the .vim directory. Since I use cygwin Bazaar on Windows usually, I keep all of the plugins with unix line endings to avoid compatibility issues (both Windows & Linux vims cope with unix line endings in plugins, but the Linux one doesn’t like Windows line endings).

    The use of version control allows me to keep all the PCs that I use in sync very easily and if I install a plugin and don’t like it, I can very easily revert the change without having to think about which files were installed by that plugin (the VCS tells me).

    As for the os conditions, I use has("win32") etc to differentiate. However, there are very few situations that require this differentiation, so it’s a minor inconvenience. My vimrc is 1000 lines long (it has quite a few functions that I’ve never got round to splitting out into plugins) and only about 10-15 are inside the has blocks:

    • Font configuration
    • Path to ctags/cscope as I have a Windows executable in vimfiles for ease of getting it working on multiple PCs without lots of installing
    • Undo dir location
    • A mapping (,x) for maximising the GVim window: this is done differently in Windows & Linux
    • On Windows, some mappings for vimtweak.dll to go completely full screen (no title bar or anything). Haven’t found an equivalent for Linux.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm dealing with game dialogue files (conversation between player and non-playable-characters) where dialogue choices
When dealing with debugging queries using Profiler and SSMS, its pretty common for me
When dealing with threads (specifically in C++) using mutex locks and semaphores is there
I've been dealing with this for years but it's so nit-picky that I never
Dealing with an employee that went over my head
When dealing with small projects, what do you feel is the break even point
I frequently have problems dealing with DataRows returned from SqlDataAdapters . When I try
I'm dealing with a MySQL table that defines the JobName column as UNIQUE. If
I am dealing with MySQL tables that are essentially results of raytracing simulations on
The table I'm dealing with it potentially larger than available memory (let's say 10GB)

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.