Neovim v0.2.1 released
github.com
github.com
An instance of this is Oni[0].
> Oni brings several IDE-like integrations to neovim:
Quick Info
Code Completion
Syntax / Compilation Errors
Fuzzy Finding
Status BarPersonally I use terminal vim not any sort of nvim (maybe I should change over but then I potentially have to maintain two sets of plugins, one for nvim and one for vim. ).
No if you want to call this out, I'd call it out for the lack of features. This only supports code completion in JS and TypeScript. I have code completion plus snippets for a lot more then that with vim.
Honestly if you want to wow me, someone should build a GUI configuration tool for neovim/vim. One big benefit of GUIs is that you can generally see all the possible settings with tool tips and explanations, and I can see that being useful for vimmers, especially if it did the right thing, like using ft-plugins to do filetype specific settings, instead of a bunch of one line autogroups based on file extension.
Yes there are vim config generators, but the neovim api means you could programmatically query the current configuration and display it along with the options, meaning you could have interactive configuration modification.
No, this only supports the extended features fro completion for those languages. It should use the simpler completion system for other languages, in which case you are using vim's support anyway.
I use this in my ~/.config/nvim/init.vim:
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath
source ~/.vimrc
That lets me directly use vim config from neovim.Then I set up an alias in my zsh profile:
alias vim=nvim
All of my plugins thus far have worked without a hitch (and I have a lot of configuration/plugins). If I ever run into problems, I can bail out by removing the alias (or for a one-off editing session, I can just run: $ command vim).
You might give something like that a go.
Which seems to have fixed things.
It's not just "literally use Neovim as the editing engine", I've tried to make editing the text in "Sublime Mode" work too, including running Sublime plugins. Work in progress, but afaik the most complete Vim integration for an existing editor. Waiting on updates to both Neovim and Sublime Text to polish it a bit more.
VSCodeVim is using it as a reference for some of their new work as well.
But we can chose to ignore those "some", just like they can keep using whatever works for them.
However I really wanted to have a little more interactivity (and visuals) than what the terminal can provide and so far Oni has delivered it good enough for me.
That said, there are a lot of daily editing issues to be solved before it can be said battle-tested.
[0]: https://github.com/neovim/neovim/wiki/Related-projects#gui
1. a single shared runtime install, installed transparently by the first thing to need it (similar to how the Adobe Air first-use experience worked), rather than a vendored dependency?
2. a shared VM that ran its apps in separate V8 execution contexts (like how browsers isolate tabs), but with a lot of shared resources so that each Electron app didn't end up with a GB of (mostly redundant) memory consumption?
I find that most people don't object to HTML5 apps per se; they just object to the way Electron handles things. The above was going to be the strategy of Chrome's "app-only runtime" mode, until they just killed off Chrome Apps altogether. I still think it's a decent strategy, all-said.
You can, for example, print your application's interface (i.e. your document), without having to implement your own print-layout logic, because that logic can just be the browser doing CSS @media(print) to the DOM. (Which can, with a few @media(print)-scoped rules, hide all the toolbars to just leave the document.)
Or, users can use User-Agent stylesheets (think "forcing high-contrast" or "disabling serif fonts") and browser extensions to customize your application [or, more importantly, anyone's old closed-source abandonware application that's never gonna make an accessibility update ever again], because your application's interface is guaranteed to exist in the intermediary state of a DOM tree, where those things can get to it to munge it†.
† (This is also true in various ways for each OS UI framework—and you can create native "extensions" like screen-readers that use the OS accessibility APIs of each OS—but you have to redo this work. WebExtensions are cross-platform.)
Also, with web-apps, users get final control over how the application is sized and shaped on the desktop, and so apps are forced to be at least semi-responsive—which is easy, because the default layout algorithm for any container, if you don't override it, is a reflowable-text algorithm. Web-apps are the only apps where I'm (nearly) guaranteed to have the ability to adjust the em-widths of blocks of text so that they're actually comfortable to read.
And, as an added benefit, as long as you ensure that you really are serving a static HTML document at each URL that is progressively-enhanced into being your app—then your web-app can double as a programmatically-accessible infobase. Google can't index a native app. You can't scrape a native app. You can't embed microformats into a native app. Etc.
I believe that a web-based UI would still be slower than a native application, if only because of the huge number of abstractions in-between, but I'd say it's something that can be overcome by (a) newer hardware, (b) better development i.e. careful profiling and optimization, (c) advancements made by the browser engine developers, and (most likely) a combination of all three.
There's also the issue with the Web as a platform, but honestly, it's not as bad as purists on HN make it. No technology is perfect. I used to be a very loud opponent of using Web technologies for applications, but I realize that ship's pretty much sailed, and we could have had a much worse outcome than this.
My main gripe with Electron has always been the inability to share resources between instances. If firing up Slack or VSCode would have the same net impact on my memory use as opening a new Chrome tab, I'd gladly run them and quit complaining.
Let's take Slack as an example. All the keyboard shortcuts use weird modifier keys like option instead of command, and I can't discover any of them by looking through the menu bar like I can in a native app.
Or for another example, the Services feature of macOS doesn't work correctly with Electron apps. In any native app I can select some text and then trigger a Service on that text (for example, I've defined a service to be able to select a bug id and hit a keyboard shortcut to view that bug in our bug tracker). No such luck in Slack.
> One more thing. I apologize for less work being done on the main repo. Much of my effort recently has gone into the neovim version of this extension (still in development).
I've been a very happy neovim user for over a year now (on linux). My switch was pre-vim 8 so the ability to have things (like plugins) run asynchronously was a huge plus, but now vim has that too.
For me the biggest selling point is the plugin architecture, I've been a vim user for over a decade now, and I'm only writing my own vim plugins now, because neovim allows me to do that in the language of my choice (ie. not VimL).
Python example:
import vim
# Show current directory in Vim
cwd = vim.eval('getcwd()')
cmd.command(':Explore %s | redraw' % cwd)
Ref: https://geoff.greer.fm/2015/01/15/why-neovim-is-better-than-...It's not complete coverage, but it's not "the API is just a thin Python wrapper around Vim commands as strings" as your comments suggest.
I'm not trying to be mean or mislead. I've used vim for decades, and emacs too for that matter. My favorite editors by far.
Vim gives you buffer, window, cursor and range, plus eval and command. The eval/command stuff is a "shim", insofar as you have to wrap them yourself if you want more programmatic access; like you'd have to do `def getcwd(): vim.eval('getcwd()')` But for a lot of what you want to do, you're messing with buffer/window/cursor. I wouldn't call it a full-featured scripting API, and certainly Neovim's is better, but your posts suggested all the scripting API was was just an entry point to ex commands. There's a lot more than that, to the extent that it covers most of what you want to do.
My (perhaps uncharitable) understanding, as a dedicated vim user with no thought of switching, is that vim has that because of Neovim. (On rereading, I guess this is what desireco42 (https://news.ycombinator.com/item?id=15650991) means by the "kick in a butt that Neovim provides for vim".)
Compare this to VSCode, Atom or IntelliJ.
[1] yeah, the language doesn’t have to change and “evolve” constantly, if its roots were planned thoroughly.
I wouldn't call it 'not in development' and even if, then 5.1 is a fine version of Lua and LuaJIT is battle tested very well and rock solid still. Changes in Lua 5.2 and 5.3 are breaking (and some are deep, like the ints, bit ops, function environments) but most of 'usual' code is compatible between 5.1, 5.2 and 5.3.
I learned Lua 5.2 and then went back to 5.1 when 5.3 came out because I didn't like the int stuff in 5.3 and didn't want to use an obsolete version (5.2) with no upsides (5.1 has the upside of being compatible with LuaJIT).
Do you care to elaborate? I don't see anything wrong with it.
(And it's definitely more insightful than the slightly older sibling comment, which apparently has not been downvoted.)
I believe nothing I said is wrong and anyone is welcome to prove me wrong. I also answered the original questions/doubts clearly (Is LuaJIT stuck on 5.1 and no longer in development - no and no and there is nothing wrong with 5.1 itself). The only downside could be how brief I was but I gave plenty of keywords ('ints', 'bit ops', 'function environments') for an astute reader to google or look up in the documentation of Lua (which is a Ctrl + F friendly one pager plain HTML with minimal styling and no JS, I have it as a single .html file with inline PNG and css on my desktop to use offline).
This stealthy downvote drama is why I use HN passively, logging in only to do a fire and forget comment. I've just avoided seeing this entire downvote debacle unfold in real time during my normal browsing (and thus avoided wondering what's going on or if I were providing people wrong information or something else wrong on my part, since it's not like any downvoter told us why they did it) because of that habit.
First of all, original 5.1 was a complete language with few technical problems unsolved. These problems were hard and didn’t exist, say, in javascript, because it has no such primitives at all, not because 5.1 was bad. To name a few fundamental: yield across pcall, C-call, for-iteraror; specific metamethods for regular tables.
LuaJIT derived from 5.1 and then development went in parallel, never being stopped or unmaintained. Original Lua experimented with features in 5.2 and while it fixed and added few nice things, it used completely different env resolution (which also doesn’t exist in javascript). 5.2 was also improved in execution speed. LuaJIT specified that it will stick with original env scheme, and personally I find it more powerful than new one. All others features were backported from 5.2, so effectively LuaJIT is 5.2 with setfenv() still working, not some obsolete chunk that you may try to guess from semantic versioning, which doesn’t take place in Lua. Versions of Lua are NOT “semantic”.
5.3 introduced things that personally I find mad, and it diverged from 5.1/5.2, which were pretty compatible if written with care (not more incompatible than javascript is in different browsers; an order of magnitude less so). So, the future of 5.3 is somewhat unclear to me. It is still good language, thought, planned, experimenting, technical, non-crowd non-legacy driven. It will show what’s wrong and what’s right, as all Lua versions perfectly did.
To sum it up. If you’re going production, you can take any version of Lua, and it will be still more compatible and feature-rich than different versions of javascript. If you want all 5.1 design holes covered and incomparable execution speed, then you take LuaJIT in place of 5.1. If you want new environments (read what they are before you want), take 5.2. If you want to test new experiences and language design, take 5.3. But there is no superiority in any version, unless you’re taking one of these perks to extreme. These are different but similar languages with different strengths.
I know it’s all harder than just “5.1 < LJ < 5.2 < 5.3”, but what can you do?
Python 3 was meant to solve a problem (among other features ofc). 5.1, 5.2 and 5.3 are engineerng experiments, there is no “problem” that LJ has in respect to these two, nor the other way round.
So Lua 5.3 has a lot of breaking changes without a clear upgrade path. LuaJIT simply isn't going to support this, because its users generally use it more like a normal scripting language like Python and expect more stability.
The problem is that the overwhelming majority of vim scripts are written in vimscript. So even if you switch to using some other language to script vim, virtually all the rest of the vim ecosystem will still be in vimscript.
https://geoff.greer.fm/2015/01/15/why-neovim-is-better-than-...
Example for python from the post
import vim
# Show current directory in Vim
cwd = vim.eval('getcwd()')
vim.command(':Explore %s | redraw' % cwd)
Technically it's python, but it's a shim.I am a web developer so I am mostly editing html, JavaScript, ruby and css files.
I love my tmux + vim setup. Give me reasons to switch. I mean practical reasons to switch not technical implementation niceties.
But these days it also makes sense to ask instead "why should I use Vim?" The version of Vim that you actually use probably wasn't installed by default on your main development system. So installing Nvim is the same as upgrading Vim.
And since Vim 8.0 does terminals and asynchronous jobs now, I don't see much value for Neovim unless you have an IDE that integrates Neovim via its API.
This will be the biggest win for Neovim. When something like pycharm/webstorm vim support is moved to real vim rather than a reimplementation I will change.
(And to be fair, switching on Arch is really easy since it's in the official repositories)
From the nvim GitHub page:
Modern GUIs
API access from any language including clojure, lisp, go, haskell, lua, javascript, perl, python, ruby, rust.
Embedded, scriptable terminal emulator
Asynchronous job control
Shared data (shada) among multiple editor instances
XDG base directories support
Compatible with most Vim plugins, including Ruby and Python plugins.- It's ok if this person doesn't want to use Nvim.
- The "Why should I switch to Nvim" question is based on a questionable premise. I think the question should be "Why should I should to Vim".
I'm using tmux less now (although my knowledge of it was limited at best), but its still useful for persistence and some window management.
Take a cross split.
https://i.imgur.com/Flqexnq.png
I left neovim for vim, though, because of the known system clipboard pasting issue.
What clipboard issue is that? I couldn't find it online, and don't currently use neovim.
It makes it really easy to write Perl/c, compile and run it, search the history for output of previous runs etc. It's a big improvement on having to have multiple putty sessions, or even alt-tabbing between shells on a box with a UI.
I guess it all depends on your workflow though. I mainly use vim in a tiling wm environment on Linux, not through putty on Windows.
Maybe this could lead to something like having a better modal editor than what evil is already providing (and doing a great job at it), with emacs' benefits like orgmod and magit?
What are my fellow hners thinking on that?
Have decided that just going full emacs would be a better route if the pain is going to be there anyways.
FWIW, after using Evil for 1 year and generally liking it, it still fell a bit short for me since you are still in emacs and still need emacs keybindings some of the time, and some other modes will conflict with Evil, so it was a bit hard to maintain. I switched from Evil to God Mode which gives you modal editing in emacs but using emacs key bindings. I have found this to be a good compromise.
Edit: just found that gv will reselect the last visual mode selection, which makes this much less cumbersome.
" Align blocks of text and keep them selected
vmap < <gv
vmap > >gv
https://github.com/neovim/neovim/releases
I've updated the wiki URLs also, thanks for mentioning it.
VimR is nice, but very buggy in my experience. I'm using Neovim.app at the moment after fixing a few bugs in it, but it's got plenty of issues.
This API, for example as let people write a vim plugin for VSCode that actually runs neovim in the background.
It's pretty slick.
From a user point of view, more plugins is probably it. I don't know if vim has it yet, but neovim has asynchronous process support, so repls and terminals are easier to use.
It is an ambitious fork of emacs, written in rust.
(Off-topic: you guys rock, I hope the Neovim vision of a high quality Vim component scriptable picks up steam and maybe one day in the distant future Neovim powers a top-notch IDE powered by Lua scripts, instead of the ugh Vimscript ones)
If it wasn't for your post, I wouldn't have known this even existed. Now that I do know, I'm wanting to know more before I bother trying.
(1) The difference is small, but one could argue that shift-z shift-z are more like 3.5 clicks, while shift-dot x are certainly 3 clicks.
(2) People are used to do a colon before an actual interaction with the editor instead of the text.
(3) taste. Even if one argues that both has the same effort then taste is the final decision and there people can be different.
Personally, I just use :wq because muscle memory and that I sometimes find knowing the last time I even opened the file in an editor is a useful thing to know.
nmap <C-m> <ESC>:w!<CR>
nmap <C-n> <ESC>:q<CR>
nmap <C-l> <ESC>:q!<CR>
This is much better. Ctrl-M followed by N does a fast :wqhttps://squaredesign.com/builds/wq/
:wq