From b4b71ddeb4ed06c11054a2dc71cdc241ddea7a99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesper=20Fussing=20M=C3=B8rk?= Date: Wed, 16 Sep 2020 14:26:19 +0200 Subject: [PATCH] Markdown support in vim. Minor bash and zsh changes --- bash/.bashrc | 1 + neovim/.config/nvim/init.vim | 28 ++++++++++------------------ zsh/.zshrc | 23 +++++++++++------------ 3 files changed, 22 insertions(+), 30 deletions(-) diff --git a/bash/.bashrc b/bash/.bashrc index 935234e..2a121ad 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -182,6 +182,7 @@ alias k9p="k9s --context onboarding-prod/liquid-tdk-dk:443/m78311 --command dp" alias k9a="k9s --context arn:aws:eks:eu-north-1:273653477426:cluster/onboarding-beta-b --command dp" alias awslogin="saml2aws login --idp-account nuuday_digital_dev --profile nuuday_digital_dev" +alias vtmux="tmux split-window -v -p 40" alias dtmux="tmux split-window -h -p 40" alias ptmux="tmux split-window -h -p 40 \; split-window -v -p 25" diff --git a/neovim/.config/nvim/init.vim b/neovim/.config/nvim/init.vim index 1ee0535..476436b 100644 --- a/neovim/.config/nvim/init.vim +++ b/neovim/.config/nvim/init.vim @@ -18,7 +18,7 @@ set rtp^=/usr/share/vim/vimfiles/ set undodir=~/.local/share/nvim/undodir set undofile set colorcolumn=80 -set foldmethod=syntax +" set foldmethod=syntax set foldlevelstart=20 set number set relativenumber @@ -34,6 +34,7 @@ Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' " Completion +Plug 'SirVer/ultisnips' Plug 'honza/vim-snippets' Plug 'epilande/vim-react-snippets' Plug 'neoclide/coc.nvim', {'branch': 'release'} @@ -42,20 +43,24 @@ Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'luochen1990/rainbow' " File handling +Plug 'justinmk/vim-dirvish' Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } Plug 'junegunn/fzf.vim' " Python -Plug 'numirias/semshi' Plug 'w0rp/ale' Plug 'ambv/black' " HTML Plug 'jonsmithers/vim-html-template-literals' -Plug 'mxw/vim-jsx' +Plug 'MaxMEllon/vim-jsx-pretty' Plug 'pangloss/vim-javascript' Plug 'alvan/vim-closetag' +" Markdown +Plug 'plasticboy/vim-markdown' +Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install' } + " Testing Plug 'janko/vim-test' @@ -66,7 +71,6 @@ Plug 'tpope/vim-surround' Plug 'airblade/vim-gitgutter' call plug#end() - " Colorscheme and Theming colorscheme nord @@ -78,11 +82,6 @@ let g:airline#extensions#tabline#enabled = 0 let g:airline_theme='nord' let g:airline_symbols.maxlinenr = '' -" BufExplorer -nnoremap :BufExplorerVerticalSplit -nnoremap :bn -nnoremap :bp - " CoC nmap gd (coc-definition) nmap gy (coc-type-definition) @@ -92,15 +91,7 @@ inoremap coc#refresh() " Testing nmap :TestNearest -nmap t :TestNearest nmap :TestFile -nmap t :TestFile -nmap t :TestSuite -nmap t :TestLast -nmap t :TestVisit - -" Syntastic -let g:syntastic_python_checkers = ['python'] "Rainbow Parentheses let g:rainbow_active = 1 @@ -116,7 +107,7 @@ autocmd BufWritePre *.py execute ':Black' let $FZF_DEFAULT_COMMAND = 'ag --ignore .git -g ""' command! -bang -nargs=? -complete=dir HFiles \ call fzf#vim#files(, {'source': 'ag --hidden --ignore .git -g ""'}, 0) -map :Files +map (dirvish_up) map :HFiles map :Buffers @@ -137,6 +128,7 @@ nmap gn (GitGutterNextHunk) " git next nmap gp (GitGutterPrevHunk) " git previous nmap ga (GitGutterStageHunk) " git add (chunk) nmap gu (GitGutterUndoHunk) " git undo (chunk) +nmap MarkdownPreview "AutoCommands au FileType json setlocal equalprg=jq\ . diff --git a/zsh/.zshrc b/zsh/.zshrc index 0b1a804..d3aa6fd 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -7,10 +7,10 @@ ZSH_THEME="gallois" # PLUGINS plugins=( git - vi-mode docker fzf helm + pipenv ) source $ZSH/oh-my-zsh.sh @@ -41,7 +41,8 @@ function zle-keymap-select { zle -N zle-keymap-select # Use beam shape cursor on startup. -PS1="%{$fg_bold[green]%}%n@%m%{$reset_color%} %{$fg_bold[blue]%}%d%{$reset_color%}"$'\n'"%{$bg[green]$fg_bold[black]%} INSERT %{$reset_color%}  " +#PS1="%{$fg_bold[green]%}%n@%m%{$reset_color%} %{$fg_bold[blue]%}%d%{$reset_color%}"$'\n'"%{$bg[green]$fg_bold[black]%} INSERT %{$reset_color%}  " +PS1="%{$fg_bold[green]%}%n@%m%{$reset_color%} %{$fg_bold[blue]%}%d%{$reset_color%}"$'\n'" " echo -ne '\e[5 q' # Use beam shape cursor for each new prompt. @@ -60,6 +61,8 @@ export PATH=$PATH:$M2_HOME/bin:/home/jfm/Tools/openshift-origin-client/:/home/jf export GIT_EDITOR=nvim export VISUAL="nvim" +# BINDS + # Aliases alias code="cd /home/jfm/Customers/TDC/Code/Onboarding" alias ops="cd /home/jfm/Customers/TDC/Code/GitLab/ops" @@ -74,16 +77,12 @@ alias vim="nvim" alias vi="nvim" alias kubectx="/home/jfm/Repositories/GitHub/kubectx/kubectx" -alias istioctl="/home/jfm/Tools/istioctl/istio-1.3.4/bin/istioctl" -alias buildtool="/home/jfm/.buildtool/bin/buildtool" -alias vpnup="nmcli con up id \"YouSee VPN\"" -alias vpndown="nmcli con down id \"YouSee VPN\"" +alias vtmux="tmux split-window -d -v -p 40 && vim" +alias dtmux="tmux split-window -d -h -p 40 && vim" +alias ptmux="tmux split-window -d -h -p 40 \; split-window -d -t 2 -v -p 25 && vim" +alias ftmux="tmux split-window -d -h -p 40 \; split-window -d -t 2 -v -p 25 nnn && vim" -alias k9t="k9s --context onboarding-test/master-int-liquid-tdk-dk:443/m78311 --command dp" -alias k9p="k9s --context onboarding-prod/liquid-tdk-dk:443/m78311 --command dp" -alias k9a="k9s --context arn:aws:eks:eu-north-1:273653477426:cluster/onboarding-beta-b --command dp" -alias awslogin="saml2aws login --idp-account nuuday_digital_dev --profile nuuday_digital_dev" +alias brewme="cd /home/jfm/Repositories/brewme-reports && ptmux" -alias dtmux="tmux split-window -h -p 40" -alias ptmux="tmux split-window -h -p 40 \; split-window -v -p 25" +[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh