From 0be1cd8680b0f6a767a1bf50682856548a9adb98 Mon Sep 17 00:00:00 2001 From: Sebastian Burschel Date: Thu, 4 Mar 2021 13:19:43 +0100 Subject: [PATCH] Added Packages and removed stuff I did not use. --- .../customizations/vim-emmet-mysnippets.json | 3 +- dotfiles/.vimrc | 79 ++++++++----------- 2 files changed, 37 insertions(+), 45 deletions(-) diff --git a/dotfiles/.vim/customizations/vim-emmet-mysnippets.json b/dotfiles/.vim/customizations/vim-emmet-mysnippets.json index c1af6a3..68debb7 100644 --- a/dotfiles/.vim/customizations/vim-emmet-mysnippets.json +++ b/dotfiles/.vim/customizations/vim-emmet-mysnippets.json @@ -11,7 +11,8 @@ "basepath": "", "parameter": "", "class": "", - "config": "def openconfig(configfile):\n\twith open(configfile, \"r\", encoding=\"utf-8\") as currentconfigfile:\n\t\treturn json.load(currentconfigfile)\n\n\ndef saveconfig(configfile, newcontent):\n\twith open(configfile, \"w\", encoding=\"utf-8\") as currentconfigfile:\n\t\tjson.dump(newcontent, currentconfigfile, indent=4, sort_keys=True)" + "config": "def openconfig(configfile):\n\twith open(configfile, \"r\", encoding=\"utf-8\") as currentconfigfile:\n\t\treturn json.load(currentconfigfile)\n\n\ndef saveconfig(configfile, newcontent):\n\twith open(configfile, \"w\", encoding=\"utf-8\") as currentconfigfile:\n\t\tjson.dump(newcontent, currentconfigfile, indent=4, sort_keys=True)", + "pdb": "import ipdb as pdb; pdb.set_trace()" } }, "java": { diff --git a/dotfiles/.vimrc b/dotfiles/.vimrc index 1a18f8e..5e11419 100644 --- a/dotfiles/.vimrc +++ b/dotfiles/.vimrc @@ -36,8 +36,6 @@ call vundle#begin() " let Vundle manage Vundle, required -"Plugin 'lervag/vimtex' -"Plugin 'vim-syntastic/syntastic' Plugin 'airblade/vim-gitgutter' Plugin 'artur-shaik/vim-javacomplete2' Plugin 'ctrlpvim/ctrlp.vim' @@ -55,28 +53,10 @@ Plugin 'Townk/vim-autoclose' Plugin 'tpope/vim-fugitive' Plugin 'tpope/vim-surround' Plugin 'vim-airline/vim-airline' -Plugin 'vim-scripts/TaskList.vim' +Plugin 'chauncey-garrett/vim-tasklist' Plugin 'Vimjas/vim-python-pep8-indent' Plugin 'VundleVim/Vundle.vim' - -" The following are examples of different formats supported. -" Keep Plugin commands between vundle#begin/end. -" plugin on GitHub repo -"Plugin 'tpope/vim-fugitive' -" plugin from http://vim-scripts.org/vim/scripts.html -" Plugin 'L9' -" Git plugin not hosted on GitHub -"Plugin 'git://git.wincent.com/command-t.git' -" git repos on your local machine (i.e. when working on your own plugin) -"Plugin 'file:///home/gmarik/path/to/plugin' -" The sparkup vim script is in a subdirectory of this repo called vim. -" Pass the path to set the runtimepath properly. -"Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} -" Install L9 and avoid a Naming conflict if you've already installed a -" different version somewhere else. -" Plugin 'ascenator/L9', {'name': 'newL9'} - " All of your Plugins must be added before the following line call vundle#end() " required filetype plugin indent on " required @@ -186,31 +166,19 @@ autocmd FileType python setlocal textwidth=80 colorcolumn=+1 set number set numberwidth=5 -" Tab completion -" will insert tab at beginning of line, -" will use completion if not at beginning - -"set wildmode=list:longest,list:full -function! InsertTabWrapper() - let col = col('.') - 1 - if !col || getline('.')[col - 1] !~ '\k' - return "\" - else - return "\" - endif -endfunction -inoremap =InsertTabWrapper() -inoremap +" Autocomplete menu for command mode +set wildmenu +set wildmode=longest:full,full " Open new split panes to right and bottom, which feels more natural set splitbelow set splitright " Quicker window movement -"nnoremap j -"nnoremap k -"nnoremap h -"nnoremap l +nnoremap j +nnoremap k +nnoremap h +nnoremap l " Autocomplete with dictionary words when spell check is on set complete+=kspell @@ -294,8 +262,11 @@ let g:peekaboo_window = 'vert bo 65new' autocmd FileType java setlocal omnifunc=javacomplete#Complete -" tasklist Keywords +" tasklist settings let g:tlTokenList = ["FIXME", "TODO", "todo"] +let g:tlWindowPosition = 1 "Open window on bottom, 0 would be top +let g:tlRememberPosition = 0 +map t TaskList " nerdtree settings map :NERDTreeToggle @@ -329,7 +300,27 @@ function! s:SwitchColorscheme() endfunction map :call SwitchColorscheme() - - - colorscheme darcula + +" Highlight whole todo comment, not just the keyword itself: + +augroup myTodo + autocmd! + autocmd Syntax * syntax match myTodo /\v\_.<(TODO|FIXME|todo|fixme).*/hs=s+1 containedin=.*Comment +augroup END + +highlight link myTodo Todo + + +" Highlight "self." in different color in python files: + +augroup python_syntax_extra + autocmd! + autocmd! Syntax python :syn keyword Keyword self +augroup END + + + +" Bind ctrl+u to jump list jump (opposite of ctrl+o) +nnoremap +