소스 검색

Make commit preview unmodifiable + map q for quit

Andrew Haust 10 년 전
부모
커밋
6286337e5b
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      plug.vim

+ 2 - 0
plug.vim

@@ -1904,6 +1904,8 @@ function! s:preview_commit()
   setlocal filetype=git buftype=nofile nobuflisted
   execute 'silent read !cd' s:shellesc(g:plugs[name].dir) '&& git show --pretty=medium' sha
   normal! gg"_dd
+  setlocal nomodifiable
+  nnoremap <silent> <buffer> q :q<cr>
   wincmd p
 endfunction