Use stow for managing dotfiles

This commit is contained in:
Oliver Davies 2021-07-10 22:20:50 +01:00
parent 7b29ee2104
commit 7fed1cf922
83 changed files with 61 additions and 40 deletions

59
vim/.config/nvim/init.vim Normal file
View file

@ -0,0 +1,59 @@
let mapleader = " "
function! s:LoadPlugins()
call plug#begin('~/.config/nvim/plugged')
source ~/.config/nvim/plugins.vim
call plug#end()
endfunction
function! s:SourceConfigFilesIn(directory)
let directory_splat = '~/.config/nvim/' . a:directory . '/*'
for config_file in split(glob(directory_splat), '\n')
if filereadable(config_file)
execute 'source' config_file
endif
endfor
endfunction
call s:LoadPlugins()
syntax on
filetype on
filetype indent on
filetype plugin on
set complete+=kspell
set expandtab
set foldlevelstart=99 " Start unfolded
set foldmethod=indent
set noswapfile
set nowrap
set number relativenumber
set scrolloff=10 " Automatically scroll
set shiftwidth=2
set smartindent
set tabstop=2 softtabstop=2
set termguicolors
call s:SourceConfigFilesIn('plugins')
colorscheme nord
" Remaps
nnoremap <leader>pv :Vex<CR>
nnoremap <Leader>so :so ~/.config/nvim/init.vim<CR>
nnoremap <C-p> :Files<CR>
" Remove arrow keys
noremap <up> <nop>
noremap <down> <nop>
noremap <left> <nop>
noremap <right> <nop>
autocmd FileType gitcommit highlight ColorColumn ctermbg=8
autocmd FileType gitcommit setlocal colorcolumn=50,72
autocmd FileType gitcommit setlocal textwidth=72
autocmd FileType gitcommit setlocal spell
" Display extra whitespace
set list listchars=tab:»·,trail