From 37bf3530df0191bfe0bafd7019951b907f7bc348 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yi=C4=9Fit=20=C3=87olako=C4=9Flu?= Date: Fri, 26 Mar 2021 21:00:45 +0300 Subject: [PATCH] Vim syntastic and whitespace highlight --- vim/vim/plugin/plugins.vim | 24 ++++-------------------- vim/vim/plugin/vim-betterwhitespace.vim | 7 +++++++ vim/vimrc | 7 +++++-- zsh/cmds | 6 ++++++ zsh/zshrc | 3 +++ 5 files changed, 25 insertions(+), 22 deletions(-) create mode 100644 vim/vim/plugin/vim-betterwhitespace.vim diff --git a/vim/vim/plugin/plugins.vim b/vim/vim/plugin/plugins.vim index a1a058a7..6e8eed5a 100644 --- a/vim/vim/plugin/plugins.vim +++ b/vim/vim/plugin/plugins.vim @@ -23,6 +23,7 @@ Plug 'blarghmatey/split-expander' Plug 'farmergreg/vim-lastplace' Plug 'jlanzarotta/bufexplorer' Plug 'jeffkreeftmeijer/vim-numbertoggle' + "Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' } Plug 'sheerun/vim-polyglot' Plug 'M4R7iNP/vim-inky' @@ -36,8 +37,6 @@ Plug 'yegappan/taglist' Plug 'ryanoasis/vim-devicons' Plug 'puremourning/vimspector' Plug 'lervag/vimtex' -Plug 'gi1242/vim-tex-autoclose' -" Plug 'ActivityWatch/aw-watcher-vim' Plug 'wakatime/vim-wakatime' Plug 'gu-fan/riv.vim' Plug 'gu-fan/InstantRst' @@ -45,19 +44,6 @@ Plug 'prettier/vim-prettier', { 'do': 'yarn install' } Plug 'isene/hyperlist.vim' Plug 'neomutt/neomutt.vim' -" Plug 'neoclide/coc.nvim', {'branch': 'release'} - -" -" if has('nvim') -" Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } -" else -" Plug 'Shougo/deoplete.nvim' -" Plug 'roxma/nvim-yarp' -" Plug 'roxma/vim-hug-neovim-rpc' -" endif -" let g:deoplete#enable_at_startup = 1 - - " Tmux integration Plug 'benmills/vimux' Plug 'christoomey/vim-tmux-navigator' @@ -75,16 +61,14 @@ Plug 'tpope/vim-endwise' Plug 'elzr/vim-json' Plug 'tpope/vim-markdown' Plug 'vim-scripts/cool.vim' +Plug 'pangloss/vim-javascript' +Plug 'mxw/vim-jsx' " Plug 'groenewege/vim-less' -" Plug 'tpope/vim-haml' -" Plug 'pangloss/vim-javascript' -" Plug 'mxw/vim-jsx' -" Plug 'jparise/vim-graphql' Plug 'leafgarland/typescript-vim' Plug 'arrufat/vala.vim' " Syntax errors -" Plug 'vim-syntastic/syntastic' +Plug 'vim-syntastic/syntastic' Plug 'ntpeters/vim-better-whitespace' " Git support diff --git a/vim/vim/plugin/vim-betterwhitespace.vim b/vim/vim/plugin/vim-betterwhitespace.vim new file mode 100644 index 00000000..3620802d --- /dev/null +++ b/vim/vim/plugin/vim-betterwhitespace.vim @@ -0,0 +1,7 @@ +let g:better_whitespace_enabled=1 +let g:better_whitespace_ctermcolor='LightRed' +let g:better_whitespace_guicolor='LightRed' +let g:better_whitespace_operator='_s' +let g:strip_whitespace_on_save=1 +let g:strip_max_file_size=1000 +let g:strip_whitespace_confirm=0 diff --git a/vim/vimrc b/vim/vimrc index 428dfb88..72817d2b 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -48,7 +48,7 @@ set nobackup nowritebackup noswapfile " Turn off backup files set noerrorbells novisualbell " Turn off visual and audible bells set expandtab shiftwidth=2 tabstop=2 " Two spaces for tabs everywhere set history=500 -set hlsearch " Highlight search results +" set hlsearch " Highlight search results set ignorecase smartcase " Search queries intelligently set case set incsearch " Show search results as you type set timeoutlen=1000 ttimeoutlen=0 " Remove timeout when hitting escape @@ -135,7 +135,10 @@ nnoremap + :exe "resize " . (winheight(0) * 3/2) nnoremap - :exe "resize " . (winheight(0) * 2/3) let g:Tlist_WinWidth = 40 -" +" Syntastic max file size for python +let g:syntastic_python_pylint_post_args="--max-line-length=120" + + "------------------------------------------------------------------------------- " Neovim-specific configurations "------------------------------------------------------------------------------- diff --git a/zsh/cmds b/zsh/cmds index da96de45..5df0929e 100644 --- a/zsh/cmds +++ b/zsh/cmds @@ -85,8 +85,14 @@ tmate-attach() { tmate-pair() { + if [ -z "$TMATE_API_KEY" ]; then + echo "You need an api key." + return + fi + if [ ! -e "$TMATE_SOCKET_LOCATION" ]; then tmate -k $TMATE_API_KEY -r "sharedProgramming" -S "$TMATE_SOCKET_LOCATION" -f "$HOME/.tmate.conf" new-session -d -s "$TMATE_PAIR_NAME" + tmate -S $TMATE_SOCKET_LOCATION display -p '#{tmate_ssh_ro}' while [ -z "$url" ]; do url="$(tmate -S $TMATE_SOCKET_LOCATION display -p '#{tmate_ssh_ro}')" diff --git a/zsh/zshrc b/zsh/zshrc index 9048f256..21f7dc37 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -94,3 +94,6 @@ local paste_widgets=( x11-clip-wrap-widgets copy $copy_widgets x11-clip-wrap-widgets paste $paste_widgets + +autoload -U +X bashcompinit && bashcompinit +complete -o nospace -C /usr/bin/mc mc