summaryrefslogtreecommitdiff
path: root/.vimrc
diff options
context:
space:
mode:
authorfilip <“filip.rabiega@gmail.com”>2025-03-05 12:39:35 +0100
committerfilip <“filip.rabiega@gmail.com”>2025-03-05 12:39:35 +0100
commit1ea5a39637b3dcb9c14fc33b44772ec6a56a4643 (patch)
tree7d098e45a7b726018edba80985751bf60eeae50a /.vimrc
parent167e1ad6d641d14a812077bbdb3c6b7c8fdcdef9 (diff)
downloaddotfiles-1ea5a39637b3dcb9c14fc33b44772ec6a56a4643.tar.gz
dotfiles-1ea5a39637b3dcb9c14fc33b44772ec6a56a4643.tar.bz2
dotfiles-1ea5a39637b3dcb9c14fc33b44772ec6a56a4643.zip
updated dotfiles
Diffstat (limited to '.vimrc')
-rw-r--r--.vimrc45
1 files changed, 34 insertions, 11 deletions
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 <BS> dB
-map s o<Esc>
-map S o<Esc>k
-map Y y$
-map Z <Esc>o<Esc>
+" Mappings
+noremap <BS> dBx
+nnoremap s o<Esc>
+nnoremap S o<Esc>k
+nnoremap Y y$
+nnoremap - ddp
+nnoremap _ ddkP
+nnoremap <C-J> "+yy
+nnoremap <C-K> <ESC>"+p
+nnoremap <space> i<space><esc>
nnoremap <silent> <F7> :tabnew ~/.vimrc<CR>
nnoremap <silent> <F8> :TlistToggle<CR>
nnoremap <silent> <F9> :NERDTree<CR>
-
-" Keybindings to simulate system shortcuts
-:nnoremap <C-J> "+yy
-:nnoremap <C-K> <ESC>"+p
-
+vnoremap sb "zdi<b><C-R>z</b><Esc> : to do końca nie działa
+vnoremap sp "zdi<p><C-R>z</p><Esc>
+inoremap <C-d> <Esc>ddi
+inoremap <C-y> <Esc>yyi
+inoremap <C-p> <Esc>pi
inoremap <Space><Space> <Esc>/<++><CR>"_c4l
" show existing tab with 4 spaces width