app-vim/editorconfig-vim: Remove old

Closes: https://bugs.gentoo.org/737356
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2020-09-09 15:05:09 +02:00
parent 6a7c66e261
commit 5e5dd45eb8
7 changed files with 0 additions and 430 deletions

View File

@@ -1,3 +1 @@
DIST editorconfig-vim-0.3.3.tar.gz 35395 BLAKE2B a7b65c1472024017dd408e5c4ac5048004d0bd55f44c7cfba49b5973cb445125ed89cc3d4363fb902a4c5fbb507f3ee5ed0ca48aece3fb6915e643bae0dbf70c SHA512 2dd968cf6bb162db8e6242ffb60cc61fb05a8042804b6b46b9f9cd35be968f83b473f04797e47c5cff11d7c052ff523bf8ba1d568992d44b72b97b54a81425a1
DIST editorconfig-vim-1.0.0-beta.tar.gz 31519 BLAKE2B 2d5e8e55e8dccc0b45453b8da9ecad80867a84d1ea20146581886f793c093c201521a7d1d4451122ae441d30f58acec28d29aa20da9de737b5beb7f44d55c0ed SHA512 159e3ca32a7ffe71853ba62a14d0469310b81345b0e704dd6a9f42c56f6f6b9a3f63502ccabcf43a15443acf4acefdaf078063ae747f49315b89f5518d7f9816
DIST editorconfig-vim-1.1.1.tar.gz 33287 BLAKE2B 4c79ac3bf1f82ca6182480ab2f3c2ee24b8234f5845c63d90434bb57271981554a0651d8bc0314c718ad9700adf7903fed45f5e400d8ae8a0b6d42932e89e071 SHA512 7b94db4b2f641ecd2d2623bf55bf9b457c007b2b5c8553cba5b7a75bc34823d6995d3c9ed13febe0f59de6f87c52eb0367591213c43c6fcd7c331c529126f4d6

View File

