From 921612fea30f53acbe1238fa77982c26ce6375ca Mon Sep 17 00:00:00 2001 From: filip <“filip.rabiega@gmail.com”> Date: Mon, 10 Nov 2025 21:33:05 +0100 Subject: remade envvarrc and added fzy to vimrc --- .config/vim/.vimrc | 40 +++++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) (limited to '.config/vim/.vimrc') diff --git a/.config/vim/.vimrc b/.config/vim/.vimrc index 2bad7b5..3236d87 100644 --- a/.config/vim/.vimrc +++ b/.config/vim/.vimrc @@ -23,6 +23,8 @@ set autoindent " Enable automatic indentation set cindent " Enable C-style indentation set smartindent " Enable smart indentation (e.g., after braces) set nowrap " Disable line wrapping +set scrolloff=8 " Keep the cursor in the middle +set completeopt=menuone,noinsert " Make autocomplete in Python usable " Clipboard and mouse set clipboard+=unnamedplus " Enable clipboard integration with system clipboard @@ -37,8 +39,8 @@ set runtimepath^=$HOME/.config/vim/.vim " Add custom runtime path for plugins an " Miscellaneous settings set go=a " Enable all automatic formatting options -set spelllang=en -set nospell +set spelllang=en,pl +colorscheme pablo " Change colorscheme " Use pathogen (plugin manager) filetype off @@ -75,7 +77,7 @@ nnoremap i nnoremap :tabnew ~/.vimrc nnoremap :TlistToggle nnoremap :NERDTree -inoremap /<++>"_c4l +" inoremap /<++>"_c4l vnoremap "+y " show existing tab with 4 spaces width @@ -93,6 +95,9 @@ autocmd Filetype rmd map :!echo"require(rmarkdown);render(' :w:!python3 % + " Pymode config let g:pymode = 1 let g:pymode_warnings = 0 @@ -104,5 +109,30 @@ let g:pymode_indent = 1 let g:pymode_indent_hanging_width = &shiftwidth let g:pymode_indent_hanging_width = 4 let g:pymode_doc = 1 - -let maplocalleader = "," +let g:pymode_doc_bind = 'K' +let g:pymode_rope = 1 +let g:pymode_rope_autoimport = 1 +let g:pymode_rope_lookup_project = 1 +let g:pymode_rope_project_root = "." +let g:pymode_rope_folder = ".ropeproject" +let g:pymode_rope_completion = 1 +let g:pymode_rope_complete_on_dot = 1 + +let maplocalleader = '\' + +" fzy integration +function! FzyCommand(choice_command, vim_command) + try + let output = system(a:choice_command . " | fzy ") + catch /Vim:Interrupt/ + " Swallow errors from ^C, allow redraw! below + endtry + redraw! + if v:shell_error == 0 && !empty(output) + exec a:vim_command . ' ' . output + endif +endfunction + +nnoremap e :call FzyCommand("ag . --silent -l -g ''", ":e") +nnoremap v :call FzyCommand("ag . --silent -l -g ''", ":vs") +nnoremap s :call FzyCommand("ag . --silent -l -g ''", ":sp") -- cgit v1.2.3