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

Loading cvimrc doesn't work #312

Open
aaronjensen opened this Issue Jun 10, 2015 · 11 comments

Comments

Projects
None yet
8 participants
@aaronjensen
Copy link

aaronjensen commented Jun 10, 2015

I tried:

let configpath = '/path/to/your/.cvimrc'
set localconfig 

using both my home dir as ~ and my fully expanded home dir in two separate tries.

Both times, I restarted Chrome and opened the cvim options. I got a modal that said there was an error loading the configuration file.

@oniatsu

This comment has been minimized.

Copy link

oniatsu commented Jun 11, 2015

I have same problem.

@oniatsu

This comment has been minimized.

Copy link

oniatsu commented Jun 11, 2015

And, I tryied :source /Users/some/path/.cvimrc, then the message is showned.

cvim error: "file:///some/path/.cvimrc" could not be opened for parsing

But I can open the file by this command :file /Users/some/path/.cvimrc.

@oniatsu

This comment has been minimized.

Copy link

oniatsu commented Jun 11, 2015

I have succeeded it.
The option needs permission of accessing local file URLs.

@oniatsu

This comment has been minimized.

Copy link

oniatsu commented Jun 11, 2015

I found a problem that the set localconfig is effective only once.

I saved the cVimrc at Chrome's option page, and then the cVimrc was reflected and copied from local .cvimrc.
However I changed local .cvimrc after that, the cVimrc at Chrome's option page was not reflected from new local .cvimrc.

I wish the local .cvimrc is reloaded every starting times.

@rodrigogolive

This comment has been minimized.

Copy link

rodrigogolive commented Jun 26, 2015

I have the same issue from @oniatsu, the config is reflected from the local file, but I want to add it to my dotfiles, so I can use the same config from cVim at work and at home

@mrap

This comment has been minimized.

Copy link

mrap commented Nov 12, 2015

The documentation for using set localconfig is a bit hidden in :help. But here's how to do it.

  1. Add let configpath = '/path/to/your/.cvimrc' and set localconfig to your local cvimrc file.
  2. In browser, :source /path/to/your/.cvimrc
  3. Go to :settings and put only set localconfig in the cvimrc textarea.
  4. Click Save!
@yxjxx

This comment has been minimized.

Copy link

yxjxx commented Jan 21, 2016

@mrap Can not work for me.

@dabbeg

This comment has been minimized.

Copy link

dabbeg commented May 12, 2016

Checking "Allow access to file URLS" for cvim in the extension view of my browser and following the steps @mrap mentioned worked for me.

yxjxx added a commit to yxjxx/dotfiles that referenced this issue May 13, 2016

@yxjxx

This comment has been minimized.

Copy link

yxjxx commented May 13, 2016

@dabbeg Yes, it works.

@adamalbrecht

This comment has been minimized.

Copy link

adamalbrecht commented Sep 26, 2016

@mrap @dabbeg Thank you for those instructions - I would have never figured it out otherwise.

@sandric

This comment has been minimized.

Copy link

sandric commented Apr 14, 2018

@mrap didnt worked for me. So If I set both let configpath = '/home/sandric/.cvimrc' and set localconfig in settings, and then save - all working, but as @oniatsu mentioned, if you change config file outside of settings tab - it not reloaded, if though I go to settings after change - changes appears in textarea and if I click save - changes appears. If I wont set let configpath = '/home/sandric/.cvimrc' in settings and leave just set localconfig as was suggested - it simply can not read config, I dont know how it even should work since how extension will know where to look for config in the firstplace. So I consider this as simple caching bug, and it not some "hidden feature". Also, what bugs me even more, if simply visiting settings path and clicking "save" reloads config, then calling :source pathto cvimrc makes nothing.

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