From ae418fe5c7348d17fbbd9fc52ad67f6ef092fcfc Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Wed, 5 May 2021 10:48:04 -0400 Subject: [PATCH] cleanup and vim filetypes --- alacritty.configlink/alacritty.yml | 2 ++ homebrew/Caskfile | 4 ++-- nvim.configlink/coc-settings.json | 10 +++++----- nvim.configlink/settings/general.vim | 20 ++++++++++++++------ tmux/tmux.conf.symlink | 3 +++ 5 files changed, 26 insertions(+), 13 deletions(-) diff --git a/alacritty.configlink/alacritty.yml b/alacritty.configlink/alacritty.yml index d9a6a17..ed40eb2 100644 --- a/alacritty.configlink/alacritty.yml +++ b/alacritty.configlink/alacritty.yml @@ -599,6 +599,8 @@ key_bindings: - { key: R, mods : Super, chars: "\x05" } # CMD-R sends CTRL-E for fish/vim - { key: G, mods : Super, chars: "\x07" } # CMD-G sends CTRL-G for fish/vim - { key: L, mods : Super, chars: "\x1F" } # CMD-L sends null key for fish + - { key: H, mods : Super|Shift, chars: "\x02P" } # CMD-SHIFT-H previous tmux window + - { key: L, mods : Super|Shift, chars: "\x02n" } # CMD-SHIFT-L next tmux window - { key: Return, mods : Shift, chars: "\x1b[13;2u" } - { key: Return, mods : Control, chars: "\x1b[13;5u" } diff --git a/homebrew/Caskfile b/homebrew/Caskfile index f85cec6..abccc94 100644 --- a/homebrew/Caskfile +++ b/homebrew/Caskfile @@ -19,7 +19,7 @@ cask "drawio" # Diagrams cask "scroll-reverser" # Mouse vs. trackpad cask "meetingbar" # Scheduling cask "gitify" # GitHub notifications -brew "basictex" # Small LaTeX distribution +cask "basictex" # Small LaTeX distribution # Fonts tap "homebrew/cask-fonts" @@ -30,7 +30,6 @@ cask "authy" # Authentication cask "keybase" # Encryption cask "discord" # My chat cask "steam" # Games -cask "vlc" # Video player cask "jira-client" cask "wkhtmltopdf" @@ -39,3 +38,4 @@ cask "wkhtmltopdf" # cask "postman" # API testing # cask "lens" # Kubernetes manager # cask "calibre" # Ebook manager +# cask "vlc" # Video player diff --git a/nvim.configlink/coc-settings.json b/nvim.configlink/coc-settings.json index ee7d5bb..be95449 100644 --- a/nvim.configlink/coc-settings.json +++ b/nvim.configlink/coc-settings.json @@ -1,7 +1,7 @@ { - "rust-analyzer.serverPath": "/usr/local/bin/rust-analyzer", - "rust-analyzer.checkOnSave.enable": true, - "diagnostic-languageserver.filetypes": { - "sh": "shellcheck" - } + "rust-analyzer.serverPath": "/usr/local/bin/rust-analyzer", + "rust-analyzer.checkOnSave.enable": true, + "diagnostic-languageserver.filetypes": { + "sh": "shellcheck" + } } diff --git a/nvim.configlink/settings/general.vim b/nvim.configlink/settings/general.vim index 40ceb11..a87cd4b 100644 --- a/nvim.configlink/settings/general.vim +++ b/nvim.configlink/settings/general.vim @@ -2,7 +2,7 @@ "-------- " Basic Settings -filetype plugin on " Load the plugin for current filetype (vimwiki) +filetype plugin on " Load the plugin for current filetype syntax enable " Syntax highlighting set termguicolors " Set to truecolor colorscheme gruvbox " Installed in autoload/ and colors/ @@ -38,16 +38,12 @@ if has("autocmd") endif " Better backup, swap and undo storage -set noswapfile " Instead of swaps, create backups (less annoying) +set noswapfile " Instead of swaps, create backups set backup " Easier to recover and more secure set undofile " Keeps undos after quit set backupdir=~/.config/nvim/dirs/backup set undodir=~/.config/nvim/dirs/undo -" Keep selection when tabbing -vnoremap < >gv - " Create backup directories if they don't exist if !isdirectory(&backupdir) call mkdir(&backupdir, "p") @@ -55,3 +51,15 @@ endif if !isdirectory(&undodir) call mkdir(&undodir, "p") endif + +" Keep selection when tabbing +vnoremap < >gv + +" Force filetype patterns that Vim doesn't know about +au BufRead,BufNewFile *.Brewfile setfiletype brewfile +au BufRead,BufNewFile tmux.conf* setfiletype tmux +au BufRead,BufNewFile *ignore.*link setfiletype gitignore +au BufRead,BufNewFile gitconfig.*link setfiletype gitconfig +au BufRead,BufNewFile *.toml.*link setfiletype toml +au BufRead,BufNewFile .env* set ft=text | set syntax=sh diff --git a/tmux/tmux.conf.symlink b/tmux/tmux.conf.symlink index 41fd231..190d5e7 100644 --- a/tmux/tmux.conf.symlink +++ b/tmux/tmux.conf.symlink @@ -17,6 +17,9 @@ bind j select-pane -D bind K select-pane -U bind l select-pane -R +# Another option for previous +bind P previous-window + # Split out pane bind b break-pane