280 points · by robenkleene · 5y ago · 140 comments
I wonder if it's possible to reduce duration slightly. Personally I find animations useful and a great improvement to UX but I prefer as short durations as possible. I also set 0.5x animation duration / scale on Android and it makes it feel much snappier, but don't like outright disabling them.
(a) GIF is not the right format here, use a video format because it’ll produce a visually superior result (proper colour, no dithering needed—not that it actually is even with animated GIFs) and much more usable result (not autoplaying if the user agent’s configuration says not to, allowing scrubbing, showing how long the video is rather than you having to guess “is it still going, or did it start again?”, that kind of thing) in significantly less space.
(b) Things like this emphatically do not belong in the code repository, because they bloat things forever despite being for demonstration only. A repository that would have been 1.0MB and cloned in well under a second is instead 46.2MB (43.8MB of GIFs and 2MB of PNGs) and took me about fifteen seconds to clone (cloning repositories from GitHub is always slower than you’d expect when you’re on the other side if the world, in AU/NZ).
You can rewrite history on the media branch so the files don't accumulate whenever you update them.
I found this idea here: https://medium.com/@minamimunakata/how-to-store-images-for-u...
It's far from ideal, and I doubt anyone is claiming otherwise, but GIFs in Github READMEs are entirely standard practice.
EDIT: Well, there you go. Video was introduced within Github this year: https://github.blog/2021-05-13-video-uploads-available-githu...
EDIT: didn't think I have to clarify this, but when I say put a screenshot, I mean "A"(1) screenshot, if necessary.
Anyway, the default animation durations are IMO too long, at least the cursor animation, I couldn't make the window animations work, wonder if it's related to that error message.
[edit] nevermind, I see there's a released build so I'll just use that and go the patchelf route
:NvuiCursorAnimationDuration 0.1
That'll reduce the duration to 0.1 seconds. The animation also runs at a specified frametime in ms (divide 1000 by FPS), default frametime is 10ms (so 100FPS). You can modify this using
:NvuiCursorFrametime 5, for example, for a 5ms frametime (200FPS).
Any longer, and I want to throw the computer out of the window.
Why are they doing this? And why does it make you happy? I don't know much about the difference, but from what I've seen it seems like a lot are going the other way (OpenGL -> Vulkan). For example, isn't Godot 4 going to be primarily on Vulkan whereas the current version is all OpenGL?
The author complained that using Vulkan and the skulpin library “greatly increased the difficulty for some platforms of installing the correct graphics drivers”
https://old.reddit.com/r/neovim/comments/mvoimq/is_there_any...
I guess my question can be posed to any gui text editor. Still, nice project!
There are a few examples in the GUI based disassemblers world (like IDA pro) which use graphical arrows to show where branch/jump instructions goto. The usefulness of those is enough to convince me that perhaps more research needs to be done in this direction.
There is also the small advantage of being able to have more than one font type/size on the screen. Your navigator panel can be a smaller font size, Your inline documentation viewer can use a variable-width font.
The counter-argument to all that is always: "Is it worth giving up the ability to be used in a terminal to add those few features?"
Everything else can be defined as "style" and gets very subjective. nvui looks like it has nice animations and smooth scrolling.
A very basic feature is that IDEs underlines in yellow for warnings and in red for errors, as well as show fix-it popups when hovering the mouse around the error area I don't believe a terminal can do that while keeping syntax highlighting no ?
E.g. here's a plugin for simple-term to add support for it: https://github.com/hexoctal/st-undercurl
The Kitty terminal has all kinds of graphics addons including coloured undercurls and images too:
https://sw.kovidgoyal.net/kitty/underlines/
Vim and NeoVim both support coloured undercurls too.
Vanilla Vi users would use :make to populate the location list, and then :cn or :cp to navigate back and forth. :cope to open up the quick fix window where you can use all your regular VI keybindings to navigate. Enter opens the location under the cursor in your previous VIM split.
There are also plenty of plugins that add inline diagnostics. It's common to use bindings for navigating these that ape the spell check navigation bindings ]s and [s.
I updated some Emacs package recently and now it opens any errors in a list buffer.
- Splits I can drag around to move and resize with a mouse
- "Native" window tabs instead of terminal-style tabs
- A gvim-style menu bar with some operations for which I can't be bothered to remember the key combination.
So, overall, mostly mouse support and better discoverability. I've tried a few though and haven't really found what I'm looking for, open to suggestions :)
You can already use the mouse to resize splits in neovim, :set mouse+=a
> "Native" window tabs instead of terminal-style tabs
Which features would "native" tabs provide that aren't already available?
> A gvim-style menu bar with some operations for which I can't be bothered to remember the key combination.
Which operations would you put under the menu?
In ideal world: reordering, tearing off and merging.
> Which operations would you put under the menu?
Ostensibly, all of them?
You might want to watch https://github.com/glacambre/nwin
now, that's a good one.
Overall I like it a lot.
This[0] post about the early days of NeoVim development made some interesting points about Vim, but one choice quote I recalled and had to google,
> Some of Vim’s source code isn’t even valid text. It’s not ASCII or UTF-8. The venerable file can’t figure out the encoding...
Re-building things to a more solid foundation enables new workflows that are currently challenging. As a Vim user, I have longingly looked at the Emacs ecosystem, with its saner extension language (though Emacs lisp has its own historical baggage weighing them down). Once Lua becomes the default, I expect to see new evolution in features that would otherwise not have made it to the Vim scene. At worst, I can imagine VSCode javascript plugins get transpiled to Lua to run within NeoVim.
[0] https://geoff.greer.fm/2015/01/15/why-neovim-is-better-than-...
Is Neovim flexible enough that it could stop being vim? Remove the modal key-system and implement something of your own? Has enough introspektion to allow something like emacs which-keys? This is a module which show a list of valid keys that can be pressed when you are inside a keychain.
Some things I like about neovim over vim.
- Lua integration as first class citizen.
- Treesitter
- lsp built in
- Feeling that the community is super active and in a period of movement.
I love being able to hack and add specific functionality to my own workflow in lua just as part of the editor. I can add features in a way that I just can't in VS Code or vim. It's no emacs level of hackability, but it's a happy medium for me.
I have no knowledge about VSCode's JS nor NVim's Lua APIs beyond that one can write extensions in these langs. Would you be able to expand on what can you do with Lua in Nvim that can't be done in VSCode? That could really be a tipping point for me.
Meanwhile the "hello world" tutorial for extending VS Code starts out with installing Node.js & multiple npm packages and compiling some source file.
For a power user it's just not the same, and there's no way I'd ever switch to another editor without this flexibility.
As a result, the plugin ecosystem is exploding. You can find a directory of neovim specific plugins here: https://neovimcraft.com
These are by no means must haves, and there are workable alternatives, but IMO they're nice improvements that warrant the small switching overhead.
I've tried NeoVim for a couple of month this year.
It's a tad snappier than vim, but there are a number of "quirks" (behaves ok, but doesn't behave exactly like vim) that made me walk away from it: at this point, vim is so hard-wired in my brain that any tiny difference in behavior is painful.
1. searching for stuff with / jumps prematurely to destination, drives me nuts.
2. I have most "smart" features (auto-indent type stuff) disabled for C++ mode in my .vimrc, which works fine in vim but is completely ignored by neovim. It requires futzing around with post/pre loading of plugins, which - 1.who has the time to do these things 2. makes for incompatible init files.
3. does not read .vimrc by default and requires linking files to have a united init file
I'm sure with enough work, I can get it to behave the way my poor old stiff brain expects, but - again - who has time for stuff like this.I might revisit neovim the day I have enough time on my hand to figure out how to install the whole tresitter shebang.
I still use Neovim, but this is my main gripe. Broadly I like it a lot, for reasons others have covered.
[0] https://github.com/rohit-px2/nvui/blob/main/assets/display/v...
> Customizable cursor height (see :h NvuiCaretExtendTop and :h NvuiCaretExtendBottom)
Ex. :NvuiCaretExtendTop 200, :NvuiCaretExtendBottom 100 (see below)I do something similar by setting cursorline and cursorcolumn. It gives me a (more subtle) full-file crosshair showing where the cursor is.
Ive been down the rabbit hole of setting vim’s code intelligence up (ale and all that), in the end it felt brittle and not good (vs perfect completion for golang/typescript in my IDE).
So Im curious, whats the case for going pure windowed vim like this?
Neovim 0.5 now has a built-in language server, and 0.6 will have even more language features available via tree-sitter integration. The best is yet to come.
Yes, there's still the cost of setting it up in the first place still. That comes with the territory. There are some decent neovim distros out there (lunarvim, nvchad, etc) to get you started though!
I find the fact that neovim runs in a terminal an advantage; they share font configuration and colour and other settings, and I can quickly jump in and out of nvim from a terminal.
Having it run in a separate window just means I now have an extra window lying around (the terminal where I typed `nvui`).
And smooth scrolling works on regular neovim with https://github.com/psliwka/vim-smoothie
Doesn't 'smooth scrolling' mean scrolling in increments less than a full line, to avoid the janky jarring jump from one line to the next?
I don't get how you can do smooth scrolling in a terminal interface? The screenshots in that link aren't smooth - they jump whole lines at a time, unlike the screenshots you can see on the NeoVim page.
Via a terminal bitmap rendering protocol like sixel [0], or KiTTY’s terminal graphics protocol [1]? I wonder if a library like notcurses [2] could allow for efficient rendering of text to a terminal graphics framebuffer?
[0] https://saitoha.github.io/libsixel/
One line is plenty resolution. What next, you'll ask for subpixel rendering to deliver subpixel smooth scrolling?
Maybe you'll find some advantages in having a long-running editor process, rather than starting one from the terminal whenever you want to edit? For example, ctr+click on a compiler error message in the terminal could open the file at the correct line in the (already running) nvui process.
No vim emulation in your GUI editor, but actual vim in your editor.
How is it better than this with NeoVim's LSP and treesitter support?
Not affiliated with the project, or even really a user, but bought a license a while ago to support what I still think is a nice idea.
Additionally, in my mind a terminal serves a similar role as plain HTML web pages - it constrains what can be done and I am extremely used to it, which makes it very easy and quick to use. On the other hand in a GUI editor (or a JS-heavy web page) it feels that it has more possibilities, which allows authors to customize things in ways that I don't expect, which can take away from my focus on what I'm doing. There's also the additional curse that because of these possibilities, authors seem eager to change things more often, whereas I value stability.
... You know that GUI apps are able to edit code over SSH too, right ?
I'm not even shocked anymore, at how out of touch and stuck in their ways some people are.
If this is your workflow: terminal; ssh <remote server>; vim <file>
...