Comments (11)
Hi!
Relative path is already supported.
Looks like an error in option name:
let g:mirror#config_file = '~/.config/nvim/mirrors.yml'
Correct way:
let g:mirror#config_path = '~/.config/nvim/mirrors.yml'
from mirror.vim.
Oh, sorry, that was my mistake since I typed that out. I just tested this again, this is an exact copy of what I have in my init.vim
:
let g:mirror#config_path = '~/.config/nvim/mirrors.yml'
"let g:mirror#config_path = '/home/local/ANT/<omitted_username>/.config/nvim/mirrors.yml'
This way it doesn't work. I try MirrorPush
in the configured path and:
E492: Not and editor command: MirrorPush
If I uncomment the second line it works.
When I comment out both and I run let g:mirror#config_path
I see this:
g:mirror#config_path /home/local/ANT/<omitted_username>/.mirrors
So the default value is using the absolute path.
PERHAPS this is due to the fact that my home path is a bit unusual. Not sure. I'll do some more tests tomorrow, for now I'm going home(this is all in my work setup).
from mirror.vim.
Can you try to replace ~
with '$HOME' .
?
Like this:
let g:mirror#config_path = $HOME . '/.config/nvim/mirrors.yml'
from mirror.vim.
Yup, that works just fine.
from mirror.vim.
But then again I might as well do this since it works too:
let g:mirror#config_path = expand('~/.config/nvim/mirrors.yml')
from mirror.vim.
I added expand
for config and cache paths.
Hope it helps.
from mirror.vim.
Well, I see your change:
let g:mirror#config_path = expand(get(g:, 'mirror#config_path', '~/.mirrors'))
But as far as I can tell if I set g:mirror#config_path
in my init.vim
then it is set AFTER the plugin is loaded(I'm using vim-plug) so it still results in it being set to exactly what I set.
That's annoying, but I guess it makes sense, your vim config should override anything and everything so it's loaded last.
from mirror.vim.
That sad.
At least you can use expand in your init.vim.
from mirror.vim.
I just checked how this is done in another plugin I use and one that respects ~
in a path and I found this for the g:easytags_by_filetype
config:
https://github.com/xolox/vim-easytags/blob/master/autoload/xolox/easytags.vim#L189
He's using his own xolox#misc#path#absolute()
function every time he uses the configured path.
I guess it's fine if it stays the way it is but I would point this out in the documentation to avoid people trouble. Thanks for help, you are awesome!
from mirror.vim.
Added information about possible problems with unusual home path and example of using expand()
to docs and readme (0d37c4b).
from mirror.vim.
That's great man. Keep at it!
from mirror.vim.
Related Issues (11)
- Using mirror.vim to save both locally and in staging at the same time. HOT 2
- Unable to see remote actions even after adding config file HOT 1
- Neovim Error HOT 1
- Is it possible to always push? HOT 1
- Jump to directory when using :MirrorSSH HOT 1
- Automatically read git-config? HOT 3
- Does mirror.vim support a remote development environment (with qa, staging, production also remote)? HOT 7
- Add support for using tpope/vim-dispatch for running scp commands HOT 7
- Add :MirrorConfigReload command HOT 2
- Add a "wildcard" like syntax to mirrors config HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mirror.vim.