Skip to content
This repository has been archived by the owner on Apr 13, 2021. It is now read-only.

Commit

Permalink
Change " into ' and vice versa when eval'ing the completions list in …
Browse files Browse the repository at this point in the history
…Vim.
  • Loading branch information
orestis committed Oct 13, 2008
1 parent fe81e84 commit 6b90905
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Tests/test_codefinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ def testNames(self):
self.assertNamesIsHandled("s%s")
self.assertNamesIsHandled("s|s|b")
self.assertNamesIsHandled("s-s")
self.assertNamesIsHandled("''")
self.assertNamesIsHandled('""')


def testClassProperties(self):
Expand Down
5 changes: 4 additions & 1 deletion pysmell.vim
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ let g:pysmell_matcher='case-insensitive'
python << eopython
from pysmell import vimhelper, idehelper
import vim
import string
TRANSLATEQUOTES = string.maketrans("\'\"", "\"\'")
eopython

function! pysmell#Complete(findstart, base)
Expand Down Expand Up @@ -77,6 +79,7 @@ def vimcompletePYSMELL(origSource, origLineText, origLineNo, origCol, base):

completions = idehelper.findCompletions(base, PYSMELLDICT, options, vim.eval('g:pysmell_matcher'))
output = repr(completions)
vim.command('let g:pysmell_completions = %s' % (output, ))
translated = output.translate(TRANSLATEQUOTES)
vim.command('let g:pysmell_completions = %s' % (translated, ))

eopython

0 comments on commit 6b90905

Please sign in to comment.