@@ -1,42 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=(python3_6)
inherit python-single-r1 vim-plugin
DESCRIPTION="vim plugin: Support EditorConfig files "
HOMEPAGE="https://editorconfig.org/"
SRC_URI="https://github.com/${PN%-vim}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD-2"
KEYWORDS="~amd64 ~x86"
IUSE=""
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
DEPEND="
${PYTHON_DEPS}
$(python_gen_cond_dep '
dev-python/editorconfig-core-py[${PYTHON_MULTI_USEDEP}]
')
|| (
app-editors/vim[python,${PYTHON_SINGLE_USEDEP}]
app-editors/gvim[python,${PYTHON_SINGLE_USEDEP}]
)"
RDEPEND="${DEPEND}"
PATCHES=(
"${FILESDIR}/${P}-python3.patch"
"${FILESDIR}/${P}-max-line-length-off.patch"
"${FILESDIR}/${P}-fixes.patch"
)
VIM_PLUGIN_HELPFILES="${PN%-vim}.txt"
src_prepare() {
default
rm LICENSE mkzip.sh .editorconfig .gitignore .travis.yml || die
rm -r tests plugin/${PN%-vim}-core-py || die
}

View File

@@ -1,39 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit vim-plugin
MY_PV="${PV//_/-}"
MY_P="${PN}-${MY_PV}"
DESCRIPTION="vim plugin: Support EditorConfig files "
HOMEPAGE="https://editorconfig.org/"
SRC_URI="https://github.com/${PN%-vim}/${PN}/archive/v${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
S="${WORKDIR}/${MY_P}"
LICENSE="BSD-2 PSF-2"
KEYWORDS="~amd64 ~x86"
VIM_PLUGIN_HELPFILES="${PN%-vim}.txt"
PATCHES=(
"${FILESDIR}/editorconfig-vim-1.0.0_beta-wildcard-slash.patch"
)
src_prepare() {
default
rm LICENSE LICENSE.PSF \
mkzip.sh .editorconfig \
.git{ignore,modules} \
.{travis,appveyor}.yml || die
}
src_install() {
# we don't want to install the tests
rm -r tests || die
vim-plugin_src_install
}

View File

@@ -1,92 +0,0 @@
diff --git a/doc/editorconfig.txt b/doc/editorconfig.txt
index bd6173b..3b32012 100644
--- a/doc/editorconfig.txt
+++ b/doc/editorconfig.txt
@@ -79,7 +79,8 @@ empty. There are 3 modes currently: "external_command", "python_builtin",
"python_external".
python_builtin: Use the vim built-in python to run the python version
- EditorConfig Core.
+ EditorConfig Core. In this mode, Python 2.5 or higher
+ is required.
python_external: Use an external python interpreter to run the python
version EditorConfig Core.
external_command: Run external EditorConfig Core.
diff --git a/plugin/editorconfig.vim b/plugin/editorconfig.vim
index af4f630..9abd008 100644
--- a/plugin/editorconfig.vim
+++ b/plugin/editorconfig.vim
@@ -121,15 +121,15 @@ function! s:FindPythonFiles() " {{{1
let l:python_core_files_dir = fnamemodify(
\ findfile(g:EditorConfig_python_files_dir . '/main.py',
- \ ','.&runtimepath), ':p:h')
+ \ fnameescape(','.&runtimepath)), ':p:h')
if empty(l:python_core_files_dir)
let l:python_core_files_dir = ''
else
- " expand python core file path to full path, and remove the appending '/'
- let l:python_core_files_dir = substitute(
- \ fnamemodify(l:python_core_files_dir, ':p'), '/$', '', '')
+ " expand python core file path to full path, and remove the appending '/'
+ let l:python_core_files_dir = substitute(
+ \ fnamemodify(l:python_core_files_dir, ':p'), '/$', '', '')
endif
let &shellslash = l:old_shellslash
@@ -247,7 +247,7 @@ function! s:InitializePythonBuiltin(editorconfig_core_py_dir) " {{{2
" The following line modifies l:ret. This is a bit confusing but
" unfortunately to be compatible with Vim 7.3, we cannot use pyeval. This
" should be changed in the future.
- execute s:pyfile_cmd s:pyscript_path
+ execute s:pyfile_cmd fnameescape(s:pyscript_path)
return l:ret
endfunction
@@ -327,14 +327,19 @@ endif
function! s:UseConfigFiles()
+ let l:buffer_name = expand('%:p')
" ignore buffers without a name
- if empty(expand('%:p'))
+ if empty(l:buffer_name)
return
endif
+ if g:EditorConfig_verbose
+ echo 'Applying EditorConfig on file "' . l:buffer_name . '"'
+ endif
+
" Ignore specific patterns
for pattern in g:EditorConfig_exclude_patterns
- if expand('%:p') =~ pattern
+ if l:buffer_name =~ pattern
return
endif
endfor
@@ -386,8 +391,8 @@ endfunction
function! s:UseConfigFiles_Python_External() " {{{2
" Use external python interp to run the python EditorConfig Core
- let l:cmd = s:editorconfig_python_interp . ' ' .
- \ s:editorconfig_core_py_dir . '/main.py'
+ let l:cmd = shellescape(s:editorconfig_python_interp) . ' ' .
+ \ shellescape(s:editorconfig_core_py_dir . '/main.py')
call s:SpawnExternalParser(l:cmd)
@@ -445,6 +450,11 @@ function! s:SpawnExternalParser(cmd) " {{{2
return
endif
+ if g:EditorConfig_verbose
+ echo 'Output from EditorConfig core executable:'
+ echo l:parsing_result
+ endif
+
for one_line in l:parsing_result
let l:eq_pos = stridx(one_line, '=')

View File

