Hacker News new | past | comments | ask | show | jobs | submit login
VimR – Refined Vim Experience for OS X (vimr.org)
164 points by jasonrdsouza on Aug 16, 2014 | hide | past | favorite | 63 comments

For those confused, this project uses a fork of macvim that the author himself turned into a framework(osx library) to be used in third party programs. [1]

(Kinda how some linux projects used xembed to embed gvim into their apps, eclim also used to have a mode to embed gvim into eclipse)

Think of it as a proof of concept implementation for a vim editor based on the macvim framework version. At worst, you don't really give a crap. At best you can use this in your own editor/ide/debugger/whatever.

The wording not emulated as mentioned in a post below is in reference to vi emulation in eclipse/idea/sublime/atom/xvim or one of the other 1000 editors that have vi keybindings.

Ps. I'm not affiliated in any way, I still use tmux and console vim, but I've been following this project for a while.

[1] https://github.com/qvacua/macvim

Thank you. I was really wondering what is so special about a GUI vim. I thought that exited for a while.

This sounds really interesting. I wonder if this would be useful for a project like XVim (Vim mode for Xcode: https://github.com/JugglerShu/XVim)

I love the idea. I use terminal Vim as my daily editor, and could see myself switching (at least part-time) to something like this.

Yes, you can achieve all this using plugins like NERDTree and Ctrl-p, but sometimes a polished GUI just provides a better experience than any ncurses-based interface can. And you're not giving anything up in the process—you can still open NERDTree from VimR if you want to.

Hope the negativity here isn't discouraging. I'm really excited to see where this project goes.

As an avid MacVim user, I'm really interested in people pushing the graphical vim experience on Mac OS X.

I find it interesting that you included a fuzzy quick-open. One of the pain points with CtrlP in a large project - even with fast hardware - is the synchronous building of its filesystem cache. I would be interested in trying another implementation that lives inside of an app (where it can be dispatched asynchronously).

All in all, a nice looking app! I'm interested in giving it a shot!

Ctrl-p is great but I agree, lack of caching is a signigicant pain point. I raised an issue on that and the author explained it's because there's actually no mechanism for Vimscript to do it, so someone would probably need to come up with some way to spawn headless Vim from a periodic Cronjob. A standalone app like VimR can also route around this constraint.


Wow, 1 hour and not one positive comment. I love this. For an user getting started with vim, just the mac-like design for sidebar and File finder is a million times useful.

Thanks Guys for making this!

Damn, I'm sorry there have been so many haters here. Looks like a really cool project and you should totally keep working on it to make it even more appealing over something like MacVim. Excellent job guys!

I love the negativity in many of the responses here. Obviously people like native apps. Macvim is a thing. Emacs has a gui version for os x. Sublime is a thing. This is a polished port of macvim that has a file drawer, which is a feature that many people want baked into macvim. Browsing complex file hierarchies and large projects isn't great inside a terminal, and is a giant hurdle for many new users of vim.

If this isn't for you then fine but don't rush here to proudly proclaim how you don't understand the point of this. I don't know why anyone submits their pet projects here.

Hope you don't mind poolpool but I quoted you in a quick writeup I made of VimR.


This looks very promising. I use MacVim daily and being able to extend the GUI (like the markdown plugin) sounds awesome.

I already see tons of possible plugin. A simple one would be to have a webkit window which reloads the page when working on a web project, with javascript bindings on the webkit window there is a lot of potential.

Or an OpenGL shader preview for real time GLSL editing.

Could also be simply a documentation browser.

There are many tools I'd like to integrate more with my editor.

To all the haters, use your imagination, it's much more than just vim in the terminal. And I'm well aware that I can have a gazillion window open (web browser, doc browser, shader preview, game window...), but this kind of integration can improve productivity and reduce frustrations.

Looks pretty neat. Good work folks. I wrote a blog post sometime back to setup macvim that looks exactly same as your projects. Good thing is that I don't have to do all that hard work to set it up and just use yours instead. :) Here is that blog post. http://vinitkumar.me/articles/2014/01/03/Setup-Macvim-for-ma...

Sorry, is the vim that ships with OS X consider emulated?

No, but a lot of editors have some level of vim emulation (eg, Atom, or IntelliJ, or VisualStudio, or XCode) that always comes up a bit short. The point the author is making is that this actually embeds vim and is not a re-implementation of vim features.

I think that was a reference to MacVim, maybe?

This project uses the MacvimFramework. It might be a dig at Sublime/Atom's re-implementation of Vim keybindings

MacVim is emulated? What does that mean? I thought it was a graphical interface like GVim just with a couple of OS X keyboard shortcuts.

As a MacVim user, I find this intriguing. It seems to work very well for my needs. I particularly like the built-in Markdown preview.

My only gripe so far is that I'd like to be able to configure additional filtering for the fuzzy file find to, for example, make it automatically ignore node_modules folders.

Thanks. The "ignore list" for the fuzzy find will be implemented soooon.

Hey, there are some great things in here. I've used it for a bit this morning, and have a couple of comments:

1. I could not figure out how to change the font. I'd love a smaller font.

2. The "show" and "hide" side bar shortcuts should be merged into a single "toggle" shortcut

3. Generally, shortcuts should be more vim-y. If I wanted to do cmd + } I would be using emacs :)

