diff --git a/autoload/startify.vim b/autoload/startify.vim index 4198115..3262035 100644 --- a/autoload/startify.vim +++ b/autoload/startify.vim @@ -11,12 +11,11 @@ endif let g:autoloaded_startify = 1 " Init: values {{{1 -let s:numfiles = get(g:, 'startify_files_number', 10) -let s:show_special = get(g:, 'startify_enable_special', 1) -let s:restore_position = get(g:, 'startify_restore_position') -let s:delete_buffers = get(g:, 'startify_session_delete_buffers') -let s:relative_path = get(g:, 'startify_relative_path') -let s:session_dir = resolve(expand(get(g:, 'startify_session_dir', +let s:numfiles = get(g:, 'startify_files_number', 10) +let s:show_special = get(g:, 'startify_enable_special', 1) +let s:delete_buffers = get(g:, 'startify_session_delete_buffers') +let s:relative_path = get(g:, 'startify_relative_path') +let s:session_dir = resolve(expand(get(g:, 'startify_session_dir', \ has('win32') ? '$HOME\vimfiles\session' : '~/.vim/session'))) let s:skiplist = get(g:, 'startify_skiplist', [ @@ -143,13 +142,9 @@ function! startify#insane_in_the_membrane(callingbuffer) abort nnoremap <2-LeftMouse> :execute 'normal' matchstr(getline('.'), '\w\+') nnoremap q :call close() - autocmd startify CursorMoved call s:set_cursor() - if s:restore_position - autocmd startify BufReadPost * call s:restore_position() - endif - call cursor(s:firstline + (s:show_special ? 2 : 0), 5) + autocmd startify CursorMoved call s:set_cursor() silent! doautocmd User Startified endfunction @@ -636,13 +631,6 @@ function! s:get_index_as_string(idx) abort endif endfunction -" Function: s:restore_position {{{1 -function! s:restore_position() abort - autocmd! startify * - if line("'\"") > 0 && line("'\"") <= line('$') - call cursor(getpos("'\"")[1:]) - endif -endfunction " Function: s:print_section_header {{{1 function! s:print_section_header() abort diff --git a/doc/startify.txt b/doc/startify.txt index dc6ce86..f0c2da4 100644 --- a/doc/startify.txt +++ b/doc/startify.txt @@ -100,7 +100,6 @@ default values. |g:startify_custom_indices| |g:startify_custom_header| |g:startify_custom_footer| - |g:startify_restore_position| |g:startify_enable_special| |g:startify_session_savevars| |g:startify_session_savecmds| @@ -321,14 +320,6 @@ Example: \ 'silent !pdfreader ~/latexproject/main.pdf &' \ ] < ------------------------------------------------------------------------------- - *g:startify_restore_position* -> - let g:startify_restore_position = 0 -< -Jump to the last cursor position when opening a file. You don't need this, if -you already have this in your vimrc: |last-position-jump|. - ------------------------------------------------------------------------------ *g:startify_custom_indices* >