mirror of
https://github.com/neovim/neovim.git
synced 2026-02-20 09:19:43 +10:00
Otherwise it might fail with an existing `tags` file upwards, e.g. in neovim's source directory (which should be rather common).
47 lines
1.1 KiB
VimL
47 lines
1.1 KiB
VimL
" Common preparations for running tests.
|
|
|
|
" Only load this once.
|
|
if exists('s:did_load')
|
|
finish
|
|
endif
|
|
let s:did_load = 1
|
|
|
|
" Align Nvim defaults to Vim.
|
|
set sidescroll=0
|
|
set directory^=.
|
|
set undodir^=.
|
|
set backspace=
|
|
set nrformats+=octal
|
|
set nohidden smarttab noautoindent noautoread complete-=i noruler noshowcmd
|
|
set listchars=eol:$
|
|
set fillchars=vert:\|,fold:-
|
|
set shortmess-=F
|
|
set laststatus=1
|
|
set tags=./tags,tags
|
|
|
|
" Prevent Nvim log from writing to stderr.
|
|
let $NVIM_LOG_FILE = exists($NVIM_LOG_FILE) ? $NVIM_LOG_FILE : 'Xnvim.log'
|
|
|
|
|
|
" Make sure 'runtimepath' and 'packpath' does not include $HOME.
|
|
set rtp=$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after
|
|
let &packpath = &rtp
|
|
|
|
" Avoid storing shell history.
|
|
let $HISTFILE = ""
|
|
|
|
" Make sure $HOME does not get read or written.
|
|
let $HOME = expand(getcwd() . '/XfakeHOME')
|
|
if !isdirectory($HOME)
|
|
call mkdir($HOME)
|
|
endif
|
|
|
|
" Use default shell on Windows to avoid segfault, caused by TUI
|
|
if has('win32')
|
|
let $SHELL = ''
|
|
let $TERM = ''
|
|
let &shell = empty($COMSPEC) ? exepath('cmd.exe') : $COMSPEC
|
|
set shellcmdflag=/s/c shellxquote=\" shellredir=>%s\ 2>&1
|
|
let &shellpipe = &shellredir
|
|
endif
|