Giter Site home page Giter Site logo

Comments (3)

mcclure avatar mcclure commented on May 23, 2024

Okay, sorry, can you clarify?

  1. You're running VIM on the quest? Not syncing with adb?
  2. When you say you "look at the contents of the file"-- you mean that after saving, you inspect the contents of the file, and the contents of the file are garbled? Or do you mean the representation of the contents of the file in lovr's memory?

Lovr should, as far as I know, not be writing to these files or retaining open copies of the files. I don't think any behavior of lovr could be causing this. So what it sounds like to me is that your copy of vim is either broken or is built for linux in a way which does not transfer to Android.

Do you get the garbled files if you edit with vim when lovr is NOT running?

from lodr.

timschmidt avatar timschmidt commented on May 23, 2024

1: Yes: https://f-droid.org/en/packages/net.momodalo.app.vimtouch/ Same behavior happens with https://play.google.com/store/apps/details?id=com.maskyn.fileeditor&hl=en_US&gl=US Syncing with ADB or other file transfer methods from a PC works. But editing files directly on the quest results in file corruption.

2: Correct. And file contents are garbled in a very specific way:

This is the last function listed in the main.lua I am testing at the moment:

function load_environment(environment_name)
  app.skybox = lovr.graphics.newTexture({
    left = 'environments/' .. environment_name .. '/left.jpg',
    right = 'environments/' .. environment_name .. '/right.jpg',
    top = 'environments/' .. environment_name .. '/top.jpg',
    bottom = 'environments/' .. environment_name .. '/bottom.jpg',
    back = 'environments/' .. environment_name .. '/back.jpg',
    front = 'environments/' .. environment_name .. '/front.jpg'
  })
  app.ambient = lovr.audio.newSource('environments/' .. environment_name .. '/ambient.ogg')
  app.ambient:setLooping(true)
  app.ambient:play()
end

When I edit that file and save on the quest, the end of the file looks like this:

function load_environment(environment_name)
  app.skybox = lovr.graphics.newTexture({
    left = 'environments/' .. environment_name .. '/left.jpg',
    right = 'environments/' .. environment_name .. '/right.jpg',
    top = 'environments/' .. environment_name .. '/top.jpg',
    bottom = 'environments/' .. environment_name .. '/bottom.jpg',
    back = 'environments/' .. environment_name .. '/back.jpg',
    front = 'environments/' .. environment_name .. '/front.jpg'
  })
  app.ambient = lovr.audio.newSource('environments/' .. environment_name .. '/ambient.ogg')
  app.ambient:setLooping(true)
  app.ambient:play()
end









t_name .. '/ambient.ogg')
  app.ambient:setLooping(true)
  app.ambient:play()
end

Note: the file is the same number of bytes long before and after the edit.

from lodr.

mcclure avatar mcclure commented on May 23, 2024

Do you get the garbled files if you edit with vim when lovr is NOT running?

It sounds like the answer to this question is "yes". In other words, this is not a bug in lovr/lodr, and there is nothing we can do about it. I think you should file your bug on VimTouch, as that appears to be the app with the problem on Quest. (Unfortunately it appears VimTouch is not an active project, though that link has a few suggestions for alternatives.)

If what you are looking for is just advice, I checked with Daniel Micay from the Graphene project (an Android custom ROM) because he is more familiar with Android OSS resources than I am. Daniel said:

It looks like VimTouch has been dead for 7 years. They should probably just be using Vim in Termux.
#offtopic:http://grapheneos.org [Matrix] it a good place to discuss the best apps for different use cases, etc. 1411 people there, and a lot of them primarily using open source apps.

There's information on our Matrix rooms at https://grapheneos.org/contact#community.

Not aware of a better place than our #offtopic:http://grapheneos.org room. There are probably large Matrix and IRC rooms about Android but our community tends to have people around with high quality advice.

I recommend either trying out Termux as both Daniel and the people in the VimToch issue suggest, or asking in the Graphene Matrix channel if anyone knows of a general solution. Good luck

from lodr.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.