@@ -1,20 +0,0 @@
commit 6e7011712398e53671e5a44edefeb68914562a3a
Author: Hong Xu <hong@topbug.net>
Date: Wed Apr 6 00:34:26 2016 -0700
Support max_line_length=off to leave the decision to the editor settings.
diff --git a/plugin/editorconfig.vim b/plugin/editorconfig.vim
index 9abd008..0e9d647 100644
--- a/plugin/editorconfig.vim
+++ b/plugin/editorconfig.vim
@@ -563,7 +563,8 @@ function! s:ApplyConfig(config) " {{{1
endif
" highlight the columns following max_line_length
- if has_key(a:config, 'max_line_length')
+ if has_key(a:config, 'max_line_length') &&
+ \ a:config['max_line_length'] != 'off'
let l:max_line_length = str2nr(a:config['max_line_length'])
if l:max_line_length >= 0

View File

@@ -1,213 +0,0 @@
commit c2b7a104b826b7ff9283d32cb95a039ddccde79b
Author: Shunsuke Shimizu <grafi@grafi.jp>
Date: Sun Jan 10 00:12:10 2016 -0800
Make the plugin to be compatible with Python 3.
Squashed commit of the following:
commit 0973c5179e504ffbd74a38d6557bb49fe3bf8b5d
Author: Hong Xu <hong@topbug.net>
Date: Sun Jan 10 00:11:11 2016 -0800
Some minor corrections
commit ca17e97e86bd6379bcf3782adfa200c1589cab69
Author: Shunsuke Shimizu <grafi@grafi.jp>
Date: Sun Jan 10 15:24:13 2016 +0900
vim 7.3 support by using `py[3]` command instead of `py[3]eval()` function
commit c51ae80ce0ca8fe24c014a7c2d54a85d604d3c88
Author: grafi <grafi@grafi.jp>
Date: Sun Jan 10 14:42:38 2016 +0900
use print_function on python2
commit 401a9486bba7528aa4d54b06b8ef3ace582829c9
Author: grafi <grafi@grafi.jp>
Date: Sun Jan 10 14:33:25 2016 +0900
assure that sys.path is cleaned
commit f3bf442429d9579a336a1bb8f98fee82710fbd1e
Author: grafi <grafi@grafi.jp>
Date: Sun Jan 10 14:22:45 2016 +0900
python3 style print
commit 8e059379328b23e4253f76cbd72d3ef484501d42
Author: Shunsuke Shimizu <grafi@grafi.jp>
Date: Sat Dec 26 07:54:49 2015 +0900
Support python3
diff --git a/plugin/editorconfig.py b/plugin/editorconfig.py
new file mode 100644
index 0000000..21ea9c7
--- /dev/null
+++ b/plugin/editorconfig.py
@@ -0,0 +1,42 @@
+from __future__ import print_function
+
+try:
+ try:
+ import vim
+ import sys
+ except:
+ vim.command('let l:ret = 2')
+ raise
+
+ try:
+ sys.path.insert(0, vim.eval('a:editorconfig_core_py_dir'))
+
+ import editorconfig
+ import editorconfig.exceptions as editorconfig_except
+ except:
+ vim.command('let l:ret = 3')
+ raise
+ finally:
+ del sys.path[0]
+
+ # `ec_` prefix is used in order to keep clean Python namespace
+ ec_data = {}
+
+ def ec_UseConfigFiles():
+ ec_data['filename'] = vim.eval("expand('%:p')")
+ ec_data['conf_file'] = ".editorconfig"
+
+ try:
+ ec_data['options'] = editorconfig.get_properties(ec_data['filename'])
+ except editorconfig_except.EditorConfigError as e:
+ if int(vim.eval('g:EditorConfig_verbose')) != 0:
+ print(str(e), file=sys.stderr)
+ vim.command('let l:ret = 1')
+ return
+
+ for key, value in ec_data['options'].items():
+ vim.command("let l:config['" + key.replace("'", "''") + "'] = " +
+ "'" + value.replace("'", "''") + "'")
+
+except:
+ pass
diff --git a/plugin/editorconfig.vim b/plugin/editorconfig.vim
index a21b103..af4f630 100644
--- a/plugin/editorconfig.vim
+++ b/plugin/editorconfig.vim
@@ -36,6 +36,8 @@ let g:loaded_EditorConfig = 1
let s:saved_cpo = &cpo
set cpo&vim
+let s:pyscript_path = expand('<sfile>:p:r') . '.py'
+
" variables {{{1
if !exists('g:EditorConfig_exec_path')
let g:EditorConfig_exec_path = ''
@@ -231,48 +233,23 @@ function! s:InitializePythonBuiltin(editorconfig_core_py_dir) " {{{2
let s:builtin_python_initialized = 1
- let l:ret = 0
-
- if !has('python')
+ if has('python')
+ let s:pyfile_cmd = 'pyfile'
+ let s:py_cmd = 'py'
+ elseif has('python3')
+ let s:pyfile_cmd = 'py3file'
+ let s:py_cmd = 'py3'
+ else
return 1
endif
- python << EEOOFF
-
-try:
- import vim
- import sys
-except:
- vim.command('let l:ret = 2')
-
-EEOOFF
-
- if l:ret != 0
- return l:ret
- endif
-
- python << EEOOFF
-
-try:
- sys.path.insert(0, vim.eval('a:editorconfig_core_py_dir'))
-
- import editorconfig
- import editorconfig.exceptions as editorconfig_except
-
-except:
- vim.command('let l:ret = 3')
-
-del sys.path[0]
-
-ec_data = {} # used in order to keep clean Python namespace
-
-EEOOFF
-
- if l:ret != 0
- return l:ret
- endif
+ let l:ret = 0
+ " The following line modifies l:ret. This is a bit confusing but
+ " unfortunately to be compatible with Vim 7.3, we cannot use pyeval. This
+ " should be changed in the future.
+ execute s:pyfile_cmd s:pyscript_path
- return 0
+ return l:ret
endfunction
" Do some initalization for the case that the user has specified core mode {{{1
@@ -388,41 +365,22 @@ augroup END
function! s:UseConfigFiles_Python_Builtin() " {{{2
" Use built-in python to run the python EditorConfig core
- let l:config = {}
- let l:ret = 0
-
" ignore buffers that do not have a file path associated
if empty(expand('%:p'))
return 0
endif
- python << EEOOFF
-
-ec_data['filename'] = vim.eval("expand('%:p')")
-ec_data['conf_file'] = ".editorconfig"
-
-try:
- ec_data['options'] = editorconfig.get_properties(ec_data['filename'])
-except editorconfig_except.EditorConfigError as e:
- if int(vim.eval('g:EditorConfig_verbose')) != 0:
- print >> sys.stderr, str(e)
- vim.command('let l:ret = 1')
+ let l:config = {}
-EEOOFF
+ let l:ret = 0
+ execute s:py_cmd 'ec_UseConfigFiles()'
if l:ret != 0
return l:ret
endif
- python << EEOOFF
-for key, value in ec_data['options'].items():
- vim.command("let l:config['" + key.replace("'", "''") + "'] = " +
- "'" + value.replace("'", "''") + "'")
-
-EEOOFF
-
call s:ApplyConfig(l:config)
- return 0
+ return l:ret
endfunction
function! s:UseConfigFiles_Python_External() " {{{2

View File

@@ -1,22 +0,0 @@
From 8b533e933f1e4904daae72e9d84f939cd18ffca8 Mon Sep 17 00:00:00 2001
From: Chris White <cxwembedded@gmail.com>
Date: Sat, 20 Jul 2019 13:14:57 -0400
Subject: [PATCH] '?' wildcard does not match '/' (fixes #124)
---
autoload/editorconfig_core/fnmatch.vim | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/autoload/editorconfig_core/fnmatch.vim b/autoload/editorconfig_core/fnmatch.vim
index 14833bf0..6f60db5d 100644
--- a/autoload/editorconfig_core/fnmatch.vim
+++ b/autoload/editorconfig_core/fnmatch.vim
@@ -199,7 +199,7 @@ function! editorconfig_core#fnmatch#translate(pat, ...)
endif
elseif l:current_char ==# '?'
- let l:result .= '\_.'
+ let l:result .= '\_[^/]'
elseif l:current_char ==# '['
if l:in_brackets