Skip to content

Version 2.3.0

Choose a tag to compare

@igorgladkoborodov igorgladkoborodov released this 31 Jul 16:40
61f92d1

Open file in existing VV instance if the file is a part of already opened project as discussed in #36 .

If you already have VV instance and it has :pwd ~/apps/vv, and you call vv ~/apps/vv/src/main/index.ts, it will open this file in the existing instance.

  • You can turn it on or off by :VVset openInProject=1 or :VVset openInProject=0. It is on by default.
  • By default it will respect switchbuf setting. It will work the same as files opened from quickfix list. In fact it uses a temporary quickfix list to open files to mimic it's behavior.
  • You can set custom options to override switchbuf setting by :VVset openInProject=[switcbuf override], for example, VVset openInProject=newtab.
  • Additionally you can override both of these using command line argument --open-in-project. For example: vv --open-in-project false [filename] to open in new VV instance, vv --open-in-project newtab [filename] to open file in new tab.
  • When you open the file, it compares file name with nvim current directory (result of :pwd), so if you initially opened file from somewhere else, you can use pligins vim-rooter or vim-findroot or similar. Or you can write custom VVprojectRoot function in your nvim config files.