Markdown support in vim. Minor bash and zsh changes

This commit is contained in:
Jesper Fussing Mørk 2020-09-16 14:26:19 +02:00
parent b6887d65cc
commit b4b71ddeb4
3 changed files with 22 additions and 30 deletions

View File

@ -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 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 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 dtmux="tmux split-window -h -p 40"
alias ptmux="tmux split-window -h -p 40 \; split-window -v -p 25" alias ptmux="tmux split-window -h -p 40 \; split-window -v -p 25"

View File

@ -18,7 +18,7 @@ set rtp^=/usr/share/vim/vimfiles/
set undodir=~/.local/share/nvim/undodir set undodir=~/.local/share/nvim/undodir
set undofile set undofile
set colorcolumn=80 set colorcolumn=80
set foldmethod=syntax " set foldmethod=syntax
set foldlevelstart=20 set foldlevelstart=20
set number set number
set relativenumber set relativenumber
@ -34,6 +34,7 @@ Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes' Plug 'vim-airline/vim-airline-themes'
" Completion " Completion
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets' Plug 'honza/vim-snippets'
Plug 'epilande/vim-react-snippets' Plug 'epilande/vim-react-snippets'
Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'neoclide/coc.nvim', {'branch': 'release'}
@ -42,20 +43,24 @@ Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'luochen1990/rainbow' Plug 'luochen1990/rainbow'
" File handling " File handling
Plug 'justinmk/vim-dirvish'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim' Plug 'junegunn/fzf.vim'
" Python " Python
Plug 'numirias/semshi'
Plug 'w0rp/ale' Plug 'w0rp/ale'
Plug 'ambv/black' Plug 'ambv/black'
" HTML " HTML
Plug 'jonsmithers/vim-html-template-literals' Plug 'jonsmithers/vim-html-template-literals'
Plug 'mxw/vim-jsx' Plug 'MaxMEllon/vim-jsx-pretty'
Plug 'pangloss/vim-javascript' Plug 'pangloss/vim-javascript'
Plug 'alvan/vim-closetag' Plug 'alvan/vim-closetag'
" Markdown
Plug 'plasticboy/vim-markdown'
Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install' }
" Testing " Testing
Plug 'janko/vim-test' Plug 'janko/vim-test'
@ -66,7 +71,6 @@ Plug 'tpope/vim-surround'
Plug 'airblade/vim-gitgutter' Plug 'airblade/vim-gitgutter'
call plug#end() call plug#end()
" Colorscheme and Theming " Colorscheme and Theming
colorscheme nord colorscheme nord
@ -78,11 +82,6 @@ let g:airline#extensions#tabline#enabled = 0
let g:airline_theme='nord' let g:airline_theme='nord'
let g:airline_symbols.maxlinenr = '' let g:airline_symbols.maxlinenr = ''
" BufExplorer
nnoremap <silent> <C-F12> :BufExplorerVerticalSplit<CR>
nnoremap <silent> <F12> :bn<CR>
nnoremap <silent> <F24> :bp<CR>
" CoC " CoC
nmap <silent> gd <Plug>(coc-definition) nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition) nmap <silent> gy <Plug>(coc-type-definition)
@ -92,15 +91,7 @@ inoremap <silent><expr> <c-space> coc#refresh()
" Testing " Testing
nmap <silent> <C-F10> :TestNearest<CR> nmap <silent> <C-F10> :TestNearest<CR>
nmap <silent> t<C-n> :TestNearest<CR>
nmap <silent> <S-F10> :TestFile<CR> nmap <silent> <S-F10> :TestFile<CR>
nmap <silent> t<C-f> :TestFile<CR>
nmap <silent> t<C-s> :TestSuite<CR>
nmap <silent> t<C-l> :TestLast<CR>
nmap <silent> t<C-g> :TestVisit<CR>
" Syntastic
let g:syntastic_python_checkers = ['python']
"Rainbow Parentheses "Rainbow Parentheses
let g:rainbow_active = 1 let g:rainbow_active = 1
@ -116,7 +107,7 @@ autocmd BufWritePre *.py execute ':Black'
let $FZF_DEFAULT_COMMAND = 'ag --ignore .git -g ""' let $FZF_DEFAULT_COMMAND = 'ag --ignore .git -g ""'
command! -bang -nargs=? -complete=dir HFiles command! -bang -nargs=? -complete=dir HFiles
\ call fzf#vim#files(<q-args>, {'source': 'ag --hidden --ignore .git -g ""'}, <bang>0) \ call fzf#vim#files(<q-args>, {'source': 'ag --hidden --ignore .git -g ""'}, <bang>0)
map <M-1> :Files<CR> map <M-1> <Plug>(dirvish_up)
map <M-2> :HFiles<CR> map <M-2> :HFiles<CR>
map <M-3> :Buffers<CR> map <M-3> :Buffers<CR>
@ -137,6 +128,7 @@ nmap <Leader>gn <Plug>(GitGutterNextHunk) " git next
nmap <Leader>gp <Plug>(GitGutterPrevHunk) " git previous nmap <Leader>gp <Plug>(GitGutterPrevHunk) " git previous
nmap <Leader>ga <Plug>(GitGutterStageHunk) " git add (chunk) nmap <Leader>ga <Plug>(GitGutterStageHunk) " git add (chunk)
nmap <Leader>gu <Plug>(GitGutterUndoHunk) " git undo (chunk) nmap <Leader>gu <Plug>(GitGutterUndoHunk) " git undo (chunk)
nmap <M-p> <Plug>MarkdownPreview
"AutoCommands "AutoCommands
au FileType json setlocal equalprg=jq\ . au FileType json setlocal equalprg=jq\ .

View File

@ -7,10 +7,10 @@ ZSH_THEME="gallois"
# PLUGINS # PLUGINS
plugins=( plugins=(
git git
vi-mode
docker docker
fzf fzf
helm helm
pipenv
) )
source $ZSH/oh-my-zsh.sh source $ZSH/oh-my-zsh.sh
@ -41,7 +41,8 @@ function zle-keymap-select {
zle -N zle-keymap-select zle -N zle-keymap-select
# Use beam shape cursor on startup. # 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' echo -ne '\e[5 q'
# Use beam shape cursor for each new prompt. # 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 GIT_EDITOR=nvim
export VISUAL="nvim" export VISUAL="nvim"
# BINDS
# Aliases # Aliases
alias code="cd /home/jfm/Customers/TDC/Code/Onboarding" alias code="cd /home/jfm/Customers/TDC/Code/Onboarding"
alias ops="cd /home/jfm/Customers/TDC/Code/GitLab/ops" alias ops="cd /home/jfm/Customers/TDC/Code/GitLab/ops"
@ -74,16 +77,12 @@ alias vim="nvim"
alias vi="nvim" alias vi="nvim"
alias kubectx="/home/jfm/Repositories/GitHub/kubectx/kubectx" 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 vtmux="tmux split-window -d -v -p 40 && vim"
alias vpndown="nmcli con down id \"YouSee VPN\"" 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 brewme="cd /home/jfm/Repositories/brewme-reports && ptmux"
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 dtmux="tmux split-window -h -p 40" [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
alias ptmux="tmux split-window -h -p 40 \; split-window -v -p 25"