Create macvim in Applications folder - vim

I ran brew install macvim, and I'm wondering if there's a way to access it outside of the terminal? I know I can create a link in my applications folder, but is there more native support for this? Or is my best bet just to download this guy https://code.google.com/p/macvim/ ?

MacVim is actually a GUI application first, that comes with a CLI executable that you can run in your shell.
You can find the MacVim.app bundle in /usr/local/Cellar/, where Homebrew puts all the programs you install with it.
It is also possible to launch the MacVim GUI with:
$ mvim -g filename
Installing MacVim with Homebrew makes sense if you already use Homebrew to install the UNIX programs that you use regularly but installing Homebrew just to get MacVim is a pointless waste of time. Downloading MacVim from the official source is a much better idea IMO: simpler, quicker…

Related

YouCompleteMe unavailable: requires Vim compiled with Python (3.6.0+) support

i have vim 8.2.850. I am trying to install YouCompleteMe. But get this error, when trying to open vim:
"YouCompleteMe unavailable: requires Vim compiled with Python (3.6.0+) support"
How can i fix this? i saw other ppl answer for different versions. But sorry im a noob, could someone please help and give a detailed explaination on how to fix it?
And i am on mac, using terminal
It is an old question but I wanted to add I simply installed macvim and re-started terminal again. It solved my problem
- brew install macvim
I'm aware that this isn't directed at your question per say, but I ran into the same issue on Ubuntu with nvim.
Reinstalling didn't help, but adding https://github.com/neovim/pynvim fixed my issue.
Perhaps it can be helpful to Mac users using nvim too.
you can use vim --version | grep python to check your vim. If vim detects the python3, it will show like:
+cmdline_hist +langmap -python +viminfo
+cmdline_info +libcall +python3 +virtualedit
The python3 will have a + sign in front of that.
If not, first, you must check if you have python3.
Second, you need to uninstall vim (sudo apt purge vim), then reinstall vim (sudo apt install vim).
Third. Reconfirmation by vim --version | grep python.
I hope this can help you.
Yes, you can reinstall the latest vim version with homebrew: https://formulae.brew.sh/formula/vim
But, I think you should recheck your vim version with :version, there is no version like yours.
And the latest version itself depends on python, and more like nvim.
# I do like this
brew install vim --HEAD
Confirmed
brew install macvim
worked for me after restarting terminal.
Make sure to
brew uninstall vim
before installing macvim, then restart terminal.
Solved it for me on new Mac with new apple chip.
Thankfully, the error message is pretty solid. You need vim with Python,
Now while I don't personally have a mac that should be as straightforward as making sure you install the correct version.
The simplest way is probably going to be with brew as mentioned here.
brew remove vim
brew cleanup
brew install vim --with-python
If you installed it with a binary you will need to find a new binary with python included. Or alternatively you could try and build it from source as the comment from Zoe suggested. But I think that may be somewhat more involved than ideal for a beginner, although worthwhile.
It doesn't seem, like this actually involves neovim at all, If it does then you may want to update your question, otherwise it is a good idea to remove the neovim tag.

sudo/apt-get command not found in git bash

