Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Custom behaviour: launch when vim is invoked w/o arguments or with a folder #4

Description

@mgiugliano

I was successful configuring my .vimrc to launch fff if vim is invoked without arguments (copying a similar setting offered for NERD Tree):

autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | exe 'F' | endif

However it does not work nicely if invoked with a folder (once more, copied from NERD tree), as it follows:

autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'F' argv()[0] | wincmd p | ene | endif

Any suggestion on how to make the last working smoothly?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions