Changes between Version 45 and Version 46 of UsingVimWithDjango


Ignore:
Timestamp:
Mar 5, 2010, 6:12:35 AM (15 years ago)
Author:
mjbrownie
Comment:

Added a surround mapping note

Legend:

Unmodified
Added
Removed
Modified
  • UsingVimWithDjango

    v45 v46  
    169169}}}
    170170
     171== Surround Mappings ==
     172
     173This is for the popular surround script [http://www.vim.org/scripts/script.php?script_id=1697 here]
     174
     175in your .vimrc
     176{{{
     177
     178let g:surround_{char2nr("b")} = "{% block\1 \r..*\r &\1%}\r{% endblock %}"
     179let g:surround_{char2nr("i")} = "{% if\1 \r..*\r &\1%}\r{% endif %}"
     180let g:surround_{char2nr("w")} = "{% with\1 \r..*\r &\1%}\r{% endwith %}"
     181let g:surround_{char2nr("c")} = "{% comment\1 \r..*\r &\1%}\r{% endcomment %}"
     182let g:surround_{char2nr("f")} = "{% for\1 \r..*\r &\1%}\r{% endfor %}"
     183
     184}}}
     185
     186now in visual mode type
     187
     188    * 'sb' for block
     189    * 'si' for an if statement
     190    * 'sw' for a with statement
     191    * 'sc' for a comment
     192    * 'sf' for a for statement
    171193
    172194== Suggestions ==
Back to Top