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

Can't edit .vimrc #90

Open
caoimhinp opened this Issue Mar 24, 2015 · 14 comments

Comments

Projects
None yet
8 participants
@caoimhinp
Copy link

caoimhinp commented Mar 24, 2015

This is a leftover issue from the Google code page - issue 7.

The menu option for vimrc is nice but it looks for ~/.vimrc
The app user's home directory on a Nexus 9 with Lollipop defaults to /data. The user doesn't have permissions to write to /data so the open fails as it tries to make a recovery file.

I assume that the vimrc file in the vim directory for the application is the one that is actually parsed. If so, then the app should open /data/data/net.momodalo.app.vimtouch/files/vim/vimrc which does have the appropriate permissions.

Until there is some standardization on $HOME I would hard code the location.

@ImLikeWhoa

This comment has been minimized.

Copy link

ImLikeWhoa commented Mar 24, 2015

Hi caoimhinp -- you say that /data/data/net.momodalo.app.vimtouch/files/vim/vimrc has appropriate permissions for me to edit it, but I couldn't access it from my Moto G running Lollipop.
I tried by typing :cd /data/data/net.momodalo.app.vimtouch/files/vim/ from vim. Vim's file listing showed files in my /sdcard/ home directory, but I couldn't write files that I had opened via that listing.

This was a while back. I am now using v2.5r2, because it is a little more useable than the version in Google play (2.7r1). I'm hoping for a new version to appear.

@caoimhinp

This comment has been minimized.

Copy link

caoimhinp commented Mar 25, 2015

Hey, ImLikeWhoa.
I'm testing on a Nexus 9.

That file is readable and writeable by root only on the Nexus 9.
The other issue is that $HOME is not that directory. The edit function in
the app tries to edit vimrc in $HOME.

On Tue, Mar 24, 2015 at 3:53 PM, ImLikeWhoa notifications@github.com
wrote:

Hi caoimhinp -- you say that
/data/data/net.momodalo.app.vimtouch/files/vim/vimrc has appropriate
permissions for me to edit it, but I couldn't access it from my Moto G
running Lollipop.

I tried by typing :cd /data/data/net.momodalo.app.vimtouch/files/vim/ from
vim. Vim's file listing showed files in my /sdcard/ home directory, but I
couldn't write files that I had opened via that listing.

This was a while back. I am now using v2.5r2, because it is a little more
useable than the version in Google play (2.7r1). I'm hoping for a new
version to appear.


Reply to this email directly or view it on GitHub
#90 (comment).

@ImLikeWhoa

This comment has been minimized.

Copy link

ImLikeWhoa commented Mar 25, 2015

Thanks caoimhinp
I hope this gets gets resolved so that the user without root access can edit their own .vimrc file. Vimtouch used to work like that.
Best, ImLikeWhoa

On Mar 25, 2015, at 10:26 , caoimhinp wrote:

Hey, ImLikeWhoa.
I'm testing on a Nexus 9.

That file is readable and writeable by root only on the Nexus 9.
The other issue is that $HOME is not that directory. The edit function in
the app tries to edit vimrc in $HOME.

On Tue, Mar 24, 2015 at 3:53 PM, ImLikeWhoa notifications@github.com
wrote:

Hi caoimhinp -- you say that
/data/data/net.momodalo.app.vimtouch/files/vim/vimrc has appropriate
permissions for me to edit it, but I couldn't access it from my Moto G
running Lollipop.

I tried by typing :cd /data/data/net.momodalo.app.vimtouch/files/vim/ from
vim. Vim's file listing showed files in my /sdcard/ home directory, but I
couldn't write files that I had opened via that listing.

This was a while back. I am now using v2.5r2, because it is a little more
useable than the version in Google play (2.7r1). I'm hoping for a new
version to appear.


Reply to this email directly or view it on GitHub
#90 (comment).


Reply to this email directly or view it on GitHub.

@robertvalik

This comment has been minimized.

Copy link

robertvalik commented Jul 30, 2015

Hello, I have used Vim touch on Android 4 with modified .vimrc. After upgrading to Android 5 (and unfortunately - resetting the device to factory settings) I am unable to do so. When I select the "edit vimrc" option in menu, it opens file ~/.vimrc that is readonly. The HOME seems to be pointing to /data - that is not writable. Seems like the issue mentioned above. Is there some workaround possible - till the issue is resolved correctly? Thanks.

@josuah

This comment has been minimized.

Copy link

josuah commented Jul 30, 2015

Fortunately Yes, but with à rooted device

What I did is that I located the app data folder (/data/data/net.momodalo.app.vimtouch/files) and put my .vimrc in it. I even could get some plugin to work, and all theme files was working for me (badwolf).

Tell me if it worked for you...

@robertvalik

This comment has been minimized.

Copy link

robertvalik commented Jul 30, 2015

Hey, biotician, thanks, but this did not work for me. My device is not rooted. And I am able to write to the mentioned folder - in fact, I have created a .vimrc there but the file gets ignored...

