You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dear author, hello! It is China's National Day now. I wonder if you have a day off. Thank you for your plugin, but I found a problem. It seems that it is not like tabnew <file_in_buffer>, but can only open one file. So I modified the code a little bit.
~/.vim/plugged/vim-startify/autoload/startify.vim
" Function: #open_buffers {{{1" modified by liuqin19980818 2024-10-01 begin" function! startify#open_buffers(...) abort" if exists('a:1') " used in mappings" let entry = b:startify.entries[a:1]" if !empty(s:batchmode) && entry.type == 'file'" call startify#set_mark(s:batchmode, a:1)" else" call s:open_buffer(entry)" endif" return" endif"" let marked = filter(copy(b:startify.entries), 'v:val.marked')" if empty(marked) " open current entry" call s:open_buffer(b:startify.entries[line('.')])" return" endif"" enew" setlocal nobuflisted"" " Open all marked entries." for entry in sort(values(marked), 's:sort_by_tick')" call s:open_buffer(entry)" endfor"" wincmd ="" if exists('#User#StartifyAllBuffersOpened')" doautocmd <nomodeline> User StartifyAllBuffersOpened" endif" endfunctionfunction!startify#open_buffers(...) abortifexists('a:1')" used in mappingslet entry =b:startify.entries[a:1]
if!empty(s:batchmode) && entry.type=='file'callstartify#set_mark(s:batchmode, a:1)
else" 使用 tabnew 打开缓冲区execute'tabnew ' . entry.pathendifreturnendiflet marked =filter(copy(b:startify.entries), 'v:val.marked')
ifempty(marked)" open current entryexecute'tabnew ' . b:startify.entries[line('.')].pathreturnendif" Open all marked entries in new tabs.for entry insort(values(marked), 's:sort_by_tick')
execute'tabnew ' . entry.pathendforwincmd=ifexists('#User#StartifyAllBuffersOpened')
doautocmd <nomodeline>User StartifyAllBuffersOpened
endifendfunction" modified by liuqin19980818 2024-10-01 end
I want to know if I can add a set of shortcut keys to open the newly opened file in a new tab so that I can use vim to edit multiple files at the same time.
Or you have already implemented it but I didn't find it in the documentation
The text was updated successfully, but these errors were encountered:
Dear author, hello! It is China's National Day now. I wonder if you have a day off. Thank you for your plugin, but I found a problem. It seems that it is not like tabnew <file_in_buffer>, but can only open one file. So I modified the code a little bit.
~/.vim/plugged/vim-startify/autoload/startify.vim
I want to know if I can add a set of shortcut keys to open the newly opened file in a new tab so that I can use vim to edit multiple files at the same time.
Or you have already implemented it but I didn't find it in the documentation
The text was updated successfully, but these errors were encountered: