aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xshenanigans.sh4
-rw-r--r--vimrc14
2 files changed, 11 insertions, 7 deletions
diff --git a/shenanigans.sh b/shenanigans.sh
index 96c78ad..cff5f06 100755
--- a/shenanigans.sh
+++ b/shenanigans.sh
@@ -96,6 +96,10 @@ backup() {
96 find /home/$USER/Videos -type f -name "*.webm" -exec cp -n {} $VHOME/videos/ \; 96 find /home/$USER/Videos -type f -name "*.webm" -exec cp -n {} $VHOME/videos/ \;
97 find /home/$USER/Pictures -type f -name "*.png" -exec cp -n {} $VHOME/pictures/ \; 97 find /home/$USER/Pictures -type f -name "*.png" -exec cp -n {} $VHOME/pictures/ \;
98 98
99 mkdir ../twow
100 cp -Rf /home/$USER/Games/turtlewow/Interface ../twow
101 cp -Rf /home/$USER/Games/turtlewow/WTF ../twow
102
99 # Sync with NAS. 103 # Sync with NAS.
100 rsync -azv \ 104 rsync -azv \
101 --exclude '.venv/' \ 105 --exclude '.venv/' \
diff --git a/vimrc b/vimrc
index 6e4080c..d7ec10c 100644
--- a/vimrc
+++ b/vimrc
@@ -18,8 +18,8 @@ nnoremap <C-q> :copen<cr>
18 18
19" Personal tabs/spaces settings. 19" Personal tabs/spaces settings.
20autocmd Filetype make,go,sh setlocal noexpandtab tabstop=4 shiftwidth=4 20autocmd Filetype make,go,sh setlocal noexpandtab tabstop=4 shiftwidth=4
21autocmd Filetype c,cpp,lua,zig setlocal expandtab tabstop=4 shiftwidth=4 21autocmd Filetype c,cpp,zig setlocal expandtab tabstop=4 shiftwidth=4
22autocmd Filetype nix,html,javascript,css setlocal expandtab tabstop=2 shiftwidth=2 22autocmd Filetype lua,nix,html,javascript,css setlocal expandtab tabstop=2 shiftwidth=2
23 23
24" External auto-formatters. 24" External auto-formatters.
25autocmd FileType c,cpp setlocal formatprg=clang-format 25autocmd FileType c,cpp setlocal formatprg=clang-format
@@ -28,11 +28,11 @@ autocmd FileType go setlocal formatprg=gofmt
28" Code commenting - https://stackoverflow.com/a/1676672. 28" Code commenting - https://stackoverflow.com/a/1676672.
29augroup CodeCommenting 29augroup CodeCommenting
30 autocmd! 30 autocmd!
31 autocmd FileType c,cpp,go,zig let b:comment_leader = '// ' 31 autocmd FileType c,cpp,go,zig,javascript let b:comment_leader = '// '
32 autocmd FileType sh,ruby,python let b:comment_leader = '# ' 32 autocmd FileType sh,ruby,python let b:comment_leader = '# '
33 autocmd FileType conf,fstab let b:comment_leader = '# ' 33 autocmd FileType conf,fstab let b:comment_leader = '# '
34 autocmd FileType lua,sql let b:comment_leader = '-- ' 34 autocmd FileType lua,sql let b:comment_leader = '-- '
35 autocmd FileType vim let b:comment_leader = '" ' 35 autocmd FileType vim let b:comment_leader = '" '
36augroup END 36augroup END
37noremap <silent> cc :<C-B>silent <C-E>s/^/<C-R>=escape(b:comment_leader,'\/')<CR>/<CR>:nohlsearch<CR> 37noremap <silent> cc :<C-B>silent <C-E>s/^/<C-R>=escape(b:comment_leader,'\/')<CR>/<CR>:nohlsearch<CR>
38noremap <silent> cu :<C-B>silent <C-E>s/^\(\s*\)\V<C-R>=escape(b:comment_leader,'\/')<CR>//e<CR>:nohlsearch<CR> 38noremap <silent> cu :<C-B>silent <C-E>s/^\(\s*\)\V<C-R>=escape(b:comment_leader,'\/')<CR>//e<CR>:nohlsearch<CR>