From 735eccee90844afa6a684d142ccb9796e2a6f611 Mon Sep 17 00:00:00 2001
From: Teddy Wing
Date: Sat, 28 Jun 2014 08:47:38 -0400
Subject: vimrc: add mapping to split multiple XML tags to separate lines
Faster way of going from
Hello, world!
to
Hello, world!
Respects current indentation length and expandtab value.
---
vimrc | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
(limited to 'vimrc')
diff --git a/vimrc b/vimrc
index 93ddb0f..8d0516d 100644
--- a/vimrc
+++ b/vimrc
@@ -227,6 +227,11 @@
" * Add a statusline item that says what line endings are used in the
" current file. "LF" is used for unix, "CRLF" is used for dos.
"
+" 2014.06.28:
+" * Add mapping to split a line with multiple XML/HTML tags into multiple
+" lines. Something I have to do every now and then and it's kind of a
+" pain to do it manually.
+"
" Pathogen
@@ -547,6 +552,21 @@ nnoremap om :execute '!mate "' . expand('%:p') . '"'
" Open current file in Finder
nnoremap of :execute '!open "' . expand('%:p:h') . '"'
+" HTML
+" Split outer tag on a single line to multiple lines
+" Example:
+" Before:
+" The Land of Chocolate
+" After:
+"
+" The Land of Chocolate
+"
+"
+" Thanks to kdlv on Freenode for helping me realise that I don't need :execute
+" "normal! " here. Turns out in the map, things like "\" are treated
+" literally (as in "\cr>"), which is of course not what I wanted.
+nnoremap hs $Fk0f>a
+
" Commands
--
cgit v1.2.3