commit 54fa8b2fb57c97b4f8fb2c810a3ed1bdd30ca90c parent 2a03651be3f6a0228243bcc9b41d236d0b3820fd Author: Bharatvaj <bharatvaj@yahoo.com> Date: Tue, 26 Apr 2022 01:15:23 +0530 Merge pull request #35 from bharatvaj/windows Windows changes Diffstat:
39 files changed, 142 insertions(+), 86 deletions(-)
diff --git a/.config/.gitignore b/.config/.gitignore @@ -7,6 +7,8 @@ !alacritty/** !bash/ !bash/** +!cmd/ +!cmd/** !git/ !git/config !i3 diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml @@ -4,5 +4,12 @@ mouse: import: - ~/.config/alacritty/theme.yml - ~/.config/alacritty/font.yml + - ~/.config/alacritty/windows.yml live_config_reload: true + +bell: + command: None + +selection: + save_to_clipboard: true diff --git a/.config/alacritty/windows.yml b/.config/alacritty/windows.yml @@ -0,0 +1,3 @@ +shell: + program: cmd + diff --git a/.config/cmd/aliases.cmd b/.config/cmd/aliases.cmd @@ -0,0 +1,5 @@ +doskey v=vim $* +doskey vi=vim $* +doskey n=nvim $* +doskey g=git $* +doskey l=%USERPROFILE%\.config\cmd\lfcd.cmd diff --git a/.config/cmd/packages.txt b/.config/cmd/packages.txt @@ -0,0 +1,16 @@ +7zip +clink +dos2unix +gpg +grep +lf +lynx +make +mingit +mpv +sed +sudo +unzip +uutils +vim +wget diff --git a/.config/cmd/profile.cmd b/.config/cmd/profile.cmd @@ -0,0 +1,12 @@ +@echo off + +cd %USERPROFILE% +prompt $P ∆ + +set VISUAL=vim +set EDITOR=%VISUAL% +set XDG_CONFIG_HOME=%USERPROFILE%\.config +set XDG_DATA_HOME=%USERPROFILE%\.local\share +set XDG_CACHE_HOME=%USERPROFILE%\.cache + +%USERPROFILE%\.config\cmd\aliases.cmd diff --git a/.config/cmd/setup.ps1 b/.config/cmd/setup.ps1 @@ -0,0 +1,7 @@ +Set-ExecutionPolicy RemoteSigned -scope CurrentUser + +# TODO Handle Admin user check +Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh') + +# Install the absolute essentials +scoop install $(gc ~/.config/cmd/packages.txt) diff --git a/.config/vim/keybindings/keybindings.vim b/.config/vim/keybindings/keybindings.vim @@ -6,6 +6,7 @@ nnoremap <Leader>l :ls<CR>:b<space> nmap <leader>F :GFiles<cr> nnoremap <leader>co :copen<cr> nnoremap <leader>g :grep +nnoremap <leader>ec :edit ~/.config/vim/vimrc<cr> nnoremap Y y$ fun! SetupCommandAlias(from, to) @@ -36,7 +37,7 @@ nnoremap <leader>ww :w<cr> nnoremap <leader>qq :q<cr> " Run Make -nnoremap <leader>bb :make<CR> +nnoremap <leader>bb :Make<CR> " Generate ctags map <leader>c :!ctags -R -f ./.git/tags .<CR> diff --git a/.config/vim/vimrc b/.config/vim/vimrc @@ -1,35 +1,12 @@ -" Use XDG Paths for vim -set runtimepath^='$XDG_CONFIG_HOME/vim' -set runtimepath+='$XDG_DATA_HOME/vim' -set runtimepath+='$XDG_CONFIG_HOME/vim/after' - -set packpath^=$XDG_DATA_HOME/vim - -let g:netrw_home = $XDG_DATA_HOME . "/vim" -call mkdir($XDG_DATA_HOME . "/vim/spell", 'p') -set viewdir=$XDG_DATA_HOME/vim/view | call mkdir(&viewdir, 'p') - -set backupdir=$XDG_CACHE_HOME/vim/backup | call mkdir(&backupdir, 'p') -set directory=$XDG_CACHE_HOME/vim/swap | call mkdir(&directory, 'p') -set undodir=$XDG_CACHE_HOME/vim/undo | call mkdir(&undodir, 'p') - if !has('nvim') | set viminfofile=$XDG_CACHE_DIR/vim/viminfo | endif -" Line number -"Adapted from https://jeffkreeftmeijer.com/vim-number/ -set number -augroup numbertoggle - autocmd! - autocmd BufEnter,FocusGained,InsertLeave,WinEnter * if &nu && mode() != "i" | set rnu | endif - autocmd BufLeave,FocusLost,InsertEnter,WinLeave * if &nu | set nornu | endif -augroup END - " General +set number set mouse= set nocursorline -syntax on set exrc set scrolloff=8 + " Turn backup off set nobackup set nowb @@ -61,24 +38,49 @@ set shiftwidth=4 " Netrw customization let g:netrw_banner = 0 -" Visual Tweaks -hi VertSplit term=NONE cterm=NONE gui=NONE - -"TODO use inverse colors from fg and bg instead of hardcoding black and white values -hi LineNr ctermbg=Black ctermfg=White - -" Prominent Cursor Line -hi CursorLineNr ctermbg=White ctermfg=Black - " Disable status set laststatus=1 set nowrapscan +set lazyredraw +set ttyfast + " Plugins source $XDG_CONFIG_HOME/vim/plugin/plugin.vim " Keybindings source $XDG_CONFIG_HOME/vim/keybindings/keybindings.vim +set packpath^=$XDG_DATA_HOME\vim + +function! s:load_plugins(t) abort + " Use XDG Paths for vim + syntax on + set synmaxcol=128 + " TODO compile hard constants somewhere based on OS + set runtimepath^='$XDG_CONFIG_HOME/vim' + set runtimepath+='$XDG_DATA_HOME/vim' + set runtimepath+='$XDG_CONFIG_HOME/vim/after' + + let g:netrw_home = $XDG_DATA_HOME . "/vim" + call mkdir($XDG_DATA_HOME . "/vim/spell", 'p') + set viewdir=$XDG_DATA_HOME/vim/view | call mkdir(&viewdir, 'p') + + set backupdir=$XDG_CACHE_HOME/vim/backup | call mkdir(&backupdir, 'p') + set directory=$XDG_CACHE_HOME/vim/swap | call mkdir(&directory, 'p') + set undodir=$XDG_CACHE_HOME/vim/undo | call mkdir(&undodir, 'p') + packadd vim-tmux-navigator + packadd editorconfig-vim + packadd vim-commentary + packadd vim-surround + packadd vim-ninja-feet + packadd vim-fugitive + packadd vim-better-whitespace +endfunction + +augroup user_cmds + autocmd! + autocmd VimEnter * call timer_start(20, function('s:load_plugins')) +augroup END if has("win32") if executable("pwsh") diff --git a/.gitignore b/.gitignore @@ -19,4 +19,5 @@ !.local/bin/ !.local/bin/* -!.local/share/vim/pack/**/start/** +# !.local/share/vim/pack/**/start/** +# !.local/share/vim/pack/**/opt/** diff --git a/.gitmodules b/.gitmodules @@ -1,54 +1,54 @@ -[submodule ".local/share/vim/pack/development/start/rust.vim"] - path = .local/share/vim/pack/development/start/rust.vim +[submodule ".local/share/vim/pack/development/opt/rust.vim"] + path = .local/share/vim/pack/development/opt/rust.vim url = https://git::@github.com/rust-lang/rust.vim.git -[submodule ".local/share/vim/pack/development/start/vim-cmake"] - path = .local/share/vim/pack/development/start/vim-cmake +[submodule ".local/share/vim/pack/development/opt/vim-cmake"] + path = .local/share/vim/pack/development/opt/vim-cmake url = https://git::@github.com/cdelledonne/vim-cmake.git -[submodule ".local/share/vim/pack/development/start/vim-msbuild"] - path = .local/share/vim/pack/development/start/vim-msbuild +[submodule ".local/share/vim/pack/development/opt/vim-msbuild"] + path = .local/share/vim/pack/development/opt/vim-msbuild url = https://git::@github.com/heaths/vim-msbuild.git -[submodule ".local/share/vim/pack/general/start/editorconfig-vim"] - path = .local/share/vim/pack/general/start/editorconfig-vim +[submodule ".local/share/vim/pack/general/opt/editorconfig-vim"] + path = .local/share/vim/pack/general/opt/editorconfig-vim url = https://git::@github.com/editorconfig/editorconfig-vim.git -[submodule ".local/share/vim/pack/general/start/vim-better-whitespace"] - path = .local/share/vim/pack/general/start/vim-better-whitespace +[submodule ".local/share/vim/pack/general/opt/vim-better-whitespace"] + path = .local/share/vim/pack/general/opt/vim-better-whitespace url = https://git::@github.com/ntpeters/vim-better-whitespace.git -[submodule ".local/share/vim/pack/general/start/vim-codepainter"] - path = .local/share/vim/pack/general/start/vim-codepainter +[submodule ".local/share/vim/pack/general/opt/vim-codepainter"] + path = .local/share/vim/pack/general/opt/vim-codepainter url = https://git::@github.com/lpinilla/vim-codepainter.git -[submodule ".local/share/vim/pack/general/start/vim-commentary"] - path = .local/share/vim/pack/general/start/vim-commentary +[submodule ".local/share/vim/pack/general/opt/vim-commentary"] + path = .local/share/vim/pack/general/opt/vim-commentary url = https://git::@github.com/tpope/vim-commentary.git -[submodule ".local/share/vim/pack/general/start/vim-easymotion"] - path = .local/share/vim/pack/general/start/vim-easymotion +[submodule ".local/share/vim/pack/general/opt/vim-surround"] + path = .local/share/vim/pack/general/opt/vim-surround + url = https://git::@github.com/tpope/vim-surround.git +[submodule ".local/share/vim/pack/general/opt/vim-easymotion"] + path = .local/share/vim/pack/general/opt/vim-easymotion url = https://git::@github.com/easymotion/vim-easymotion.git -[submodule ".local/share/vim/pack/general/start/vim-fugitive"] - path = .local/share/vim/pack/general/start/vim-fugitive +[submodule ".local/share/vim/pack/general/opt/vim-fugitive"] + path = .local/share/vim/pack/general/opt/vim-fugitive url = https://git::@github.com/tpope/vim-fugitive.git -[submodule ".local/share/vim/pack/general/start/vim-ninja-feet"] - path = .local/share/vim/pack/general/start/vim-ninja-feet +[submodule ".local/share/vim/pack/general/opt/vim-ninja-feet"] + path = .local/share/vim/pack/general/opt/vim-ninja-feet url = https://git::@github.com/tommcdo/vim-ninja-feet.git -[submodule ".local/share/vim/pack/general/start/vim-repeat"] - path = .local/share/vim/pack/general/start/vim-repeat - url = https://git::@github.com/tpope/vim-repeat.git -[submodule ".local/share/vim/pack/general/start/vim-surround"] - path = .local/share/vim/pack/general/start/vim-surround - url = https://git::@github.com/tpope/vim-surround.git -[submodule ".local/share/vim/pack/general/start/vim-textobj-user"] - path = .local/share/vim/pack/general/start/vim-textobj-user +[submodule ".local/share/vim/pack/general/opt/vim-textobj-user"] + path = .local/share/vim/pack/general/opt/vim-textobj-user url = https://git::@github.com/kana/vim-textobj-user.git -[submodule ".local/share/vim/pack/general/start/vim-textobj-xmlattr"] - path = .local/share/vim/pack/general/start/vim-textobj-xmlattr +[submodule ".local/share/vim/pack/general/opt/vim-textobj-xmlattr"] + path = .local/share/vim/pack/general/opt/vim-textobj-xmlattr url = https://git::@github.com/whatyouhide/vim-textobj-xmlattr.git -[submodule ".local/share/vim/pack/general/start/vim-unimpaired"] - path = .local/share/vim/pack/general/start/vim-unimpaired - url = https://github.com/tpope/vim-unimpaired [submodule ".local/share/vim/pack/themes/start/gruvbox-material"] path = .local/share/vim/pack/themes/start/gruvbox-material url = https://git::@github.com/sainnhe/gruvbox-material.git -[submodule ".local/share/vim/pack/general/start/vim-tmux-navigator"] - path = .local/share/vim/pack/general/start/vim-tmux-navigator - url = https://github.com/christoomey/vim-tmux-navigator [submodule ".local/share/nvim/pack/general/start/nvim-lspconfig"] path = .local/share/nvim/pack/general/start/nvim-lspconfig url = https://github.com/neovim/nvim-lspconfig +[submodule ".local/share/vim/pack/general/start/vim-unimpaired"] + path = .local/share/vim/pack/general/start/vim-unimpaired + url = https://github.com/tpope/vim-unimpaired +[submodule ".local/share/vim/pack/general/start/vim-repeat"] + path = .local/share/vim/pack/general/start/vim-repeat + url = https://git::@github.com/tpope/vim-repeat.git +[submodule ".local/share/vim/pack/general/start/vim-tmux-navigator"] + path = .local/share/vim/pack/general/start/vim-tmux-navigator + url = https://github.com/christoomey/vim-tmux-navigator diff --git a/.local/share/vim/pack/development/opt/emmet-vim b/.local/share/vim/pack/development/opt/emmet-vim @@ -0,0 +1 @@ +Subproject commit 1b7e460de071b7ed45cae3b5bec47310e7d12ed5 diff --git a/.local/share/vim/pack/development/opt/rust.vim b/.local/share/vim/pack/development/opt/rust.vim @@ -0,0 +1 @@ +Subproject commit c06a17151c69b9d61e60a28274932a28fd37c453 diff --git a/.local/share/vim/pack/development/opt/vim-cmake b/.local/share/vim/pack/development/opt/vim-cmake @@ -0,0 +1 @@ +Subproject commit 844b85677d52d932432eb115236d9173ebe3664d diff --git a/.local/share/vim/pack/development/opt/vim-msbuild b/.local/share/vim/pack/development/opt/vim-msbuild @@ -0,0 +1 @@ +Subproject commit 4766d9a225c433e7ce2625bcc6263bfd028c4a50 diff --git a/.local/share/vim/pack/development/start/rust.vim b/.local/share/vim/pack/development/start/rust.vim @@ -1 +0,0 @@ -Subproject commit c06a17151c69b9d61e60a28274932a28fd37c453 diff --git a/.local/share/vim/pack/development/start/vim-cmake b/.local/share/vim/pack/development/start/vim-cmake @@ -1 +0,0 @@ -Subproject commit 844b85677d52d932432eb115236d9173ebe3664d diff --git a/.local/share/vim/pack/development/start/vim-msbuild b/.local/share/vim/pack/development/start/vim-msbuild @@ -1 +0,0 @@ -Subproject commit 4766d9a225c433e7ce2625bcc6263bfd028c4a50 diff --git a/.local/share/vim/pack/general/opt/editorconfig-vim b/.local/share/vim/pack/general/opt/editorconfig-vim @@ -0,0 +1 @@ +Subproject commit 3078cd10b28904e57d878c0d0dab42aa0a9fdc89 diff --git a/.local/share/vim/pack/general/opt/vim-better-whitespace b/.local/share/vim/pack/general/opt/vim-better-whitespace @@ -0,0 +1 @@ +Subproject commit c5afbe91d29c5e3be81d5125ddcdc276fd1f1322 diff --git a/.local/share/vim/pack/general/opt/vim-codepainter b/.local/share/vim/pack/general/opt/vim-codepainter @@ -0,0 +1 @@ +Subproject commit 1ae0ee4f48e7e196ef90bc84ecbc56cad231e9df diff --git a/.local/share/vim/pack/general/opt/vim-commentary b/.local/share/vim/pack/general/opt/vim-commentary @@ -0,0 +1 @@ +Subproject commit 349340debb34f6302931f0eb7139b2c11dfdf427 diff --git a/.local/share/vim/pack/general/opt/vim-easymotion b/.local/share/vim/pack/general/opt/vim-easymotion @@ -0,0 +1 @@ +Subproject commit d75d9591e415652b25d9e0a3669355550325263d diff --git a/.local/share/vim/pack/general/opt/vim-fugitive b/.local/share/vim/pack/general/opt/vim-fugitive @@ -0,0 +1 @@ +Subproject commit 6f07d7e6cd23b7a76dc461fdfb1984717d233806 diff --git a/.local/share/vim/pack/general/opt/vim-ninja-feet b/.local/share/vim/pack/general/opt/vim-ninja-feet @@ -0,0 +1 @@ +Subproject commit cb9b448dd468a338255aed474e6113ed115612c1 diff --git a/.local/share/vim/pack/general/opt/vim-surround b/.local/share/vim/pack/general/opt/vim-surround @@ -0,0 +1 @@ +Subproject commit f51a26d3710629d031806305b6c8727189cd1935 diff --git a/.local/share/vim/pack/general/opt/vim-textobj-user b/.local/share/vim/pack/general/opt/vim-textobj-user @@ -0,0 +1 @@ +Subproject commit 41a675ddbeefd6a93664a4dc52f302fe3086a933 diff --git a/.local/share/vim/pack/general/opt/vim-textobj-xmlattr b/.local/share/vim/pack/general/opt/vim-textobj-xmlattr @@ -0,0 +1 @@ +Subproject commit 694a297f1d75fd527e87da9769f3c6519a87ebb1 diff --git a/.local/share/vim/pack/general/start/editorconfig-vim b/.local/share/vim/pack/general/start/editorconfig-vim @@ -1 +0,0 @@ -Subproject commit 3078cd10b28904e57d878c0d0dab42aa0a9fdc89 diff --git a/.local/share/vim/pack/general/start/vim-better-whitespace b/.local/share/vim/pack/general/start/vim-better-whitespace @@ -1 +0,0 @@ -Subproject commit c5afbe91d29c5e3be81d5125ddcdc276fd1f1322 diff --git a/.local/share/vim/pack/general/start/vim-codepainter b/.local/share/vim/pack/general/start/vim-codepainter @@ -1 +0,0 @@ -Subproject commit 1ae0ee4f48e7e196ef90bc84ecbc56cad231e9df diff --git a/.local/share/vim/pack/general/start/vim-commentary b/.local/share/vim/pack/general/start/vim-commentary @@ -1 +0,0 @@ -Subproject commit 349340debb34f6302931f0eb7139b2c11dfdf427 diff --git a/.local/share/vim/pack/general/start/vim-easymotion b/.local/share/vim/pack/general/start/vim-easymotion @@ -1 +0,0 @@ -Subproject commit d75d9591e415652b25d9e0a3669355550325263d diff --git a/.local/share/vim/pack/general/start/vim-fugitive b/.local/share/vim/pack/general/start/vim-fugitive @@ -1 +0,0 @@ -Subproject commit 6f07d7e6cd23b7a76dc461fdfb1984717d233806 diff --git a/.local/share/vim/pack/general/start/vim-ninja-feet b/.local/share/vim/pack/general/start/vim-ninja-feet @@ -1 +0,0 @@ -Subproject commit cb9b448dd468a338255aed474e6113ed115612c1 diff --git a/.local/share/vim/pack/general/start/vim-surround b/.local/share/vim/pack/general/start/vim-surround @@ -1 +0,0 @@ -Subproject commit f51a26d3710629d031806305b6c8727189cd1935 diff --git a/.local/share/vim/pack/general/start/vim-textobj-user b/.local/share/vim/pack/general/start/vim-textobj-user @@ -1 +0,0 @@ -Subproject commit 41a675ddbeefd6a93664a4dc52f302fe3086a933 diff --git a/.local/share/vim/pack/general/start/vim-textobj-xmlattr b/.local/share/vim/pack/general/start/vim-textobj-xmlattr @@ -1 +0,0 @@ -Subproject commit 694a297f1d75fd527e87da9769f3c6519a87ebb1 diff --git a/.profile b/.profile @@ -1,4 +1,3 @@ -export GREP_OPTIONS='--color=auto' export GREP_COLOR='1;35;40' # XDG