VIM Writing HTML - Editors
This is a discussion on VIM Writing HTML - Editors ; Hi
The following has revolutionised my HTML development, I write a lot of
HTML but have only just learnt about
dat,yat,cat (delete,yank,change) a tag
ie dat will delete a whole table if cursor anyway over <table>
ie yat will yank ...
-
VIM Writing HTML
Hi
The following has revolutionised my HTML development, I write a lot of
HTML but have only just learnt about
dat,yat,cat (delete,yank,change) a tag
ie dat will delete a whole table if cursor anyway over <table>
ie yat will yank a whole tablerow if cursor over <tr>
dit,yit,cit will empty a tag pair
da< just deletes a single tag
di< empties a tag
:help text-objects
seems to work with XML as well
Thanks to person who told me about these commands
--
zzapper
http://motivation-tips.co.uk/
-
Re: VIM Writing HTML
Le Thu, 07 Jun 2007 10:31:28 -0700, zzapper a écrit:
> The following has revolutionised my HTML development, I write a lot of
> HTML but have only just learnt about
>
> dat,yat,cat (delete,yank,change) a tag
>
Thank you, I didn't know either, and it's very helpful.
By the way, is there (maybe with an apropriate plugin) some way to
automaticaly complete the last opened tag by its closing version ?
Manuel.
-
Re: VIM Writing HTML
mpg scripsit:
> Le Thu, 07 Jun 2007 10:31:28 -0700, zzapper a écrit:
>> The following has revolutionised my HTML development, I write a lot of
>> HTML but have only just learnt about
>> dat,yat,cat (delete,yank,change) a tag
> Thank you, I didn't know either, and it's very helpful.
>
> By the way, is there (maybe with an apropriate plugin) some way to
> automaticaly complete the last opened tag by its closing version ?
</<c-x><c-o>
m.
--
LaTeX + Vim = http://vim-latex.sourceforge.net/
Vim Universal Templates: http://vim.sf.net/script.php?script_id=1078
vim.pl - http://skawina.eu.org/mikolaj
CLEWN - http://clewn.sf.net
-
Re: VIM Writing HTML
mpg <manuel.pg@free.fr> wrote:
> By the way, is there (maybe with an apropriate plugin) some way to
> automaticaly complete the last opened tag by its closing version ?
A shameless plug :-) for my own script.
http://www.vim.org/scripts/script.php?script_id=632
Don't forget to vote if you like it!!!
description
In insert mode, typing anyword,,, gets translated to an xml element
named 'anyword'
Example 1:
anyword,,,<cr><tab>xsl:if,,, ==>
<anyword>
<xsl:if>
</xsl:if>
</anyword>
with the cursor after the element open tag.
If anyword is not on a line by itself, no newline is added.
Example 2:
This is a bold,,, statement ==> This is a <bold>statement</bold>
Use it all the time myself, in docbook and with some custom dtd's.
See vimtip #465
install details
just source it from ftplugin/xml.vim or ~/.vimrc or _vimrc
Bart
-
Re: VIM Writing HTML
On Jun 8, 6:36 pm, Mikolaj Machowski <mikm...@wp.pl> wrote:
> mpg scripsit:
>
> </<c-x><c-o>
Here something buried lonely and forgotten in my .vimrc
" type table,,, to get <table></table> ### Cool ###
imap ,,, <esc>bdwa<<esc>pa><cr></<esc>pa><esc>kA
--
David Rayner
http://motivation-tips.co.uk/
-
Re: VIM Writing HTML
zzapper <zzapper@gmail.com> wrote:
> " type table,,, to get <table></table> ### Cool ###
> imap ,,, <esc>bdwa<<esc>pa><cr></<esc>pa><esc>kA
http://www.vim.org/scripts/script.php?script_id=632
Bart
Similar Threads
-
By Application Development in forum DOTNET
Replies: 6
Last Post: 12-07-2007, 07:06 PM
-
By Application Development in forum Javascript
Replies: 5
Last Post: 06-20-2007, 10:26 AM
-
By Application Development in forum DOTNET
Replies: 1
Last Post: 05-05-2005, 06:33 AM
-
By Application Development in forum Perl
Replies: 0
Last Post: 03-16-2005, 07:19 PM
-
By Application Development in forum Perl
Replies: 1
Last Post: 07-15-2003, 09:02 AM