Compare commits

...

3 Commits

Author SHA1 Message Date
3be304fc35 vimspector 2022-06-17 11:50:05 +03:00
b297797d61 Замена плагина для CMake 2022-06-17 11:49:36 +03:00
ba31625e03 Plug 2022-06-17 11:49:07 +03:00
2 changed files with 20 additions and 8 deletions

View File

@ -2621,26 +2621,34 @@ 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('.')) let name = s:find_name(line('.'))
endif
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' sha execute 'e' title
else else
execute 'pedit' sha execute 'pedit' title
wincmd P wincmd P
endif endif
setlocal previewwindow filetype=git buftype=nofile nobuflisted modifiable setlocal previewwindow filetype=git buftype=nofile bufhidden=wipe 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).' && git show --no-color --pretty=medium '.sha let cmd = 'cd '.plug#shellescape(g:plugs[name].dir).' && '.command
if s:is_win if s:is_win
let [batchfile, cmd] = s:batchfile(cmd) let [batchfile, cmd] = s:batchfile(cmd)
endif endif

8
vimrc
View File

@ -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/vhdirk/vim-cmake " https://github.com/ilyachur/cmake4vim
" CMake " " CMake "
Plug 'vhdirk/vim-cmake' Plug 'ilyachur/cmake4vim'
Plug 'lervag/vimtex' Plug 'lervag/vimtex'
Plug 'xuhdev/vim-latex-live-preview' Plug 'xuhdev/vim-latex-live-preview'
@ -148,6 +148,10 @@ 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'