From ad9fe550d8bcea98106284e2e7231e69374ff386 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Thu, 19 May 2022 08:30:49 +0200 Subject: update --- .vimrc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index b1900bd..9c74d98 100644 --- a/.vimrc +++ b/.vimrc @@ -8,6 +8,9 @@ filetype plugin on filetype plugin indent on let mapleader = "," +" No bell +set belloff=all + set guifont=6x13:h13 set rtp+=/opt/homebrew/opt/fzf @@ -101,3 +104,20 @@ noremap e :cs find e =expand("") noremap i :cs find i =expand("") " noremap f :cs find f =expand("") noremap d :cs find d =expand("") + +function! CloseOnLast() + let cnt = 0 + for i in range(0, bufnr("$")) + if buflisted(i) + let cnt += 1 + endif + endfor + if cnt <= 1 + q + else + bd + endif + endfunction + +noremap :call CloseOnLast() + -- cgit v1.2.3