vim-startify icon indicating copy to clipboard operation
vim-startify copied to clipboard

Startify Does Not Open Directory When Giving One as a Bookmark

Open FOSSilizedDaemon opened this issue 4 years ago • 1 comments

I am having an issue where I have given all of my bookmarks as directories, but when I select them neovim just opens an empty buffer. Does startify work with directories? If it helps here is my configuration.

----------------
--- Startify ---
----------------
-- Set the startify header.
plugin.startify_custom_header = {
	'',
	'',
	'                                       ██            ',
	'                                      ░░             ',
	'    ███████   █████   ██████  ██    ██ ██ ██████████ ',
	'   ░░██░░░██ ██░░░██ ██░░░░██░██   ░██░██░░██░░██░░██',
	'    ░██  ░██░███████░██   ░██░░██ ░██ ░██ ░██ ░██ ░██',
	'    ░██  ░██░██░░░░ ░██   ░██ ░░████  ░██ ░██ ░██ ░██',
	'    ███  ░██░░██████░░██████   ░░██   ░██ ███ ░██ ░██',
	'   ░░░   ░░  ░░░░░░  ░░░░░░     ░░    ░░ ░░░  ░░  ░░ ',
	'',
	'',
}

-- Set the bookmarked list.
plugin.startify_bookmarks = {
	{ c = '~/.config' },
	{ C = '~/dox/dev/misc/dotfiles' },
	{ w = '~/dox/dev/core-software/working-projects' },
	{ f = '~/dox/dev/core-software/finished-projects' },
}

-- Ser the list order.
plugin.startify_lists = {
	{ type = 'files',     header = { '   Most Recently Used' } },
	{ type = 'bookmarks', header = { '   Bookmarks' } },
}

FOSSilizedDaemon avatar Aug 02 '21 15:08 FOSSilizedDaemon

to open a bookmark this is my conf:

let g:startify_lists = [
          \ { 'type': 'sessions',  'header': ['   Sessions']       },
          \ { 'type': 'files',     'header': ['   Files']            },
          \ { 'type': 'dir',       'header': ['   Current Directory '. getcwd()] },
          \ { 'type': 'bookmarks', 'header': ['   Bookmarks']      },
          \ ]
let g:startify_bookmarks = [
            \ { 'i': '~/.vim/init/' },
            \ { 'j': '~/.vim/plugged/vim-startify/autoload/startify.vim' },
            \ ]
let g:NERDTreeHijackNetrw = 1
let g:startify_session_autoload = 1
let g:startify_session_delete_buffers = 1
let g:startify_change_to_dir = 1
let g:startify_session_persistence = 1
" ...

and using netrw work fine.
If you like me love to use NERDTree look at this: issue 1288 my configuration using issue 1288 is:

"========================  Startify  =============================================
let g:startify_session_dir = '~/.vim/session'
let g:startify_lists = [
          \ { 'type': 'sessions',  'header': ['   Sessions']       },
          \ { 'type': 'files',     'header': ['   Files']            },
          \ { 'type': 'dir',       'header': ['   Current Directory '. getcwd()] },
          \ { 'type': 'bookmarks', 'header': ['   Bookmarks']      },
          \ ]
let g:startify_bookmarks = [
            \ { 'i': '~/.vim/init/' },
            \ { 'j': '~/.vim/plugged/vim-startify/autoload/startify.vim' },
            \ ]
let g:startify_session_autoload = 1
let g:startify_session_delete_buffers = 1
let g:startify_change_to_dir = 1
let g:startify_session_persistence = 1
let s:bannerText = '...' " using figlet: system('figlet -f slant -w 100 Leonardo') . "\nby startify"
let g:startify_custom_header = startify#pad(split(s:bannerText, "\n"))
let g:startify_session_before_save = [
            \ 'silent! NERDTreeClose'
            \ ]
let g:startify_open_folder_cmd = 'NERDTree'

This conf can be improved but to me is working fine.
best regards,
Leonardo

lesar avatar Dec 22 '21 08:12 lesar