mirror of
https://github.com/zoriya/auto-save.nvim.git
synced 2026-08-06 22:28:06 +00:00
first commit
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
local api = vim.api
|
||||
|
||||
-- original source: https://vim.fandom.com/wiki/Run_a_command_in_multiple_buffers
|
||||
-- like bufdo but restore the current buffer.
|
||||
api.nvim_exec(
|
||||
[[
|
||||
function! g:AutoSaveBufDo(command)
|
||||
let currBuff=bufnr("%")
|
||||
execute 'bufdo ' . a:command
|
||||
execute 'buffer ' . currBuff
|
||||
endfunction
|
||||
com! -nargs=+ -complete=command Bufdo call BufDo(<q-args>)
|
||||
]],
|
||||
false
|
||||
)
|
||||
Reference in New Issue
Block a user