4. could not find a keyboard shortcut to change focus from the editor to the sidebar, so I have to use my mouse there (bad).

5. Quick open does not have vim-like navigation. So I need to use the arrows to select a file in the list. Also, is there a way to set an ignore list? (e.g. ignore all the object files).

6. Long term, it would be amazing if gui actions could be tied to keyboard shortcuts via the vimrc.

Thanks for the feedback! ⌘1 is what you want to focus the sidebar, and <Esc> will take you back to your buffer. We're working on some improvements to the View menu.

That works! Thanks! Looking forward to the next round of improvements.

We will soon document all key shortcuts in the wiki on GitHub.

Re #1, I don't know what config it uses but `:set guifont=*` will give you a font picker (as in any guivim, afaik).

@3, you can always use gt/gT to switch tabs :)

I am missing a "Why should I use this instead of MacVim?" section on that website.

Thank you for your comments. Please bear in mind that VimR is still very much work in progress: it's got still rough edges here and there. With your comments and feedback we will try to polish it and add new features. Stay tuned. :)

Okay, here's some feedback: you mention that you're using "real" vim, yet refer to the file browser controls as that "hjkl" thing. No app that isn't vim or isn't trying to partially resemble vim has used that obsolete "uh, down means up, so left means down" hjkl arrowkey arrangement for decades. Everyone else, all apps, spreadsheets, games, other text editors, including all standard hardware, uses an inverted-T arrangement for arrowkeys.

So, no problem, vim lets you remap your keys, which takes care of the problem. Many of us remap the "arrowkeys on the home row" to the standard inverted-T of ijkl (and remap i, for insert left, to h, reach left instead of reaching up), so that both sets of arrowkeys on the keyboard match each other and match their arrangement in every other app we use. Those with other keyboards, such as Dvorak, will often map to different keys that make more sense on their own keyboards. The ability to do so has always been one of the features of "real vi(m)".

I hope that for your file browser, you'll pass the keypresses through the (g)vimrc map, so that whatever keys a user has chosen for up, down, left, right, escape, and whatever else the file browser handles, will work the same way in both the editor and the file browser, which is to say, the way their "real vim" works.

Does anybody know how to really close a tab in vim? When I type t on a file to open it in a tab and then type :q, it looks like ist closed. But when I type :ls I see that its still open.

When you write `:ls` you see all the buffers, not tabs. To remove the buffer you can use `:bd :bdel :bdelete` (see `:help :bdel`) which unloads a buffer and deletes it from the bugger list.

Sure. But I want to close the buffer AND the tab. :bd only closes the tab if there are multiple tabs open. It does not close the tab when its the last tab before the file explorer:

1) in the shell run "vim ."

2) hit "t" on a file

3) type ":bd<enter>"

You still have 2 tabs open. One with the file explorer and one with an empty file. Probably because the file explorer has type "nofile" or something, so vim things the buffer you just closed was the last one. Im not sure why its not closing the tab. It might be a bug.

Is there a way to tell vim "When I type :bd close the frickin tab, even if its the last one!"?

Yes, see my other answer here: https://news.ycombinator.com/item?id=8187723

`:bdel` is what you're looking for. ;-)

Problem with ":bd" or ":bdel" is that it leaves open the last tab:

1) in the shell run "vim ."

2) hit "t" on a file

3) type ":bdel<enter>"

The tab is still open.

":bdel|q" would do the trick, then.

But I understand it's not a very good solution.

This is great! I like the fact that there is a gui with menu bar commands, ability to navigate folders , etc. to fall back on. Is there any way to open it via the terminal like sublime or atom? It would be great if it could launch from a directory with all of the contents showing in the sidebar

Installed MacVim the other day, first thing I run into "MacVim.app doesn't show up in spotlight" (https://github.com/Homebrew/homebrew/issues/8970)

On one hand, I really want to leave a constructive comment, but on the other, I don't think that I should use it first for a few days (and judging by my first impressions, coming from macvim, I definitely will). By the way, did all the haters test it thoroughly?

Doesn't work for me on either macbook or imac, running mavericks.

Same here. Trying to create a new file or open an existing one results in a crash.

I love this idea! I've wanted to get into MacVIM but I am just too addicted to the file browser sidebar that Sublime and Atom have. I'll have to give this a shot.

Checkout nerdtree. File browser/sidebar for Vim.


What other keyboard shortcuts are available other than hjkl? It looks not even the arrow keys work.

There are quite a few, and they're documented on the wiki[1].

If you find that there's a specific feature missing, please open an issue. All feedback is appreciated :) This is still very much a work in progress.

[1] https://github.com/qvacua/vimr/wiki/File-Browser-Actions

It would be awesome if you could add in some kind of package manager like sublime text has.

Wouldn't Vundle work just as well on this? Vundle is pretty decent for installing plugins.

Vundle is great, there is Pathogen too.

This is awesome! Going to give it a proper run Monday.

Looks great, I'll check it out

could be pretty good with more polish

Good work!

I have low enthusiasm for this project because I don't see a big added-value above NerdTree and CtrlP.

But I would love to see more cross-platform Gui wrappers and more embedded Vim. I'm hopeful that NeoVim will help make this happen.

NeoVim seems to be making really good progress. There are packages for installing on OSX and Linux. In my daily use NeoVim has been solid. I love the direction that NeoVim is taking, and believe it will be a great foundation for embedded vim.

Title should be "VimR: Refined Vim Experience for OS X" not "Vim for OS X".

Sorry. One of my first posts to HN. Updated.

I fail to see how this is better than to use gvim, which is crossplatform, together with NERDTree, CTRL+p + some other language specific plugins that can run on your server, on your desktop (which can be windows, linux or osx, whatever you like).

Feels like the authors effort would be better spent on helping some project like NeoVim instead. https://github.com/neovim/neovim

>I fail to see how this is better than to use gvim, which is crossplatform, together with NERDTree, CTRL+p + some other language specific plugins that can run on your server, on your desktop (which can be windows, linux or osx, whatever you like).

It's better for people that could not care less using a version that's "cross platform" as the lowest common denominator, and want something that runs well and with native hooks to the platforms they use.

Did you even use it?

I can't ask questions if I haven't used it? I have no interest of trying this out since it's mac exclusive.

You didn't ask a question. You suggested that the author's effort was misguided for an application you didn't even use.

ugh more OSX embrace extend extinguish. Apple doesn't even have to pay people to write more lock in anymore.


Is there any specific reason why you think so? Why not have it in a terminal and also elsewhere?

So, in what way is it better than vim inside tmux? NERDtree and CTRL-p and you're good to go.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact