Repository navigation
Feature: New command, '$volt edit' and '$volt profile edit' #230
Description
Activity
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." 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 configWhat'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).- If the file is updated by
:write, Vim asynchronously invokesvolt build(orvolt 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 asynchronousvolt 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.- If the file is updated by
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.URL parsing is easier than URN parsing (just use
net/url).volt-file://{path to file relative under $VOLTPATH}- This is used for
:VoltEditargument (:VoltEdittakes path aftervolt-file://) - ex) volt-file://config.toml
- ex) volt-file://rc/default/vimrc
- This is used for
- volt-profile://{profile name}
- This is used in config.toml, lock.json.
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.What's the advantage when it's implemented in vim plugin
This does not seem to be related to
:VoltEditcommand.
I don't know what I thought before...
Autovolt buildfeature 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:let g:projectionist_heuristics = { \ "*": { \ ".vim/volt/plugconf/github.com/*.vim": {"type": "plug"} \ } }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...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.
- added a commit that references this issue
on Apr 16, 2019 - added a commit that references this issue
on Apr 29, 2019
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 pluginand 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?