You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature: New command, '$volt edit' and '$volt profile edit' #230
I often want to edit the plugin configuration files or the rc file of the current profile, but it's hard to always look for the scripts deep in the subdirectories.
A simple command $volt edit <plugname> could simply take you to the rc file of that plugin
and edit it with the $EDITOR command.
And a command like $volt profile edit <profile? (default current) > would edit the rc file of the current profile.
It is also useful because the autocomplete of the volt command would help you select the plugin config you need to edit.
what do you think?
Yes, I'm also thinking of this.
But the feature editing plugconf, profile's vimrc, ... files should be implemented in vim plugin, I think.
I'm thinking :VoltEdit command, which allows you to edit the volt related files.
" Open specified plugconf
:VoltEdit tyru/caw.vim
" Open profile's vimrc
:VoltEdit profile:default:vimrc
" Or gvimrc
:VoltEdit profile:default:gvimrc
" Open config.toml
:VoltEdit config
What's the advantage when it's implemented in vim plugin
Vim can detect :write and invoke volt build automatically
See #221, if the volt up (or maybe volt build is replaced) command is implemented. when you update config file and the syntax is correct, volt automatically installs/removes plugins without typing volt up command!
You can stick on stable Vim while trying new plugins
When you add or remove plugin, you might want to check if your Vim environment will not be broken by new plugins, or and so on.
Volt uses Vim 8's package feature, so we don't have to care Vim 7 users basically.
So we can use job, terminal(it's not in Vim 8.0.0, but it helps the restart-vim-and-check-it cycle. see below).
If the file is updated by :write, Vim asynchronously invokes volt build (or volt up) in background.
Then user can continue using current stable Vim instance
And it can also invoke new Vim from :terminal or another terminal emulator and shell to check the Vim environment is stable.
After Checking new Vim environment is stable, you can safely restart current Vim.
Maybe someone says "I don't care. I manage vimrc (and $HOME/volt) in git, so I can revert them when the environment breaks."
Yes, it's true.
This is small advantage to decide the architecture.
The important thing is mainly asynchronous volt build (or volt up).
:VoltEdit argument syntax
I wonder if the argument should be URI syntax as well as #208, and I found volt should define own URN(Uniform Resource Name), like urn:volt:config which references the filepath of config.toml. :VoltEdit parses given string as urn:volt:{arg} and if it's correct path, opens it.
I wonder if the argument should be URI syntax as well as #208, and I found volt should define own URN(Uniform Resource Name), like urn:volt:config which references the filepath of config.toml. :VoltEdit parses given string as urn:volt:{arg} and if it's correct path, opens it.
URL parsing is easier than URN parsing (just use net/url).
volt-file://{path to file relative under $VOLTPATH}
This is used for :VoltEdit argument (:VoltEdit takes path after volt-file://)
After a while ago, as I see this, I think the URN notation I wrote is too complex to understand...
I think :VoltEdit command just provides tab completion of files under ~/volt is enough.
What's the advantage when it's implemented in vim plugin
This does not seem to be related to :VoltEdit command.
I don't know what I thought before...
Auto volt build feature is useful and necessary while editing files, but not while trying to open files.
I would just like to say, that I have found a temporary solution which might be a good alternative to creating special commands for editing config files inside vim.
Using the tpope's plugin projectionst, one can define commands for quick editing of these files if only you set up the JSON file correctly.
For example:
But the feature editing plugconf, profile's vimrc, ... files should be implemented in vim plugin,
I tend to disagree. While it is certainly a nice feature to implement this into the vim-volt plugin, I think it is still necessary too also provide that command from the CLI client.
Activity
tyru commentedon Apr 7, 2018
Yes, I'm also thinking of this.
But the feature editing plugconf, profile's vimrc, ... files should be implemented in vim plugin, I think.
I'm thinking
:VoltEditcommand, which allows you to edit the volt related files.What's the advantage when it's implemented in vim plugin
Vim can detect
:writeand invokevolt buildautomaticallySee #221, if the
volt up(or maybevolt buildis replaced) command is implemented. when you update config file and the syntax is correct, volt automatically installs/removes plugins without typingvolt upcommand!You can stick on stable Vim while trying new plugins
When you add or remove plugin, you might want to check if your Vim environment will not be broken by new plugins, or and so on.
Volt uses Vim 8's package feature, so we don't have to care Vim 7 users basically.
So we can use job, terminal(it's not in Vim 8.0.0, but it helps the restart-vim-and-check-it cycle. see below).
:write, Vim asynchronously invokesvolt build(orvolt up) in background.Maybe someone says "I don't care. I manage vimrc (and $HOME/volt) in git, so I can revert them when the environment breaks."
Yes, it's true.
This is small advantage to decide the architecture.
The important thing is mainly asynchronous
volt build(orvolt up).:VoltEdit argument syntax
I wonder if the argument should be URI syntax as well as #208, and I found volt should define own URN(Uniform Resource Name), like
urn:volt:configwhich references the filepath of config.toml.:VoltEditparses given string asurn:volt:{arg}and if it's correct path, opens it.tyru commentedon Apr 15, 2018
URL parsing is easier than URN parsing (just use
net/url).volt-file://{path to file relative under $VOLTPATH}:VoltEditargument (:VoltEdittakes path aftervolt-file://)tyru commentedon Oct 27, 2018
After a while ago, as I see this, I think the URN notation I wrote is too complex to understand...
I think
:VoltEditcommand just provides tab completion of files under~/voltis enough.This does not seem to be related to
:VoltEditcommand.I don't know what I thought before...
Auto
volt buildfeature is useful and necessary while editing files, but not while trying to open files.AvianY commentedon Nov 1, 2018
I would just like to say, that I have found a temporary solution which might be a good alternative to creating special commands for editing config files inside vim.
Using the tpope's plugin projectionst, one can define commands for quick editing of these files if only you set up the JSON file correctly.
For example:
This works for my setup. I can just type :Eplug proj inside vim
and it will complete it into tpope/vim-projectionst.vim
Just an idea to think about...
hupfdule commentedon Mar 26, 2019
I tend to disagree. While it is certainly a nice feature to implement this into the vim-volt plugin, I think it is still necessary too also provide that command from the CLI client.
Introduce new subcmd `edit`
Introduce new subcmd `edit`