Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I have Macvim.app but when I install gives an error. #33

Open
shinokada opened this issue Jan 10, 2014 · 15 comments
Open

I have Macvim.app but when I install gives an error. #33

shinokada opened this issue Jan 10, 2014 · 15 comments

Comments

@shinokada
Copy link

Error is the following.

vim-anywhere requires mvim to function
Run `brew install macvim`.

Do I have to uninstall Macvim.app and install through brew?

Thanks in advance.

@cknadler
Copy link
Owner

No, definitely not. This is a bug. vim-anywhere should detect where MacVim is installed, even if it isn't installed via Homebrew. Marking this as a bug. I'll have a look today.

@cknadler
Copy link
Owner

This turned out to be not as easy as I originally expected. For some reason, when you start the vim executable stored in the MacVim.app installation directly, it doesn't focus the editor. I can hack my way around it and focus the window in this specific situation.

@jubilatious1
Copy link

Same issue. MacVim installed in Applications folder.

@jubilatious1
Copy link

mycomputer:~ myhome$ /Users/myhome/vim-anywhere-master/install ; exit;
vim-anywhere requires mvim to function
Run `brew install macvim`.
logout

[Process completed]

@jubilatious1
Copy link

Dylan-- did you read the OWNER's comments in this thread, @cknadler??

OP: "Do I have to uninstall Macvim.app and install through brew?"

OWNER: No, definitely not. This is a bug. vim-anywhere should detect where MacVim is installed, even if it isn't installed via Homebrew. Marking this as a bug. I'll have a look today.

@dylan-chong
Copy link

Ah I admit I skimmed that a little. I'll remove those comments since they were irrelevant then.

Still, it's been 3.5 years since cknadler tried to fix it, so I don't think it's going to be fixed anytime soon. (I also had a similar problem trying to replace mvim with vimr yesterday with no luck.) So you're better off just installing mvim through brew

@cknadler
Copy link
Owner

cknadler commented Jul 9, 2017

So you're better off just installing mvim through brew

Yep. If you want to take a stab at fixing this, go for it. I'm likely not going to make an attempt anytime soon.

@jubilatious1
Copy link

@dylan-chong No worries--sorry if I over-reacted. I have base Vim installed via MacOS, Vim_8+ installed via Macports, and MacVim.app in the Applications folder. Three Vim installs are enough!

@cknadler I certainly like the concept of Vim-anywhere and would love to take a stab at sending you a pull request, but I'm getting-by right now using a shortcut to open MacVim.app via the Services Menu (and/or keyboard shortcut): "New MacVim Buffer with Selection".

Not as slick as Vim-anywhere (esp. closing the app), but it'll do for now.

@dylan-chong
Copy link

dylan-chong commented Jul 10, 2017

No worries. Just wondering, what happens when you change the .path file to point to the mvim executable inside Macvim.app?

@jubilatious1
Copy link

@cknadler @dylan-chong The vim-anywhere Install-script balks and won't complete the install without finding a brew-installed mvim. The invisible folder you referred to, ~/.vim-anywhere/ , doesn't exist.

@dylan-chong
Copy link

Ah. There's probably a way of getting around that if you have a look at the install script. Can't really help you much there though

@jubilatious1
Copy link

@cknadler @dylan-chong

I had a thought that the vim-anywhere install-script might accept vim installed via Macports, which installs into /opt/local/bin/vim.

Alternatively, vim-anywhere install-script might accept being pointed at either the mvim executable or (like Linux), the gvim alias present within the MacVim.app bundle, generally located at:

/Applications/MacVim_snapshot-[insert-number-here]/MacVim.app/Contents/bin/mvim
/Applications/MacVim_snapshot-[insert-number-here]/MacVim.app/Contents/bin/gvim

@dylan-chong
Copy link

dylan-chong commented Jul 12, 2017

You could change the install script to try that, e.g. by doing something like this

diff --git a/install b/install
index 0e988de..5040389 100755
--- a/install
+++ b/install
@@ -75,13 +75,13 @@ if [[ $OSTYPE == "linux-gnu" ]]; then
   require_installed xclip

 # OSX specific checks
-elif [[ $OSTYPE == "darwin"* ]]; then
-  require_installed mvim 'Run `brew install macvim`.'
+# elif [[ $OSTYPE == "darwin"* ]]; then
+  # require_installed mvim 'Run `brew install macvim`.'

-# Unsupported OS
-else
-  echo "OS '$OSTYPE' is not supported!"
-  exit 1
+# # Unsupported OS
+# else
+  # echo "OS '$OSTYPE' is not supported!"
+  # exit 1
 fi

 ###
@@ -121,7 +121,8 @@ if [[ $OSTYPE == "linux-gnu" ]]; then
 # OSX install
 elif [[ $OSTYPE == "darwin"* ]]; then
   # store the absolute path to the mvim executable
-  which mvim > $AW_PATH/.path
+  #which mvim > $AW_PATH/.path
+  echo "YOUR_PATH" > $AW_PATH/.path

   # install the workflow as a service
   mkdir -p $HOME/Library/Services

Just replace YOUR_PATH with your mvim path. Also you can play with the path by modifying the path inside ~/.vim-anywhere/.path after it is installed. The bin/run script will use the .path file to run mvim

@cknadler cknadler removed the bug label Feb 17, 2018
@bradwood
Copy link

I'm having this issue today as well. the brew build of macvim is a little ropey for me -- segfaults with some of my plugins so I'm using vanilla brew vim instead for console mode... any suggestions how to get around this?

@jubilatious1
Copy link

I notice the package author @cknadler removed the "bug" label back in February. But I haven't gone back to try the changes suggested above, or looked at the repo to see if there have been any updates.

mangosmoothie added a commit to mangosmoothie/vim-anywhere that referenced this issue Jan 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants