frayedknot
frayedknot

Reputation: 1

How to get the current directory from .vimrc

I'd like to have my .vimrc be aware of where it is located so that vundle can be configured correctly just based on where the .vimrc is located (same dir as .vim for me).

I currently have this in my vimrc (located at ~/user/.vimfiles/vimrc):

set rtp+=~/user/.vimfiles/vim/bundle/vundle/
call vundle#rc("~/user/.vimfiles/vim/bundle/")

And it would like to make it relative to were there .vimrc is located since that can change depending on what box I am on.

Upvotes: 0

Views: 201

Answers (1)

ILMostro_7
ILMostro_7

Reputation: 1482

from the VIM help-menu:

getcwd()        The result is a String, which is the name of the current
                working directory.

Upvotes: 1

Related Questions