From 44134c565b518c529cf0ce51a463bef4e97d7141 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Fri, 11 Dec 2020 10:08:34 +0300 Subject: [PATCH 1/5] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hosts/ptah.vimrc | 1 + 1 file changed, 1 insertion(+) create mode 100644 hosts/ptah.vimrc diff --git a/hosts/ptah.vimrc b/hosts/ptah.vimrc new file mode 100644 index 0000000..2ad9261 --- /dev/null +++ b/hosts/ptah.vimrc @@ -0,0 +1 @@ +set guifont=PragmataPro\ 18 From a188580b8911402f2a07005c1b3c4691a32f1439 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Mon, 21 Dec 2020 11:11:33 +0300 Subject: [PATCH 2/5] shellcheck --- vimrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vimrc b/vimrc index a5038fb..32f89da 100644 --- a/vimrc +++ b/vimrc @@ -129,6 +129,11 @@ Plug 'xuhdev/vim-latex-live-preview' " Python " Plug 'python-mode/python-mode', { 'for': 'python', 'branch': 'develop' } +" https://github.com/itspriddle/vim-shellcheck " +" Shell " +Plug 'itspriddle/vim-shellcheck' + + " Перечисление плагинов заканчивается здесь " call plug#end() From b998997d859bd82621592cd6bc768aa8ffff6200 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Mon, 17 May 2021 10:17:51 +0300 Subject: [PATCH 3/5] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=BD=D1=83=D0=BC=D0=B5=D1=80=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=BA=D0=BE=D0=BB=D0=BE=D0=BD=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vimrc | 1 + 1 file changed, 1 insertion(+) diff --git a/vimrc b/vimrc index 32f89da..95a132a 100644 --- a/vimrc +++ b/vimrc @@ -361,6 +361,7 @@ let g:lightline = { \ 'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}', \ 'character': '%04B', \ 'separator': '|', + \ 'lineinfo': '%3l:%-2v', \ }, \ 'component_function': { \ 'mode': 'LightlineMode', From 11e3b9d1eacc8c230e83eaa86b1b036a2c03116c Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Mon, 17 May 2021 10:18:21 +0300 Subject: [PATCH 4/5] Plug --- autoload/plug.vim | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/autoload/plug.vim b/autoload/plug.vim index c1657f2..6a958cb 100644 --- a/autoload/plug.vim +++ b/autoload/plug.vim @@ -116,6 +116,10 @@ let s:TYPE = { let s:loaded = get(s:, 'loaded', {}) let s:triggers = get(s:, 'triggers', {}) +function! s:is_powershell(shell) + return a:shell =~# 'powershell\(\.exe\)\?$' || a:shell =~# 'pwsh\(\.exe\)\?$' +endfunction + function! s:isabsolute(dir) abort return a:dir =~# '^/' || (has('win32') && a:dir =~? '^\%(\\\|[A-Z]:\)') endfunction @@ -263,7 +267,7 @@ function! s:define_commands() endif if has('win32') \ && &shellslash - \ && (&shell =~# 'cmd\(\.exe\)\?$' || &shell =~# 'powershell\(\.exe\)\?$') + \ && (&shell =~# 'cmd\(\.exe\)\?$' || s:is_powershell(&shell)) return s:err('vim-plug does not support shell, ' . &shell . ', when shellslash is set.') endif if !has('nvim') @@ -503,7 +507,7 @@ if s:is_win let batchfile = s:plug_tempname().'.bat' call writefile(s:wrap_cmds(a:cmd), batchfile) let cmd = plug#shellescape(batchfile, {'shell': &shell, 'script': 0}) - if &shell =~# 'powershell\(\.exe\)\?$' + if s:is_powershell(&shell) let cmd = '& ' . cmd endif return [batchfile, cmd] @@ -935,7 +939,7 @@ function! s:prepare(...) call s:new_window() endif - nnoremap q :if b:plug_preview==1pcendifbd + nnoremap q :call close_pane() if a:0 == 0 call s:finish_bindings() endif @@ -957,6 +961,15 @@ function! s:prepare(...) endif endfunction +function! s:close_pane() + if b:plug_preview == 1 + pc + let b:plug_preview = -1 + else + bd + endif +endfunction + function! s:assign_name() " Assign buffer name let prefix = '[Plugins]' @@ -975,7 +988,7 @@ function! s:chsh(swap) set shell=sh endif if a:swap - if &shell =~# 'powershell\(\.exe\)\?$' || &shell =~# 'pwsh$' + if s:is_powershell(&shell) let &shellredir = '2>&1 | Out-File -Encoding UTF8 %s' elseif &shell =~# 'sh' || &shell =~# 'cmd\(\.exe\)\?$' set shellredir=>%s\ 2>&1 @@ -1532,7 +1545,7 @@ while 1 " Without TCO, Vim stack is bound to explode let [error, _] = s:git_validate(spec, 0) if empty(error) if pull - let cmd = ['git', 'fetch'] + let cmd = s:git_version_requirement(2) ? ['git', '-c', 'credential.helper=', 'fetch'] : ['git', 'fetch'] if has_tag && !empty(globpath(spec.dir, '.git/shallow')) call extend(cmd, ['--depth', '99999999']) endif @@ -2216,7 +2229,7 @@ function! plug#shellescape(arg, ...) let script = get(opts, 'script', 1) if shell =~# 'cmd\(\.exe\)\?$' return s:shellesc_cmd(a:arg, script) - elseif shell =~# 'powershell\(\.exe\)\?$' || shell =~# 'pwsh$' + elseif s:is_powershell(shell) return s:shellesc_ps1(a:arg) endif return s:shellesc_sh(a:arg) @@ -2268,7 +2281,7 @@ function! s:system(cmd, ...) return system(a:cmd) endif let cmd = join(map(copy(a:cmd), 'plug#shellescape(v:val, {"shell": &shell, "script": 0})')) - if &shell =~# 'powershell\(\.exe\)\?$' + if s:is_powershell(&shell) let cmd = '& ' . cmd endif else From 6148c3922913f6f6e3a2c3aeeba640eda09ebc85 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Tue, 18 May 2021 07:57:29 +0300 Subject: [PATCH 5/5] =?UTF-8?q?=D0=92=D0=B0=D1=80=D0=B8=D0=B0=D0=BD=D1=82?= =?UTF-8?q?=20=D1=80=D0=B5=D0=B3=D1=83=D0=BB=D1=8F=D1=80=D0=BD=D1=8B=D1=85?= =?UTF-8?q?=20=D0=B2=D1=8B=D1=80=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8=D0=B9=20?= =?UTF-8?q?=D0=B4=D0=BB=D1=8F=20=D0=BE=D0=BF=D1=80=D0=B5=D0=B4=D0=B5=D0=BB?= =?UTF-8?q?=D1=91=D0=BD=D0=BD=D1=8B=D1=85=20=D1=82=D0=B8=D0=BF=D0=BE=D0=B2?= =?UTF-8?q?=20=D1=84=D0=B0=D0=B9=D0=BB=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vimrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vimrc b/vimrc index 95a132a..35121f1 100644 --- a/vimrc +++ b/vimrc @@ -144,6 +144,9 @@ call plug#end() syntax on filetype plugin indent on +" Выбор движка для регулярных выражений +autocmd FileType ruby,tex set regexpengine=1 + " Отключен режим совместимости " set nocompatible