How can you use Python in Vim? -


I waste a lot of time between Wim and Python. I see it slow and vice versa to copy-paste it manually from Python to Vime. A good broken example is:

%! I for python in Xrange (25); Print 6 * I \ n

How can you make such changes in Vim? [Solution]

[explanation] I need things to be vim, like print sequence, arithmetic ... - I can not do it in WIM. .

[?] Anyone can expand this point: "Your script works directly on STDIN from (.,%, ...) lines given If you print 'Hello' in 4,5, 6 and 7 lines, you can do this. What I want to do is:

: 4-7! Dragon-c "print" hello '"

The dot modifies the current line Can I print on several lines 7, 32 and 99:

< P>: 7,32,99! Python-C "Print" Hello ""

Not working clearly.

In your any windows, type something like this:

  For x in range (x10): print '- & gt; Select the two views visually (to start V scene mode), and type the following:  
 : python:% d '% x  

Because you have pressed ':' in the visual mode, which will look like the end:

 : '& lt ;;' & Gt ;! Python  

Press Enter and the selection has been replaced with the output of the print statements. You can easily convert it to mapping:

 : vnoremap  

Comments