Vim Mac Os X



Question or issue on macOS:

I’m reasonably new to OS X, but I’m familiar with Vim from using it in various *nix systems. I’ve seen many people recommend running MacVim over Vim in the terminal. Can anyone tell me what differences there are between MacVim and regular Vim?

How to solve this problem?

Solution no. 1:

Another tip: For cross-platform clipboard sharing you can use the open-source (GPL) ClipboardMultiSharer with text and image data on any platform that runs Java; in particular, Mac OS X, Windows and Linux. Since version 7.3 the console version of Vim supports Mac OS X clipboard. As noted above just add the following to /.vimrc. Today, I finally got sufficiently irritated about the color Vim uses to display comments in Ruby (on a Mac OS X system), so much so that I decided to look for an alternate colorscheme. Somewhere along the way, I stumbled upon Solarized, which looks really nice. Anyway, here is how Vim was displaying Ruby code prior to me using Solarized. Look at the comments in particular it’s very. Macosx vim free download. MacOSX Vim Vim Binaries for MacOSX.

The best way is to use has, with this function you can check for features of Vim; OS specific features from:help feature-list. Macunix Macintosh version of Vim, using Unix files (OS-X). Unix Unix version of Vim. Win32 Win32 version of Vim (MS-Windows 95 and later, 32 or 64 bits) win32unix Win32 version of Vim, using Unix files (Cygwin). . VIM - Vi IMproved by Bram Moolenaar. Do ':help uganda' in Vim to read copying and usage conditions. Do ':help credits' in Vim to see a list of people who contributed. See README.txt for an overview of the Vim source code./ /. osmacosx.m - Mac specific things for Mac OS X./ /. Suppress compiler warnings to non-C89 code.

MacVim is just Vim. Anything you are used to do in Vim will work exactly the same way in MacVim.

MacVim is more integrated in the whole OS than Vim in the Terminal or even GVim in Linux, it follows a lot of Mac OS X’s conventions.

If you work mainly with GUI apps (YummyFTP + GitX + Charles, for example) you may prefer MacVim.

Vim mac os x

If you work mainly with CLI apps (ssh + svn + tcpdump, for example) you may prefer vim in the terminal.

Entering and leaving one realm (CLI) for the other (GUI) and vice-versa can be “expensive”.

I use both MacVim and Vim depending on the task and the context: if I’m in CLI-land I’ll just type vim filename and if I’m in GUI-land I’ll just invoke Quicksilver and launch MacVim.

When I switched from TextMate I kind of liked the fact that MacVim supported almost all of the regular shortcuts Mac users are accustomed to. I added some of my own, mimiking TextMate but, since I was working in multiple environments I forced my self to learn the vim way. Now I use both MacVim and Vim almost exactly the same way. Using one or the other is just a question of context for me.

Also, like El Isra said, the default vim (CLI) in OS X is slightly outdated. You may install an up-to-date version via MacPorts or you can install MacVim and add an alias to your .profile:

to have the same vim in MacVim and Terminal.app.

Another difference is that many great colorschemes out there work out of the box in MacVim but look terrible in the Terminal.app which only supports 8 colors (+ highlights) but you can use iTerm — which can be set up to support 256 colors — instead of Terminal.

So… basically my advice is to just use both.

EDIT: I didn’t try it but the latest version of Terminal.app (in 10.7) is supposed to support 256 colors. I’m still on 10.6.x at work so I’ll still use iTerm2 for a while.

EDIT: An even better way to use MacVim’s CLI executable in your shell is to move the mvim script bundled with MacVim somewhere in your $PATH and use this command:

EDIT: Yes, Terminal.app now supports 256 colors. So if you don’t need iTerm2’s advanced features you can safely use the default terminal emulator.

Solution no. 2:

The one reason I have which made switching to MacVim worth it: Yank uses the system clipboard.

I can finally copy paste between MacVim on my terminal and the rest of my applications.

Solution no. 3:

unfortunately, with “mvim -v”, ALT plus arrow windows still does not work. I have not found any way to enable it 🙁

Solution no. 4:

It’s all about the key bindings which one can simply achieve from .vimrc configurations.
As far as clipboard is concerned you can use :set clipboard unnamed and the yank from vim will go to system clipboard.
Anyways, whichever one you end up using I suggest using this vimrc config
, it contains a whole lot of plugins and bindings which will make your experience smooth.

Hope this helps!

Setting up your computer for Vim and Tmux often comes with a few issues. Here's how to manage plugins for Vim and use Tmux to boost your productivity, as well as settle a few common issues.

Vim Mac Os X Update

We'll install:

  1. Vundle - Plugin management for Vim
  2. Solarized color scheme
  3. Tmux - Terminal multiplexer
Vim Mac Os X

We'll also figure out some issues Mac and Tmux have with showing 256 color themes.

Install Vundle

You can install Vundle by cloning it:

Configure Vundle

Once installed, you can configure it.

And follow the installation directions by editing your ~/.vimrc file:

Once this is setup, you can open a new instance of vim and run :BundleInstall:

You'll get a confirmation 'Done' message on the bottom of your screen if all goes well.

Add Solarized Color Theme

Next, we'll add the Solarized color theme. Vundle makes this really easy. Simply add the Github repository name in ~/.vimrc:

Now that we've added the solarized theme, we need to have Vundle install it.

Now open up your Terminal (iTerm2 or Terminal app). If you're on a Mac, you may see something...ugly. I had a terrible background and the colors were completley off. I didn't have 256 color enabled.

Here's what I saw:

To fix that, I finally came across this StackOverflow question, which had the answer waiting.

Change your ~.vimrc settings from above to the following:

Once you start up a new instance of Vim, you should see your new, colored vim!

Onto Tmux!

Let's up our game and get Tmux into the mix. We can use Tmux to open up multiple 'panes' within our shell.

First, install it. On your Mac, you can use Homebrew:

Ubuntu or Debian users can user apt-get:

Great. Now, colors are also an issue when running Vim within Tmux. Let's fix that. Create or edit the file ~/.tmux.conf:

Now we're ready to use Tmux. Start up a new Tmux session:

Next, split the screen vertically so we have 2 panes with this keyboard shortcut:

You can switch between panes with this shortcut:

You can then open up separate files in each! (Or do ... anything really).

More Tmux

Vim Mac Os X Download

Tmux has Windows, and within the Windows it has Panes. Each Window consists of a set of 1-n Panes.

Tmux also has Sessions. A collection of Windows/Panes live within a Session. You can detach from a Session, leaving it running in the background. You can later re-attach to it, and continue working. This is how people pair program.

Split Screen into 2 Panes:
Split current Pane horizontally into 2 Panes:

Vim For Mac Os X

Switch between Panes:
Create new Window:
Switch between Windows:
Detach from Session:
Vim mac os x os
Re-attach to a Session:

Vimrc Mac Os X

Create a Session:
Switch between Sessions:
Switch between Sessions within Tmux:
List Sessions:
List all commands:

Scripted!

You can run this bash script on your Debian or Ubuntu server to run the above Vim+Tmux configurations. This might conflict with anything you currently have in your ~/.vimrc or ~/.tmux.conf files (If they already exist). Back them up first.

Further Reading: