2

Off the top of my head perhaps something like this in your vimrc... let g:localconffile = '.myvimconf' func! LoadLocalConfig() abort let l:fname = expand('%:p:h') . '/' . g:localconffile if filereadable(l:fname) exe "source " . l:fname endif endfunc augroup localconf autocmd! au VimEnter * call LoadLocalConfig() augroup ...


2

You can cheat a little using this method: vim -S Session.vim -c ":e OTHER_FILE" This will source your Session.vim then load the file you want. From what I have read in the man page, the commands specified with -c will be executed last: +{command} -c {command} {command} will be executed after the first file has been read. {command} is ...


1

"Session" is simply a Vim script. You can read it - it does not try to wipe any existing buffers (except maybe one it was started from and only if it was blank). It works well on Vim startup, but may leave extra buffers floating around if you load it later. Currently there's no way to change this behaviour. If you really feel it wrong (although, I ...


1

In addition to @craigp's answer, you can also open a file in a remote tab. vim --servername SERVER --remote-tab FILE


Only top voted, non community-wiki answers of a minimum length are eligible