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

neovim fixendofline is enabled but insert_final_newline doesn't work #74

Open
sandrodz opened this issue Jan 8, 2017 · 8 comments
Open
Labels

Comments

@sandrodz
Copy link

sandrodz commented Jan 8, 2017

insert_final_newline (Feature +fixendofline (available on Vim 7.4.785+) or PreserveNoEOL is required for this property)

in neovim this setting is ON by default, but newline is not inserted.

@verkholantsev
Copy link

Have the same issue

@xuhdev
Copy link
Member

xuhdev commented Nov 3, 2017

Can you give detailed steps to reproduce?

@andrei-pavel
Copy link

  1. Install the two plugins:
    In your ~/.config/nvim/init.vim:
" auto-install vim-plug
if empty(glob('~/.config/nvim/autoload/plug.vim'))
  silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs \
      https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  autocmd VimEnter * PlugInstall
endif
call plug#begin('~/.config/nvim/plugged')
Plug 'editorconfig/editorconfig-vim'
Plug 'vim-scripts/PreserveNoEOL'
call plug#end()

Run :PlugInstall

  1. Check that ~/.config/nvim/plugged/editorconfig-vim/.editorconfig has insert_final_newline = true

  2. Open any existing file. Expected: newline appears at the end of file. Actual behaviour: no new line appears at the end of file.

This is the issue I'm having. Can anyone confirm that it is the same?

@jrock2004
Copy link

I am also having same issue. I even have in my folder that vim is open in a .editorconfig and still same result

@vlcinsky
Copy link

vlcinsky commented Jun 15, 2018

It is important to check, if the final newline is really present or not.

I use:

$ hexdump -c file.txt

for this purpose as it prints characters one by one in well readable format.

I was tricked a bit by LSP python document validation reporting that EOL was missing at the end of file while it was in fact present.

So I recommend @jrock2004 @sandrodz @xuhdev and @andrei-pavel to check presence of final newline using hexdump.

Tested on Debian 9 with neovim 0.3.0 and neovim 0.2.3 (installed using appimage)

@jrock2004
Copy link

So I ran the hexdump command and it shows it but I guess we just have to assume everytime that this is working?

@xuhdev
Copy link
Member

xuhdev commented Oct 26, 2018

@jrock2004 To be honest, I don't know whether there is an easy way to do this. I think you'll get a more satisfactory answer from the neovim community.

@huntzhan
Copy link

huntzhan commented Dec 8, 2019

Have the same issue here.

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

No branches or pull requests

8 participants