DEV Community

Neovim after 2 years

Holy-Elie Scaïde on October 08, 2019

One of the most important things to being a developer is your development environment. Being productive depends a lot on what tools are available t...
Collapse
 
codenutt profile image
Jared

Pretty similar to my setup. I use MacVim though, not Neovim. What's your argument of Neovim over that?

Side note: CoC is amazing!

Collapse
 
skydevht profile image
Holy-Elie Scaïde • Edited

I've not used MacVim as I was using Neovim with Linux before getting an MBP. But I like being in one terminal when I'm working (All the applications I used daily is usually on full screen (small screen)). It's easier for me to focus on one thing that way (I was using a tiling window manager on Linux). I close and reopen Neovim multiple times throughout the day. Let's say I need to change branch to fix a bug. I suspend the current vim session (ctrl-z), switch to the branch (gco <new-branch>, open a new neovim instance (nvim .), fix the bug, close the recent instance of neovim (:qa), go back to the branch I was (gco <old-branch>) and resume my work where I left it (fg). I don't say you can't do the same process using MacVim, but I don't like switching applications when I'm working.

Collapse
 
tnolte profile image
Tim Nolte

Your workflow sounds like a perfect use of the Neovim split window(neovim.io/doc/user/windows.html) and built-in terminal (neovim.io/doc/user/nvim_terminal_e...) features, instead of all of that suspending.

Thread Thread
 
skydevht profile image
Holy-Elie Scaïde

@tnolte . I tried it before, but it felt a little strange. I'm already in a terminal so I just used that instead. I can't run longstanding command in it as I close and reopen Neovim a lot (mainly for reloading file (have to make a script for that or find one). I don't copy messages from the terminal and pressing suspend, command or alias, resume is more sastifying than new tab, term full-command. Or maybe I should try it again....

Thread Thread
 
moopet profile image
Ben Sinclair

Worth noting is that everything people are saying you can do better in neovim here, you can do in vim.

Thread Thread
 
malikbenkirane profile image
Malik Benkirane • Edited

@skydevht

resume is more sastifying than new tab, term full-command. Or maybe I should try it again....

I feeled the same until I've found vim-wintabs that had changed my way of dealing with tabs and buffers and helped me to reconsider tabs as helpful.

I only had to add some extra mappings to change tabs following the plugins' <C-[HL]> philosophy with <C-T>[hl] for :tabnext and :tabp respectively.

Also, one last thing to consider although but I'm used to it now, is the <C-\><C-N> to escape the terminal (but also scrolling with the mouse or clicking outside the terminal buffer does it).

Finally, thank you for sharing your experience that syntheticly.

Can't wait for the next year or two with all the communities work...

Collapse
 
leojpod profile image
leojpod

You can also use gco - to go back to the previous branch just like you would use cd - :)

Collapse
 
codenutt profile image
Jared

Makes sense. Thanks for the info!

Collapse
 
moopet profile image
Ben Sinclair

Neovim works on other systems? I mean, not as many as Vim, but more than MacVim :)

Collapse
 
skydevht profile image
Holy-Elie Scaïde

Never tried Windows, but it works on Mac and Linux perfectly

Collapse
 
codenutt profile image
Jared

Very true lol good point.

Collapse
 
tnolte profile image
Tim Nolte

I've been struggling with a half broken deoplete/Padawan/ctags setup ever since upgrading to Neovim 0.4.0, and general resource utilization of ctags. It's all been costing me productivity lately. I saw CoC not long ago and after your write up I'm going to have to give it a go and hopefully get my productivity back. Thanks!

Collapse
 
skydevht profile image
Holy-Elie Scaïde • Edited

I don't know if it worked fine for php. I've only written php occasionally and it was with the Laravel framework. But it was usable.
I used this coc-phpls, but you can check the php section of coc docs

Collapse
 
ldelossa profile image
Louis DeLosSantos

Definitely check out github.com/jarun/nnn

Ive replaces netrw with this and its been great