set nocompatible " be iMproved, required filetype off " required " set the runtime path to include Vundle and initialize set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() " let Vundle manage Vundle, required " " Plugin 'nathangrigg/vim-beancount' " Plugin 'knsh14/vim-github-link' " Plugin 'vimwiki/vimwiki' " Plugin 'posva/vim-vue' "Plugin 'jpalardy/vim-slime' " Plugin 'dense-analysis/ale' Plugin 'VundleVim/Vundle.vim' Plugin 'scrooloose/nerdtree' " Plugin 'rust-lang/rust.vim' Plugin 'scrooloose/nerdcommenter' Plugin 'tpope/vim-fugitive' Plugin 'airblade/vim-gitgutter' Plugin 'alvan/vim-closetag' "Plugin 'ziglang/zig.vim' "Plugin 'tmhedberg/SimpylFold' Plugin 'vim-airline/vim-airline' "Plugin 'junegunn/goyo.vim' Plugin 'whiteinge/diffconflicts' Plugin 'AndrewRadev/linediff.vim' "Plugin 'ryanolsonx/vim-lsp-python' " Plugin 'prabirshrestha/async.vim' " Plugin 'prabirshrestha/vim-lsp' " Plugin 'mattn/vim-lsp-settings' " Plugin 'mileszs/ack.vim' Plugin 'nathanaelkane/vim-indent-guides' Plugin 'ctrlpvim/ctrlp.vim' "Tag tree "Plugin 'majutsushi/tagbar' "Plugin 'xolox/vim-easytags' "Plugin 'xolox/vim-misc' "Plugin 'nicwest/vim-http' Plugin 'psf/black' "Plugin 'Konfekt/FastFold' "Plugin 'nvie/vim-flake8' "Plugin 'plasticboy/vim-markdown' "Plugin 'tell-k/vim-autopep8' "Plugin 'makerforceio/CoVim.git' "Plugin 'davidhalter/jedi-vim' " Plugin 'LucHermitte/lh-vim-lib' " Plugin 'LucHermitte/local_vimrc' " All of your Plugins must be added before the following line call vundle#end() " required filetype plugin indent on " required " Custom _vimrc_local.vim files can be added wherever you want. " Add them to whitelist to source automatically " For example we can switch off augroup black python " for work related projects "augroup BlackPython "autocmd! "augroup END function Hfmt() execute ':!djlint --indent 2 --reformat % ' endfunction function Jfmt() execute ':!js-beautify -s2 -r % ' endfunction function AutoBlackFile() if $VIM_BLACK_VIA_SHELL == "y" execute ':!black % ' execute ':e' else execute ':Black' endif endfunction augroup BlackPython autocmd! autocmd BufWritePre *.py call AutoBlackFile() augroup END augroup SVELTE autocmd! au BufNewFile,BufRead *.svelte set filetype=html augroup END let mapleader="," set ts=4 shiftwidth=4 ai expandtab ruler cursorline lazyredraw incsearch autocmd BufNewFile,BufRead *.html set shiftwidth=2 ts=2 autocmd BufNewFile,BufRead *.js set shiftwidth=2 ts=2 autocmd BufNewFile,BufRead *.css set shiftwidth=2 ts=2 autocmd BufNewFile,BufRead *.vue set shiftwidth=2 ts=2 syntax on let g:vimwiki_list = [{'path': '~/docs/', 'syntax': 'markdown', 'ext': '.md'}] "Configuring the plugins let g:slime_target = "tmux" let g:slime_default_config = {"socket_name": 'default', "target_pane": "{last}"} let g:airline#extensions#tabline#enabled = 1 "let g:indent_guides_enable_on_vim_startup = 1 "let g:asyncomplete_auto_popup = 0 let g:lsp_preview_float = 1 let g:lsp_preview_keep_focus = 1 let g:black_fast = 1 "let g:lsp_highlights_enabled = 1 "let g:lsp_signature_help_enabled = 0 noremap :read !python % 2>&1 \| sed 's/^/\# /' noremap :NERDTreeToggle noremap :LspDefinition noremap :LspReferences noremap :Ack! nmap :TagbarToggle if executable('pyls') " pip install python-language-server au User lsp_setup call lsp#register_server({ \ 'name': 'pyls', \ 'cmd': {server_info->['pyls']}, \ 'whitelist': ['python'], \ }) endif if executable('ag') let g:ackprg = 'ag --vimgrep' endif abbr atreid @reidransom iab atparth @ParthS007 iab atmarie @mariehankinson "iab br breakpoint() iab #N # NOTE(thesage21): iab #P print( iab #T # TODO(thesage21): iab tprint \import traceback \def show(*a, **kw): \line = traceback.extract_stack()[-2].line \print(line, "\|", *a, **kw) \ au BufRead,BufNewFile *.lambda set filetype=lambda set updatetime=100 if executable('ag') " Use Ag over Grep set grepprg=ag\ --nogroup\ --nocolor " Use ag in CtrlP for listing files. Lightning fast and respects .gitignore let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' " Use ag in ack to search for patterns let g:ackprg = 'ag --vimgrep' endif "Copy full buffer into X clipboard let @C = 'ggVG"+y' let @c = '"+y' let @P = 'ggVGx"+p' let @p = 'x"+p'