From bd71d64c374396f7af660382100a34088aebc0f8 Mon Sep 17 00:00:00 2001 From: Sebastian Burschel Date: Fri, 12 Mar 2021 16:02:34 +0100 Subject: [PATCH] Packages changes an newly added settings. --- dotfiles/.vimrc | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/dotfiles/.vimrc b/dotfiles/.vimrc index 17f543d..31691cc 100644 --- a/dotfiles/.vimrc +++ b/dotfiles/.vimrc @@ -18,6 +18,8 @@ call plug#begin('~/.vim/bundle') Plug 'airblade/vim-gitgutter' Plug 'artur-shaik/vim-javacomplete2' Plug 'chauncey-garrett/vim-tasklist' +Plug 'Yggdroot/indentLine' +Plug 'preservim/nerdcommenter' Plug 'ctrlpvim/ctrlp.vim' Plug 'davidhalter/jedi-vim' Plug 'dense-analysis/ale' @@ -37,7 +39,7 @@ Plug 'tpope/vim-fugitive' Plug 'tpope/vim-surround' Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' -Plug 'Yilin-Yang/vim-markbar' +" Plug 'Yilin-Yang/vim-markbar' "Does not work that good, seems too buggy atm call plug#end() @@ -50,7 +52,7 @@ set backspace=2 " Backspace deletes like most programs in insert mode set nobackup set nowritebackup set noswapfile " http://robots.thoughtbot.com/post/18739402579/global-gitignore#comment-458413287 -set history=50 +set history=200 set ruler " show the cursor position all the time set showcmd " display incomplete commands set incsearch " do incremental searching @@ -131,7 +133,7 @@ set nojoinspaces "endif " Make it obvious where 80 characters is -autocmd FileType python setlocal textwidth=80 colorcolumn=+1 +" autocmd FileType python setlocal textwidth=80 colorcolumn=+1 " Numbers set number @@ -181,6 +183,10 @@ set ignorecase set smartcase set hlsearch +" Search replace bind: + +nnoremap S :%s//g + " Strip trailing whitespaces on each save fun! StripTrailingWhitespaces() let l = line(".") @@ -258,7 +264,8 @@ let g:ale_fixers = {'python': ['isort', 'black'], " Install the linter and fixer for a specific language automatically -command InstallLinterFixPython python3 import pip; [pip.main(["install", singlepackage, "--user"]) for singlepackage in "flake8 pylint mypy prospector black isort".split(" ")] +"todo Find better solution to do this +" command InstallLinterFixPython python3 import pip; [pip.main(["install", singlepackage, "--user"]) for singlepackage in "flake8 pylint mypy prospector black isort".split(" ")] " colorscheme toggle: @@ -291,8 +298,25 @@ augroup python_syntax_extra autocmd! Syntax python :syn keyword Keyword self augroup END - - " Bind ctrl+u to jump list jump (opposite of ctrl+o) nnoremap +" Load changes to a file automatically from drive if the file has not been +" changed yet +set autoread + +" Generate help tags to find the docs with :help +"if !empty((globpath(&rtp, '~/.vim/doc/**')) +" helptags ~/.vim/doc +"endif + + +" Use persistent history. (so undo from older sessions can be used) +if !isdirectory("$HOME/.vim/.vim-undo-dir") + silent !mkdir -p $HOME/.vim/.vim-undo-dir +endif +set undodir=$HOME/.vim/.vim-undo-dir +set undofile + +" Set the character which is used as tab indent marker +let g:indentLine_char = '┊'