From 1ea5a39637b3dcb9c14fc33b44772ec6a56a4643 Mon Sep 17 00:00:00 2001 From: filip <“filip.rabiega@gmail.com”> Date: Wed, 5 Mar 2025 12:39:35 +0100 Subject: updated dotfiles --- .vimrc | 45 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 11 deletions(-) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index bfa3417..24e6d3a 100644 --- a/.vimrc +++ b/.vimrc @@ -1,3 +1,4 @@ +runtime ftplugin/man.vim set number set relativenumber set title @@ -15,9 +16,14 @@ set autoindent set cindent set smartindent set nowrap +set ignorecase +set smartcase +" Use pathogen (plugin manager) +filetype off execute pathogen#infect() +execute pathogen#helptags() syntax on filetype plugin on filetype plugin indent on @@ -27,7 +33,19 @@ autocmd BufWritePost ~/website/*.html !bash ~/.local/bin/update_website autocmd BufWritePost ~/website/*.css !bash ~/.local/bin/update_website " Automatically use black on a Python file -autocmd BufWritePost *.py !black % +autocmd BufWritePost *.py !black --line-length=79 % + +" Pymode config +let g:pymode = 1 +let g:pymode_warnings = 0 +let g:pymode_trim_whitespaces = 1 +let g:pymode_options = 1 +let g:pymode_options_max_line_length = 79 +let g:pymode_options_colorcolumn = 1 +let g:pymode_indent = 1 +let g:pymode_indent_hanging_width = &shiftwidth +let g:pymode_indent_hanging_width = 4 +let g:pymode_doc = 1 " Automatically source .vimrc after saving autocmd BufWritePost ~/.vimrc source $MYVIMRC @@ -41,19 +59,24 @@ autocmd BufWritePre * %s/\s\+$//e autocmd BufWritePre * %s/\n\+\%$//e autocmd BufWritePre * cal cursor(currPos[1], currPos[2]) -map dB -map s o -map S ok -map Y y$ -map Z o +" Mappings +noremap dBx +nnoremap s o +nnoremap S ok +nnoremap Y y$ +nnoremap - ddp +nnoremap _ ddkP +nnoremap "+yy +nnoremap "+p +nnoremap i nnoremap :tabnew ~/.vimrc nnoremap :TlistToggle nnoremap :NERDTree - -" Keybindings to simulate system shortcuts -:nnoremap "+yy -:nnoremap "+p - +vnoremap sb "zdiz : to do końca nie działa +vnoremap sp "zdi

z

+inoremap ddi +inoremap yyi +inoremap pi inoremap /<++>"_c4l " show existing tab with 4 spaces width -- cgit v1.2.3