mcchrish / nnn.vim

File manager for vim/neovim powered by n³
BSD 2-Clause "Simplified" License
645 stars 25 forks source link

Opening a file from startup page does not open in main window #87

Closed medwatt closed 3 years ago

medwatt commented 3 years ago

I use the startify plugin as my startup page. If I open a file via nnn from the startup page, it does not open in the main window, but opens inside the small window designated for it.

This is my config:

let g:nnn#layout = { 'left': '~20%' }
let g:nnn#statusline = 0

let g:nnn#set_default_mappings = 0
let g:nnn#command = 'nnn -goQ'

autocmd! FileType nnn
autocmd  FileType nnn set mouse=
  \| autocmd BufLeave <buffer> set mouse=a

nnoremap <silent> <leader>n :NnnPicker %:p:h<CR>

let g:nnn#action = {
      \ '<c-t>': 'tab split',
      \ '<c-x>': 'split',
      \ '<c-v>': 'vsplit' }

mizlan commented 3 years ago

There are some related issues with vim-startify, such as not cleaning up the extra tab created when g:nnn#layout = 'tabnew', but all these issues seem to be fixed if the corresponding window is deleted during cleanup.

jarun commented 3 years ago

Many thanks for checking this out!