From 5421a311d1c968f461be01942d254e2271cb965f Mon Sep 17 00:00:00 2001 From: Nicholas Houle Date: Mon, 3 Oct 2022 17:10:49 -0700 Subject: [PATCH] V1.0.x (#2) * Verify macOS aliases * Updates - Update aliases - Update vim settings - test * Remove unicode characters for plain text --- home/.aliases | 9 +++---- home/.sh/vscode-helper.zsh | 54 ++++++++++++++++++++++++++++++++++++-- home/.vimrc.settings | 24 ++++++++++------- 3 files changed, 70 insertions(+), 17 deletions(-) diff --git a/home/.aliases b/home/.aliases index d9dffe0..a424b8c 100644 --- a/home/.aliases +++ b/home/.aliases @@ -69,7 +69,7 @@ alias urlencode='python3 -c "import sys, urllib.parse as ul; print(ul.quote_plus # MacOS Helpers # Software Updates, and update installed Ruby gems, Homebrew, npm, and their installed packages -alias update='sudo softwareupdate -i -a && brew update && brew upgrade --all && brew cleanup && brew cask cleanup' +alias update='sudo softwareupdate -i -a && brew update && brew upgrade --quiet && brew cleanup' # Delete `.DS_Store` files alias cleanupds="find . -type f -name '*.DS_Store' -ls -delete" @@ -78,9 +78,8 @@ alias cleanupds="find . -type f -name '*.DS_Store' -ls -delete" alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl" # Show/hide hidden files in Finder -# To-do: Testing, this method might not be a solution with the latest OSX, or macOS updates -alias show="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder" -alias hide="defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder" +alias dotfilesshow="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder" +alias dotfileshide="defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder" # Lock the screen (when going AFK) -alias afk="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend" +alias afk="osascript -e 'tell application \"System Events\" to keystroke \"q\" using {command down,control down}'" diff --git a/home/.sh/vscode-helper.zsh b/home/.sh/vscode-helper.zsh index d6379b2..da0c7f5 100644 --- a/home/.sh/vscode-helper.zsh +++ b/home/.sh/vscode-helper.zsh @@ -3,7 +3,57 @@ # vscode # https://code.visualstudio.com/download # https://code.visualstudio.com/docs/setup/mac -cat << EOF >> ~/.zprofile +ZPROFILE="${HOME}/.zprofile" +if ! grep -i 'Visual Studio Code.app' "${ZPROFILE}" 1>/dev/null 2>&1; then +cat << EOF >> "${ZPROFILE}" # Add Visual Studio Code (code) -export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin" +export PATH="\${PATH}:/Applications/Visual Studio Code.app/Contents/Resources/app/bin" +EOF +source "${ZPROFILE}" +fi + +# code --list-extensions +# code --install-extension vscode-icons-team.vscode-icons@11.19.0 +# @installed +# @sort:name microsoft +while IFS= read -r line; do + code --install-extension "${line}"; +done << \EOF +azsdktm.SecurityIntelliSense +chef-software.chef +Dart-Code.dart-code +Dart-Code.flutter +dbaeumer.vscode-eslint +DotJoshJohnson.xml +esbenp.prettier-vscode +golang.go +hashicorp.hcl +hashicorp.terraform +k--kato.docomment +ms-dotnettools.csharp +ms-kubernetes-tools.vscode-kubernetes-tools +ms-python.pylint +ms-python.python +ms-python.vscode-pylance +ms-vscode-remote.remote-containers +ms-vscode.cmake-tools +ms-vscode.cpptools +ms-vscode.cpptools-extension-pack +ms-vscode.cpptools-themes +ms-vscode.hexeditor +ms-vscode.live-server +ms-vscode.powershell +puppet.puppet-vscode +redhat.ansible +rust-lang.rust-analyzer +ryuta46.multi-command +streetsidesoftware.code-spell-checker +VisualStudioExptTeam.intellicode-api-usage-examples +VisualStudioExptTeam.vscodeintellicode +vscjava.vscode-java-debug +vscjava.vscode-java-dependency +vscjava.vscode-java-pack +vscjava.vscode-java-test +vscjava.vscode-maven +vscode-icons-team.vscode-icons EOF diff --git a/home/.vimrc.settings b/home/.vimrc.settings index 43b8312..744b63f 100644 --- a/home/.vimrc.settings +++ b/home/.vimrc.settings @@ -134,17 +134,19 @@ set encoding=utf-8 " PLUGIN OPTIONS {{{ " Plugin: airblade/vim-gitgutter options -let g:gitgutter_set_sign_backgrounds = 0 -highlight link GitGutterChangeLine DiffText +let g:gitgutter_set_sign_backgrounds = 1 +let g:gitgutter_terminal_reports_focus = 0 " Plugin: dense-analysis/ale options let g:ale_fix_on_save = 0 +let g:ale_open_list = 0 let g:ale_floating_window_border = ['│', '─', '╭', '╮', '╯', '╰', '│', '─'] let g:ale_echo_msg_format = '[%severity%] [%linter%] %s ' let g:ale_set_highlights = 0 let g:ale_change_sign_column_color = 0 -let g:ale_sign_error = '🚩' -let g:ale_sign_warning = '🚧' +let g:ale_sign_column_always = 1 +let g:ale_sign_error = 'E' +let g:ale_sign_warning = 'W' let g:ale_pattern_options = {'\.min.js$': {'ale_enabled': 0}} let g:ale_linters = { \ 'javascript': ['prettier', 'eslint'], @@ -169,8 +171,9 @@ let g:airline#extensions#ale#enabled = 1 " MOVED TO THEME OPTIONS SECTION " Plugin: vim-airline/vim-airline-theme options "let g:airline_theme='luna' -"set statusline+=%{LinterStatus()} -"set statusline+=%{GitStatus()} +set statusline="" +set statusline=%{LinterStatus()} +set statusline+=%{GitStatus()} "}}} " THEME OPTIONS {{{ @@ -189,18 +192,19 @@ if has('mouse') endif " Give context to where the cursor is positioned in a file -set scrolloff=10 +set scrolloff=5 " Highlight current line set cursorline " Number of lines that are checked for set commands set modeline +set updatetime=100 " Vim 7.4.2201 set signcolumn=yes -" Highlight column 140 +" Highlight column if exists('+colorcolumn') set colorcolumn=80 else @@ -301,8 +305,8 @@ nmap (ale_next_wrap) set autoread " Mapping key press wait timeout -set timeout timeoutlen=50 -set ttimeoutlen=50 +set timeout timeoutlen=1000 +set ttimeoutlen=1000 " Hide buffers after they are abandoned set hidden