Compare commits
2 commits
9d26abbb3a
...
0e4af5d596
Author | SHA1 | Date | |
---|---|---|---|
0e4af5d596 | |||
5ff5aa3bf3 |
3 changed files with 12 additions and 8 deletions
|
@ -1,8 +1,6 @@
|
||||||
set mouse=
|
set mouse=
|
||||||
" use spaces instead of \t
|
set expandtab " use spaces instead of \t
|
||||||
set expandtab
|
set autoindent " match indentation of previous line
|
||||||
" match indentation of previous line
|
|
||||||
set autoindent
|
|
||||||
set runtimepath^=~/.vim runtimepath+=~/.vim/after
|
set runtimepath^=~/.vim runtimepath+=~/.vim/after
|
||||||
let &packpath = &runtimepath
|
let &packpath = &runtimepath
|
||||||
source ~/.vimrc
|
source ~/.vimrc
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
" NOTE: don't add more LSPs here, use coc - it offers better completion
|
" NOTE: don't add more LSPs here, use 'coc.nvim' - it offers better completion
|
||||||
|
" 'vim'/common elements are held here while 'nvim' has another config: '.config/nvim/init.vim'
|
||||||
call plug#begin('~/.vim/exts')
|
call plug#begin('~/.vim/exts')
|
||||||
Plug 'AlexvZyl/nordic.nvim', { 'branch': 'main' }
|
Plug 'AlexvZyl/nordic.nvim', { 'branch': 'main' }
|
||||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||||
|
|
11
update.sh
11
update.sh
|
@ -3,13 +3,15 @@
|
||||||
# minimal dotfile manager
|
# minimal dotfile manager
|
||||||
# tracks files / copies them into the repo, sorted by hostname
|
# tracks files / copies them into the repo, sorted by hostname
|
||||||
#
|
#
|
||||||
|
set -u
|
||||||
|
|
||||||
# array of files [relative to home] to include
|
# array of files [relative to home] to include
|
||||||
DOTS=(
|
DOTS=(
|
||||||
'.vimrc'
|
'.vimrc'
|
||||||
'.config/nvim/init.vim'
|
'.config/nvim/init.vim'
|
||||||
'.config/nvim/coc-settings.json'
|
'.config/nvim/coc-settings.json'
|
||||||
# '.config/sway'
|
'.config/autostart-i3ipc.yml'
|
||||||
|
'.config/sway'
|
||||||
)
|
)
|
||||||
|
|
||||||
# ensure the host running this script/updating dotfiles has a directory
|
# ensure the host running this script/updating dotfiles has a directory
|
||||||
|
@ -18,13 +20,16 @@ DOTS=(
|
||||||
[ -d "$HOSTNAME" ] || mkdir -v "$HOSTNAME"
|
[ -d "$HOSTNAME" ] || mkdir -v "$HOSTNAME"
|
||||||
pushd "$HOSTNAME" || exit
|
pushd "$HOSTNAME" || exit
|
||||||
|
|
||||||
|
echo "Changed working dir to $PWD"
|
||||||
|
|
||||||
# now that the host/working dir is managed, process the dotfiles
|
# now that the host/working dir is managed, process the dotfiles
|
||||||
# ensure their directory structure is retained, then recursively copy
|
# ensure their directory structure is retained, then recursively copy
|
||||||
for DOT in "${DOTS[@]}"; do
|
for DOT in "${DOTS[@]}"; do
|
||||||
DOT_DIR="$(dirname "$DOT")"
|
DOT_DIR="$(dirname "$DOT")"
|
||||||
[ -d "$DOT_DIR" ] || mkdir -vp "$DOT_DIR"
|
[ -d "$DOT_DIR" ] || mkdir -vp "$DOT_DIR"
|
||||||
# naively copy; rely on git to tell us about changes
|
# naively 'copy' with rsync; rely on git to tell us about changes. TODO: reconsider
|
||||||
cp -ravp "$HOME/$DOT" "$DOT"
|
echo "Copying '$HOME/$DOT' to '$DOT'"
|
||||||
|
rsync -aqv "$HOME/$DOT" "$DOT" || echo "Couldn't copy '$DOT', got rc: $?"
|
||||||
done
|
done
|
||||||
|
|
||||||
# return where we were
|
# return where we were
|
||||||
|
|
Loading…
Reference in a new issue