Open sandrodz opened 7 years ago
Have the same issue
Can you give detailed steps to reproduce?
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
Check that ~/.config/nvim/plugged/editorconfig-vim/.editorconfig
has insert_final_newline = true
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?
I am also having same issue. I even have in my folder that vim is open in a .editorconfig and still same result
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)
So I ran the hexdump command and it shows it but I guess we just have to assume everytime that this is working?
@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.
Have the same issue here.
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.