summaryrefslogtreecommitdiff
path: root/vim/.vimrc
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2021-12-09 14:32:54 +0100
committerUrbain Vaes <urbain@vaes.uk>2021-12-09 14:32:54 +0100
commite434d3e3913609d0b029c499ed3a38ce3edd268a (patch)
tree032048b080011fbb50622162cac078646d7eb4ba /vim/.vimrc
parent6a151b87421d9168bd17b2cfdabeeab3d7c77b31 (diff)
Improve formatting mappings
Diffstat (limited to 'vim/.vimrc')
-rw-r--r--vim/.vimrc10
1 files changed, 7 insertions, 3 deletions
diff --git a/vim/.vimrc b/vim/.vimrc
index 96f6fae..da2a427 100644
--- a/vim/.vimrc
+++ b/vim/.vimrc
@@ -11,6 +11,7 @@ let maplocalleader = ","
"" Plugins {{{1
call plug#begin('~/.vim/plugged')
+Plug 'andymass/vim-matchup'
Plug 'PotatoesMaster/i3-vim-syntax'
Plug 'SirVer/ultisnips'
Plug 'airblade/vim-gitgutter'
@@ -321,8 +322,9 @@ nnoremap \h :e %:p:s,.hpp$,.X123X,:s,.cpp$,.hpp,:s,.X123X$,.cpp,<cr>
nnoremap Y y$
" Formatting
-nnoremap <Leader>fw :%s/\s\+$//<cr>
-nnoremap <Leader>ft :%s/^ \+//g<cr>
+nnoremap <Leader>fw m`:silent! keeppattern %s/\s\+$//<cr>``:update<cr>
+nnoremap <Leader>ft m`:silent! keeppattern %s/^ \+//g<cr>``:update<cr>
+nmap <Leader>ff <Leader>fw<Leader>ft
" Swap <c-p>/<c-n> and <up>/<down>
cnoremap <c-p> <up>
@@ -331,7 +333,7 @@ cnoremap <up> <c-p>
cnoremap <down> <c-n>
" Alternate file
-nnoremap <bs> 
+no remap <bs> 
" Buffers
nnoremap + :Buffers<cr>
@@ -433,6 +435,8 @@ catch
endtry
endif
+let g:matchup_override_vimtex = 1
+
" Tests {{{1
let g:ripple_repls = {
\ "python": {