From 5cc86198aafb1d30d410724bfb108736098ec760 Mon Sep 17 00:00:00 2001 From: Smirnov Alexandr Date: Sat, 27 Mar 2021 14:05:41 +0200 Subject: [PATCH] Add termial alias in vim --- config/nvim/init.vim | 22 +++++++++++++--------- tmux.conf | 2 +- vscode/settings.json | 11 +++++------ zshrc | 5 +++-- 4 files changed, 22 insertions(+), 18 deletions(-) diff --git a/config/nvim/init.vim b/config/nvim/init.vim index f269613..b2fda2b 100644 --- a/config/nvim/init.vim +++ b/config/nvim/init.vim @@ -65,28 +65,31 @@ set list listchars=tab:\|·,trail:~,extends:>,precedes:<,space:· " Disable sound set visualbell t_vb= -"== Settings for specific files -autocmd FileType python,json setlocal ex sw=4 ts=4 -autocmd FileType go setlocal noex sw=4 ts=4 -autocmd FileType javascript,javascriptreact setlocal et sw=2 ts=2 -autocmd FileType css,yaml setlocal ex sw=4 ts=4 "== Aliases -command! WQ :wq -command! Wq :wq -command! Wiki :e ~/doc/index.md +command! VTerm :vs | res 40 | set nonu nornu | startinsert | wincmd L | term +command! Term :sp | res 40 | set nonu nornu | startinsert | wincmd J | term command! Prettier :silent !prettier % --write command! ESlint :!eslint % -command! Flake8 :!flake8 % command! Black :silent !black % command! AutoPep8 :silent !autopep8 % --in-place +command! Flake8 :!flake8 % command! GoFmt :silent !gofmt -w % +command! GoLint :!golint % + + +"== Settings for specific files +autocmd FileType python setlocal ex sw=4 ts=4 +autocmd FileType go setlocal noex sw=4 ts=4 +autocmd FileType javascript,javascriptreact,yaml setlocal et sw=2 ts=2 + "== NERDTree let g:NERDTreeWinPos = "right" let g:NERDTreeMinimalUI = 1 let g:NERDTreeWinSize = 24 + "== Mapping let mapleader=";" @@ -131,5 +134,6 @@ nnoremap h :bdele noremap c "+y noremap v "+p + " Terminal tnoremap diff --git a/tmux.conf b/tmux.conf index 562d24c..0aae169 100644 --- a/tmux.conf +++ b/tmux.conf @@ -2,7 +2,7 @@ set -sg escape-time 0 ## Set prefix -set -g prefix C-a +set -g prefix C-f ## Set base index set -g base-index 1 diff --git a/vscode/settings.json b/vscode/settings.json index 4c75eb2..7ec86d2 100644 --- a/vscode/settings.json +++ b/vscode/settings.json @@ -1,18 +1,16 @@ { - "workbench.colorTheme": "Ayu Dark", - "workbench.iconTheme": "ayu", + "workbench.colorTheme": "One Dark Pro", "editor.wordWrap": "off", "editor.fontSize": 14, "editor.fontFamily": "'Jetbrains Mono', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'", - "workbench.panel.defaultLocation": "left", - "workbench.sideBar.location": "right", "workbench.activityBar.visible": true, "workbench.startupEditor": "newUntitledFile", - "window.menuBarVisibility": "hidden", "editor.formatOnPaste": true, "editor.minimap.enabled": false, "explorer.confirmDelete": false, "explorer.confirmDragAndDrop": false, + "workbench.sideBar.location": "right", + "window.menuBarVisibility": "hidden", "editor.tabCompletion": "on", "editor.tabSize": 4, @@ -28,7 +26,8 @@ "vim.useSystemClipboard": true, "vim.normalModeKeyBindings": [{"before": ["f"], "after" : ["leader","leader","s"]}], - "cSpell.userWords": ["getenv", "popen"], + "cSpell.userWords": ["getenv"], + "emmet.includeLanguages": { "javascript": "javascriptreact" }, diff --git a/zshrc b/zshrc index c8e4951..17887ae 100644 --- a/zshrc +++ b/zshrc @@ -1,11 +1,12 @@ -export PATH="$HOME/.yarn/bin:$HOME/bin:$HOME/.local/bin:$PATH" +export PATH="$HOME/.yarn/bin:$HOME/bin:$HOME/.local/bin:$HOME/go/bin:$PATH" export EDITOR="nvim" +export GOPATH="$HOME/go" ### Oh my zsh export OMH="$HOME/.oh-my-zsh" ZSH_THEME="simple" DISABLE_AUTO_TITLE="true" -plugins=(yarn nvm golang) +plugins=(yarn nvm) source $OMH/oh-my-zsh.sh ### Aliases