terrychou / iVim

A vim port to iOS.
598 stars 35 forks source link

curl Crashes iVim #137

Closed suliveevil closed 4 years ago

suliveevil commented 4 years ago

:!curl -v -k https://docs.python.org/zh-cn/3.8/archives/python-3.8.3-docs-text.zip

terrychou commented 4 years ago

@suliveevil would you try this in ivish?

Also, I see a few crash reportings in TestFlight. Are they related to the iplug manager, or to the incompatible plugins you installed?

suliveevil commented 4 years ago

I stripped unnecessary plugins from 51 to 29, but they made iVim unstable still. I will restructure and test all scripts/plugins from scratch. It could take a while since I just begin to learn and write VimL.

suliveevil commented 4 years ago

A list to show famous plugins that could be used in iVim will be helpful. I will try to find out the most robust dependency-less compatible plugins.

suliveevil commented 4 years ago

Confused to :! and :ivish, is there any difference?

terrychou commented 4 years ago

The unfortunate truth is, that iplug just provides a more convenient way to manage plugins, but it cannot guarantee a plugin's full functioning in iVim.

Normally, a plugin may not work as it advertises, but it should not "crash" iVim. The probably cause would be it calls an external command which iVim does not offer.

It would be great that we can make a compatible plugins list for iVim. Please take your time experimenting with it.

suliveevil commented 4 years ago

I will test some plugins,but I will use as less as possible plugins/scripts. For example, I wouldn’t test NERDTree because it defines it shortcuts logic while Vim already has netrw. vim-vinegar is what I’m using now. For the heavy plugins like UltiSnips ALE, it may out of my capabity to test for now, I will keep it as long as it works.

terrychou commented 4 years ago

Confused to :! and :ivish, is there any difference?

:! means to run an external command from the Ex command line. On the other hand, ivish is a very simple shell that runs in vim's internal terminal. The latter can utilize the advantages a terminal has to offer, such as colors, terminal ansi code etc.

suliveevil commented 4 years ago

Both :!ls -la and :ivish+ls -la shows something like [1m[34m.[39;49m[0m .

suliveevil commented 4 years ago

But when using vim-floaterm ,it disappeared.

terrychou commented 4 years ago

You need to use ivish in a terminal. :shell will open a terminal with ivish ready.

The seemingly weird part [1m[34m.[39;49m[0m is the ansi code for colors. It will only be translated in a terminal.

suliveevil commented 4 years ago

I got it. :ivish take me to the Middle Tier, this is why I saw those wired display. :shell or :! take me to the place I really want.

terrychou commented 4 years ago

Back to the problem itself, the command in question does crash iVim. The reason is because the command will try to output non-text content (binary content of the zip file) into the command line, which iVim fails to handle.

suliveevil commented 4 years ago

Would you please add a FileType Detection for command line mode ? If there are something like s[ave] | S[ave as] | d[elete], that would be even better!

terrychou commented 4 years ago

Would you please add a FileType Detection for command line mode ? If there are something like s[ave] | S[ave as] | d[elete], that would be even better!

I don't quite understand this. Would you give some examples?

suliveevil commented 4 years ago

Sorry for the misunderstood. I was and may still confused about Vim Ex-mode、Vim-cmdline-mode、External-Terminal-ivish😂😂😂 I will learn from helpdoc.