Compare commits
No commits in common. "3be304fc35d765604fcb6e756d629b72b07c112e" and "b2d961aa32ffa5e40e7c71ed0890342e2854f0ba" have entirely different histories.
3be304fc35
...
b2d961aa32
@ -2621,34 +2621,26 @@ function! s:preview_commit()
|
|||||||
|
|
||||||
let sha = matchstr(getline('.'), '^ \X*\zs[0-9a-f]\{7,9}')
|
let sha = matchstr(getline('.'), '^ \X*\zs[0-9a-f]\{7,9}')
|
||||||
if empty(sha)
|
if empty(sha)
|
||||||
let name = matchstr(getline('.'), '^- \zs[^:]*\ze:$')
|
|
||||||
if empty(name)
|
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
let title = 'HEAD@{1}..'
|
|
||||||
let command = 'git diff --no-color HEAD@{1}'
|
|
||||||
else
|
|
||||||
let title = sha
|
|
||||||
let command = 'git show --no-color --pretty=medium '.sha
|
|
||||||
let name = s:find_name(line('.'))
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
let name = s:find_name(line('.'))
|
||||||
if empty(name) || !has_key(g:plugs, name) || !isdirectory(g:plugs[name].dir)
|
if empty(name) || !has_key(g:plugs, name) || !isdirectory(g:plugs[name].dir)
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if exists('g:plug_pwindow') && !s:is_preview_window_open()
|
if exists('g:plug_pwindow') && !s:is_preview_window_open()
|
||||||
execute g:plug_pwindow
|
execute g:plug_pwindow
|
||||||
execute 'e' title
|
execute 'e' sha
|
||||||
else
|
else
|
||||||
execute 'pedit' title
|
execute 'pedit' sha
|
||||||
wincmd P
|
wincmd P
|
||||||
endif
|
endif
|
||||||
setlocal previewwindow filetype=git buftype=nofile bufhidden=wipe nobuflisted modifiable
|
setlocal previewwindow filetype=git buftype=nofile nobuflisted modifiable
|
||||||
let batchfile = ''
|
let batchfile = ''
|
||||||
try
|
try
|
||||||
let [sh, shellcmdflag, shrd] = s:chsh(1)
|
let [sh, shellcmdflag, shrd] = s:chsh(1)
|
||||||
let cmd = 'cd '.plug#shellescape(g:plugs[name].dir).' && '.command
|
let cmd = 'cd '.plug#shellescape(g:plugs[name].dir).' && git show --no-color --pretty=medium '.sha
|
||||||
if s:is_win
|
if s:is_win
|
||||||
let [batchfile, cmd] = s:batchfile(cmd)
|
let [batchfile, cmd] = s:batchfile(cmd)
|
||||||
endif
|
endif
|
||||||
|
8
vimrc
8
vimrc
@ -129,9 +129,9 @@ Plug 'henry4k/vim-fontzoom'
|
|||||||
" Опции для отдельных проектов "
|
" Опции для отдельных проектов "
|
||||||
Plug 'elnull/vim-dfutil' | Plug 'elnull/vimprj'
|
Plug 'elnull/vim-dfutil' | Plug 'elnull/vimprj'
|
||||||
|
|
||||||
" https://github.com/ilyachur/cmake4vim
|
" https://github.com/vhdirk/vim-cmake
|
||||||
" CMake "
|
" CMake "
|
||||||
Plug 'ilyachur/cmake4vim'
|
Plug 'vhdirk/vim-cmake'
|
||||||
|
|
||||||
Plug 'lervag/vimtex'
|
Plug 'lervag/vimtex'
|
||||||
Plug 'xuhdev/vim-latex-live-preview'
|
Plug 'xuhdev/vim-latex-live-preview'
|
||||||
@ -148,10 +148,6 @@ Plug 'kergoth/vim-bitbake'
|
|||||||
" Python "
|
" Python "
|
||||||
Plug 'python-mode/python-mode', { 'for': 'python', 'branch': 'develop' }
|
Plug 'python-mode/python-mode', { 'for': 'python', 'branch': 'develop' }
|
||||||
|
|
||||||
" https://github.com/puremourning/vimspector "
|
|
||||||
" Multi language graphical debugger "
|
|
||||||
Plug 'puremourning/vimspector'
|
|
||||||
|
|
||||||
" https://github.com/itspriddle/vim-shellcheck "
|
" https://github.com/itspriddle/vim-shellcheck "
|
||||||
" Shell "
|
" Shell "
|
||||||
Plug 'itspriddle/vim-shellcheck'
|
Plug 'itspriddle/vim-shellcheck'
|
||||||
|
Loading…
Reference in New Issue
Block a user