coolwanglu / neovim-e Goto Github PK
View Code? Open in Web Editor NEWElectron UI for Neovim
License: MIT License
Electron UI for Neovim
License: MIT License
Closing the electron shell window on Windows 7 does not exit neovim cleanly. THe next time neovim is started, .swp files are present.
I'm using airline for my statusbar. It works fine with the new neovim terminal UI, but doesn't work properly in neovim.as:
In iTerm, there's an option so that full screen mode doesn't put the terminal into a new workspace, it's just full screen in the same desktop that it was in. This is super convenient. I don't like having full screen things in different workspaces because it interferes with the way I group windows. I find it Okay for app like Google Chrome when I want to go full screen temporarily, but I usually have my terminals full screen all the time so I can have them grouped in each desktop instead of separated all over the place in a big mess.
I see in #9 you can pass a file, but what about all params nvim accepts?
I'm confused, is this an Electron UI for Neovim or a way to integrate Neovim into Atom? I mean, I know Atom uses Electron, but that is not the same thing...
I'm running on Windows with HEAD of electron and neovim-e
To reproduce:
Open neovim-e
press <C-w><C-s>
observe that neovim-e has crashed
the error message I get is this: [13252:1009/122332:ERROR:ipc_channel_win.cc(435)] pipe error: 232
(Not very specific, sorry)
Do you plan to change the repository name?
You are awesome.
Thank you for working on this (and other awesome Vim related projects!)
Would you be willing to set up a BountySource so that people can show their support for your work?
Hi,
OS: Ubuntu 14.04 x64.
Hi,
I tried to run this on windows. I was more or less successful, but found one weird issue for now.
First a big caveat, I am not comfortable in the js/coffescript world, so not sure if I did everything as needed, probably screwed up somewhere...
What I did was:
I already had node-js installed
download neovim build for windows from appveyor
download atom-shell build for windows
download neovim-as
npm install -g grunt-cli
cd neovim.as
path-to-atom\resources\app\apm\bin\apm.cmd build .
I had Atom too, and found apm in there, so I used it
grunt
copy nvim.exe to neovim.as\
path-to-atom-shell\atom.exe .
this is different from you instructions, in windows at least there is no 'atom-shell.exe', just 'atom.exe'.
This successfully launches neovim.as with nvim. But the window resizes by itself most of the time time it is tiny, see the video here: http://tinypic.com/player.php?v=2wgxb1c&s=8#.VOmxqVXF-zY
Other than that, seem usable, I can enter insert mode etc.
After a raw install all I get is blank screen and there is nothing I can do nor write.
There is the log I'm getting:
$ atom-shell .
[21524:0214/132145:ERROR:browser_main_loop.cc(162)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
[21550:0214/132145:INFO:renderer_main.cc(204)] Renderer process started
[21524:0214/132146:INFO:CONSOLE(20)] "child process spawned: 21561", source: /home/ylecuyer/neovim.as/src/nvim/nvim.js (20)
[21524:0214/132151:ERROR:channel.cc(316)] RawChannel read error (connection broken)
This would be super awesome to use: http://hello.onejs.io (the font rendering bits).
Neovim is not picking up linespace settings from vimrc
I'm sure you might know, but wanted to leave an issue for it. Everything (selecting, moving the cursor, etc) is nice and fast and zippy compared to terminal. The only thing is scrolling the whole view is slow, lagging then scrolling chunks at a time instead of line by line.
Is it possible to change the line height?
Have you noticed this?
When the popup menu refreshes while typing, it flickers subtly.
I’ve run into an odd issue where I can start Neovim.AS, but cannot get its window to accept keyboard input; instead, all keyboard input goes to the terminal in which Neovim.AS was started.
I also can’t switch to the window with Cmd-Tab
, its OS X menu does not display, and the only way to quit it is issuing ^C
in the originating shell.
Configuration:
grunt -v
inside the neovim.as directory gives no errorsAttempting to use <c-w>
for window commands closes the Neovim-e window in Linux (similar to web browsers).
neovim.as should respect the guifont
option from vim, or provide another way to set it. E.g. in my .nvimrc
I have:
set guifont=Droid\ Sans\ Mono\ for\ Powerline:h11
Would be super nice if you could make command
send ctrl
key in OS X so it's easy to use command key as ctrl key (similar to the popular iTerm2 app for OS X).
Run atom-shell . -u NONE
, neovim will quit immediately.
I expected <c-c>
to work but it looks like atom-shell
is preventing then somehow. They don't show-up in the addEventListener
callback.
.nvimrc
stay empty.config.cson
like this:font: '12px Ubuntu Mono'
row: 999
col: 999
In latest version, row : 999, col : 999, will hangs neovim.as.
But if we have been set col, row in .nvimrc
, neovim.as will works well.
I never did anything with web technology, Atom shell.... whatnot. Could you expand the three lines in the README to a bit more substantial help to get everything installed?
So we can do
npm install -g neovim-e # claim on npmjs.com before someone else!
nvim-e some-file-to-edit.js # or similar
I just tested 2d3fc60
I'm not sure about other OS's, but paste isn't working in any capacity for me. I believe it's just a no-op because of the default menu.
Regardless of the default menu, is sent to neovim, but neovim doesn't handle <D-...> mappings it seems because doing nmap <D-v> hi
and then map <
shows that it's registering it as individual keystrokes and not one key combination.
I can add a handler to respond to cmd-v
from the menu, but I'm not sure how paste is implemented in neovim, and I would like to do it the official way if there is a msgpack endpoint.
Love this neovim-e
! And here is a idea suggestion for enhancement.
Currently when pressing Meta + "0, -/_, +/=" doesn't trigger font size changing like in Terminals or Browser, or is there but I am not aware of?
Currently I have a quick dirty hack to check on ui.coffee
keydown
event and change the fontsize dynamically, then force window.resizeTo()
for redrawing the frames.
I am sure there are better ways to implement this properly.
Can you add an option to change the block cursor from outlined to solid? A good reason to have a solid cursor is because in some terminals an outline cursor indicates the window isn't in focus.
Amazing.
I run electron .
on mac, seems neovim-e don't want to talk to me, and give me an exception.
Who could help me?
~/repos/neovim-e $ electron .
App threw an error during load
Error: Cannot find module 'app'
at Module._resolveFilename (module.js:440:15)
at Function.Module._resolveFilename (/usr/local/lib/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/common/reset-search-paths.js:35:12)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/pysnow530/repos/neovim-e/src/launcher.js:4:9)
at Object.<anonymous> (/Users/pysnow530/repos/neovim-e/src/launcher.js:34:4)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
Say I have a split and switch using Ctrl+w then an arrow key, or ctrl+ww. The app then crashes.
I can switch if I click on a different split, however.
Here's the last x lines of output:
[19868:0704/230223:INFO:CONSOLE(0)] Error processing argument 0.
[19868:0704/230223:INFO:CONSOLE(0)] TypeError: Error processing argument 0.
at TypeError (native)
at EventEmitter.<anonymous> (C:\Users\<my user>\AppData\Roaming\npm\node_module
s\electron-prebuilt\dist\resources\atom.asar\browser\api\lib\browser-window.js:3
4:22)
at emitTwo (events.js:87:13)
at EventEmitter.emit (events.js:172:7)
[19868:0704/230223:INFO:CONSOLE(0)] Error processing argument 0.
[19868:0704/230223:INFO:CONSOLE(0)] TypeError: Error processing argument 0.
at TypeError (native)
at EventEmitter.<anonymous> (C:\Users\<my user>\AppData\Roaming\npm\node_module
s\electron-prebuilt\dist\resources\atom.asar\browser\api\lib\browser-window.js:3
4:22)
at emitTwo (events.js:87:13)
at EventEmitter.emit (events.js:172:7)
[19868:0704/230249:INFO:CONSOLE(27)] "child process closed", source: C:\Scripts\
neovim-e\src\nvim\nvim.js (27)
So that while the cursor is being moved it is always visible. It would make it easier to see where the cursor lands when moving really fast.
I thought I should open a new ticket for issues on windows, as it's very possible there will be many of them...
for now this still fails (versions current as of today):
atom-shell\atom.exe . eval.c
[12480:0410/193553:INFO:renderer_main.cc(212)] Renderer process started
[4700:0410/193555:INFO:CONSOLE(22)] "child process spawned: 11400", source: neovim.as\src\nvim\nvim.js (22)
[4700:0410/193555:INFO:CONSOLE(25)] "child process closed", source: neovim.as\src\nvim\nvim.js (25)
[12480:0410/193555:ERROR:ipc_channel_win.cc(136)] pipe error: 109
neovim TUI and vanilla gvim
both support scrolling with the mouse, would be nice to have that in neovim.as too.
Azerty keyboard dont work.
Letter press is correctly print in screen, but all symbol (number, ponctuation, ...) is not from azerty keyboard.
Open neovim.as and type :ls
Expected output:
:ls
1 %a "[No Name]" line 1
Press ENTER or type command to continue
Current output:
Press ENTER or type command to continue line 1
I took a look at ui.coffee
and it seems like supporting ligatures would be within reach. Ligatures are great because modern programming fonts are beginning to include support for awesome symbols for functional languages etc.:
For example, see https://github.com/tonsky/FiraCode
It looks like the canvas drawText API that you're using supports ligatures but it merely requires that you draw the two/three characters in one call to drawText
. I saw that neovim-e
draws one character at a time, however.
Should there be some intermediate representation that neovim-e
keeps track of instead of just executing raw single character draw/put commands? Could neovim-e
maintain an up to date representation of the entire screen so that when anything changes, something like a "mini react" can find the characters that are likely dirty and draw only those lines (and the entire lines so that ligatures will render correctly)?
I confirmed that the js is sending command keyboard events to neovim but apparently neovim doesn't respond at all to them. What is going on inside of neovim?
On Linux, in Gnome 3 at 2x scale, Neovim-e is still at 1x scale, and it's tiny. I wonder what's the best way to double it's size on Linux.
It would be very helpful to support opening multiple files from a shell into a single neovim.as window. The editor currently only considers the first argument to be a file to open.
This is pretty easy to reproduce. When I have the cursor near the right side of the window and then resize, I need to be very careful to resize the window such that the cursor remains lined up with the characters in the window, otherwise it moves off the character grid:
When I try to scroll with the touchpad in OS X, it might scroll the window that I'm in for a split second, then after that it just scrolls the top left window no matter what window the mouse is over.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.