Skip to content
This repository was archived by the owner on Apr 13, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion pysmell.vim
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,24 @@ if !exists('g:pysmell_matcher')
endif

python << eopython
from pysmell import vimhelper, idehelper
import vim
try:
from pysmell import vimhelper, idehelper
vim.command('let g:pysmell_exists=1')
except:
pass

import string
TRANSLATEQUOTES = string.maketrans("\'\"", "\"\'")
eopython

if !exists('g:pysmell_exists')
if g:pysmell_debug == 1
echo "Error: Required pysmell"
endif
finish
endif

function! pysmell#Complete(findstart, base)
"findstart = 1 when we need to get the text length
if a:findstart == 1
Expand Down
24 changes: 24 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,27 @@ def run(self):


)

setup(
cmdclass={'install': install},
name='mktags',
version='0.1',
packages = ['tags'],
entry_points={
'console_scripts':[
'mktags = tags.tag:mktags',
]
},
)

setup(
cmdclass={'install': install},
name='rmtags',
version='0.1',
packages = ['tags'],
entry_points={
'console_scripts':[
'rmtags = tags.tag:rmtags',
]
},
)
Empty file added tags/__init__.py
Empty file.
29 changes: 29 additions & 0 deletions tags/tag.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
from subprocess import *
import os
import sys
sys.path.append(os.path.abspath(os.path.curdir))
import settings

def run(command):
proc = Popen(command.split(' '), stdout=PIPE)
output = proc.communicate()[0]
if output.strip():
print output

def rmtags():
for root, dirs, files in os.walk('.'):
for name in files:
if name.startswith('PYSMELLTAGS') or name == 'tags':
run('rm {0}'.format(name))

def mktags():
rmtags()

path = '{0}/lib/python{1}.{2}/site-packages'.format(os.environ['VIRTUAL_ENV'], *sys.version_info[:2])

for package in settings.packages:
run('ctags -aR %(path)s/%(package)s' % locals())
run('pysmell -o PYSMELLTAGS.%(package)s %(path)s/%(package)s' % locals())

run('ctags -aR .')
run('pysmell .')