News for hackers. Stuff that matters.
Re:Neovim v0.4.0 by vhakulinen on Monday September 16, 2019 @01:55AM (#20981450)
I'll just leave a shameless plug for my neovim GUI project here: https://github.com/vhakulinen/gnvim. It has a WIP PR[1] for implementing multigrid support, which would allow features such as scrollbars.

There are many other GUIs too, such as oni/oni2, gonvim, neovim-gtk and neovim-qt. Extensive list can be found here: https://github.com/neovim/neovim/wiki/Related-projects#gui

1: https://github.com/vhakulinen/gnvim/pull/95

Re:Neovim v0.4.0 by rjzzleep on Monday September 16, 2019 @04:06AM (#20981998)
I just tried this. I get rendering artifacts when scrolling.

BUT! The scroll speed is absolutely wonderful. I've tried all the UIs and always find myself going back to the terminal, but this is something else.

Although I have to say fvim looks tempting as well and vimr(I'm not on MacOS anymore).

For those people mocking vim users and bragging about their IDE's. With languageserver and the other kind of refactoring daemons available for a whole host of languages nowadays these editors are much closer to IDE's than ever before.

The only things that are not really first class citizens are IMHO:

1. refactoring(outside of C++ and Java)

2. profiling

3. breakpoints

EDIT: I'm quite happy with the tmux setup I have but thanks for the suggestions. The main problem I see with neovim is that the separation of the python library while nice for update iterations causes issues with virtual environments.

Re:Neovim v0.4.0 by coldtea on Monday September 16, 2019 @07:48AM (#20983118)
>Although I have to say fvim looks tempting as well

Visited its page to have a look... I'm not sure why they'd put a screenshot with a variable width font, which automatically puts lots of people off when it comes to coding...

It's like having a screenshot of your bitmap editor, and showing it editing goatse.cx...

Re:Neovim v0.4.0 by franek on Monday September 16, 2019 @11:45AM (#20985224)
The option to use proportional fonts is a very rare feature in vim-like text editors (the only other way I know of is to use terminal vim in mlterm), so for people who want this the screenshot is good advertisement.

In fact, after reading you comment, I promptly startet to install it (still compiling as I type this). My use-case is creative writing: I'm very used to vim keybindings from coding, but prefer to have a variable-width fonts for writing.

Re:Neovim v0.4.0 by v-yadli on Monday September 16, 2019 @12:33PM (#20985807)
fvim author here. The font in the screenshot is `Iosevka Slab` which _is_ monospace -- `fvim` currently syncs with the neovim grid system and doesn't support proportional fonts well.

Sorry about the confusion -- I think you've already discovered that (after 46 minutes)!

Re:Neovim v0.4.0 by coldtea on Monday September 16, 2019 @12:55PM (#20986051)
>The font in the screenshot is `Iosevka Slab` which _is_ monospace -- `fvim` currently syncs with the neovim grid system and doesn't support proportional fonts well.

Aha, looked like a proportional font was used to me. I'd use a more well designed monospace font for the first impression!

Re:Neovim v0.4.0 by franek on Monday September 16, 2019 @12:44PM (#20985928)
Wow, I was completely fooled by the serifs and my excitement. Thank you for clearing that up!
Re:Neovim v0.4.0 by eitland on Monday September 16, 2019 @04:27AM (#20982090)
> For those people mocking vim users and bragging about their IDE's.

Haven't seen this, -it usually goes the other way:

You're doing it wrong, you should use vim!

(I know enough vim to effectively use it to edit configs etc, but I just prefer my IDEs.)

Re:Neovim v0.4.0 by chapium on Monday September 16, 2019 @09:32AM (#20983823)
Use vim plugins for your favorite ide and enjoy both! (or not all, we all have preferences:))
Re:Neovim v0.4.0 by pnako on Monday September 16, 2019 @05:44AM (#20982438)
I'm not going to mock you, but why not just use an IDE with a vi(m) mode or plugin in the first place, if you really want all those features?

Modern IDEs are following a platform + plugins architecture that is probably as flexible but more robust than whatever you can tape together around vim.

Re:Neovim v0.4.0 by feanaro on Monday September 16, 2019 @06:39AM (#20982731)
vim modes in IDEs are often inadequate (if this is not immediately obvious, you probably just don't use vim as fully as possible). The IDEs are often (too) complex in the sense of a hodgepodge of GUI options and menus which are hard to navigate. You often can't put the IDE configuration in a version control system easily. IDEs are often sluggish. The plugin system for vim is superior to most IDEs.

It's not that using an IDE with a vim mode is not a possible viable alternative, but it's a game of trade-offs, as usual.

Re:Neovim v0.4.0 by pvinis on Monday September 16, 2019 @07:04AM (#20982871)
I agree completely. For me, for now, I have vscode with vim emulation. I find that it's more convenient to have everything vscode has + vim keys for a lot of things, than have all of vim + try to make vim do what I like from vscode.

I really hope in the future I'll find the time to do that, but for now I am content. It's always a trade-off.

Re:Neovim v0.4.0 by cagmz on Monday September 16, 2019 @10:26AM (#20984337)
Have you noticed any sluggishness when using Vim commands in VS Code? I use nvim + tmux as my go to and it's pretty responsive (still has trouble catching up to me sometimes) but I often have to wait for VS Code.
Re:Neovim v0.4.0 by pvinis on Wednesday September 18, 2019 @08:53AM (#21004830)
I have to wait sometimes, but normally it's fast. It's only when (I think) somehow the vim emulation bugs out that I need to wait a couple of seconds or just hit esc 5 times. Thankfully it's not often.
Re:Neovim v0.4.0 by alpaca128 on Monday September 16, 2019 @06:54AM (#20982807)
Because Vim modes usually don't support more than a handful of basic features, let alone plugins and custom keybindings.

Vim also starts up without any noticable delay and can be used for every text file, no matter in what context.

Re:Neovim v0.4.0 by m712 on Monday September 16, 2019 @08:09AM (#20983241)
>Vim also starts up without any noticable delay

Only if you run it without any plugins. Unfortunately if you have a lot of third party packages, vim startup times start to get closer to emacs startup times (both of which are still better than any IDE I have used, of course). I keep a vim.norc alias in my alias file which launches vim with an empty .vimrc for this very reason.

Re:Neovim v0.4.0 by alpaca128 on Tuesday September 17, 2019 @02:19AM (#20992188)
Strange. I use 15 plugins and according to the --startuptime flag NeoVim takes 32ms to start. Vim takes about twice as long, but that's still so incredibly fast I'd call it instant. I guess when it comes to plugins there are some real heavy-hitters out there that I somehow managed to never try.
Re:Neovim v0.4.0 by wruza on Monday September 16, 2019 @12:47PM (#20985957)
You could use autocmd for filetypes that require plugins, so they don’t load for configs/texts. If your pm of choice allows this separation, ofc.

I’m not very experienced with complex plugins, but most of what I’ve seen did nothing unless explicitly initiated. Maybe there are global variables to control that.

Re:Neovim v0.4.0 by soraminazuki on Monday September 16, 2019 @08:07PM (#20989820)
I've found that profiling startup time and lazy loading plugins could reduce your startup time to 100~200ms even if you have more than 50 plugins.
Re:Neovim v0.4.0 by drbojingle on Monday September 16, 2019 @06:24AM (#20982652)
Vim has a plugin architecture. The built in language sucks balls but it does work.
Re:Neovim v0.4.0 by Crinus on Monday September 16, 2019 @05:20AM (#20982311)
> With languageserver and the other kind of refactoring daemons available for a whole host of languages nowadays these editors are much closer to IDE's than ever before.

Most likely true, though i think the "I" part of "IDE" is woefully ignored and (at least to me) is much more important than a hodgepodge of barely related programs strung together with duct tape.

Re:Neovim v0.4.0 by rjzzleep on Monday September 16, 2019 @05:31AM (#20982374)
That's precisely what every single python IDE does. They take isort, black, jedi or whatever other engine together and stitch them together in a user transparent way.

Omnisharp was literally the attempt of MonoDevelop to create an open source alternative to the Resharper engine.

The completion agents for VIM or VSCode do the presentation layer for the lower layer(the language server daemons, or custom completion agents. YouCompleteMe however is all that together in one not as fancy but I like it).

I get where you're coming from, but basically the difference is that vim by itself is a raw editor and until neovim came along never made an effort to merge the functionality that was required for something like this to happen in a nice fashion.

Editors like Oni are basically distributions like VSCode with defaults that are more inline with what you say plus a nicer presentation layer.

Re:Neovim v0.4.0 by Crinus on Monday September 16, 2019 @06:31AM (#20982685)
Yeah well, it isn't like Python IDE are much better :-P. I think in general most languages with unix-ish background do not tend to have truly integrated development environments as unix was always about stitching together stuff. Only Borland somewhat managed to make real integrated environments for their C/C++ tools and even then it wasn't as good as the stuff they had better control over (turbo pascal, delphi, etc).

Java and NetBeans is (or was, before Oracle botched it) probably the best IDE (in terms of integration) for a toolset with a unixy background.

Though none of those compare to something like Smalltalk, Lisp or even Microsoft's QBasic and (pre-.NET) Visual Basic.

Note that i'm talking about how integrated the IDE is with the language and its tools, not about how good or bad the language is.

Re:Neovim v0.4.0 by rjzzleep on Monday September 16, 2019 @07:46AM (#20983099)
I think this isn't about unix tools or philosophies. It's about the fact that for a very long time these big monolithic projects didn't really allow any integrations.

Vim didn't allow integration because there was no way interface to it, and it's not an easy codebase. Neovims work is proof of that. C++ compilers didn't allow integration because they were big monstrous projects and when you need to do proper c++ indexing you basically need to compile the whole project.

For C++ this changed with clang and even for clang it took a lot of iterations and bugs inside of libclang to allow for this capability.

Naturally one of the best C++ IDE's was therefore also by the producer of their own compiler (Visual Studio).

These boundaries are slowly fading, so these arguments are kinda moot. A few examples:

https://clang.llvm.org/extra/clangd/

https://github.com/Andersbakken/rtags

https://github.com/cquery-project/cquery

Re:Neovim v0.4.0 by Crinus on Monday September 16, 2019 @08:14AM (#20983269)
No i think it is actually about philosophies (or at least a way of looking at how software should be made) - again, i point out to Borland (whose IDEs were always provided a way more integrated environment than anything Microsoft ever did - e.g. for C++ MSVC always called out to a separate compiler program that had to reparse/restart its state for each file whereas BCC had the compiler as part of the IDE executable that would keep state across compilation in memory and even use the editor text buffer for 'input' if there was one instead of loading a file from disk) and Smalltalk (where the IDE and runtime are the same thing, you are modifying a live environment with tools written in that same environment instead of cold-running everything from start).

libclang might be a bit closer but it still is something separate from whatever IDE it is used for.

Honestly i do not believe it is even possible to what the sort of integration i'm talking about by stitching together separate projects no matter how many extension points and hooks those projects provide - by definition they aren't made with a singular coherent vision where everything is meant to work together, instead each project has its own idea of how it should work.

MSVC could in theory be able to do that since the IDE is made by the same company as the compiler, but in practice the teams behind it are probably acting as separate "sub-companies" inside the bigger organization. They're not seen as a single "C++ development environment" project but as two separate projects that happen to communicate with each other.

I'm not sure if 'philosophy' is the proper term here, but it is certainly about how you believe that software should be made and having that in mind at all times when designing it at all levels - be it the functionality to provide or how that will be implemented (e.g. a compiler that runs as a simple standalone application can just use globals for the state and perhaps not even free memory at shutdown - see dlang as an example - whereas a compiler meant to be integrated as a library cannot do that).

As an example, for a Borland-like approach (at least based on my understanding of it), adding a language extension to -say- provide meta-data for classes wouldn't be something that only the compiler developers cared about, but something that the developers of the compiler, the debugger (for being able to display the meta-data), the IDE (for editor auto-completion and automatic code editing - later Borland IDEs could modify the code - and debugger UI), the framework library (for taking advantage of it and providing a 'best use' scenario), etc. And all of those would influence the new functionality instead of being something that was added by the compiler team and then the rest would have to support (as it is done by pretty much every language that only exists as a standalone compiler or interpreter without any concern for IDEs, debuggers, UIs, etc nowadays).

Re:Neovim v0.4.0 by vhakulinen on Monday September 16, 2019 @04:26AM (#20982087)
> I get rendering artifacts when scrolling.

If you're using pango 1.44, that is a known issue and there really isn't a proper workaround yet. Quite a few applications using grid based applications are currently broken with pango 1.44.

Re:Neovim v0.4.0 by xyproto on Monday September 16, 2019 @04:27AM (#20982092)
Using NeoVim with nvim-qt should not result in any rendering artifacts.
Re:Neovim v0.4.0 by euoia on Monday September 16, 2019 @11:21AM (#20984950)
I am happy with Neovim in a terminal too. But I wanted I wanted it running as a separate application that I could launch and switch to, so I downloaded the iTerm2 source code and changed the icon and application name and created a profile that just runs Neovim. I find this works well, but maybe someone knows a simpler way, or a generic way, to do this on OS X?
Re:Neovim v0.4.0 by rjzzleep on Monday September 16, 2019 @11:49AM (#20985273)
I think you can use an applescript for that. I think you can compile the applescript to a .app and then run it. But it's been a while since I was in OSX

https://www.iterm2.com/documentation-scripting.html

Re:Neovim v0.4.0 by kps on Monday September 16, 2019 @10:08AM (#20984137)
I just wish vim+languageserver would catch up to where vim+mlcscope was fifteen years ago. (Specifically, finer-grained distinctions that just references to a symbol, e.g. assignments and calls.)
Re:Neovim v0.4.0 by Asooka on Monday September 16, 2019 @10:25AM (#20984322)
Have you tried rtags?
Re:Neovim v0.4.0 by cetra3 on Monday September 16, 2019 @02:51AM (#20981646)
Both neovim-gtk & gnvim are great but don't integrate nicely with standard ctrl + c, ctrl + v actions which is super frustrating.

VSCode with vim plugin handles this well with the Use Ctrl Keys option set. If you're in insert mode, ctrl + v will paste, otherwise ctrl + v will start visual mode. If you are selecting text, ctrl + c will copy.

Re:Neovim v0.4.0 by justinmk on Monday September 16, 2019 @02:53AM (#20981658)
You can create mappings for that.

Adding a bazillion one-off options like "Use Ctrl Keys" to avoid creating mappings, defeats the purpose of using vim, since creating mappings is the bare minimum way to configure it. (But Vim did so anyways for Windows, in the form of the "mswin.vim" plugin, which is enabled by default, causing confusion for users expecting vim to behave like vim.)

Re:Neovim v0.4.0 by cetra3 on Monday September 16, 2019 @03:27AM (#20981800)
I wouldn't even know where to begin to approach these mappings as they are highly context dependent. If it is possible with just normal vim mappings then that'd be excellent.
Re:Neovim v0.4.0 by justinmk on Monday September 16, 2019 @03:40AM (#20981875)

    inoremap <C-V> <C-R>+
    vnoremap <C-C> "+y
    cnoremap <C-V> <C-R>+
Re:Neovim v0.4.0 by majewsky on Monday September 16, 2019 @06:45AM (#20982762)

  vnoremap <C-X> "+ygvd
Re:Neovim v0.4.0 by nothrabannosir on Monday September 16, 2019 @05:47AM (#20982457)
A different way of tackling this if you don’t mind doing it “the vim way”: Most vim builds enable the + register to access the system clipboard (hopefully these two do so too, I haven’t verified!). “+p = ctrl+v, “+y = ctrl+c etc.

If you’re unfamiliar with registers look them up in the docs they are super useful. (Also have a look at the 0 register, e.g. “0p)

Re:Neovim v0.4.0 by e12e on Monday September 16, 2019 @05:56AM (#20982517)
In addition to sibling comment - does any vi(m) work with the (non) standard (for vi) ctrl-v/c out of the box? I understand setting the star/plus as default registry so that paste and yank read/fill the system clipboard. But using ctrl-V for paste is surely alien?

Nothing wrong with custom keybindings, obviously. But it sounds rather non-standard?

Re:Neovim v0.4.0 by cferr on Monday September 16, 2019 @10:44AM (#20984542)
Shift + Insert works on every platform I've tried it on. Ctrl-V/C are Unix console commands.
Re:Neovim v0.4.0 by daliusd on Monday September 16, 2019 @03:11AM (#20981731)
set clipboard+=unnamedplus

imap <C-V> <C-R>+

vmap <C-C> y

Most probably you want this as well:

cmap <C-V> <C-R>+

Re:Neovim v0.4.0 by emidln on Monday September 16, 2019 @07:49AM (#20983123)
Worth noting that this is Ctrl+Shift+v and Ctrl+Shift+c.

The C-v (Ctrl+lowercase v) is important for literal character insertion. (Insert a tab, escape, return, etc.)

Re:Neovim v0.4.0 by narimiran on Monday September 16, 2019 @08:16AM (#20983281)
> The C-v (Ctrl+lowercase v) is important for literal character insertion.

You can remap it to <C-l> (L = literal), and then use <C-c> and <C-v> without shift:

    inoremap <C-l> <C-v>
    imap <C-v> <C-r>+
    cmap <C-v> <C-r>+
    xmap <C-c> "+y
Re:Neovim v0.4.0 by majewsky on Monday September 16, 2019 @06:46AM (#20982767)
> set clipboard+=unnamedplus

TIL. This goes into my vimrc right now.

Re:Neovim v0.4.0 by justinmk on Monday September 16, 2019 @02:13AM (#20981516)
> multigrid support, which would allow features such as scrollbars

also per-window font-size, dimensions, line-spacing--so Nvim UIs can add unlimited decorations to windows while the editor navigation remains exactly the same (driven by Nvim).

Re:Neovim v0.4.0 by maccam94 on Monday September 16, 2019 @04:24AM (#20982079)
> shameless plug

You didn't even mention it's written in Rust!

Re:Neovim v0.4.0 by fortran77 on Monday September 16, 2019 @09:28PM (#20990314)
The first rule of the Rust club is: "Always talk about the Rust club"
Re:Neovim v0.4.0 by fortran77 on Monday September 16, 2019 @08:45AM (#20983464)
"It's written in Rust."
Re:Neovim v0.4.0 by timvisee on Monday September 16, 2019 @05:21AM (#20982314)
I'm really liking this 'No Electron!' mentality. Looks like an awesome project, thanks for sharing.
Re:Neovim v0.4.0 by tadzik_ on Monday September 16, 2019 @05:30AM (#20982363)
Looks nice, but I'm a bit surprised to see "No web bloat!" and then Webkit in dependencies. Is the UI built in web technologies, just not in Electron this time around?
Re:Neovim v0.4.0 by detaro on Monday September 16, 2019 @05:37AM (#20982400)
From a quick look at the repo, seems to be used for previewing markdown files.
Re:Neovim v0.4.0 by dvcrn on Monday September 16, 2019 @03:27AM (#20981799)
I'm using vimr [1] and never had issues with it

1: https://github.com/qvacua/vimr

Re:Neovim v0.4.0 by pfranz on Monday September 16, 2019 @11:54AM (#20985338)
I don't use vimr that heavily, but a few times now I've seen it chewing on the CPU when I've left it open in the background. I do use neovim heavily and haven't seen that.
Re:Neovim v0.4.0 by asdkhadsj on Monday September 16, 2019 @01:12PM (#20986252)
Holy cow, that is pretty. I wonder which is better, Gnvim or Vimr for a full Neovim experience?

Either way, VimR is impressively nice looking. Thanks for the link!

Re:Neovim v0.4.0 by zelos on Monday September 16, 2019 @03:35AM (#20981852)
I've had a reasonable number of crashes with VimR. It's definitely got a lot better, but not enough that I'd use it for work.
Re:Neovim v0.4.0 by milin on Monday September 16, 2019 @02:51PM (#20987303)
Any advantages of using this vs the neovim in the terminal?