]> gitweb.fluxo.info Git - rhatto/dotfiles/vim.git/commitdiff
Avoid slowness due to too many opened buffers
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 21 Mar 2018 21:57:28 +0000 (18:57 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 21 Mar 2018 21:57:28 +0000 (18:57 -0300)
vimrc.dot.link

index 38df4a495fd8bf571cac3c3f87d8233da61e8450..b8abd155e484294196d5bd20a92e2c4d3f263287 100644 (file)
@@ -167,7 +167,9 @@ nmap <ESC>c :tabclose<CR>
 nmap <ESC>b :NERDTreeFromBookmark 
 nmap <ESC>B :B 
 nmap <ESC>s :OpenSession 
-nmap <ESC>m :q!<CR>
+"nmap <ESC>m :q!<CR>
+" We're closing the buffer instead of just the window to avoid slowness due to too many opened buffers
+nmap <ESC>m :bd<CR>
 nmap <ESC>w :w<CR>
 imap <ESC>n <ESC>:tabnew<CR>
 imap <ESC>t <ESC>:NERDTree 
@@ -177,7 +179,9 @@ imap <ESC>t <ESC>:T
 imap <ESC>f <ESC>:wq<CR>
 imap <ESC>c <ESC>:tabclose<CR>
 "map <ESC>e <ESC>:tabclose<CR>
-imap <ESC>m <ESC>:q!<CR>
+"imap <ESC>m <ESC>:q!<CR>
+" We're closing the buffer instead of just the window to avoid slowness due to too many opened buffers
+imap <ESC>m <ESC>:bd<CR>
 imap <ESC>w <ESC>:w<CR>
 
 " Write, quit and close shortcuts using Alt-key combo notation