From 1261a73e73bf08385465ebb5b4fa0879df419479 Mon Sep 17 00:00:00 2001 From: Jordan Orelli Date: Sun, 2 Oct 2022 12:58:47 -0500 Subject: [PATCH] some vim tweaks to highlight the current line In Windows on WSL with a bigger monitor I kept losing track of where my cursor was when I had multiple files open, so this makes it a little bit more clear where I'm currently editing when I switch windows in a multi-window setup. --- .bashrc | 4 ++++ .config/htop/htoprc | 2 +- .config/lazydocker/config.yml | 12 ++++++++++++ .vim/ftplugin/yml.vim | 4 ++++ .vimrc | 19 +++++++++++++++++++ install.sh | 1 + 6 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 .config/lazydocker/config.yml create mode 100644 .vim/ftplugin/yml.vim diff --git a/.bashrc b/.bashrc index 967cd56..42cfffa 100644 --- a/.bashrc +++ b/.bashrc @@ -94,3 +94,7 @@ fi if [ -f "$HOME/.cargo/env" ]; then source "$HOME/.cargo/env" fi + +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion diff --git a/.config/htop/htoprc b/.config/htop/htoprc index 76041be..4f5436a 100644 --- a/.config/htop/htoprc +++ b/.config/htop/htoprc @@ -18,7 +18,7 @@ detailed_cpu_time=0 cpu_count_from_zero=0 update_process_names=0 account_guest_in_cpu_meter=0 -color_scheme=3 +color_scheme=0 delay=15 left_meters=LeftCPUs2 Memory Swap left_meter_modes=1 1 1 diff --git a/.config/lazydocker/config.yml b/.config/lazydocker/config.yml new file mode 100644 index 0000000..5c2914c --- /dev/null +++ b/.config/lazydocker/config.yml @@ -0,0 +1,12 @@ +logs: + timestamps: no + +gui: + returnImmediately: yes + +customCommands: + containers: + - name: scylla shell + attach: true + command: 'docker exec -it {{ .Container.ID }} cqlsh' + serviceNames: [] diff --git a/.vim/ftplugin/yml.vim b/.vim/ftplugin/yml.vim new file mode 100644 index 0000000..0509337 --- /dev/null +++ b/.vim/ftplugin/yml.vim @@ -0,0 +1,4 @@ +set shiftwidth=2 +set tabstop=2 +set expandtab +set list diff --git a/.vimrc b/.vimrc index a7092ec..2802dd0 100644 --- a/.vimrc +++ b/.vimrc @@ -31,6 +31,7 @@ call vundle#begin() Plugin 'b4b4r07/vim-hcl' " hcl syntax stuff? Plugin 'Glench/Vim-Jinja2-Syntax' " jinja2 syntax stuff Plugin 'rust-lang/rust.vim' " bare minimum rust syntax stuff + Plugin 'elubow/cql-vim' " Past plugins " @@ -300,6 +301,7 @@ noremap $ g$ " Normal Mode ---------------------------------------------------------------{{{ " toggle line numbering with n nnoremap n :set number! +set number " Shortcut to show invisible characters nnoremap l :set list! @@ -484,4 +486,21 @@ set visualbell " you know what, just disable the error bells entirely set noerrorbells + +" highlight the cursor line only in the current window +augroup CursorLine + au! + au VimEnter,WinEnter,BufWinEnter * setlocal cursorline + au WinLeave * setlocal nocursorline +augroup END + +" integrate the wsl clipboard for yanking to the system clipboard +let s:clip = '/mnt/c/Windows/System32/clip.exe' " change this path according to your mount point +if executable(s:clip) + augroup WSLYank + autocmd! + autocmd TextYankPost * if v:event.operator ==# 'y' | call system(s:clip, @0) | endif + augroup END +endif " ---------------------------------------------------------------------------}}} + diff --git a/install.sh b/install.sh index 40c5d6c..a0ce0ce 100755 --- a/install.sh +++ b/install.sh @@ -17,6 +17,7 @@ include=( .vim/ftplugin .vimrc .config/htop/htoprc + .config/lazydocker/config.yml ) if [[ -d "$backup_dir" ]] ; then