Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

On windows xp and vim 7.3.1105 (Yongwei's build):

:tabnew
:py import vim
:py print(type(vim.current.buffer.name))
<type 'str'> -- THIS

on ubuntu and vim 7.3.1020 (my own build):

:tabnew
:py import vim
:py print(type(vim.current.buffer.name))
<type 'NoneType'> -- AND THIS

why this difference?

share|improve this question
    
What string does the Windows build give you? I think this is too localized to be honest, it really depends on the implementation of the vim module... Do you get this behaviour on any other operating systems? –  Breakthrough Jun 19 '13 at 12:55
    
after ':tabnew', the buffer.name is '' (windows) or None (ubuntu). –  user232284 Jun 19 '13 at 14:37
    
That's what I suspected... I'd expect that Ubuntu would return a string if the buffer name was non-null, but it's just a blank string even on Windows. –  Breakthrough Jun 19 '13 at 15:02
add comment

1 Answer

There have been many recent changes to the Python interface (mainly done by ZyX) in order to improve the Python interface. Python imports have been reworked, too.

Probably the discrepancy is due to the different Vim patch levels. Try again with identical Vim versions. If you have problems with the changed behavior, or detailed questions, please ask them on the vim_dev mailing list. As long as development towards Vim 7.4 is ongoing, the group is still very open to feedback and bug reports.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.