Vim Tips Wiki
Advertisement

Nice work, but wouldn't something like this be easier?

let zen_profile='...' let zen_abbr=extract_zen_code_from_current_line() python import vim python import zencoding.zen_core as zen exec 'python zen_xtags=parse_into_tree(r"""' . zen_abbr . '""", "' . &ft . '")' exec 'python zen_string=zen_xtags.to_string("' . zen_profile . '")' python vim.command("let zen_result='" + zen_string + "'") " fix indentation and insert at cursor, replacing the zen_abbr call insert_text_into_buffer(zen_result)

MM.

Advertisement