Skip to content

Commit

Permalink
Revert "IPython bug fix"
Browse files Browse the repository at this point in the history
This reverts commit 5be78b3.
  • Loading branch information
jpalardy committed May 8, 2019
1 parent 9540e70 commit 92421f0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ftplugin/python/slime.vim
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ if !exists("g:slime_dispatch_ipython_pause")
end

function! _EscapeText_python(text)
if exists('g:slime_python_ipython')
let empty_lines_pat = '\(^\|\n\)\zs\(\s*\n\+\)\+'
let no_empty_lines = substitute(a:text, empty_lines_pat, "#\n", "g")
return [no_empty_lines, g:slime_dispatch_ipython_pause, "\n"]
if exists('g:slime_python_ipython') && len(split(a:text,"\n")) > 1
return ["%cpaste -q\n", g:slime_dispatch_ipython_pause, a:text, "--\n"]
else
let empty_lines_pat = '\(^\|\n\)\zs\(\s*\n\+\)\+'
let no_empty_lines = substitute(a:text, empty_lines_pat, "", "g")
Expand Down

2 comments on commit 92421f0

@betoharres
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @jpalardy! Great library! I just installed on my vimrc and was blown away with the magic and wanted to say thanks for the work, it made me smile in front of my computer 😄

@jpalardy
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@betoharres I'm glad you like it!

Please sign in to comment.