Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding NeoVim support #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

klaxalk
Copy link

@klaxalk klaxalk commented Aug 11, 2018

Hello, I would like to update vim-stream to support NeoVim. It would be almost straightforward, except the nvim's pipe mode does not print the "Vim: Reading from stdin..." message, thus the tail is not necessary.

I am not sure whether the use of whereis and awk to detect the path to Vim/NeoVim binary is correct. Please correct me, if there is a better way. In this case the $VIM/$NVIM variables are empty when Vim or NeoVim is not installed.

@codecov-io
Copy link

codecov-io commented Aug 11, 2018

Codecov Report

Merging #2 into master will decrease coverage by 5%.
The diff coverage is 71.42%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master       #2   +/-   ##
=======================================
- Coverage   91.66%   86.66%   -5%     
=======================================
  Files           1        1           
  Lines          24       30    +6     
=======================================
+ Hits           22       26    +4     
- Misses          2        4    +2
Impacted Files Coverage Δ
vims 86.66% <71.42%> (-5%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update acb9f08...0083c41. Read the comment docs.

@MilesCranmer
Copy link
Owner

Hi @klaxalk, thanks for adding this! Looks good to me. I'm going to add nvim support to the test suite, see if I can remove the use of awk, and then merge.

@MilesCranmer
Copy link
Owner

So the command "$(which nvim)" is enough to replace the command with awk.

By the way, I'm having issues getting neovim to work at all - have you seen good results? Perhaps (macOS) brew installed an older version. For instance, the command (using the basics - without vims):

 echo 'HELLO!' | nvim - -nes -c ':exe "norm ggAHELLO2"' -c :%p -c ':q!'

Only prints HELLO2 at the output.

@klaxalk
Copy link
Author

klaxalk commented Aug 18, 2018

Hi, $(which nvim) might be problematic when nvim is aliased (I have both vim and nvim aliased to add some launch parameters automatically). Neovim worked out of the box for me. I installed it from repositories on Ubuntu, currently on 0.3.2-dev. I found just a handful of incompatibilities between vim and nvim, this was one of them. The other was that to achieve headless mode, nvim requires --headless and that colors in tmux can be fixed like:

if !has("nvim")
  set term=screen-256color
else 

It looks like that you are required to use the improved Ex mode for that command. That is what I use most of the time. Thus -nEs.

Sincerely, Tomas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants