How do I use my .vimrc file in Cygwin?

Viewed 38358

I just installed Cygwin on my work machine and would like to use the .vimrc file I use on my Linux box at home.

  • Is that possible, or does it need to have Cygwin-specific settings?
  • Where would I put the .vimrc file?

I'm a little unsure of what directory I'm being dropped into at the bash prompt under Cygwin, but I think I'd create a subdirectory called .vim there, right?

10 Answers

simply navigate to your home directory which is c:/Users/user_name/ create the file using vi .vimrc set your preferences here, and they would surely reflect like

set nu "show line numbers
set ai "auto indentations 
colors blue " or elflord or whatever you like.

save and try.

I had issue with Cygwin vi tabstop. It was always defaulting to 8. While launching it was giving error "Failed to source defaults.vim" Tried to follow various solutions but below worked for me.

Create .vim directory under current user home ($HOME) directory.

Create .virc file under .vim directory.

Add below line to .virc

set tabstop=4

Cygwin version details CYGWIN_NT-10.0-22000 3.3.5-341.x86_64 x86_64 Cygwin

Related