Sessions saved with populated [Location List] windows restore as a populated [Quickfix List] window and an empty [Location List] window.
This creates and unwanted, empty window in the tab and also changes the tab name to "location list"
The above was determined using
:ls
to view the open buffers in the tab.
[1] Save a session that has at least one open tab and contains:
*The location list window with syntax errors should be populated and opened at startup given the .vimrc configuration listed in the "Environment" heading below.
:mksession somefile
[2] Quit vim
[3] Restore the session with
vim -S somefile
[3] Observe that the previously mentioned tab now contains
NeoBundle 'scrooloose/syntastic'
"{{{
"Check if plugin loaded
if !empty(glob("~/.vim/bundle/syntastic/plugin/syntastic.vim"))
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_reuse_loc_lists = 1
let g:syntastic_javascript_checkers = ['jshint']
" Navigation shortcuts for location window
map <expr> <C-Down> (empty(getloclist(0)) ? "" : ":lnext")."\n"
map <expr> <C-Up> (empty(getloclist(0)) ? "" : ":lp")."\n"
endif
" Set location list height to 3 lines
let g:syntastic_loc_list_height=3
"}}}
Try this:
set sessionoptions-=blank
(do that before saving your session, obviously).
Brilliant. That worked. Thank you.
Most helpful comment
Try this:
(do that before saving your session, obviously).