jessebot / dot_files

Default dot files for onboardme including bash, neovim, powerline, neomutt, w3m, wezterm, and more :)
https://jessebot.github.io/onboardme
GNU Affero General Public License v3.0
5 stars 3 forks source link

Make vim respect XDG #6

Closed jessebot closed 1 year ago

jessebot commented 1 year ago

The XDG specification is pretty good and helps get your dot files organized. Finding info on it, is a bit difficult. It's very old internet because it's freedesktop, but here's some links:

basically we want ~/.vim to move to ~/.config/ and we want ~/.vimrc to go into ~/.config/vim, to get config files into the config directory. What a battle this is with old software :)

Found this article called vim respect xdg that is pretty much exactly how to go about this, so I'll plan to do this soonish, because I really like the organization. It makes everything feel tidy.

jessebot commented 1 year ago

Another article doing similar things: https://blog.joren.ga/vim-xdg

jessebot commented 1 year ago

Done as of v0.12.0. We set the following in our a sourced ~/.config/bash/text_editing.sh:

https://github.com/jessebot/dot_files/blob/2be09eb258b0c0c80f2e20dcf10a52839c93adcf/.config/bash/text_editing.sh#L6-L7

Then we also set this in our our new ~/.config/vim/vimrc:

https://github.com/jessebot/dot_files/blob/2be09eb258b0c0c80f2e20dcf10a52839c93adcf/.config/vim/vimrc#L7-L34

Now everything seems to work, but you may have to rm the following files and directories:

You may also need to run a :PlugInstall in vim and a PackerSync in nvim