heavenshell / vim-pydocstring

Generate Python docstring to your Python source code.
BSD 3-Clause "New" or "Revised" License
337 stars 53 forks source link

`:PydocstringFormat` isn't respecting buffer fileformat when outputting results #109

Closed SkyLeach closed 4 years ago

SkyLeach commented 4 years ago

check fileformat: set ff image

run :PydocstringFormat image

a very quick glance over the code makes me think that using '\n' (safe for posix) is the problem. Should be \r which should input whatever line ending CR should insert based on fileformat. I may be off, but that's my best guess.

heavenshell commented 4 years ago

@SkyLeach Thx for reporting.

I can't reproduced. Please give me more information(steps to reproduce, OS, Vim version). Kapture 2020-09-13 at 14 29 49

SkyLeach commented 4 years ago

Windows 10 Home NeoVim v0.4.4

I don't think there are any special steps. I'm not using Cygwin or anything here, just Python 3.8 on windows with neovim.

heavenshell commented 4 years ago

@SkyLeach Works fine for me. Windows10(VirtualMachine), Vim8.2, Python3.7 Kapture 2020-09-16 at 18 47 54

This vim has vim-pydocstring only and no vimrc. So, I think this is your env's problem.

Please try minimum vimrc(Load only vim-pydocstring) and if same issue will raised, tell me.