aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-03-21 18:57:28 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-03-21 18:57:28 -0300
commitf5eb6aeba4e3c2d21fe81b87bcb3bbe19eeb575d (patch)
tree3ef295cf3f67e10a854d0a734c658bacec3dc9dd
parent7a8a48f3072c0124734573d42f525ca481a66ddd (diff)
downloadvim-f5eb6aeba4e3c2d21fe81b87bcb3bbe19eeb575d.tar.gz
vim-f5eb6aeba4e3c2d21fe81b87bcb3bbe19eeb575d.tar.bz2
Avoid slowness due to too many opened buffers
-rw-r--r--vimrc.dot.link8
1 files changed, 6 insertions, 2 deletions
diff --git a/vimrc.dot.link b/vimrc.dot.link
index 38df4a4..b8abd15 100644
--- a/vimrc.dot.link
+++ b/vimrc.dot.link
@@ -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