I am using Windows 10 in my machine, and currently installed git bash on it.
I wanted to install node and npm for my application.
when i tried :
apt-get install nodejs
"apt-get" command not found,
I tried google and got
sudo install nodejs
"sudo" command not found.
How to use sudo and apt-get command on my git bash.
Git for Windows comes with a Windows port of Bash and a collection of few more common *nix command-line tools that have been compiled for Windows, it does not provide a complete *nix environment. Hence you cannot use tools like sudo and apt-get which modify the *nix operating system.
However, there are other tools, programs if you like, available.
Try to install node " the windows way ".
win-sudo package adds sudo to windows.
kafaior at Super User suggests:
A working sudo replacement for Cygwin's mintty terminal would be to place the following script in user's PATH:
$!/bin/bash
cygstart --action=runas mintty -e `which bash` -lc \"$#\"
Maximus mentions how to add sudo (well, csudo) via cmder.
Super User has a similar question here.
It looks like there is a command runas or elevate commands. These might be for PowerShell, rather than git bash. I'm not sure.
I found your this while looking for a way to add rsync to Git Bash. So below I included info that may or may not work for sudo or apt-get. If they do not work directly for specific commands the OP is asking about, they may inspire a solution that does work. Also this could help others who arrived here as I did.
rsync is another unix command not available in the standard installation of git bash.
However, you can download and install the Git for Windows SDK (scroll to the bottom of the page for the link). This will allow you to create a version of the Git for Windows installer that does include additional *nx commands.
Install the Git for Windows SDK according to the instructions. Part 2 is where you add the packages you want, that aren't included in the standard git bash installation. Part 3 is where you create a Git installer, which will include the additional packages. If you skipped step 2, this should produce an installer similar to the standard installer.. There is a good discussion as to why they cannot include these commands in the general distribution.
It is also possible to just grab rsync filehere or here and unpack it directly within your Git installation, and it works. I dunno if it is also possible to do something similar for sudo or apt-get.
Finally, it looks like there is a way to get *nix commands available within the Git Bash shell via cmder. Here are the instructions.
Installing applications in git bash does not sound right to me. I would suggest you either use the native Windows installer (https://nodejs.org/) or, if you prefer a package manager, use Chocolatey (https://chocolatey.org/) to install nodejs with:
choco install nodejs

Emacs is starting in x window version

After installing Emacs via sudo apt-get install Emacs on a Linux Mint machine, I'm getting to the xwindow version of Emacs every time I start 'Emacs' from the terminal emulator in my window/tile manager.
I'm interested in the command-line version. Did I do something wrong so far?
If you remove the GUI version and install emacs-nox it will give you the command line only version.
Alternatively, you could also keep what you have and open it with emacs -nw. The nw means "No Window".

Run Ubuntu terminal from bin folder

So, I uninstalled Python and now my Ubuntu GUI interface is quite messed up. I really can't seem to do anything, but I've accessed the file system from right-clicking a file I created and choosing "run-as filesystem". I need to get to the terminal, but it is not listed as a run-as application. I know I can run many programs from the /usr/bin directory. Does anyone know the name of the script in that directory that would run the terminal? I'm running Ubuntu LTS 12.04.3
I propose to switch to a different terminal (using Control-Alt-F1), log in there and then install Python again. Since apt-get is a binary it does not need any Python installed, so you should be able to install it using
apt-get install python
After this (and maybe a reboot for fixing several boot-time problems) you should be able to log in normally again.

Installing additional packages for Cygwin

To install additional packages for Cygwin, do I just need to run the setup.exe again and choose from the packages list?
Also, doing this won't harm my computer in terms of 2 Cygwin instances being installed or problems of that kind (I'm kind of a noobie with these things).
Last, there is no package manager in Cygwin which you can run in the command line? Something similar to Pip in Python.
No, adding additional packages doesn’t modify the current settings. There is a
package manager called apt-cyg which installes additional packages from
command-line. To install apt-cyg follow the below steps:
wget rawgit.com/transcode-open/apt-cyg/master/apt-cyg
install apt-cyg /bin
Note: wget should be installed for downloading the apt-cyg. To Use apt-cyg for
installing additional package (after following the above steps):
apt-cyg install ncurses
No, it doesn't hurt the current setup. The install program knows what's installed already.
Having said that, I long ago got into the habit of installing all of Cygwin since, despite its size, it's still minuscule compared to the size of modern hard disks. That way, you won't ever have to worry about whether a package is installed or not.
Re-run the setup executable like "cygwin_setup-x86_64.exe" should do it.
"Install from Internet"
Accept your existing root directory (from your existing installation)
Use your existing "Local Package Directory"
On the screen, view "Full"
Search for the new package you want to add
Go through the installation
Additional option, may be helpful for someone:
To install additional packages in windows from windows command line you can use your cygwin installer.
I suppose, you've already downloaded it to install cygwin from here https://cygwin.com/install.html.
$ setup-x86_64.exe -q -P graphviz
see this guide for details:
http://preshing.com/20141108/how-to-install-the-latest-gcc-on-windows/
There is no package management in Cygwin outside of the setup program. The setup only applies updates to your current installation, it does not overwrite packages than what you already have.
So if you want new packages just rerun the setup program to install packages.
You can just look for the package binaries and decompress them in the C:\cygwin\bin folder.
I did that for dos2unix ( https://cygwin.com/packages/summary/dos2unix.html ) and trying it out now.

Resources