From 017aa9946ca25b15566e0f5b08601f86852a6d90 Mon Sep 17 00:00:00 2001 From: Satoru Kitaguchi Date: Sun, 7 Jul 2024 22:23:16 +0900 Subject: [PATCH] follow the format of the buffer name `{scheme}://{expr}[;{params}][#{fragment}]` --- .vimrc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.vimrc b/.vimrc index 7cbe704..3f760cc 100644 --- a/.vimrc +++ b/.vimrc @@ -115,13 +115,14 @@ def! g:InstallPackPlugins(): void #{{{ enddef #}}} def! g:UpdatePackPlugins(): void #{{{ + const bufname = 'vimrc://update/plugins' # Needs escape not to use file-pattern. - var prevbuf: number = bufnr('\[update plugins]\') + var prevbuf: number = bufnr(bufname) if prevbuf != -1 # Needs `:` before Ex command with range. execute ':' .. prevbuf .. 'bwipeout!' endif - var nr: number = bufadd('[update plugins]') + var nr: number = bufadd(bufname) bufload(nr) execute ':' .. nr .. 'sb' ToScratch @@ -575,7 +576,7 @@ command! -bar ToScratch setlocal buftype=nofile bufhidden=hide noswapfile command! -bar ToScratchForFiles ToScratch | setlocal iskeyword+=. command! -bar -nargs=? ModsNew new | if len() > 0 - | edit [] + | edit modsnew://output/ | endif # List files recursively in the specified directory.