소스 검색

change working directory when opening a file

It was discussed whether this should be optional or not and it was
agreed to just make this default behaviour for now.
Øystein Walle 12 년 전
부모
커밋
b35bf399f6
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      plugin/startify.vim

+ 2 - 2
plugin/startify.vim

@@ -52,7 +52,7 @@ function! s:insane_in_the_membrane() abort
         continue
       endif
       call append('$', '   ['. cnt .']'. repeat(' ', 3 - strlen(string(cnt))) . fname)
-      execute 'nnoremap <buffer> '. cnt .' :edit '. startify#escape(fname) .'<cr>'
+      execute 'nnoremap <buffer> '. cnt .' :edit '. startify#escape(fname) .' <bar> lcd %:h<cr>'
       let cnt += 1
       if cnt == numfiles
         break
@@ -80,7 +80,7 @@ function! s:insane_in_the_membrane() abort
       endif
       let cnt += 1
       call append('$', '   ['. cnt .']'. repeat(' ', 3 - strlen(string(cnt))) . fname)
-      execute 'nnoremap <buffer> '. cnt .' :edit '. startify#escape(fname) .'<cr>'
+      execute 'nnoremap <buffer> '. cnt .' :edit '. startify#escape(fname) .' <bar> lcd %:h<cr>'
     endfor
   endif