diff --git a/alacritty.yml b/alacritty.yml index 5340f2d70549341bcb27f46dec361433eeb972e6..4100a4a9951ef38d5eb18c276a3459fe038b246a 100644 --- a/alacritty.yml +++ b/alacritty.yml @@ -17,4 +17,4 @@ family: Berkeley Mono colors: primary: - background: "#151515" + background: "#131313" diff --git a/shenanigans.sh b/shenanigans.sh index 34b8ea7193367c796520512d38d638d2ad15ef77..32bec7a693f1ce6541be2f32501046a32d3cdddd 100755 --- a/shenanigans.sh +++ b/shenanigans.sh @@ -1,6 +1,5 @@ # Software list. -# cifs-utils tree s3cmd xclip mc gnupg ripgrep jq xmlstarlet fzf -# htop nvtop newsboat tmux +# cifs-utils tree s3cmd xclip mc gnupg ripgrep jq xmlstarlet fzf htop nvtop newsboat tmux # Magical environment variables. diff --git a/tmux.conf b/tmux.conf index 23c8d9b36f5185ac7793af2441ecdb65987f0907..56d0cb303afaf2fed0dda54e85acee4c45ca6448 100644 --- a/tmux.conf +++ b/tmux.conf @@ -20,9 +20,9 @@ set -g status-bg '#480b8e' set -g status-fg '#ffffff' # Set inactive/active window styles. -set -g window-status-current-format "#[fg=#ffffff]#[bg=#151515]#[fg=#ffffff]#[bg=#151515] #I:#W #[fg=#ffffff]#[bg=#151515]" +set -g window-status-current-format "#[fg=#ffffff]#[bg=#131313]#[fg=#ffffff]#[bg=#131313] #I:#W #[fg=#ffffff]#[bg=#131313]" set -g window-style 'bg=#222222' -set -g window-active-style 'bg=#151515' +set -g window-active-style 'bg=#131313' # Other settings set-option -sg escape-time 10 diff --git a/vimrc b/vimrc index c9b883807f2d0cc8732a1e0ed4176672a5656d39..6e593ca502368abc4c5b5b86ae87c96da6fdbfab 100644 --- a/vimrc +++ b/vimrc @@ -1,9 +1,4 @@ -" https://vimhelp.org/options.txt.html - set nocompatible -syntax enable - -" Sane defaults. set path+=** set relativenumber set smartcase @@ -20,13 +15,40 @@ set backspace=2 set scrolloff=4 set spelllang=en_us set laststatus=2 +set shiftwidth=4 +set tabstop=4 -" Buffer navigation remaps. +filetype plugin on +filetype indent on + +syntax enable + nnoremap :bnext nnoremap :bprevious +nnoremap :buffers:buffer +nnoremap :Explore +nnoremap :Lex -" Language specific indentation. -filetype plugin indent on -autocmd Filetype make,go,sh setlocal noexpandtab tabstop=4 shiftwidth=4 -autocmd Filetype c,cpp,html,javascript,css,python setlocal expandtab tabstop=2 shiftwidth=2 +" Commenting blocks of code. +augroup commenting_blocks_of_code + autocmd! + autocmd FileType c,cpp,go,scala let b:comment_leader = '// ' + autocmd FileType sh,ruby,python let b:comment_leader = '# ' + autocmd FileType conf,fstab let b:comment_leader = '# ' + autocmd FileType lua let b:comment_leader = '-- ' + autocmd FileType vim let b:comment_leader = '" ' +augroup END +noremap gcc :silent s/^/=escape(b:comment_leader,'\/')/:nohlsearch +noremap gcu :silent s/^\V=escape(b:comment_leader,'\/')//e:nohlsearch + +" Go autoformat. +function! GoFmt() + let file = expand('%') + silent execute "!gofmt -w " . file + edit! +endfunction +command! GoFmt call GoFmt() +augroup go_autocmd + autocmd BufWritePost *.go GoFmt +augroup END