Skip to content

install.sh behaves incorrectly when ~/.vim already exists #133

@b33j0r

Description

@b33j0r

Here's what happened when I tried to install using the script with this configuration:

  • macOS High Sierra 10.13.2
  • fish shell
  • vim from brew

I had an existing file in ~/.vim. I don't remember how it got there, actually ;)

~> ls -a ~/.vim
.          ..         .netrwhist

Run the easy install command:

~> curl -L https://raw.github.com/zaiste/vimified/master/install.sh | sh

Looks like it didn't know what to do with a populated directory:

~> ls -al ~/.vim
total 8
drwxr-xr-x   4 bjorgensen  staff   128 Jan 28 10:53 .
drwxr-xr-x@ 99 bjorgensen  staff  3168 Jan 28 11:03 ..
-rw-r--r--   1 bjorgensen  staff    55 Jan 28 10:52 .netrwhist
lrwxr-xr-x   1 bjorgensen  staff    26 Jan 28 10:53 vimified -> /Users/bjorgensen/vimified

The .vimrc is linked correctly, so I get this upon starting vim:

~> vi .vimrc
Error detected while processing /Users/bjorgensen/.vimrc:
line   15:
E484: Can't open file /Users/bjorgensen/functions/util.vim
line   46:
E117: Unknown function: vundle#rc
line   48:
E492: Not an editor command: Bundle 'gmarik/vundle'
line   62:
...

Deleting .vim and reinstalling worked perfectly!

It's unclear to me what is happening, but I'm guessing it's something trivial around here: https://github.com/zaiste/vimified/blob/master/install.sh#L5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions