rogual / neovim-dot-app

Mac OS X GUI for Neovim
1.13k stars 62 forks source link

Slick windows #73

Open rkannan82 opened 9 years ago

rkannan82 commented 9 years ago

The boundaries between split windows are same as how they appear in a terminal. We need to make a smoother UI just like how typical Mac applications are. I am new to building Mac apps, but would like to contribute. Want to know if this is something in the roadmap and if so does anyone have pointers?

rogual commented 9 years ago

It's not planned, but I'm open-minded! How would you like it to look?

Edit: Something to consider would be the width of the separators, which would have to remain as wide as a character cell, otherwise the widths of split windows would no longer add up. Consider this:

....|.....
....|.....
----------
..........

If the vertical separator were very thin, like most borders in OS X, then the upper part of the window (4 char cells + separator + 5 char cells) would no longer be the same pixel width as the lower part (10 char cells).

I guess we could have the separator take up a whole char cell but just have it filled with the background colors of the cells either side of it, with a thin dividing line in the middle? That might look nice.

Also, we'd need to be able to distinguish Vim's separators from normal | chars. I haven't found a way to do this, which is why the mouse cursor still doesn't change when you hover over them.

rkannan82 commented 9 years ago

I will try out a few things and get back to you in a week. Can you point me how you handle a split window right now? I will look into the code base later.

Just to give a background, I really like the look and feel of Atom UI. I was deliberating whether to contribute to the atom vim mode project or this one. I felt its a good idea to build a native VIM focused client. Hence my interest in this project. In the past I have built the Java remote debugger interface for VIM using Eclim plugin (done using Java and Vimscript). During that time, I realized a strong need to build elegant UI around VIM, but couldn't do it until the Neovim project started. I don't rely on mouse for code manipulation. I like to use just the keyboard. But even in that case, we need a clean way to display information in a window that overlays on top of current window. For e.g., when you want to view Javadocs or have a preview, instead of having to create a split window. These can be made possible with native GUIs. Similarly, we need a nicer quick fix window (:copen) that does not seem like a bunch of text put together. All this without compromising the responsiveness of the client ... of course :)

rogual commented 9 years ago

There's no logic concerning split windows at the moment. We just send keys and mouse events to Vim, and Vim tells us what characters to put where. Whether those are text characters or the | that make up a split boundary doesn't concern us.

rkannan82 commented 9 years ago

OK. Got it. In order to build the OSX like windowing, we need to do the window management on client side as well and redraw each window and not the entire canvas. Not sure if this is supported in Neovim.

rogual commented 9 years ago

It isn't, at least not yet.

ViViDboarder commented 9 years ago

I think it's a cool idea (especially the neovim ticket that is referenced here), but the change may seem out of place. Sure, you could theme the separator OSXish, but then it will be out of place with the rest of the window interior since that uses your Vim theme.

bulkan commented 9 years ago

@shazow there is a separate issue for the native tabs https://github.com/rogual/neovim-dot-app/issues/28

shazow commented 9 years ago

@bulkan Ah woops, good call. Deleted. Feel free to delete this comment. :)