| 171 | == Surround Mappings == |
| 172 | |
| 173 | This is for the popular surround script [http://www.vim.org/scripts/script.php?script_id=1697 here] |
| 174 | |
| 175 | in your .vimrc |
| 176 | {{{ |
| 177 | |
| 178 | let g:surround_{char2nr("b")} = "{% block\1 \r..*\r &\1%}\r{% endblock %}" |
| 179 | let g:surround_{char2nr("i")} = "{% if\1 \r..*\r &\1%}\r{% endif %}" |
| 180 | let g:surround_{char2nr("w")} = "{% with\1 \r..*\r &\1%}\r{% endwith %}" |
| 181 | let g:surround_{char2nr("c")} = "{% comment\1 \r..*\r &\1%}\r{% endcomment %}" |
| 182 | let g:surround_{char2nr("f")} = "{% for\1 \r..*\r &\1%}\r{% endfor %}" |
| 183 | |
| 184 | }}} |
| 185 | |
| 186 | now 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 |