terrychou / iVim

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

iVim 2.45 fails to start #223

Closed alexeyignatiev closed 2 years ago

alexeyignatiev commented 2 years ago

Hi there,

First of all, thanks for making this wonderful port of VIM!

Unfortunately, my installation of iVim broke down in version 2.45 (on iPadOS 15.2). The app does not even start saying invalid value ‘’ set to option 'guifont'. The current font 'Source Code Pro' is not changed.

At first, I thought it could be my fault as there could be some options set in .vimrc by me. However, there is nothing related to fonts there. Also, running the app with -u NONE does not help. So I am not sure how to proceed.

terrychou commented 2 years ago

Hi, thanks for reporting.

  1. Which device are you using?
  2. When did this happen? Right after the iVim updating?
  3. Please leave an email so that I will send you TestFlight invitation to test some modified builds.
alexeyignatiev commented 2 years ago

Here are some answers:

  1. I am using an iPad Pro (11-inch) (3rd generation) running iPadOS 15.2
  2. I am not sure when exactly the issue first appeared. Before the start of my leave on December 18th, iVim worked just fine. Yesterday I noticed that it stopped working.
  3. Sure, my email address is alexey.ignatiev@gmail.com.
terrychou commented 2 years ago

@alexeyignatiev I have pushed a new build (2.46(4)) to TestFlight and sent an invitation to your address, please give it a try.

alexeyignatiev commented 2 years ago

@terrychou, thank you. I have accepted your invitation and downloaded the new build. And yes, it seems to run with no such issue!

terrychou commented 2 years ago

@alexeyignatiev Great to know this! It also includes some fix of the new font management system, please have a look and let me know if any problems or suggestions come up 😃 .

alexeyignatiev commented 2 years ago

Well, I can immediately say that there are some issues on my iPad. :)

terrychou commented 2 years ago

Also, have you tried the new :ifont command? Does it work as it is supposed to?

alexeyignatiev commented 2 years ago

Okay, it's like this:

Regarding the ifont command, I have now tried it and it works fine. I was able to perform all the operations with no issue. However, in my opinion, it would help if ls gave a list of fonts together with an integer id assigned to each. This integer id could then be used given to set. In the case no id is given to set, the command could show the font selection dialogue as it does now.

terrychou commented 2 years ago

So, it looks like iVim is indeed aware of fonts installed by other apps, but unfortunately in an improper way.

The embedded Source Code Pro font has three typefaces: regular, bold and italic. However, in your case, it seems that iVim takes OperatorMono instead by mistake.

As to the font index number, the old font system did this. The reason why the new system ditch it is that some users would add a :ifont set command in their .vimrc file and an index number would be confusing, don't you think so? The fonts are ordered by their names in the list and a name with wildcard support would be better.

alexeyignatiev commented 2 years ago

Yep, I do agree that using font index in .vimrc may be problematic and unintuitive. My point was that if one wants to use solely the command line then showing them a font selection dialogue is not really helpful.

So it would be great to support both possibilities: for those who want the command line and for those who prefer the dialogue. I guess this could be achieved if set was able to receive a font name (instead of the index), maybe? Would this make sense?

terrychou commented 2 years ago

The :ifont set command actually accepts a font name. See ":h :ifont-set" for the examples.

alexeyignatiev commented 2 years ago

OK, then all my comments are already addressed. :)

alexeyignatiev commented 2 years ago

Except for the clash with the existing font!

terrychou commented 2 years ago

Except for the clash with the existing font!

I will try to make a workaround for that.

By the way, can you change the font size as expected?

alexeyignatiev commented 2 years ago

Yes, increasing and decreasing font size works fine on my iPad.

terrychou commented 2 years ago

@alexeyignatiev I have pushed version 2.46(5) to TestFlight, this build tries to add the default font family manually if it is not there. Please give it a try to see whether it gets Source Code Pro back.

alexeyignatiev commented 2 years ago

Thank you for the update, @terrychou. It does get Source Code Pro back.

alexeyignatiev commented 2 years ago

@terrychou, my understanding is that I close this issue, can't I? I can't reproduce it anymore in the test versions.

terrychou commented 2 years ago

@alexeyignatiev yes, feel free to do it. You can reopen it or open a new issue if it came back again.