Mercurial > vim_plugins > core
view autoload/core.vim @ 1:7c5bd18befd2 default tip
Some basic usage
| author | Luka Sitas <lsitas@avatarasoftware.com> |
|---|---|
| date | Tue, 10 Mar 2026 21:31:17 -0400 |
| parents | 7bb5f650cfb7 |
| children |
line wrap: on
line source
" autoload/core.vim " Functions are loaded on demand if exists('g:loaded_core') finish endif let g:loaded_core = 1 function! core#PopupCommand(command) let buf = term_start(a:command, {'hidden': 1, 'term_finish': 'close'}) let winid = popup_create(buf, {'minwidth': 120, 'minheight': 28}) endfunction function! core#ReadOnlyPopup(content) let lines = split(a:content, "\n") let winid = popup_create(lines, {'minwidth':120, 'minheight':28}) let buf = winbufnr(winid) call setbufvar(buf, '&modifiable', 0) call setbufvar(buf, '&bufhidden', 'wipe') return winid endfunction function! core#ExecuteCommand(command) " a:command is a shell command string, e.g. 'hg status' return system(a:command . ' 2>&1') endfunction
