Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- augroup vimrc-plugin-lingr
- autocmd!
- autocmd User plugin-lingr-* call s:lingr_event(
- \ matchstr(expand('<amatch>'), 'plugin-lingr-\zs\w*'))
- augroup END
- function! s:lingr_event(event)
- if a:event ==# 'message' && exists(':WindowName') == 2
- execute printf('WindowName %s(%d)', 'lingr-vim', lingr#unread_count())
- endif
- endfunction
- function! s:set_window_name(name)
- let esc = "\<ESC>"
- silent! execute '!echo -n "' . esc . 'k' . escape(a:name, '%#!')
- \ . esc . '\\"'
- redraw!
- endfunction
- command! -nargs=? WindowName call s:set_window_name(<q-args>)
Add Comment
Please, Sign In to add comment