From 34a998e35634a4a7d2d57c47ecd32dea181be878 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Thu, 30 Nov 2017 22:18:41 +0100 Subject: Various changes --- vim/.vim/.gitignore | 3 ++- vim/.vimrc | 19 ++++++++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) (limited to 'vim') diff --git a/vim/.vim/.gitignore b/vim/.vim/.gitignore index 55aa2a4..58ba36e 100644 --- a/vim/.vim/.gitignore +++ b/vim/.vim/.gitignore @@ -1,4 +1,5 @@ .init.vim-* .netrwhist plugged -vimundo/* +view +vimundo diff --git a/vim/.vimrc b/vim/.vimrc index c0a2172..4f7cdc3 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -23,6 +23,7 @@ Plug 'holomorph/vim-freefem' Plug 'honza/vim-snippets' Plug 'inkarkat/vim-SpellCheck' Plug 'inkarkat/vim-ingo-library' +Plug 'kopischke/vim-stay' Plug 'jamessan/vim-gnupg' Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } Plug 'junegunn/fzf.vim' @@ -86,6 +87,7 @@ call plug#end() " Toggles nnoremap cpg :GitGutterToggle +nnoremap cpr :IronRepl nnoremap cpn :NERDTreeToggle nnoremap cpt :TagbarToggle nnoremap cpu :GundoToggle @@ -123,9 +125,10 @@ nnoremap gd :Gdiff " Iron let g:iron_map_defaults=0 +let g:iron_repl_open_cmd='edit' nmap yr (iron-send-motion) -nmap yrr VR xmap R (iron-send-motion) +nmap yrr VR " Easy align xmap ga (EasyAlign) @@ -287,6 +290,9 @@ endif "" Mappings +nmap n nzz +nmap N Nzz + nnoremap AddWhiteSpaceAfter a h:silent call repeat#set("\AddWhiteSpaceAfter") nnoremap AddWhiteSpaceBefore i l:silent call repeat#set("\AddWhiteSpaceBefore") @@ -336,13 +342,15 @@ cnoremap cnoremap nmap -nmap :bd! # nmap >b :BufSurfForward -nmap :bd! # +nmap :bd! # +nmap >B :BufSurfForward:bd! # +nmap [B [b:bd! # +nmap ]B ]b:bd! # if has("nvim") - nnoremap goh :lcd %:h \| terminal - tnoremap :bd! # + nnoremap goh :let @a=getcwd() \| lcd %:h \| terminal:execute 'lcd '.@aA + tnoremap :bd! # nnoremap :b # \| norm A tnoremap endif @@ -387,4 +395,5 @@ augroup vimrc \ if !isdirectory(expand(':p:h')) | \ call mkdir(expand(':p:h'), 'p') | \ endif + au BufWritePost *vimrc :source % augroup END -- cgit v1.2.3