aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.vimrc7
1 files changed, 3 insertions, 4 deletions
diff --git a/.vimrc b/.vimrc
index f6da3a4..4a0f9eb 100644
--- a/.vimrc
+++ b/.vimrc
@@ -212,10 +212,6 @@ nmap <Esc><Esc> :nohl<cr>
" Disable Ex Mode
nnoremap Q <Nop>
-" Clear notification popups
-nnoremap j :call popup_clear()<cr><Down>
-nnoremap k :call popup_clear()<cr><Up>
-
" Split window mappings
nmap <Bslash> :vsplit<cr>
nmap <C-Bslash> :split<cr>
@@ -355,6 +351,9 @@ augroup AutoCommands
" Set file types.
autocmd BufRead,BufNewFile *.nims set filetype=nim
+ " Clear notification on cursor movement.
+ autocmd CursorMoved * silent! call popup_clear()
+
" Automatically remove trailing white space on save.
autocmd InsertLeave,BufWritePre * %s/\s\+$//e