2017-01-16 04:50:43 -07:00
|
|
|
" Common preparations for running tests.
|
|
|
|
|
2018-07-24 17:54:14 -07:00
|
|
|
" Only load this once.
|
|
|
|
if exists('s:did_load')
|
|
|
|
finish
|
|
|
|
endif
|
|
|
|
let s:did_load = 1
|
|
|
|
|
2018-02-08 18:25:03 -07:00
|
|
|
" Align Nvim defaults to Vim.
|
|
|
|
set backspace=
|
2019-07-01 14:59:24 -07:00
|
|
|
set directory^=.
|
2018-02-08 16:44:24 -07:00
|
|
|
set fillchars=vert:\|,fold:-
|
2022-02-13 20:35:25 -07:00
|
|
|
set fsync
|
2019-02-04 20:53:03 -07:00
|
|
|
set laststatus=1
|
2019-07-01 14:59:24 -07:00
|
|
|
set listchars=eol:$
|
2021-08-17 11:12:47 -07:00
|
|
|
set joinspaces
|
2021-12-25 15:26:29 -07:00
|
|
|
set nohidden nosmarttab noautoindent noautoread complete-=i noruler noshowcmd
|
2022-07-08 06:13:30 -07:00
|
|
|
set nohlsearch noincsearch
|
2019-07-01 14:59:24 -07:00
|
|
|
set nrformats+=octal
|
|
|
|
set shortmess-=F
|
|
|
|
set sidescroll=0
|
2019-06-14 08:02:58 -07:00
|
|
|
set tags=./tags,tags
|
2019-07-01 14:59:24 -07:00
|
|
|
set undodir^=.
|
|
|
|
set wildoptions=
|
2019-10-01 07:14:00 -07:00
|
|
|
set startofline
|
2021-07-13 10:12:08 -07:00
|
|
|
set sessionoptions+=options
|
2021-08-16 13:05:24 -07:00
|
|
|
set viewoptions+=options
|
2021-08-16 11:20:46 -07:00
|
|
|
set switchbuf=
|
2021-08-16 08:31:14 -07:00
|
|
|
|
2022-05-12 17:28:10 -07:00
|
|
|
" Clear Nvim default mappings.
|
|
|
|
mapclear
|
|
|
|
mapclear!
|
2019-06-14 08:02:58 -07:00
|
|
|
|
2018-02-08 18:25:03 -07:00
|
|
|
" Prevent Nvim log from writing to stderr.
|
|
|
|
let $NVIM_LOG_FILE = exists($NVIM_LOG_FILE) ? $NVIM_LOG_FILE : 'Xnvim.log'
|
|
|
|
|
2017-02-09 19:39:00 -07:00
|
|
|
|
2017-03-21 09:07:00 -07:00
|
|
|
" Make sure 'runtimepath' and 'packpath' does not include $HOME.
|
2017-01-16 04:50:43 -07:00
|
|
|
set rtp=$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after
|
2017-03-21 09:07:00 -07:00
|
|
|
let &packpath = &rtp
|
2017-01-16 04:50:43 -07:00
|
|
|
|
2019-02-02 05:37:26 -07:00
|
|
|
" Avoid storing shell history.
|
|
|
|
let $HISTFILE = ""
|
|
|
|
|
2018-03-27 22:18:39 -07:00
|
|
|
" 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
|
2018-08-07 20:04:01 -07:00
|
|
|
let &shellpipe = &shellredir
|
2018-03-27 22:18:39 -07:00
|
|
|
endif
|
2019-09-15 04:32:34 -07:00
|
|
|
|
|
|
|
" Detect user modules for language providers
|
|
|
|
let $PYTHONUSERBASE = $HOME . '/.local'
|
|
|
|
if executable('gem')
|
|
|
|
let $GEM_PATH = system('gem env gempath')
|
|
|
|
endif
|
|
|
|
|
|
|
|
" Make sure $HOME does not get read or written.
|
|
|
|
let $HOME = expand(getcwd() . '/XfakeHOME')
|
|
|
|
if !isdirectory($HOME)
|
|
|
|
call mkdir($HOME)
|
|
|
|
endif
|