Use this page to discuss script 2981 2981
- Add constructive comments, bug reports, or discuss improvements (see the guideline).
- Do not document the script here (the author should do that on vim.org).
- This page may be out of date: check the script's vim.org page above, and its release notes.
Comments
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=zen.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.
It require python or python interp.
mattn.
===========================
- Not if you are on windoze and don't have python :-( - You can easily add abbreviations for you own language
I needed to add these to the vim_rc to get it working.
- let g:user_zen_expandabbr_key = '<c-e>'
- let g:use_zen_complete_tag = 1
Change your laguage using
- set filetype=css
- set filetype=html
Love it thanks !
MikeyB
or quick way to get this working on html related template files is to modify the zen_get_filetype function (as of 0.22) function! s:zen_get_filetype() if type == 'htmldjango' | let type = 'html' | endif if type == 'html.django_template' | let type = 'html' | endif
Great work