@ Ответ Björn Winckler показывает, как это сделать для файлов, открытых через поисковые устройства и другие механизмы открытия ОС.
Если вы хотите работать с mvim командой найти файл mvim
и изменяет линии в нижней части от
if [ "$gui" ]; then
# Note: this isn't perfect, because any error output goes to the
# terminal instead of the console log.
# But if you use open instead, you will need to fully qualify the
# path names for any filenames you specify, which is hard.
exec "$binary" -g $opts ${1:+"[email protected]"}
else
exec "$binary" $opts ${1:+"[email protected]"}
fi
в
if [ "$gui" ]; then
# Note: this isn't perfect, because any error output goes to the
# terminal instead of the console log.
# But if you use open instead, you will need to fully qualify the
# path names for any filenames you specify, which is hard.
#make macvim open stuff in the same window instead of new ones
if $tabs && [[ `$binary --serverlist` = "VIM" ]]; then
exec "$binary" -g $opts --remote ${1:+"[email protected]"}
else
exec "$binary" -g $opts ${1:+"[email protected]"}
fi
else
exec "$binary" $opts ${1:+"[email protected]"}
fi
Это сделает все файлы, открытые с помощью команды линия открывается в том же окне.
Кроме того, если вы хотите, чтобы файл, чтобы открыть тот же буфер, если этот файл уже открыт вместо расщепления или добавить новую вкладку
au VimEnter,BufWinEnter * NERDTreeFind
к вашему gvimrc (так, чтобы не мешать вашей обычной VIM)
(эта последняя часть требует, чтобы у вас NERDTree установлен)
Удостоверьтесь, что вы рассматриваете более новые ответы как этот, так и другие: http://stackoverflow.com/a/23927976/724752 –