If you liked this video, please like and subscribe for further content. You can also join as a member of this channel for special perks youtube.com/@elijahmanor/join If you'd like to connect on social media, you can find me on Twitter twitter.com/elijahmanor and Mastodon hachyderm.io/@elijahmanor
YES, I love to hear that. It really have been a game changers for me to quickly switch between setups. Glad that this will help you. If Neovim nightly is a challenge, you could try `bob` a neovim version manager. I recently started using it so I could swap between nightly and stable github.com/MordechaiHadad/bob I'm considering doing a quick video on it since it has been helpful to me as well.
NOTE: You'll need to be running a Neovim nightly build to get this functionality. You can follow the instructions from github.com/neovim/neovim/wiki/Installing-Neovim or use a Neovim version manager such as bob github.com/MordechaiHadad/bob to quickly switch between versions. If that sounds like an interesting video to you, I could make that as well. Please give this comment a thumbs-up if you'd like to see that.
@@peekaboo6026 I’m working on material for a video on the new features of Neovim 0.9 (which includes this feature). Hopefully I can get another video soon about quickly switching between versions of Neovim.
Thank you for this, Elijah. I have been dipping my toe into Neovim and the ability to try out the different flavors was keeping me from choosing one and switching over. I had started with NvChad, but I think it turns out LazyVim feels closer to where I want to start.
Awesome, glad this was helpful to you. There are so many good options. Having a way to switch between them is nice... even if it's multiple versions of the same thing (trying different options).
And good news is that v0.9 was released today, so the feature if available in the stable release! ua-cam.com/users/postUgkxCoXgAqgnq3y37xX3mrTjFJR0y6m1sf6C
Great point, I've been very curious about how other distros setup their keymaps. Doesn't mean they are better, but typically a lot of thought has been put into them so I've found it to be a good exercise to think about how keymaps scale with regards to semantic meaning (something that i'll remember because there is some pattern or construct to them)
Thanks a lot for this🙏🏻. A game changer for trying different nvim configs. Was trying nyoom-nvim the other day with XDG variables but still there were issues going on, so this implementation is quite neat 👍🏻
Glad I could help! Yes, I've tried other techniques in the past... and this one is much better. Not everyone is up to a dev or nightly release so that may hinder some until an official release. I've recently started using the `bob` neovim version manager to quickly switch between neovim versions github.com/MordechaiHadad/bob I might do a quick video on using that if people find that helpful/interesting
Another awesome ultra quality video, as usual. Insane how you take a bit of somehow “hidden” documentation and build such an elegant and simple script. Thanks also for the key binding , ultra handy 🎉. Congrats for the excellent work and keep it going !
Oh wow, glad you enjoyed the concept! Previously I had tried other techniques and they were more complicated and didn't work as well, but then learned about this new feature and it made things so much nicer. I'm glad that I got to share about it. Thanks for watching and sharing your thoughts! Have a great rest of your week
@@pnavais thank you so much! yes, bob is great and I def want to do a video on it. I hear you about kickstart.nvim. I did a video on it a while back before they switched to lazy.nvim. I’m on this LazyVim series atm but I think after a few more in that playlist I’ll circle back and build content on top of kickstart since it’s so closer to the metal with a decent starting point. I think that would appeal to a larger audience. Like kickstart.nvim wouldn’t be the topic, but I’d show how to setup and/or do things on top of it
@@ElijahManor oh yes you are absolutely right about kickstart I forgot you already covered that ! And what about a quick comparison between main distros (Astro , lazy , NvChad, etc..) ? I’m using lazy btw but I miss some nvchad bultins like theme switcher , color schemes, opening terminals,…. I think that would be also handy for folks in the editor hopping journey 😋. And right after fixing that , we can jump straight to Helix 🧬 and forget neovim at all 🤣.
@@pnavais Lazy has a theme switcher `uC` and terminals `ft` but not sure how they compare to NvChad. I'd like to get acquainted with other Neovim distros so I can compare/contrast. That would be a great video idaea (as you mentioned). So, yeah add that to my backlog :) I love the idea of Helix, but some of the differences feel like they would be hard for me to adjust, but maybe not.
Very helpful, I was struggling with this when upgrading my setup to LazyVim, now I know I can experiment with different configs at the same time with this new feature!
Thanks Josh! Yeah, I was very pleased for the feature. I had tried other options and there were downsides to them. This option is great. I know not everyone feels comfortable with a dev or nightly release, but it should hopefully come soon to a stable release
I know, right!?! I had a previous scripts in the past, but they have numerous problems and some were more complex... but this makes things very straightforward! Yay. Thanks for watching and supporting the channel
If you want to try it sooner, then maybe try a neovim version switcher like `bob` github.com/MordechaiHadad/bob I've started to use it and it's really handy to be able to switch between nightly and stable and other versions very quickly
Thank You!!! This is something I've wanted to be able to properly do for a long time. It was such a nightmare trying to update my config without disrupting my work. This is perfect to be able to update my config safely but still have my current setup for when I need to work without disruptions. I've wanted to migrate from Packer to Lazy Nvim for a while but kept putting it off because even the slightest changes/updates always seem to be a problem. As a bonus, I have been getting treesitter errors with certain plugins since the last big update for things like closing buffers/tabs in barbar. This somehow also fixed that issue and I'm guessing it was because of some hidden file that needed to be updated that I couldn't find from old plugin installs. I've tried using Packer to uninstall and reinstall the plugins, completely deleted NeoVim and reinstalled, etc, but couldn't get these errors to stop. But moving my current config into a "myVim" folder fixed all the errors.
Just want to say thank you for this video, I have genuinely found benefit from it. I break my config a lot. I hate when it's so broken I don't have a good way to edit the broken config files, because I'm cutting off the branch I'm standing on. With this little trick, I have a few different base configuration options, and when I inevitably Bork my main conf, going in and fixing it is trivial, because I can switch to a good working version of lazyvim or astronvim, or whatever. Absolutely huge difference. Thanks!
Yay, that is great that you found it helpful. And yes, I agree. I like to have something that I can count on and other things I can tinker with. Very handy. Thank you for watching and sharing your success story!
Yay, so glad to hear. With so many great configs around and new things to try, it's a nice way to experiment and play around without sacrificing something that is stable and you can be productive with.
I have also created such a script... but when I found out about this feature, things became much more easy and straightforward (without the downside of how I was doing it). If you'd rather not sacrifice your main Neovim with nightly you can try a. neovim version manager like `bob` github.com/MordechaiHadad/bob I might do a short video on it since I've found it helpful to quickly jump between a nightly version of neovim and stable if needed. Does that sound like an interesting or helpful video?
@@ElijahManor that would be really good video for people who would switch versions due to any potential bugs or breaking feature in the dev version like developers and some pro people , but majoritiy would not . So I think you should reconsider , but it will be helpful surely. You should ask more people , I am not experienced enough here and i may be wrong
Thanks, yeah I've tried other techniques before and they all seemed to have their issues. This is much more straightforward and fixes a lot of the pain. Thanks for watching and supporting the channel
Oh my god, this is such a game changer. So far, the only team that managed to make this work before was Lunarvim. Now my idea of having my most basic config as a plugin makes even more sense!
@@jajpater my understanding is that you should. Not sure how the specific workaround that lunar vim does will interact with this feature, but all those projects that are supposed to become your main neovim should work out of the box
Hey @ElijahManor I finally had time to sit down and play with this config and it's really efficient and helpful, thanks once again for illustrating the process :)
Yeah, there were a few ways to do it before, but each of them had minor pros/cons. This new way solves a lot of those cons. It is so nice and I enjoy using it. Glad you stopped by and left a note! Have a great rest of your week
I've started using the bob neovim version manager so I can quickly and easily switch between a stable version of neovim and a nightly github.com/MordechaiHadad/bob I might do a short video on showing various ways to install Neovim. I think some may find value from that.
@@ElijahManor I would be totally lost in the neverending rabbit hole. Ahahaha. I will maybe use the config switch to check other people workflow, keybindings and plugins. But version switching I'm not sure.. maybe to say l switch from stable and nightly if it could also also build it.
@@lpanebr yeah, depending on which version you install it may take a while :) waiting for v0.9 to land works too... hopefully that'll be soon. April 7th is the current date (but I'm not sure how hard that is) github.com/neovim/neovim/milestone/28
True, running a dev or nightly release is a bit risky. But you could try a Neovim version manager such as bob github.com/MordechaiHadad/bob to quickly switch between versions. That could be an interesting video for me to make to show how that works. It's handy to quickly switch back and forth without the risk of messing everything up :)
Yay! Glad it was helpful. If you want to try it now and not sure about going nightly, then maybe use a neovim version manager like `bob` github.com/MordechaiHadad/bob I've been using it to switch back and forth between nightly and stable (or other versions) and it's been pretty nice
@Elijah Manor yeah only real mod I made was I put it in my .aliases instead of my .zshrc becausevI segregate my aliases from my zsh configuration...works great
good job! It would be very nice if you could persist the config somehow. Most of the time if you want to use say AstroNvim you want to use it for some time. So having a nvim_default that launches the same fzf would be great. Also nice if you could add and remove options with a command instead of going into the script "nvims-add AstroNvim"
Yeah, the script could be much smarter. I would recommend that your nvim folder be whatever you normally use and reserve the others for temporary experiments. But I get what you are saying. Some additional state (either an ENV variable, config file, etc...) could be added to add that level of persistence that you mentioned. Also the script file could be abstracted to a node script or some other language to make it much richer. The underlying NVIM_APPNAME env var would be key for those to work though.
Hi Elijah - Thanks - I wonder if there is a "good" way to maybe setup links (ln -s) to plugin share directories sort of like pnpm. Then maybe need not to "Lazy update" each of the multiple configs - of course better to have just one :) eventually
That topic is in my list of LazyVim videos to go in my playlist. I just wanted to do this quick video because I thought it was timely and I've been using it recently to switch between various configs to play and experiment with things. Thank you so much for your interest and for supporting the channel
Elijah - this changed the game for my nvim usage! I've tried all the other plugins, $XDG switching and more, but your little alias/zshrc function is so elegant and minimal. Two unrelated questions: 1. In your video is your CLI in the terminal via neovim or just the regular terminal? If it is in neovim, how did you get it to look so nice? The terminal experience is the one thing I can't seem to enjoy using. 2. How did you jump to specific words/EOL in the CLI? This makes me think you're in neovim... but would love to know the trick to jumping around in the regular CLI!
Yay, glad it helped and yes it works much nicer than the previous $XDG way (less cons). As for your questions, I don't remember exactly what I was doing in this video, but what you were seeing was a special vi-mode with my shell (zsh) so I can use vim-like commands to update the CLI which is really handy. I've thought about doing a whole video about the topic because there are various levels of goodness you can use. I'd recommend the following... github.com/jeffreytse/zsh-vi-mode
Thanks! Take a look at this gist. There are some comments by others with variations for fish, powershell, etc... gist.github.com/elijahmanor/b279553c0132bfad7eae23e34ceb593b
Thank you so much for this valuable info... However, I have some issues with this. After adding the code and changing my nvim folder name. I get address and file not found errors, Do I need to change and edit all addresses in the config files ?
Nice. One question, any reason yo use C-a but not something like, C-n? C-a has a default mapping of jumping to the beginning of line in terminal already, but C-n does not as far as I know.
Good question. I use a vim-mode plugin in oh-my-zsh to navigate through my terminal, so I'm not missing that keymap. However, you can pick whatever you want for the binding. With much of this it's very much user driven based on your needs... since terminal and neovim keymaps are all over the place depending on each user's preference. Thank you for watching and supporting the channel!
Thank you for this! But, I get an error "bindkey: command not found" when running ~/.zshrc at source, can you help me with this? I'm using WSL btw. Edit: I changed it to bind cmd, but now I get: "not a valid number: ~50 Nothing selected" when using nvims.
I am new to neovim, and current using nvchad configurations. I would like to understand what is the use case of mainining multiple configs like nvchad, lazy etc. It will be helpful for me to understand and use the new feature as mentioned in this video.
The use case is less having a bunch of neovim distros, but that is definitely what i showed as an extreme example. The use case I primarily use it for, is having a few configs that I can swap between depending on my needs. My default choice ~/.config/nvim is the config that I depend upon, that I'm most confident with, that is solid, that I use for primary productivity, when I need to get things done. The other config choices are things I want to experiment around with. Maybe a few are other distros I want to test out, maybe it's a fresh distro of my preferred default, but I want to tweak some settings and experiment with other things that might would have otherwise jeopardized my default experience. Or maybe you have a config that is specific to some type of work you do. Maybe you have one that is VERY geared to writing with a bunch of plugins for spelling, grammar, and other such writing tools. Maybe you have a very complicated config that is totally geared for Front-End development only with all the bells and whistles that you'd rather not clutter another config that is totally geared toward Rust development or something. Yes, you could use one config to do everything, but there are risks of breaking your current config and getting into a state that isn't useful for just being productive. Having other configs can help you focus and/or try out new things. Hope that helps
Hey 👋 I'm using the vscode-neovim Extension and wondering how to disable a bunch of plugins when vscode is calling neovim or using a seperate config file
Wonder if this will work in windows, all the script you wrote! I am newbie so is it possible to get the same working in windows? Have you tested it in Windows?
I don't have a modern windows machine handy, but the gist I listed in the video description has comments from other users who have tweaked the script to work on Windows. I've not tried them, but feel free to check them out.
wow this is a really great great video! thanks. I've first switched from Packer to Lazy following your indication of other video. Then cloned some nvim configurations but i've modified a little the function in .zshrc file. I've cloned the nvim configuration in varius directories named nvim-CONFIG (nvim (dash) and CONFIG is the name of the specific nvim configuration under the ~/.config directory. If you list the directories sorted by name nvim configurations (directories)are all near each others and on top there is the classic nvim directory. I've added also a nvim-clean directory (empty direcrtory - for clean nvim with no configiguration at all) and one nvim-test directory to do some tests on new plugins or configuration set up before moving to the classic nvim directory. I've also created a nvim-bak config directory (just a back up of my nvim working configuration after changing the plugin manager from Packer to Lazy - just in case ). I've inserted in .zshrc a function (called nvim-alias) to automatically generate the aliases for the varius nvin configurations (alias is the directory name where the configuration is inserted in). Then the function is called directly in .zshrc. But function is also listed in terminal if yuo type nvim- and (nvim (dash) and
Glad you enjoy the videos and find value in them. So cool to see you play around and experiment with the idea. To your point, there are great use cases of alternate configs for your personal use other than just other distros. Thanks for your excitement and support of the channel. Sounds like you are a repeat viewer. Always appreciated and thanks for saying hi!
@@ElijahManor thanks, I found a potential flaw in my solution. As there is a function named "nvim-alias" I think is not possibile to have also an nvim configuration named "alias". Even it is quite a remote possibility , this condition is nevertheless not tested. So may be there is the need to add some additional code when generating nvim configurations aliases to skip ahead and not generate an alias named "nvim-alias" but providing at the end a warning message "nvim-alias" config not generated. Evnetual directory "nvim-alias" with an nvim configuration in it, will be accessible just with the function nvims selecting the entry "alias". But from my point of wiew better not generate confusion and avoid to have a nvim config named alias. Just keep things in the right way to avoid clash. Thank again for your videos, really well done and great for inspirations .
alright, i have an alias setup like you mentioned in my xonsh shell and installed AstroVim for example. How can i start nvim with this new APP_NAME as nvim presently cannot understand the switch
@@ElijahManor thanks. i got the nightly. i have also made it working on xonsh shell. this alias did the trick. aliases['nvim-astro']="$NVIM_APPNAME='AstroVim'; nvim" i have updated the same in your Gist. Thanks once again.
The gist has some suggestions of alternate scripts for other shells including Windows gist.github.com/elijahmanor/b279553c0132bfad7eae23e34ceb593b Hope that helps! I don't have a Windows machine, but that eventually might be nice for me to test such things.
@@jizhang2407 glad you got something to work! I have almost ZERO powershell experience, so unfortunately I'm not much help there. Feel free to leave a comment on the gist with your findings to help others.
I was so looking forward to this feature that I started using nightly, but I noticed my Telescope highlights is broken in nightly where the preview pane doesn't change when I search the highlights. Not sure if you've noticed/had the same issue or not
Hmm, I haven't seen that yet. I wonder when that broke exactly as I downloaded nightly several days ago. You might find a Neovim version manager like `bob` github.com/MordechaiHadad/bob to be handy where you can quickly switch between versions of Neovim. The benefit is that you can have a stable version to "get things done" in case nightly or another version is having issues. I'm considering doing a video on `bob` since that has been helpful for me and I don't think it's very well known. Thoughts?
That's actually what I'm using 😆, and I like it; it's very convenient to use. The only thing is that, I cannot use it on a machine with older C++ libs, and for that, I need to build from source (not a huge deal, per se, but all the conveniences of bob are basically gone on that machine). But yeah, I think it's a useful tool to deserve a video ... and maybe you can also mention that it may not (doesn't?) work if your distribution has older C++ libs
@IuseArchbtw-di6cd actually, I tried it, the cache and local directories match the NVIM_APPNAME, so e.g. if you launch with NVIM_APPNAME='AstroNVIM', it'll match '.config/AstroNVIM' with '.local/share/AstroNVIM', which is absolutely perfect! you can keep both, your config and cache isolated, this is a godsend and I can imagine countless examples where it'd be useful!
so im trying this out but instead of pulling up the menu as shown its showing my my directory folders, like documents/ home/ etc. any reason its not working correct?
@@ElijahManor I has pop-os going for a test run, the problem was likely another plugin overriding the key. It worked with enter instead of tab for me, so it was working I just wasnt aware of the key switch.
Maybe you can create a private gist with a readme.md and provide more detail on what you are seeing. Once you save the gist you can drag/drop and attach images to the comments with a screenshot and/or short video. Feel free to post the private gist here and I can take a look. I'd also need to know what operation system you are using, what shell (bash, zsh, fish, powershell, WSL, etc)
Make sure the configs are in their own folder and not in the nvim config folder ex. ~/.config/NvChad and not ~/.config/Nvim/NvChad that solved this issue for me
always wanted to try many configs, thanks! right now i have a config with packer, what happens if i install a config with lazy? will my packer config get deleted?
Both packer and lazy download their plugins to vim.fn.stdpath("data") (aka $XDG_DATA_HOME) which typically is somewhere like ~/.local/share on mac/linux and ~/AppData/Local on windows. So, it should work just fine. All your plugins for YourPackerThing config would be stored in the ~/.local/share/YourPackerThing folder and your plugins for YouLazyThing config would be stored in the ~/.local/shareYourLazyThing folder.
Thanks! I've been having a blast playing around with it. Of course you need to be running nightly. I wonder if it'd be helpful to show different ways to swap between versions of Neovim?
ls ~/.config | NVIM_APPNAME=$(fzf --height 40% --reverse -q "nv" --select-1) nvim ^ one liner to have dynamic config, just name nvim configs dir starting with nv so only those get filtered.
Love this I have just found the awesomness of astrovim, kickstart nvim, etc and this makes it much nicer to change. Would it be possible to store all alt configs in ~/.config/nvims/ and have zsh auto generate
Yes, you could create a folder in .config mkdir -p ~/.config/nvims Then clone a nvim distro to that folder... git clone github.com/NvChad/NvChad ~/.config/nvims/NvChad --depth 1 Then when launching it, apply the partial path NVIM_APPNAME=nvims/NvChad nvim And you could update the aliases to the partial path. The auto-complete would work like in the video... nvim- # toggle between options If you used the nvims function, you'd update the items to use the partial paths items=("default" "nvims/kickstart" "nvims/LazyVim" "nvims/NvChad" "nvims/AstroNvim") Hope that helps!
If you liked this video, please like and subscribe for further content.
You can also join as a member of this channel for special perks youtube.com/@elijahmanor/join
If you'd like to connect on social media, you can find me on Twitter twitter.com/elijahmanor and Mastodon hachyderm.io/@elijahmanor
Great I have been tweaking my vim/neovim setup for several decades and now I have a way to make it so I can tweak many versions in parallel :-)
YES, I love to hear that. It really have been a game changers for me to quickly switch between setups. Glad that this will help you. If Neovim nightly is a challenge, you could try `bob` a neovim version manager. I recently started using it so I could swap between nightly and stable github.com/MordechaiHadad/bob I'm considering doing a quick video on it since it has been helpful to me as well.
NOTE: You'll need to be running a Neovim nightly build to get this functionality.
You can follow the instructions from github.com/neovim/neovim/wiki/Installing-Neovim or use a Neovim version manager such as bob github.com/MordechaiHadad/bob to quickly switch between versions.
If that sounds like an interesting video to you, I could make that as well. Please give this comment a thumbs-up if you'd like to see that.
Thank you so much!
Yes, please make the video
@@peekaboo6026 I’m working on material for a video on the new features of Neovim 0.9 (which includes this feature). Hopefully I can get another video soon about quickly switching between versions of Neovim.
thanks a lot btw
I was fixing stuff that wasn't broken huh. ty, didn't know I didn't update nvim ever since 0.7
Thank you for this, Elijah. I have been dipping my toe into Neovim and the ability to try out the different flavors was keeping me from choosing one and switching over. I had started with NvChad, but I think it turns out LazyVim feels closer to where I want to start.
Awesome, glad this was helpful to you. There are so many good options. Having a way to switch between them is nice... even if it's multiple versions of the same thing (trying different options).
This new feature of Neovim is mind-blowing, and what you did is really awesome as well. I will do my best to share this video. Congrats!
Thank you for your support!
I've been looking like this for ages. Thanks so much!
This will make my neovim distro hopping so much easier to manage!
And good news is that v0.9 was released today, so the feature if available in the stable release! ua-cam.com/users/postUgkxCoXgAqgnq3y37xX3mrTjFJR0y6m1sf6C
This is a voyage of discovery. I've already learnt how unusual some of my most basic key-mappings are compared to the mainstream distros
Great point, I've been very curious about how other distros setup their keymaps. Doesn't mean they are better, but typically a lot of thought has been put into them so I've found it to be a good exercise to think about how keymaps scale with regards to semantic meaning (something that i'll remember because there is some pattern or construct to them)
Thanks a lot for this🙏🏻. A game changer for trying different nvim configs. Was trying nyoom-nvim the other day with XDG variables but still there were issues going on, so this implementation is quite neat 👍🏻
Glad I could help! Yes, I've tried other techniques in the past... and this one is much better. Not everyone is up to a dev or nightly release so that may hinder some until an official release. I've recently started using the `bob` neovim version manager to quickly switch between neovim versions github.com/MordechaiHadad/bob I might do a quick video on using that if people find that helpful/interesting
Another awesome ultra quality video, as usual. Insane how you take a bit of somehow “hidden” documentation and build such an elegant and simple script. Thanks also for the key binding , ultra handy 🎉. Congrats for the excellent work and keep it going !
Oh wow, glad you enjoyed the concept! Previously I had tried other techniques and they were more complicated and didn't work as well, but then learned about this new feature and it made things so much nicer. I'm glad that I got to share about it. Thanks for watching and sharing your thoughts! Have a great rest of your week
@@pnavais thank you so much! yes, bob is great and I def want to do a video on it. I hear you about kickstart.nvim. I did a video on it a while back before they switched to lazy.nvim. I’m on this LazyVim series atm but I think after a few more in that playlist I’ll circle back and build content on top of kickstart since it’s so closer to the metal with a decent starting point. I think that would appeal to a larger audience. Like kickstart.nvim wouldn’t be the topic, but I’d show how to setup and/or do things on top of it
@@ElijahManor oh yes you are absolutely right about kickstart I forgot you already covered that ! And what about a quick comparison between main distros (Astro , lazy , NvChad, etc..) ? I’m using lazy btw but I miss some nvchad bultins like theme switcher , color schemes, opening terminals,…. I think that would be also handy for folks in the editor hopping journey 😋. And right after fixing that , we can jump straight to Helix 🧬 and forget neovim at all 🤣.
@@pnavais Lazy has a theme switcher `uC` and terminals `ft` but not sure how they compare to NvChad. I'd like to get acquainted with other Neovim distros so I can compare/contrast. That would be a great video idaea (as you mentioned). So, yeah add that to my backlog :) I love the idea of Helix, but some of the differences feel like they would be hard for me to adjust, but maybe not.
Very helpful, I was struggling with this when upgrading my setup to LazyVim, now I know I can experiment with different configs at the same time with this new feature!
Thanks Josh! Yeah, I was very pleased for the feature. I had tried other options and there were downsides to them. This option is great. I know not everyone feels comfortable with a dev or nightly release, but it should hopefully come soon to a stable release
Ridiculously easy, thanks for demoing that! ❤
I know, right!?! I had a previous scripts in the past, but they have numerous problems and some were more complex... but this makes things very straightforward! Yay. Thanks for watching and supporting the channel
@@ElijahManor totally! I'm gonna hold on until it gets to maybe a stable release, but the temptation is great! 😂
If you want to try it sooner, then maybe try a neovim version switcher like `bob` github.com/MordechaiHadad/bob I've started to use it and it's really handy to be able to switch between nightly and stable and other versions very quickly
@@ElijahManor I didn't know about that, thanks 🙏
Thank You!!! This is something I've wanted to be able to properly do for a long time. It was such a nightmare trying to update my config without disrupting my work. This is perfect to be able to update my config safely but still have my current setup for when I need to work without disruptions. I've wanted to migrate from Packer to Lazy Nvim for a while but kept putting it off because even the slightest changes/updates always seem to be a problem.
As a bonus, I have been getting treesitter errors with certain plugins since the last big update for things like closing buffers/tabs in barbar. This somehow also fixed that issue and I'm guessing it was because of some hidden file that needed to be updated that I couldn't find from old plugin installs. I've tried using Packer to uninstall and reinstall the plugins, completely deleted NeoVim and reinstalled, etc, but couldn't get these errors to stop. But moving my current config into a "myVim" folder fixed all the errors.
Just want to say thank you for this video, I have genuinely found benefit from it. I break my config a lot. I hate when it's so broken I don't have a good way to edit the broken config files, because I'm cutting off the branch I'm standing on.
With this little trick, I have a few different base configuration options, and when I inevitably Bork my main conf, going in and fixing it is trivial, because I can switch to a good working version of lazyvim or astronvim, or whatever.
Absolutely huge difference. Thanks!
Yay, that is great that you found it helpful. And yes, I agree. I like to have something that I can count on and other things I can tinker with. Very handy. Thank you for watching and sharing your success story!
This is really good, I've been really needing this tbh.
Yay, so glad to hear. With so many great configs around and new things to try, it's a nice way to experiment and play around without sacrificing something that is stable and you can be productive with.
Great job once again. Thanks for putting this together.
Thanks again! Yay, thank you for coming back :) Have a great rest of your day!
👍Once again, thanks for such a crystal clear and high quality video tutorial for this amazing tool for neovim config.
You are welcome! Glad you liked it. I'm excited about making more content. I appreciate your support and encouragement.
Thank God this feature came i was about to script out the config switching part using bash but this vid saved my day
I have also created such a script... but when I found out about this feature, things became much more easy and straightforward (without the downside of how I was doing it). If you'd rather not sacrifice your main Neovim with nightly you can try a. neovim version manager like `bob` github.com/MordechaiHadad/bob I might do a short video on it since I've found it helpful to quickly jump between a nightly version of neovim and stable if needed. Does that sound like an interesting or helpful video?
@@ElijahManor that would be really good video for people who would switch versions due to any potential bugs or breaking feature in the dev version like developers and some pro people , but majoritiy would not . So I think you should reconsider , but it will be helpful surely. You should ask more people , I am not experienced enough here and i may be wrong
thanks, that was very helpful for me as i'm exploring neovim
Great, the new feature is very helpful. Thanks for stopping by and leaving a note!
That's perfect! Just as I was about to try some of these hacky workarounds after switching between configs a fair bit for my Quarto and Neovim series.
Thanks, yeah I've tried other techniques before and they all seemed to have their issues. This is much more straightforward and fixes a lot of the pain. Thanks for watching and supporting the channel
Thank you, this is a really nice way to switch between configs and avoid messing anything up, I will try it out!
Hope you enjoy! Thanks for watching and supporting the channel
Oh my god, this is such a game changer. So far, the only team that managed to make this work before was Lunarvim. Now my idea of having my most basic config as a plugin makes even more sense!
Yay, glad you found it helpful! I've been having fun playing with it. Things are so much more flexible now.
I wonder if I can use this with lvim? And other configs like SpaceVim etc.
@@jajpater my understanding is that you should. Not sure how the specific workaround that lunar vim does will interact with this feature, but all those projects that are supposed to become your main neovim should work out of the box
As someone ricing a lot on the past couple weeks. This is amazing!!!! Thx!
Glad you liked it! It has been pretty fun for me to play with. Thanks for the support!
I'm new to vim and I'm exploring all projects thanks for showing that
Great, glad that was helpful. It's a nice way to try new things without messing up your main config
Thank you very much, boss. ❤️
You're very welcome! Thanks for watching and supporting the channel
Hey @ElijahManor I finally had time to sit down and play with this config and it's really efficient and helpful, thanks once again for illustrating the process :)
Yay, so glad you found it helpful!
Brilliant. Double brilliant!!
Nice job mate
This is exactly what I wanted. Finally a reliable solution. Thanks man.
Glad it helped, yay!
Awesome. Gave the channel a sub. Please keep making videos!
Thanks for the sub! Much appreciated. I def have a long list of things I'd like to cover, so stay tuned :)
Interesting. I’d done something similar using #3 all XDG vars + fzf. Great that it’s now a feature!
Yeah, there were a few ways to do it before, but each of them had minor pros/cons. This new way solves a lot of those cons. It is so nice and I enjoy using it. Glad you stopped by and left a note! Have a great rest of your week
Very good! Thanks! When I upgrade to version 9 I'll try it out.
I've started using the bob neovim version manager so I can quickly and easily switch between a stable version of neovim and a nightly github.com/MordechaiHadad/bob I might do a short video on showing various ways to install Neovim. I think some may find value from that.
@@ElijahManor I would be totally lost in the neverending rabbit hole. Ahahaha. I will maybe use the config switch to check other people workflow, keybindings and plugins. But version switching I'm not sure.. maybe to say l switch from stable and nightly if it could also also build it.
@@lpanebr yeah, depending on which version you install it may take a while :) waiting for v0.9 to land works too... hopefully that'll be soon. April 7th is the current date (but I'm not sure how hard that is) github.com/neovim/neovim/milestone/28
thanks for a video, you motivate me!
You are so welcome! Thanks for the encouragement and support of the channel
thank you for the content!
This is much much cleaner than i expected, sad its on nightly though
True, running a dev or nightly release is a bit risky. But you could try a Neovim version manager such as bob github.com/MordechaiHadad/bob to quickly switch between versions. That could be an interesting video for me to make to show how that works. It's handy to quickly switch back and forth without the risk of messing everything up :)
@@ElijahManor Ill have to try that,thanks
Nice overview, cheers
Thank you so much! Appreciate the watch and for supporting the channel!
Love it exactly what I was looking for
Yay! Glad it was helpful. If you want to try it now and not sure about going nightly, then maybe use a neovim version manager like `bob` github.com/MordechaiHadad/bob I've been using it to switch back and forth between nightly and stable (or other versions) and it's been pretty nice
@Elijah Manor yeah only real mod I made was I put it in my .aliases instead of my .zshrc becausevI segregate my aliases from my zsh configuration...works great
@@batboy49 Awesome!
Funcionou que é uma beleza. Faltou o script para o bash, mas com alguns ajustes funcionou tudo ok.
Um alô do Brasil!!
Wow, neat! Thank you!
You bet! Glad you found it helpful! Thanks for watching
Very nice! Thank you
So glad you found value in it and thanks for supporting the channel!
Thank you!
You're welcome! Thanks for coming back and supporting the channel!
Terrific video! Exactly what I wanted. It's too late for me to try this, but does it work on v0.9.1 or does it have to be nightly?
The feature landed in v0.9.0 so you are good. When I made this video v0.9.0 hadn't been launched yet, so the feature was only on the main branch.
Great tool!
Thanks!
No problem! Thanks for watching :)
good job!
It would be very nice if you could persist the config somehow. Most of the time if you want to use say AstroNvim you want to use it for some time. So having a nvim_default that launches the same fzf would be great. Also nice if you could add and remove options with a command instead of going into the script "nvims-add AstroNvim"
Yeah, the script could be much smarter. I would recommend that your nvim folder be whatever you normally use and reserve the others for temporary experiments. But I get what you are saying. Some additional state (either an ENV variable, config file, etc...) could be added to add that level of persistence that you mentioned. Also the script file could be abstracted to a node script or some other language to make it much richer. The underlying NVIM_APPNAME env var would be key for those to work though.
Wow... 100000000000 of likes... I really love it. Perfect
Yay, and now there is v0.9 stable with this feature baked-in. No need for a nightly release
Hi Elijah - Thanks - I wonder if there is a "good" way to maybe setup links (ln -s) to plugin share directories sort of like pnpm. Then maybe need not to "Lazy update" each of the multiple configs - of course better to have just one :) eventually
Make a video of lazyvim copilot setup. Suggests, panels and all. Thanks
That topic is in my list of LazyVim videos to go in my playlist. I just wanted to do this quick video because I thought it was timely and I've been using it recently to switch between various configs to play and experiment with things. Thank you so much for your interest and for supporting the channel
Elijah - this changed the game for my nvim usage! I've tried all the other plugins, $XDG switching and more, but your little alias/zshrc function is so elegant and minimal.
Two unrelated questions:
1. In your video is your CLI in the terminal via neovim or just the regular terminal? If it is in neovim, how did you get it to look so nice? The terminal experience is the one thing I can't seem to enjoy using.
2. How did you jump to specific words/EOL in the CLI? This makes me think you're in neovim... but would love to know the trick to jumping around in the regular CLI!
Yay, glad it helped and yes it works much nicer than the previous $XDG way (less cons). As for your questions, I don't remember exactly what I was doing in this video, but what you were seeing was a special vi-mode with my shell (zsh) so I can use vim-like commands to update the CLI which is really handy. I've thought about doing a whole video about the topic because there are various levels of goodness you can use. I'd recommend the following... github.com/jeffreytse/zsh-vi-mode
@@ElijahManor Holy moly, perfect! My new favorite zsh extension! Thanks, Elijah!
I added a few comments to your gist to support Bash as well as Fish Shells. Hopefully it helps!
Oh that is great! I'm not familiar with fish, so that is awesome! And I prob should have tested bash too. Kudos. Thanks
@ElijahManor it's becoming alot more widly used. I use it as my daily driver currently for my workspace. So I had to give your script a shot
Yeah, I should probably know more of the differences. Thank you again
Thank u
Is there by any chance a way to implement this in windows ? Using powershell or whichever terminal emulator? Great video👍👍
Thanks! Take a look at this gist. There are some comments by others with variations for fish, powershell, etc... gist.github.com/elijahmanor/b279553c0132bfad7eae23e34ceb593b
@@ElijahManor Thanks
Thank you so much for this valuable info... However, I have some issues with this. After adding the code and changing my nvim folder name. I get address and file not found errors, Do I need to change and edit all addresses in the config files ?
What operating system are you using? Do you have fzf installed?
Nice. One question, any reason yo use C-a but not something like, C-n? C-a has a default mapping of jumping to the beginning of line in terminal already, but C-n does not as far as I know.
Good question. I use a vim-mode plugin in oh-my-zsh to navigate through my terminal, so I'm not missing that keymap. However, you can pick whatever you want for the binding. With much of this it's very much user driven based on your needs... since terminal and neovim keymaps are all over the place depending on each user's preference. Thank you for watching and supporting the channel!
Thank you for this! But, I get an error "bindkey: command not found" when running ~/.zshrc at source, can you help me with this? I'm using WSL btw.
Edit: I changed it to bind cmd, but now I get: "not a valid number: ~50 Nothing selected" when using nvims.
I am new to neovim, and current using nvchad configurations.
I would like to understand what is the use case of mainining multiple configs like nvchad, lazy etc. It will be helpful for me to understand and use the new feature as mentioned in this video.
The use case is less having a bunch of neovim distros, but that is definitely what i showed as an extreme example.
The use case I primarily use it for, is having a few configs that I can swap between depending on my needs. My default choice ~/.config/nvim is the config that I depend upon, that I'm most confident with, that is solid, that I use for primary productivity, when I need to get things done. The other config choices are things I want to experiment around with. Maybe a few are other distros I want to test out, maybe it's a fresh distro of my preferred default, but I want to tweak some settings and experiment with other things that might would have otherwise jeopardized my default experience. Or maybe you have a config that is specific to some type of work you do. Maybe you have one that is VERY geared to writing with a bunch of plugins for spelling, grammar, and other such writing tools. Maybe you have a very complicated config that is totally geared for Front-End development only with all the bells and whistles that you'd rather not clutter another config that is totally geared toward Rust development or something.
Yes, you could use one config to do everything, but there are risks of breaking your current config and getting into a state that isn't useful for just being productive. Having other configs can help you focus and/or try out new things.
Hope that helps
Hey 👋 I'm using the vscode-neovim Extension and wondering how to disable a bunch of plugins when vscode is calling neovim or using a seperate config file
Wonder if this will work in windows, all the script you wrote! I am newbie so is it possible to get the same working in windows? Have you tested it in Windows?
I don't have a modern windows machine handy, but the gist I listed in the video description has comments from other users who have tweaked the script to work on Windows. I've not tried them, but feel free to check them out.
wow this is a really great great video! thanks.
I've first switched from Packer to Lazy following your indication of other video.
Then cloned some nvim configurations but i've modified a little the function in .zshrc file.
I've cloned the nvim configuration in varius directories named nvim-CONFIG (nvim (dash) and CONFIG is the name of the specific nvim configuration under the ~/.config directory. If you list the directories sorted by name nvim configurations (directories)are all near each others and on top there is the classic nvim directory. I've added also a nvim-clean directory (empty direcrtory - for clean nvim with no configiguration at all) and one nvim-test directory to do some tests on new plugins or configuration set up before moving to the classic nvim directory. I've also created a nvim-bak config directory (just a back up of my nvim working configuration after changing the plugin manager from Packer to Lazy - just in case ).
I've inserted in .zshrc a function (called nvim-alias) to automatically generate the aliases for the varius nvin configurations (alias is the directory name where the configuration is inserted in). Then the function is called directly in .zshrc. But function is also listed in terminal if yuo type nvim- and (nvim (dash) and
Glad you enjoy the videos and find value in them. So cool to see you play around and experiment with the idea. To your point, there are great use cases of alternate configs for your personal use other than just other distros. Thanks for your excitement and support of the channel. Sounds like you are a repeat viewer. Always appreciated and thanks for saying hi!
@@ElijahManor thanks,
I found a potential flaw in my solution.
As there is a function named "nvim-alias" I think is not possibile to have also an nvim configuration named "alias". Even it is quite a remote possibility , this condition is nevertheless not tested. So may be there is the need to add some additional code when generating nvim configurations aliases to skip ahead and not generate an alias named "nvim-alias" but providing at the end a warning message "nvim-alias" config not generated. Evnetual directory "nvim-alias" with an nvim configuration in it, will be accessible just with the function nvims selecting the entry "alias". But from my point of wiew better not generate confusion and avoid to have a nvim config named alias. Just keep things in the right way to avoid clash.
Thank again for your videos, really well done and great for inspirations .
@@kkolpetto yeah, that's a pretty edge case. cool to see others play off of the idea. i've seen a couple others in the wild as well. have fun!
how to fix such an error (zsh: ~nvims)
not a valid number: ~50
Nothing selected
alright, i have an alias setup like you mentioned in my xonsh shell and installed AstroVim for example. How can i start nvim with this new APP_NAME as nvim presently cannot understand the switch
What version of Neovim are you using?
@@ElijahManor thanks. i got the nightly. i have also made it working on xonsh shell. this alias did the trick.
aliases['nvim-astro']="$NVIM_APPNAME='AstroVim'; nvim"
i have updated the same in your Gist. Thanks once again.
@@karthickb1973 awesome! Nicely done
I wonder how to apply this config switcher in Windows system...? Appreciate suggestions from Elijah and your followers here. Thanks.
The gist has some suggestions of alternate scripts for other shells including Windows gist.github.com/elijahmanor/b279553c0132bfad7eae23e34ceb593b Hope that helps! I don't have a Windows machine, but that eventually might be nice for me to test such things.
@@jizhang2407 glad you got something to work! I have almost ZERO powershell experience, so unfortunately I'm not much help there. Feel free to leave a comment on the gist with your findings to help others.
I was so looking forward to this feature that I started using nightly, but I noticed my Telescope highlights is broken in nightly where the preview pane doesn't change when I search the highlights. Not sure if you've noticed/had the same issue or not
Hmm, I haven't seen that yet. I wonder when that broke exactly as I downloaded nightly several days ago. You might find a Neovim version manager like `bob` github.com/MordechaiHadad/bob to be handy where you can quickly switch between versions of Neovim. The benefit is that you can have a stable version to "get things done" in case nightly or another version is having issues. I'm considering doing a video on `bob` since that has been helpful for me and I don't think it's very well known. Thoughts?
That's actually what I'm using 😆, and I like it; it's very convenient to use.
The only thing is that, I cannot use it on a machine with older C++ libs, and for that, I need to build from source (not a huge deal, per se, but all the conveniences of bob are basically gone on that machine).
But yeah, I think it's a useful tool to deserve a video ... and maybe you can also mention that it may not (doesn't?) work if your distribution has older C++ libs
@@farzadmf Glad that is mostly works for you and I appreciate the heads up. Have an awesome day!
@@ElijahManor You too, keep up the great work; really like your videos
What happens with cache and local files?
@IuseArchbtw-di6cd actually, I tried it, the cache and local directories match the NVIM_APPNAME, so e.g. if you launch with NVIM_APPNAME='AstroNVIM', it'll match '.config/AstroNVIM' with '.local/share/AstroNVIM', which is absolutely perfect! you can keep both, your config and cache isolated, this is a godsend and I can imagine countless examples where it'd be useful!
so im trying this out but instead of pulling up the menu as shown its showing my my directory folders, like documents/ home/ etc. any reason its not working correct?
What operating system are you using? Do you have fzf installed?
@@ElijahManor I has pop-os going for a test run, the problem was likely another plugin overriding the key. It worked with enter instead of tab for me, so it was working I just wasnt aware of the key switch.
Hey, thanks a lot for the video. However, I get the following error : not a valid number: ~50
nothing selected. Can anyone help me ?
Maybe you can create a private gist with a readme.md and provide more detail on what you are seeing. Once you save the gist you can drag/drop and attach images to the comments with a screenshot and/or short video. Feel free to post the private gist here and I can take a look. I'd also need to know what operation system you are using, what shell (bash, zsh, fish, powershell, WSL, etc)
Make sure the configs are in their own folder and not in the nvim config folder ex. ~/.config/NvChad and not ~/.config/Nvim/NvChad that solved this issue for me
always wanted to try many configs, thanks! right now i have a config with packer, what happens if i install a config with lazy? will my packer config get deleted?
Both packer and lazy download their plugins to vim.fn.stdpath("data") (aka $XDG_DATA_HOME) which typically is somewhere like ~/.local/share on mac/linux and ~/AppData/Local on windows. So, it should work just fine. All your plugins for YourPackerThing config would be stored in the ~/.local/share/YourPackerThing folder and your plugins for YouLazyThing config would be stored in the ~/.local/shareYourLazyThing folder.
@@ElijahManor tried it and it works like a charm, thanks again
Awesome, great to hear!
Neat.
Thanks! I've been having a blast playing around with it. Of course you need to be running nightly. I wonder if it'd be helpful to show different ways to swap between versions of Neovim?
any idea to implement this on windows please?
hi bro, please test my config (nvpak) and tell me your opinion about it.
Do you still need nightly on 0.9.0?
The feature in this video is in 0.9.0. I’m working on a video about the new features in v0.9.0, hopefully will be ready tomorrow morning (my time)
Can you show me how to do it on window? Thanks
I've not tried it on Windows. What terminal do you use, what shell? Are you running Neovim nightly?
@@ElijahManor i am using window terminal on powershell 7
Im about to have a field day with this shit because my main conf is getting bloated
Oh great, glad that has sparked some new ideas for you to experiment with! Yay
ls ~/.config | NVIM_APPNAME=$(fzf --height 40% --reverse -q "nv" --select-1) nvim
^ one liner to have dynamic config, just name nvim configs dir starting with nv so only those get filtered.
Nicely done, I like it! Or filter ahead of time with grep
ls ~/.config | grep "nv" | NVIM_APPNAME=$(fzf --height 40% --reverse --select-1) nvim
Love this I have just found the awesomness of astrovim, kickstart nvim, etc and this makes it much nicer to change. Would it be possible to store all alt configs in ~/.config/nvims/ and have zsh auto generate
Yes, you could create a folder in .config
mkdir -p ~/.config/nvims
Then clone a nvim distro to that folder...
git clone github.com/NvChad/NvChad ~/.config/nvims/NvChad --depth 1
Then when launching it, apply the partial path
NVIM_APPNAME=nvims/NvChad nvim
And you could update the aliases to the partial path. The auto-complete would work like in the video...
nvim- # toggle between options
If you used the nvims function, you'd update the items to use the partial paths
items=("default" "nvims/kickstart" "nvims/LazyVim" "nvims/NvChad" "nvims/AstroNvim")
Hope that helps!