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

Comments are replaced by empty lines #26

Closed
tusj opened this issue Sep 24, 2014 · 5 comments
Closed

Comments are replaced by empty lines #26

tusj opened this issue Sep 24, 2014 · 5 comments

Comments

@tusj
Copy link

tusj commented Sep 24, 2014

When editing a function with funced, the commented lines are replaced by empty lines.

This happens only if I use vim with this plugin and using the funced program.
Removing this plugin, or not sourcing any files by setting the -u flag for vim, I don't have this problem.
Simply calling vim test_function.fish will not trigger it either.

I don't see why it happens with funced, and maybe I did not properly probe the error. But it certainly is vim-fish which is causing the issue.

@lilyball
Copy link

I'm not seeing this. In fact, vim-fish doesn't even detect funced functions, because it doesn't have a filename or shebang.

What I am seeing is if the first line of a function is a comment, then the comment gets erased, but fish appears to be doing that on its end, when the function is created (either on the commandline or as a file stored in ~/.config/fish/functions/). Every comment after the very first line of the function is left intact, and survives being edited by vim.

Did you do something to make funced functions actually enable the fish filetype?

@tusj
Copy link
Author

tusj commented Sep 24, 2014

I retested on my machine with setting the nano as EDITOR, and I can confirm that it is the same problem. So that excludes vim-fish as the source. So false alarm, sorry for that.

I had a look at the funced definition, and from what I can see it does not seem to do that much.

@lilyball
Copy link

It's not funced, the actual function definition loses the comment. I'll file an issue on the fish project to track it. In the meantime, you should probably close this vim-fish issue.

@lilyball
Copy link

I've filed it as fish-shell/fish-shell#1710. Please comment there if I did not accurately capture what you're seeing.

@tusj
Copy link
Author

tusj commented Sep 24, 2014

Thanks. The report is what I experienced. Closing.

@tusj tusj closed this as completed Sep 24, 2014
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

No branches or pull requests

2 participants