diff options
| author | Olivia Kinnear <git@superatomic.dev> | 2026-04-23 16:11:59 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-23 17:11:59 -0400 |
| commit | 645a588aa60f4e816a704c97685e2036958af176 (patch) | |
| tree | ddd9fb1d80b0c8b1f4e0ae54e86576492baf1acb /src/nvim/ex_cmds.lua | |
| parent | c42aea3d37d96cd4275847ee0a71aa270596ba7f (diff) | |
feat(excmd): add :uptime command #39331
Problem
Nvim marks its v:starttime, but there is no user-friendly way to get Nvim's uptime.
Solution
Add :uptime (based loosely on uptime(1)).
Diffstat (limited to 'src/nvim/ex_cmds.lua')
| -rw-r--r-- | src/nvim/ex_cmds.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/ex_cmds.lua b/src/nvim/ex_cmds.lua index 7f8efe90d1..25bba1eb17 100644 --- a/src/nvim/ex_cmds.lua +++ b/src/nvim/ex_cmds.lua @@ -3078,6 +3078,12 @@ M.cmds = { func = 'ex_update', }, { + command = 'uptime', + flags = bit.bor(CMDWIN, LOCK_OK), + addr_type = 'ADDR_NONE', + func = 'ex_uptime', + }, + { command = 'vglobal', flags = bit.bor(RANGE, WHOLEFOLD, EXTRA, DFLALL, CMDWIN, LOCK_OK), addr_type = 'ADDR_LINES', |
