4 ms·
Best protip I heard about (n)vim customization: use git branches when you want to switch between different configurations. Eg something like: - vanilla/default
by pizza 3y ago
Best protip I heard about (n)vim customization: use git branches when you want to switch between different configurations. Eg something like:
- vanilla/default
- minimal
- fancy
depending on what you want to deal with. If I go months between using all these plugins I forget what they do and what changed and it’s just noisy distractions that invariably lead me to open my init.lua file rather than what I actually had intended to work on
- qbasic_forever 3y agoI had luck using gnu stow to switch configs easily too.
- pizza 3y agoHadn’t heard of this. Thanks. I guess there are probably plenty of little GNU utilities out there that just haven’t hit their deserved mindshare yet
- tjferrara14 3y agohttps://kkovacs.eu/cool-but-obscure-unix-tools/ https://kkovacs.eu/cool-but-obscure-unix-tools/
- pynappo 3y agoyou can also use $NVIM_APPNAME if you want a more "full" switch between configurations. especially helpful for trying/switching between distributions (i use it for switching between my own config and lazyvim). basically, it modifies the paths where neovim looks for config and data files on startup: config path: $XDG_CONFIG_HOME/nvim/ -> $XDG_CONFIG_HOME/$NVIM_APPNAME/ data path on Windows: $LOCALAPPDATA/nvim-data/ -> $LOCALAPPDATA/{$NVIM_APPNAME}-data/ https://neovim.io/doc/user/starting.html#%24NVIM_APPNAME https://neovim.io/doc/user/starting.html#%24NVIM_APPNAME
- devnullbrain 3y agoWhy not stay in the editor and use `:source`?
- cerved 3y agowhat do you mean "use Git branches"?
- worksonmine 3y agoSince the configuration is done in (dot)files you can version and track them with git. If you want several setups you could have them in branches and just ´git checkout X´ in your .vim or .config/nvim directory to change it and it would affect settings and plugins (as they're also just files). I don't need it but I can see the use. I do have a dotfiles repository however it's very common in Linux and Mac, don't know about Windows. If I setup a new machine or spin up a VM I just have to clone that repository to have all my configurations for everything (even addons for Firefox and Chrome). This article[1] is a good starting point if you want to try it out. [1] https://www.atlassian.com/git/tutorials/dotfiles https://www.atlassian.com/git/tutorials/dotfiles