@josuah

This comment has been minimized.

Copy link

josuah commented Jul 30, 2015

Indeed, it worked a month ago for me, but I now have an access denied (in
french) message now.

Something may have changed since the last time I tried.

A workaround could be to use the source command so followed by the path
to your vimrc (or any vim file)...
Good luck !

Le jeu. 30 juil. 2015 19:08, Robert Valík notifications@github.com a
écrit :

Hey, biotician, thanks, but this did not work for me. My device is not
rooted. And I am able to write to the mentioned folder - in fact, I have
created a .vimrc there but the file gets ignored...


Reply to this email directly or view it on GitHub
#90 (comment).

@josuah

This comment has been minimized.

Copy link

josuah commented Jul 30, 2015

You may also try this
https://play.google.com/store/apps/details?id=com.termux
Le 30 juil. 2015 19:17, "Josuah" josuah.demangeon@gmail.com a écrit :

Indeed, it worked a month ago for me, but I now have an access denied
(in french) message now.

Something may have changed since the last time I tried.

A workaround could be to use the source command so followed by the path
to your vimrc (or any vim file)...
Good luck !

Le jeu. 30 juil. 2015 19:08, Robert Valík notifications@github.com a
écrit :

Hey, biotician, thanks, but this did not work for me. My device is not
rooted. And I am able to write to the mentioned folder - in fact, I have
created a .vimrc there but the file gets ignored...


Reply to this email directly or view it on GitHub
#90 (comment).

@rafaeln

This comment has been minimized.

Copy link

rafaeln commented Aug 2, 2015

Installing vim through termux is the best way! And it's a way more up to
date version too! Thanks for the tip.

Em qui, 30 de jul de 2015 17:47, Josuah Demangeon notifications@github.com
escreveu:

You may also try this
https://play.google.com/store/apps/details?id=com.termux
Le 30 juil. 2015 19:17, "Josuah" josuah.demangeon@gmail.com a écrit :

Indeed, it worked a month ago for me, but I now have an access denied
(in french) message now.

Something may have changed since the last time I tried.

A workaround could be to use the source command so followed by the path
to your vimrc (or any vim file)...
Good luck !

Le jeu. 30 juil. 2015 19:08, Robert Valík notifications@github.com a
écrit :

Hey, biotician, thanks, but this did not work for me. My device is not
rooted. And I am able to write to the mentioned folder - in fact, I have
created a .vimrc there but the file gets ignored...


Reply to this email directly or view it on GitHub
<#90 (comment)
.


Reply to this email directly or view it on GitHub
#90 (comment).

@robertvalik

This comment has been minimized.

Copy link

robertvalik commented Aug 3, 2015

rafaeln, biotician, thanks, that works - somehow. But I miss "Open in Vim" context menu in other applications. So not a clean solution. But the Termux is a really nice package for non-rooted devices.

@josuah

This comment has been minimized.

Copy link

josuah commented Aug 7, 2015

@thestumbler

This comment has been minimized.

Copy link

thestumbler commented Oct 21, 2015

I have Note 4 with external card. I tried Termux after I couldn't get Vimtouch working, and the problem I ran into with Termux was that it couldn't write to the external SD card. Even though that is now allowed in Lollipop, it looks like your application has to request permission. The user can't just give any random app such permission. I'd be happy to be wrong on this.

So, I went back to trying to get Vimtouch working. First thing I did was do a soft link of my files ( a vimwiki ) and my .vim directory from the external card to the vimtouch "home" directory, '~/'. To do this, just drop to a shell from within Vimtouch, e.g, :!sh. Then link as follows:
$ ln -s /storage/extSdCard/vimwiki ~/vimwiki
$ ln -s /storage/extSdCard/.vim ~/vim
Notice I renamed the .vim directory without the "dot". It seems that Vimtouch uses ~/vim for its configuration files. If you delete the ~/vim directory, it just gets recreated automatically.

This is ALMOST working, I'm having some difficulty getting the runtime path correct so pathogen will run and install all my plugins.

I'd like to hear from anyone who has successfully run Vimtouch on a Note 4 using Lollipop.

@emilhuseynli

This comment has been minimized.

Copy link

emilhuseynli commented Jan 11, 2017

Any update to this?
For me '/data/data/net.momodalo.app.vimtouch/files/vim/vimrc' is writable, but if I do a change to that file, it is overwritten after next vim start. Actually the whole vimrc is replaced with some template on each start. So, it's not possible for me to configure vim at the moment. My device is Samsung Galaxy S5 with Marshmallow 6.0.1 on it. And it is rooted of course.

@PeterBinney

This comment has been minimized.

Copy link

PeterBinney commented Jun 6, 2017

Any chance of an enhancement to allow non-rooted devices to have a custom vimrc please???

For instance, how about an optional vimrc in an accessible and editable (to non-root) part of the Android filesystem such as /storage/emulated/0/Download/vimrc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment