" (_) " __ ___ _ __ ___ _ __ ___ " \ \ / / | '_ ` _ \| '__/ __| " \ V /| | | | | | | | | (__ " \_/ |_|_| |_| |_|_| \___| syntax on " theme set background=dark colorscheme solarized " plugins call plug#begin('~/.vim/plugged') Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } Plug 'junegunn/fzf.vim' Plug 'airblade/vim-gitgutter' Plug 'godlygeek/tabular' Plug 'itchyny/lightline.vim' Plug 'jpalardy/vim-slime' Plug 'justinmk/vim-dirvish' Plug 'roginfarrer/vim-dirvish-dovish' Plug 'tpope/vim-commentary' Plug 'tpope/vim-fugitive' Plug 'tpope/vim-surround' Plug 'github/copilot.vim', {'branch': 'release'} Plug 'roxma/nvim-yarp', { 'do': 'pip install -r requirements.txt' } Plug 'ncm2/ncm2' Plug 'ncm2/ncm2-bufword' Plug 'ncm2/ncm2-path' Plug 'ncm2/ncm2-jedi' Plug 'dense-analysis/ale' Plug 'dhruvasagar/vim-table-mode' call plug#end() " options set autoindent " take indent for new line from previous line set backspace=eol,start,indent " how backspace works at start of line set breakindent " wrapped line repeats indent set breakindentopt=shift:3,min:40,sbr " settings for 'breakindent' set colorcolumn=80 " columns to highlight set comments=b:# " patterns that can start a comment line set completeopt=noinsert,menuone,noselect " options for Insert mode completion set completeopt=noinsert,menuone,noselect " options for Insert mode completion set cursorline " highlight the screen line of the cursor set foldenable " set to display all folds open set foldopen-=block " for which commands a fold will be opened set foldmethod=marker " set nofoldenable " disable folding at startup. set foldtext=FoldText() " expression used to display for a closed fold set formatoptions-=cro " how automatic formatting is to be done set hlsearch " highlight matches with last search pattern set ignorecase " ignore case in search patterns set incsearch " highlight match while typing search pattern set linebreak " wrap long lines at a blank set listchars+=space:. " characters for displaying in list mode set matchtime=2 " tenths of a second to show matching paren set modeline " recognize modelines at start or end of file set noexpandtab " (don't) use spaces when is inserted set number " print the line number in front of each line set runtimepath+=~/.vim/after " list of directories used for runtime files set runtimepath-=~/.vim/after " list of directories used for runtime files set shiftwidth=4 " number of spaces to use for (auto)indent step set shortmess+=c " list of flags, reduce length of messages set smartcase " no ignore case when pattern has uppercase set softtabstop=4 " number of spaces that uses while editing set splitbelow " new window from split is below the current one set splitright " new window is put right of the current one set tabstop=4 " number of spaces that in file uses set updatetime=300 " after this many milliseconds flush swap file set visualbell " use visual bell instead of beeping set whichwrap+=<,>,h,l " allow specified keys to cross line boundaries set wrap " long lines wrap and continue on the next line function! FoldText() return repeat(" ", indent(v:foldstart)) . trim(getline(v:foldstart))[0:-1] . " +" . repeat(" ", winwidth(0)) endfunction " variables if exists('$VIRTUAL_ENV') let g:python3_host_prog = $VIRTUAL_ENV . '/bin/python' else let g:python3_host_prog= $HOME . "/.env/bin/python" endif let g:lightline = { \ 'colorscheme': 'solarized', \ 'inactive': { \ 'left': [ ['filename'] ], \ 'right': [] \ } \ } let g:ale_lint_on_save = 1 let g:ale_fix_on_save = 0 let g:ale_python_auto_virtualenv = 1 let g:python_highlight_all = 1 let g:slime_target = "tmux" " mappings nnoremap x ((foldclosed('.')==-1)?('x'):('zo0x')) nnoremap nnoremap nnoremap nnoremap nnoremap = = tnoremap inoremap pumvisible() ? "\" : "\" inoremap pumvisible() ? "\" : "\" nmap (dirvish_up) nmap vmap nmap vmap nnoremap gn :GitGutterNextHunk nnoremap gp :GitGutterPrevHunk nnoremap gv :Gvdiffsplit nnoremap n :ALENext nnoremap p :ALEPrevious inoremap (pumvisible() ? "\\" : "\") nnoremap n nnoremap N nnoremap / :execute "normal! mf"/ nnoremap :noh nnoremap go :noh`f vmap SendSelectionToTmux nmap NormalModeSendToTmux nmap r SetTmuxVars " autocommands augroup CursorLineOnlyInActiveWindow autocmd! autocmd VimEnter,WinEnter,BufWinEnter * setlocal cursorline autocmd WinLeave * setlocal nocursorline augroup END augroup dirvish_config autocmd! autocmd FileType dirvish \ nmap o (dovish_create_file) \ | nmap O (dovish_create_file) \ | nmap dd (dovish_delete) \ | nmap c (dovish_rename) \ | nmap yy (dovish_yank) \ | xmap yy (dovish_yank) \ | nmap p (dovish_copy) augroup END " autocmd BufEnter * call ncm2#enable_for_buffer() set completeopt=noinsert,menuone,noselect let g:slime_target = "tmux" let g:slime_default_config = {"socket_name": get(split($TMUX, ","), 0), "target_pane": ":.2"}