diff --git a/init.vim b/init.vim index 1fb06a7..192116b 100644 --- a/init.vim +++ b/init.vim @@ -8,13 +8,15 @@ let g:mapleader = ' ' " I use tab as my local leader let g:maplocalleader = "\" -" This sources all the files inside the init directory -" The directory must be in your runtimepath; my init directory -" is inside my ~/.config/nvim directory, this one is always in -" runtimepath -" Without the !, runtime only sources the first file in the list, -" instead of all -runtime! init/*.vim +" Here, I source the various config files. I explicitely source them one by one +" to ensure their order is always the same (the autocmds are needed later, e.g. +" when the colorscheme is sourced) +runtime init/autocmds.vim +runtime init/keys.vim +runtime init/netrw.vim +runtime init/settings.vim + +" The configs for the various plugins don't have a particular order to them runtime! init/plugins/*.vim " This sources a .vim/local.vim file in the current directory, if it exists. diff --git a/init/autocmds.vim b/init/autocmds.vim new file mode 100644 index 0000000..fc65f3f --- /dev/null +++ b/init/autocmds.vim @@ -0,0 +1,12 @@ +function! OverwriteBackground() + " We only want a transparent background if we're using the dark theme + if g:colors_name == 'flattened_dark' + highlight Normal guibg=NONE ctermbg=NONE + highlight LineNr ctermfg=NONE ctermbg=NONE + endif +endfunction + +augroup ColorschemeOverwrite + autocmd! + autocmd ColorScheme * call OverwriteBackground() +augroup END diff --git a/init/plugins/plugins.vim b/init/plugins/plugins.vim index 9494460..a3fe4d1 100644 --- a/init/plugins/plugins.vim +++ b/init/plugins/plugins.vim @@ -6,10 +6,14 @@ call plug#begin('~/.config/nvim/plugged') " definitions easily. " Plug 'ludovicchabant/vim-gutentags', { 'commit': '31c0ead' } -" File navigation +" Fast file navigation using fuzzy search +" +" https://github.com/ctrlpvim/ctrlp.vim Plug 'ctrlpvim/ctrlp.vim' " Git client within Vim +" +" https://github.com/tpope/vim-fugitive Plug 'tpope/vim-fugitive' " Change surrounding quotes, brackets...