Modify config.fish and .vimrc to account for linux and macos

Modify references to ~/Documents to reference ~/code
This commit is contained in:
mitchell 2020-05-15 17:58:26 -04:00
parent 81b1861545
commit 2947c5fe66
2 changed files with 56 additions and 13 deletions

View File

@ -1,36 +1,79 @@
set -gx EDITOR nvim set -gx EDITOR nvim
set -gx GOPATH $HOME/Documents/go
set -gx GOPATH $HOME/code/go
set -gx GOBIN $GOPATH/bin set -gx GOBIN $GOPATH/bin
set -gx DOTNET_ENVIRONMENT Development set -gx DOTNET_ENVIRONMENT Development
set -gx DOTNET_CLI_TELEMETRY_OPTOUT true set -gx DOTNET_CLI_TELEMETRY_OPTOUT true
set -gx DOTNET_ROOT $HOME/.asdf/installs/dotnet-core/(command -sq dotnet; and dotnet --version)
set -gx PATH $PATH $GOBIN \ set -gx PATH $PATH $GOBIN \
/snap/bin \
$HOME/bin \
$HOME/.pub-cache/bin \ $HOME/.pub-cache/bin \
$HOME/Documents/scripts \ $HOME/code/scripts \
$HOME/Documents/flutter/bin \ $HOME/code/flutter/bin \
$HOME/.cargo/bin \ $HOME/.cargo/bin \
$HOME/.dotnet/tools $HOME/.dotnet/tools
set -gx UNAME (uname)
command -sq kitty; and kitty + complete setup fish | source command -sq kitty; and kitty + complete setup fish | source
command -sq asdf; and source (brew --prefix asdf)/asdf.fish
switch "$UNAME"
case 'Linux'
test -e ~/.asdf/asdf.fish; and source ~/.asdf/asdf.fish
case 'Darwin'
test -e (brew --prefix asdf)/asdf.fish; and source (brew --prefix asdf)/asdf.fish
end
# The next line updates PATH for the Google Cloud SDK. # The next line updates PATH for the Google Cloud SDK.
# if test -f '/Users/m/Documents/google-cloud-sdk/path.fish.inc'; source '/Users/m/Documents/google-cloud-sdk/path.fish.inc'; end # if test -f '/Users/m/Documents/google-cloud-sdk/path.fish.inc'; source '/Users/m/Documents/google-cloud-sdk/path.fish.inc'; end
# aliases # aliases
function cat; bat --theme ansi-dark $argv; end
function cp; rsync -aP $argv; end function cp; rsync -aP $argv; end
function dm; docker-machine $argv; end function dm; docker-machine $argv; end
function dm-env; eval (docker-machine env $argv); end function dm-env; eval (docker-machine env $argv); end
function goland; open -a Goland .; end
function rider; open -a Rider .; end
function v; nvim (fzf); end function v; nvim (fzf); end
function vg; vagrant $argv; end function vg; vagrant $argv; end
function webstorm; open -a Webstorm .; end function cat
switch "$UNAME"
case 'Linux'
batcat --theme ansi-dark $argv
case 'Darwin'
bat --theme ansi-dark $argv
end
end
function goland
switch "$UNAME"
case 'Linux'
command goland $argv
case 'Darwin'
open -a Goland $argv
end
end
function rider
switch "$UNAME"
case 'Linux'
command rider $argv
case 'Darwin'
open -a Rider $argv
end
end
function webstorm
switch "$UNAME"
case 'Linux'
command webstorm $argv
case 'Darwin'
open -a Webstorm $argv
end
end

4
.vimrc
View File

@ -38,6 +38,7 @@ Plug 'MaxMEllon/vim-jsx-pretty'
Plug 'fsharp/vim-fsharp', { 'do': './make' } Plug 'fsharp/vim-fsharp', { 'do': './make' }
Plug 'hashivim/vim-terraform' Plug 'hashivim/vim-terraform'
Plug 'PProvost/vim-ps1' Plug 'PProvost/vim-ps1'
Plug 'vmchale/dhall-vim'
call plug#end() call plug#end()
@ -125,7 +126,7 @@ let g:ale_fix_on_save = 1
let g:ale_linters_explicit = 1 let g:ale_linters_explicit = 1
let g:ale_completion_enabled = 1 let g:ale_completion_enabled = 1
let g:ale_completion_delay = 100 let g:ale_completion_delay = 100
let g:ale_elixir_elixir_ls_release = expand('~/Documents/elixir-ls/bin') let g:ale_elixir_elixir_ls_release = expand('~/code/elixir-lsp/elixir-ls/bin')
let g:OmniSharp_server_stdio = 1 let g:OmniSharp_server_stdio = 1
@ -142,7 +143,6 @@ augroup END
augroup wiki_ft augroup wiki_ft
au! au!
autocmd BufNewFile,BufRead *.wiki set textwidth=79 autocmd BufNewFile,BufRead *.wiki set textwidth=79
autocmd BufNewFile,BufRead *.wiki HardPencil
augroup END augroup END
if exists('$TMUX') if exists('$TMUX')