<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>kusnier.net - Kusnier Sebastian</title>
	<atom:link href="http://kusnier.net/feed" rel="self" type="application/rss+xml" />
	<link>http://kusnier.net</link>
	<description>Diplom-Informatiker</description>
	<lastBuildDate>Mon, 23 Aug 2010 20:20:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Git &#8211; SVN Crash Course</title>
		<link>http://kusnier.net/development/git-svn-crash-course</link>
		<comments>http://kusnier.net/development/git-svn-crash-course#comments</comments>
		<pubDate>Mon, 23 Aug 2010 20:20:31 +0000</pubDate>
		<dc:creator>Sebastian Kusnier</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Git]]></category>

		<guid isPermaLink="false">http://kusnier.net/?p=556</guid>
		<description><![CDATA[Git for SVN user]]></description>
			<content:encoded><![CDATA[<p><a title="Git - SVN Crash Course" href="http://git.or.cz/course/svn.html">Git for SVN user</a></p>
]]></content:encoded>
			<wfw:commentRss>http://kusnier.net/development/git-svn-crash-course/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MacVim 7.3 is out</title>
		<link>http://kusnier.net/development/macvim-7-3-is-out</link>
		<comments>http://kusnier.net/development/macvim-7-3-is-out#comments</comments>
		<pubDate>Tue, 17 Aug 2010 19:27:47 +0000</pubDate>
		<dc:creator>Sebastian Kusnier</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Vi-IMproved]]></category>
		<category><![CDATA[gvim]]></category>
		<category><![CDATA[macvim]]></category>

		<guid isPermaLink="false">http://kusnier.net/?p=548</guid>
		<description><![CDATA[But i am need my special version with perl, python and ruby interpreter. This steps are needed to create this special version git clone git://github.com/b4winckler/macvim.git vim73 cd vim73/src ./configure --with-features=huge --enable-cscope --enable-pythoninterp \ --enable-rubyinterp --enable-perlinterp --with-macarchs=x86_64 \ --with-macsdk=10.6 make open MacVim/build/Release/ copy MacVim.app to  Applications]]></description>
			<content:encoded><![CDATA[<p>But i am need my special version with perl, python and ruby interpreter.</p>
<p>This steps are needed to create this special version</p>
<pre>git clone git://github.com/b4winckler/macvim.git vim73
cd vim73/src
./configure --with-features=huge --enable-cscope --enable-pythoninterp \
  --enable-rubyinterp --enable-perlinterp --with-macarchs=x86_64 \
  --with-macsdk=10.6
make
open MacVim/build/Release/
</pre>
<p>copy MacVim.app to  Applications</p>
]]></content:encoded>
			<wfw:commentRss>http://kusnier.net/development/macvim-7-3-is-out/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GVIM: Has your menu disappeared and you want it back?</title>
		<link>http://kusnier.net/development/gvim-has-your-menu-disappeared-and-you-want-it-back</link>
		<comments>http://kusnier.net/development/gvim-has-your-menu-disappeared-and-you-want-it-back#comments</comments>
		<pubDate>Tue, 17 Aug 2010 15:32:23 +0000</pubDate>
		<dc:creator>Sebastian Kusnier</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Vi-IMproved]]></category>
		<category><![CDATA[gvim]]></category>

		<guid isPermaLink="false">http://kusnier.net/?p=546</guid>
		<description><![CDATA[rm ~/.gnome2/Vim]]></description>
			<content:encoded><![CDATA[<pre>rm ~/.gnome2/Vim</pre>
]]></content:encoded>
			<wfw:commentRss>http://kusnier.net/development/gvim-has-your-menu-disappeared-and-you-want-it-back/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vim: xml.vim (Summary, Mappings)</title>
		<link>http://kusnier.net/development/vim-xml-vim-summary-mappings</link>
		<comments>http://kusnier.net/development/vim-xml-vim-summary-mappings#comments</comments>
		<pubDate>Sat, 24 Jul 2010 08:36:24 +0000</pubDate>
		<dc:creator>Sebastian Kusnier</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Vi-IMproved]]></category>
		<category><![CDATA[gvim]]></category>
		<category><![CDATA[macvim]]></category>
		<category><![CDATA[mappings]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://kusnier.net/?p=542</guid>
		<description><![CDATA[A filetype plugin to help edit XML and SGML documents. Mappings &#60;LocalLeader&#62;&#60;LocalLeader&#62; Normal or Insert &#8211; Continue editing after the ending tag. This option requires xml_jump_string to be set to function. When a tag is completed it will append the xml_jump_string. Once this mapping is ran it will delete the next xml_jump_string pattern to the [...]]]></description>
			<content:encoded><![CDATA[<p>A filetype plugin to help edit XML and SGML documents.</p>
<h2>Mappings</h2>
<ul>
<li><span style="color: #ff0000;">&lt;LocalLeader&gt;&lt;LocalLeader&gt;</span><br />
Normal or Insert &#8211; Continue editing after the ending tag. This option requires xml_jump_string to be set to function. When a tag is completed it will append the xml_jump_string. Once this mapping is ran it will delete the next xml_jump_string pattern to the right of the curser and delete it leaving you in insert mode to continue editing.</li>
<li><span style="color: #ff0000;">&lt;LocalLeader&gt;w</span><br />
Normal &#8211; Will clear the entire file of left over xml_jump_string garbage.<br />
This will also happen automatically when you save the file.</li>
<li><span style="color: #ff0000;">&lt;LocalLeader&gt;x</span><br />
Visual &#8211; Place a custom XML tag to suround the selected text. You need to have selected text in visual mode before you can use this mapping. (surround.vim and zencoding.vim does this too)</li>
<li><span style="color: #ff0000;">&lt;LocalLeader&gt;.</span> or      <span style="color: #ff0000;">&lt;LocalLeader&gt;&gt;</span><br />
Insert &#8211; Place a literal &#8216;&gt;&#8217; without parsing tag.</li>
<li><span style="color: #ff0000;">&lt;LocalLeader&gt;5</span> or      <span style="color: #ff0000;">&lt;LocalLeader&gt;%</span><br />
Normal or Visual &#8211; Jump to the begining or end tag. (matchit.vim does this too)</li>
<li><span style="color: #ff0000;">&lt;LocalLeader&gt;d</span><br />
Normal &#8211; Deletes the surrounding tags from the cursor. (surround.vim does this too)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://kusnier.net/development/vim-xml-vim-summary-mappings/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vim: SQL Completion (Summary)</title>
		<link>http://kusnier.net/development/vim-sql-completion-summary</link>
		<comments>http://kusnier.net/development/vim-sql-completion-summary#comments</comments>
		<pubDate>Sun, 18 Jul 2010 16:37:18 +0000</pubDate>
		<dc:creator>Sebastian Kusnier</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Vi-IMproved]]></category>
		<category><![CDATA[gvim]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://kusnier.net/?p=527</guid>
		<description><![CDATA[The Structured Query Language (SQL) is a standard which specifies statements that allow a user to interact with a relational database.  Vim includes features for navigation, indentation and syntax highlighting. 1. SQL Dialects sql-dialects sql-types sybase TSQL Transact-SQL sqlanywhere oracle plsql sqlj sqlserver mysql postgress psql informix 1.1 SQLSetType For the people that work with [...]]]></description>
			<content:encoded><![CDATA[<p>The Structured Query Language (SQL) is a standard which specifies statements that allow a user to interact with a relational database.  Vim includes features for navigation, indentation and syntax highlighting.</p>
<h3>1. SQL Dialects</h3>
<ul>
<li>sql-dialects sql-types</li>
<li>sybase TSQL Transact-SQL</li>
<li>sqlanywhere</li>
<li>oracle plsql sqlj</li>
<li>sqlserver</li>
<li>mysql postgress psql</li>
<li>informix</li>
</ul>
<h3>1.1 SQLSetType</h3>
<p>For the people that work with many different databases, it is nice to be able to flip between the various vendors rules (indent, syntax) on a per buffer basis, at any time.  The ftplugin/sql.vim file defines this function:</p>
<p><strong>SQLSetType</strong></p>
<p>Executing this function without any parameters will set the indent and syntax scripts back to their defaults.</p>
<h3>1.2 SQL Dialect Default</h3>
<p>As mentioned earlier, the default syntax rules for Vim is based on Oracle (PL/SQL).  You can override this default by placing one of the following in your vimrc:</p>
<pre>let g:sql_type_default = 'sqlanywhere'</pre>
<h3>2. SQL Completion Tutorial</h3>
<p>First, create a new buffer:</p>
<pre>:e tutorial.sql</pre>
<h3>Static features</h3>
<p>To take you through the various lists, simply enter insert mode, hit:<br />
<span style="color: #ff0000;">&lt;C-C&gt;s</span> (show SQL statements)</p>
<p>At this point, you can page down through the list until you find &#8220;select&#8221;.<br />
If you are familiar with the item you are looking for, for example you know<br />
the statement begins with the letter &#8220;s&#8221;.  You can type ahead (without the<br />
quotes) &#8220;se&#8221; then press:<br />
<span style="color: #ff0000;">&lt;C-Space&gt;t</span></p>
<p>Assuming &#8220;select&#8221; is highlighted in the popup list press <span style="color: #ff0000;">&lt;Enter&gt;</span> to choose<br />
the entry.  Now type:</p>
<pre>fr<span style="color: #ff0000;">&lt;C-C&gt;a</span> (show all syntax items)</pre>
<p>choose &#8220;from&#8221; from the popup list.</p>
<p>When writing stored procedures using the &#8220;type&#8221; list is useful.  It contains<br />
a list of all the database supported types.  This may or may not be true<br />
depending on the syntax file you are using.  The SQL Anywhere syntax file<br />
(sqlanywhere.vim) has support for this: &gt;</p>
<pre>BEGIN
  DECLARE customer_id <span style="color: #ff0000;">&lt;C-C&gt;T</span> &lt;-- Choose a type from the list
</pre>
<h3>Dynamic features</h3>
<p>To take advantage of the dynamic features you must first install the<br />
dbext.vim plugin (http://vim.sourceforge.net/script.php?script_id=356).  It<br />
also comes with a tutorial.</p>
<p>Assuming you have followed the dbext-tutorial you can press <span style="color: #ff0000;">&lt;C-C&gt;</span>t to<br />
display a list of tables.  There is a delay while dbext is creating the table<br />
list.  After the list is displayed press <span style="color: #ff0000;">&lt;C-W&gt;</span>.  This will remove both the<br />
popup window and the table name already chosen when the list became active. &gt;</p>
<h3>2.1 Table Completion:</h3>
<p>Press <span style="color: #ff0000;">&lt;C-C&gt;</span>t to display a list of tables from within the database you<br />
have connected via the dbext plugin.</p>
<h3>2.2 Column Completion:</h3>
<p>The SQL completion plugin can also display a list of columns for particular<br />
tables.  The column completion is trigger via <span style="color: #ff0000;">&lt;C-C&gt;c</span>.</p>
<p>Example of using column completion:</p>
<ul>
<li> Press <span style="color: #ff0000;">&lt;C-C&gt;t</span> again to display the list of tables.</li>
<li> When the list is displayed in the completion window, press <span style="color: #ff0000;">&lt;Right&gt;</span>, this will replace the list of tables, with a list of columns for the table highlighted (after the same short delay).</li>
<li> If you press <span style="color: #ff0000;">&lt;Left&gt;</span>, this will again replace the column list with the list of tables.  This allows you to drill into tables and column lists very quickly.</li>
<li> Press <span style="color: #ff0000;">&lt;Right&gt;</span> again while the same table is highlighted.  You will notice there is no delay since the column list has been cached.  If you change the schema of a cached table you can press <span style="color: #ff0000;">&lt;C-C&gt;R</span>, which clears the SQL completion cache.</li>
</ul>
<p>Lets look how we can build a SQL statement dynamically.  A select statement requires a list of columns.  There are two ways to build a column list using the SQL completion plugin.<br />
One column at a time:</p>
<ol>
<li> After typing SELECT press <span style="color: #ff0000;">&lt;C-C&gt;</span>t to display a list of tables.</li>
<li> Choose a table from the list.</li>
<li> Press <span style="color: #ff0000;">&lt;Right&gt;</span> to display a list of columns.</li>
<li> Choose the column from the list and press enter.</li>
<li> Enter a &#8220;,&#8221; and press <span style="color: #ff0000;">&lt;C-C&gt;c</span>.  Generating a column list generally requires having the cursor on a table name.  The plugin uses this name to determine what table to retrieve the column list. In this step, since we are pressing <span style="color: #ff0000;">&lt;C-C&gt;c</span> without the cursor on a table name the column list displayed will be for the previous table.  Choose a different column and move on.</li>
<li> Repeat step 5 as often as necessary.</li>
</ol>
<p>All columns for a table:</p>
<ol>
<li> After typing SELECT press <span style="color: #ff0000;">&lt;C-C&gt;t</span> to display a list of tables.</li>
<li> Highlight the table you need the column list for.</li>
<li> Press <span style="color: #ff0000;">&lt;Enter&gt;</span> to choose the table from the list.</li>
<li> Press <span style="color: #ff0000;">&lt;C-C&gt;l</span> to request a comma separated list of all columns for this table.</li>
<li> Based on the table name chosen in step 3, the plugin attempts to decide on a reasonable table alias.  You are then prompted to either accept of change the alias.  Press OK.</li>
<li> The table name is replaced with the column list of the table is replaced with the comma separate list of columns with the alias prepended to each of the columns.</li>
<li> Step 3 and 4 can be replaced by pressing <span style="color: #ff0000;">&lt;C-C&gt;L</span>, which has a <span style="color: #ff0000;">&lt;C-Y&gt;</span> embedded in the map to choose the currently highlighted table in the list.</li>
</ol>
<p>There is a special provision when writing select statements.  Consider the<br />
following statement:</p>
<pre>select *
  from customer c,
          contact cn,
          department as dp,
          employee e,
          site_options so
  where c.
</pre>
<p>In INSERT mode after typing the final &#8220;c.&#8221; which is an alias for the &#8220;customer&#8221; table, you can press either<span style="color: #ff0000;"> &lt;C-C&gt;c</span> or <span style="color: #ff0000;">&lt;C-X&gt;&lt;C-O&gt;</span>.  This will popup a list of columns for the customer table.  It does this by looking back<br />
to the beginning of the select statement and finding a list of the tables specified in the FROM clause.  In this case it notes that in the string &#8220;customer c&#8221;, &#8220;c&#8221; is an alias for the customer table.  The optional &#8220;AS&#8221; keyword is also supported, &#8220;customer AS c&#8221;. &gt;</p>
<h3>3.0 SQL Maps</h3>
<p>The default SQL maps have been described in other sections of this document in greater detail.  Here is a list of the maps with a brief description of each.</p>
<h3>Static Maps</h3>
<p>These are maps which use populate the completion list using Vim&#8217;s syntax highlighting rules.</p>
<ul>
<li> <span style="color: #ff0000;">&lt;C-C&gt;a</span> &#8211; Displays all SQL syntax items.</li>
<li> <span style="color: #ff0000;">&lt;C-C&gt;k</span> &#8211; Displays all SQL syntax items defined as &#8216;sqlKeyword&#8217;.</li>
<li> <span style="color: #ff0000;">&lt;C-C&gt;f</span> &#8211; Displays all SQL syntax items defined as &#8216;sqlFunction.</li>
<li> <span style="color: #ff0000;">&lt;C-C&gt;o</span> &#8211; Displays all SQL syntax items defined as &#8216;sqlOption&#8217;.</li>
<li> <span style="color: #ff0000;">&lt;C-C&gt;T</span> &#8211; Displays all SQL syntax items defined as &#8216;sqlType&#8217;.</li>
<li> <span style="color: #ff0000;">&lt;C-C&gt;s</span> &#8211; Displays all SQL syntax items defined as &#8216;sqlStatement&#8217;.</li>
</ul>
<h3>Dynamic Maps</h3>
<p>These are maps which use populate the completion list using the dbext.vim plugin.</p>
<ul>
<li> <span style="color: #ff0000;">&lt;C-C&gt;t </span>- Displays a list of tables.</li>
<li> <span style="color: #ff0000;">&lt;C-C&gt;p</span> &#8211; Displays a list of procedures.</li>
<li> <span style="color: #ff0000;">&lt;C-C&gt;v</span> &#8211; Displays a list of views.</li>
<li> <span style="color: #ff0000;">&lt;C-C&gt;c</span> &#8211; Displays a list of columns for a specific table.</li>
<li> <span style="color: #ff0000;">&lt;C-C&gt;l</span> &#8211; Displays a comma separated list of columns for a specific table.</li>
<li><span style="color: #ff0000;">&lt;C-C&gt;L</span> &#8211; Displays a comma separated list of columns for a specific table. This should only be used when the completion window is active.</li>
<li> <span style="color: #ff0000;">&lt;Right&gt;</span> &#8211; Displays a list of columns for the table currently highlighted in the completion window.  &lt;Right&gt; is not recognized on most Unix systems, so this maps is only created on the Windows platform. If you would like the same feature on Unix, choose a different key and make the same map in your vimrc. &gt;</li>
<li> <span style="color: #ff0000;">&lt;Left&gt;</span> &#8211; Displays the list of tables.<br />
&lt;Left&gt; is not recognized on most Unix systems, so this maps is only created on the Windows platform.  If you would like the same feature on Unix, choose a different key and make the same map in your vimrc.</li>
<li> <span style="color: #ff0000;">&lt;C-C&gt;R</span> &#8211; This maps removes all cached items and forces the SQL completion to regenerate the list of items.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://kusnier.net/development/vim-sql-completion-summary/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vim: Insert the contents fo numbered or named register</title>
		<link>http://kusnier.net/development/vim-insert-the-contents-fo-numbered-or-named-register</link>
		<comments>http://kusnier.net/development/vim-insert-the-contents-fo-numbered-or-named-register#comments</comments>
		<pubDate>Mon, 21 Jun 2010 08:07:36 +0000</pubDate>
		<dc:creator>Sebastian Kusnier</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Vi-IMproved]]></category>

		<guid isPermaLink="false">http://kusnier.net/?p=524</guid>
		<description><![CDATA[CTRL-R {0-9a-z&#8221;%#:-=.} (insert mode) Insert the contents of a numbered or named register.  Between typing CTRL-R and the second character &#8216;&#8221;&#8216; will be displayed to indicate that you are expected to enter the name of a register. Special registers: &#8220; &#8211; the unnamed register, containing the text of the last delete or yank % &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #ff0000;">CTRL-R {0-9a-z&#8221;%#:-=.} <span style="color: #c0c0c0;">(insert mode)</span><br />
</span></p>
<p>Insert the contents of a numbered or named register.  Between typing CTRL-R and the second character &#8216;&#8221;&#8216; will be displayed to indicate that you are expected to enter the name of a register.</p>
<p>Special registers:</p>
<ul>
<li><span style="color: #ff0000;">&#8220;</span> &#8211; the unnamed register, containing the text of the last delete or yank</li>
<li><span style="color: #ff0000;">%</span> &#8211; the current file name</li>
<li><span style="color: #ff0000;">#</span> &#8211; the alternate file name</li>
<li><span style="color: #ff0000;">*</span> &#8211; the clipboard contents (X11: primary selection)</li>
<li><span style="color: #ff0000;">+</span> &#8211; the clipboard contents</li>
<li><span style="color: #ff0000;">/</span> &#8211; the last search pattern</li>
<li><span style="color: #ff0000;">:</span> &#8211; the last command-line</li>
<li><span style="color: #ff0000;">-</span> &#8211; the last small (less than a line) delete</li>
<li><span style="color: #ff0000;">. </span>- the last inserted text</li>
<li><span style="color: #ff0000;">=</span> &#8211; the expression register: you are prompted to enter an expression (see |expression|) (doesn&#8217;t work at the expression prompt; some things such as changing the buffer or current window are not allowed to avoid side effects) When the result is a |List| the items are used as lines.  They can have line breaks inside too. When the result is a Float it&#8217;s automatically converted to a String.</li>
</ul>
<p>The expression register is very nice for calculating.<br />
<span style="color: #ff0000;">CTRL-R =</span>, then type 5*5 and you will get the result in the buffer.</p>
]]></content:encoded>
			<wfw:commentRss>http://kusnier.net/development/vim-insert-the-contents-fo-numbered-or-named-register/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zen Coding: VIM Tutorial</title>
		<link>http://kusnier.net/development/zen-coding-vim-tutorial</link>
		<comments>http://kusnier.net/development/zen-coding-vim-tutorial#comments</comments>
		<pubDate>Sun, 14 Mar 2010 17:30:58 +0000</pubDate>
		<dc:creator>Sebastian Kusnier</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Vi-IMproved]]></category>
		<category><![CDATA[Zen Coding]]></category>

		<guid isPermaLink="false">http://kusnier.net/?p=475</guid>
		<description><![CDATA[vimrc: let g:user_zen_leader_key = &#8216;&#60;c-k&#62;&#8216; 1. Expand Abbreviation div&#62;p#foo$*3&#62;a Type &#60;c-k&#62;, &#60;div&#62; &#60;p id="foo1"&#62; &#60;a href=""&#62;&#60;/a&#62; &#60;/p&#62; &#60;p id="foo2"&#62; &#60;a href=""&#62;&#60;/a&#62; &#60;/p&#62; &#60;p id="foo3"&#62; &#60;a href=""&#62;&#60;/a&#62; &#60;/p&#62; &#60;/div&#62; 2. Wrap with Abbreviation 1st line 2nd line 3rd line 4th line Use visual mode to select the lines and type &#60;c-k&#62;, Enter &#8216;ul&#62;li*&#8217; as Tag. &#60;ul&#62; [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #888888;">vimrc: let g:user_zen_leader_key = &#8216;<span style="color: #800000;">&lt;c-k&gt;</span>&#8216;</span></p>
<h3>1. Expand Abbreviation</h3>
<pre class="vimhtml">div&gt;p#foo$*3&gt;a</pre>
<p>Type <span style="color: #ff0000;">&lt;c-k&gt;,</span></p>
<pre class="vimhtml"><span class="Identifier">&lt;</span><span class="Statement">div</span><span class="Identifier">&gt;</span>
  <span class="Identifier">&lt;</span><span class="Statement">p</span><span class="Identifier"> </span><span class="Type">id</span><span class="Identifier">=</span><span class="Constant">"foo1"</span><span class="Identifier">&gt;</span>
    <span class="Identifier">&lt;</span><span class="Statement">a</span><span class="Identifier"> </span><span class="Type">href</span><span class="Identifier">=</span><span class="Constant">""</span><span class="Identifier">&gt;</span><span class="Identifier">&lt;/</span><span class="Statement">a</span><span class="Identifier">&gt;</span>
  <span class="Identifier">&lt;/</span><span class="Statement">p</span><span class="Identifier">&gt;</span>
  <span class="Identifier">&lt;</span><span class="Statement">p</span><span class="Identifier"> </span><span class="Type">id</span><span class="Identifier">=</span><span class="Constant">"foo2"</span><span class="Identifier">&gt;</span>
    <span class="Identifier">&lt;</span><span class="Statement">a</span><span class="Identifier"> </span><span class="Type">href</span><span class="Identifier">=</span><span class="Constant">""</span><span class="Identifier">&gt;</span><span class="Identifier">&lt;/</span><span class="Statement">a</span><span class="Identifier">&gt;</span>
  <span class="Identifier">&lt;/</span><span class="Statement">p</span><span class="Identifier">&gt;</span>
  <span class="Identifier">&lt;</span><span class="Statement">p</span><span class="Identifier"> </span><span class="Type">id</span><span class="Identifier">=</span><span class="Constant">"foo3"</span><span class="Identifier">&gt;</span>
    <span class="Identifier">&lt;</span><span class="Statement">a</span><span class="Identifier"> </span><span class="Type">href</span><span class="Identifier">=</span><span class="Constant">""</span><span class="Identifier">&gt;</span><span class="Identifier">&lt;/</span><span class="Statement">a</span><span class="Identifier">&gt;</span>
  <span class="Identifier">&lt;/</span><span class="Statement">p</span><span class="Identifier">&gt;</span>
<span class="Identifier">&lt;/</span><span class="Statement">div</span><span class="Identifier">&gt;</span></pre>
<h3>2. Wrap with Abbreviation</h3>
<pre class="vimhtml">1st line
2nd line
3rd line
4th line</pre>
<p>Use visual mode to select the lines and type <span style="color: #ff0000;">&lt;c-k&gt;,</span><br />
Enter &#8216;ul&gt;li*&#8217;  as Tag.</p>
<pre class="vimhtml"><span class="Identifier">&lt;</span><span class="Statement">ul</span><span class="Identifier">&gt;</span>
  <span class="Identifier">&lt;</span><span class="Statement">li</span><span class="Identifier">&gt;</span>1st line<span class="Identifier">&lt;/</span><span class="Statement">li</span><span class="Identifier">&gt;</span>
  <span class="Identifier">&lt;</span><span class="Statement">li</span><span class="Identifier">&gt;</span>2nd line<span class="Identifier">&lt;/</span><span class="Statement">li</span><span class="Identifier">&gt;</span>
  <span class="Identifier">&lt;</span><span class="Statement">li</span><span class="Identifier">&gt;</span>3rd line<span class="Identifier">&lt;/</span><span class="Statement">li</span><span class="Identifier">&gt;</span>
  <span class="Identifier">&lt;</span><span class="Statement">li</span><span class="Identifier">&gt;</span>4th line<span class="Identifier">&lt;/</span><span class="Statement">li</span><span class="Identifier">&gt;</span>
<span class="Identifier">&lt;/</span><span class="Statement">ul</span><span class="Identifier">&gt;</span></pre>
<p>If you type tag as &#8216;div&#8217;, then you&#8217;ll get following.</p>
<pre class="vimhtml"><span class="Identifier">&lt;</span><span class="Statement">div</span><span class="Identifier">&gt;</span>
  1st line
  2nd line
  3rd line
  4th line
<span class="Identifier">&lt;/</span><span class="Statement">div</span><span class="Identifier">&gt;</span></pre>
<h3>3. Balance Tag Inward</h3>
<pre class="vimhtml"><span class="Identifier">&lt;</span><span class="Statement">div</span><span class="Identifier">&gt;</span>
  <span class="Identifier">&lt;</span><span class="Statement">ul</span><span class="Identifier">&gt;</span>
    <span class="Identifier">&lt;</span><span class="Statement">li</span><span class="Identifier">&gt;</span>test1<span class="Identifier">&lt;/</span><span class="Statement">li</span><span class="Identifier">&gt;</span>
    <span class="Identifier">&lt;</span><span class="Statement">li</span><span class="Identifier">&gt;</span>t|est2<span class="Identifier">&lt;/</span><span class="Statement">li</span><span class="Identifier">&gt;</span>
    <span class="Identifier">&lt;</span><span class="Statement">li</span><span class="Identifier">&gt;</span>test3<span class="Identifier">&lt;/</span><span class="Statement">li</span><span class="Identifier">&gt;</span>
  <span class="Identifier">&lt;/</span><span class="Statement">ul</span><span class="Identifier">&gt;</span>
<span class="Identifier">&lt;/</span><span class="Statement">div</span><span class="Identifier">&gt;</span></pre>
<p>Type <span style="color: #ff0000;">&lt;c-k&gt;d</span> in insert mode.<br />
(Alternative: vit)</p>
<pre class="vimhtml"><span class="Identifier">&lt;</span><span class="Statement">div</span><span class="Identifier">&gt;</span>
  <span class="Identifier">&lt;</span><span class="Statement">ul</span><span class="Identifier">&gt;</span>
    <span class="Identifier">&lt;</span><span class="Statement">li</span><span class="Identifier">&gt;</span>test1<span class="Identifier">&lt;/</span><span class="Statement">li</span><span class="Identifier">&gt;</span>
    <span class="Selected"><span class="Identifier">&lt;</span><span class="Statement">li</span><span class="Identifier">&gt;</span>test2<span class="Identifier">&lt;/</span><span class="Statement">li</span><span class="Identifier">&gt;</span></span>
    <span class="Identifier">&lt;</span><span class="Statement">li</span><span class="Identifier">&gt;</span>test3<span class="Identifier">&lt;/</span><span class="Statement">li</span><span class="Identifier">&gt;</span>
  <span class="Identifier">&lt;/</span><span class="Statement">ul</span><span class="Identifier">&gt;</span>
<span class="Identifier">&lt;/</span><span class="Statement">div</span><span class="Identifier">&gt;</span></pre>
<h3>4. Balance Tag Outward</h3>
<p>Type <span style="color: #ff0000;">&lt;c-k&gt;D</span> in insert mode.<br />
(Alternative: vat)</p>
<pre class="vimhtml"><span class="Identifier">&lt;</span><span class="Statement">div</span><span class="Identifier">&gt;</span>
  <span class="Identifier">&lt;</span><span class="Statement">ul</span><span class="Identifier">&gt;</span>
    <span class="Identifier">&lt;</span><span class="Statement">li</span><span class="Identifier">&gt;</span>test1<span class="Identifier">&lt;/</span><span class="Statement">li</span><span class="Identifier">&gt;</span>
    <span class="Identifier">&lt;</span><span class="Statement">li</span><span class="Identifier">&gt;</span><span class="Selected">test2</span><span class="Identifier">&lt;/</span><span class="Statement">li</span><span class="Identifier">&gt;</span>
    <span class="Identifier">&lt;</span><span class="Statement">li</span><span class="Identifier">&gt;</span>test3<span class="Identifier">&lt;/</span><span class="Statement">li</span><span class="Identifier">&gt;</span>
  <span class="Identifier">&lt;/</span><span class="Statement">ul</span><span class="Identifier">&gt;</span>
<span class="Identifier">&lt;/</span><span class="Statement">div</span><span class="Identifier">&gt;</span></pre>
<h3>5. Go to Next/Previous Edit Point</h3>
<p>Type <span style="color: #ff0000;">&lt;c-k&gt;n</span> to go to the  next edit point in insert mode.<br />
Type <span style="color: #ff0000;">&lt;c-k&gt;N</span> to go to the previous edit point in insert mode.</p>
<pre class="vimhtml"><span class="Identifier">&lt;</span><span class="Statement">div</span><span class="Identifier">&gt;</span>
  <span class="Identifier">&lt;</span><span class="Statement">ul</span><span class="Identifier">&gt;</span>
    <span class="Identifier">&lt;</span><span class="Statement">li</span><span class="Identifier">&gt;</span>|<span class="Identifier">&lt;/</span><span class="Statement">li</span><span class="Identifier">&gt;</span>
    <span class="Identifier">&lt;</span><span class="Statement">li</span><span class="Identifier">&gt;</span>|<span class="Identifier">&lt;/</span><span class="Statement">li</span><span class="Identifier">&gt;</span>
    <span class="Identifier">&lt;</span><span class="Statement">li</span><span class="Identifier">&gt;</span>|<span class="Identifier">&lt;/</span><span class="Statement">li</span><span class="Identifier">&gt;</span>
  <span class="Identifier">&lt;/</span><span class="Statement">ul</span><span class="Identifier">&gt;</span>
<span class="Identifier">&lt;/</span><span class="Statement">div</span><span class="Identifier">&gt;</span></pre>
<h3>6. Update &lt;img&gt; Size</h3>
<p>Move cursor over the img tag and press <span style="color: #ff0000;">&lt;c-k&gt;i</span></p>
<pre class="vimhtml"><span class="Identifier">&lt;</span><span class="Statement">img</span><span class="Identifier"> </span><span class="Type">src</span><span class="Identifier">=</span><span class="Constant">"foo.png"</span><span class="Identifier"> </span><span class="Type">width</span><span class="Identifier">=</span><span class="Constant" style="background-color:lighred;">"32"</span><span class="Identifier"> </span><span class="Type">height</span><span class="Identifier">=</span><span class="Constant" style="background-color:lighred;">"32"</span><span class="Identifier"> /&gt;</span></pre>
<h3>7. Merge Lines</h3>
<p>Use visual mode to select lines.</p>
<pre class="vimhtml"><span class="Identifier">&lt;</span><span class="Statement">ul</span><span class="Identifier">&gt;</span>
  <span class="Identifier">&lt;</span><span class="Statement">li</span><span class="Identifier"> </span><span class="Type">class</span><span class="Identifier">=</span><span class="Constant">"list1"</span><span class="Identifier">&gt;</span><span class="Identifier">&lt;/</span><span class="Statement">li</span><span class="Identifier">&gt;</span>
  <span class="Identifier">&lt;</span><span class="Statement">li</span><span class="Identifier"> </span><span class="Type">class</span><span class="Identifier">=</span><span class="Constant">"list2"</span><span class="Identifier">&gt;</span><span class="Identifier">&lt;/</span><span class="Statement">li</span><span class="Identifier">&gt;</span>
  <span class="Identifier">&lt;</span><span class="Statement">li</span><span class="Identifier"> </span><span class="Type">class</span><span class="Identifier">=</span><span class="Constant">"list3"</span><span class="Identifier">&gt;</span><span class="Identifier">&lt;/</span><span class="Statement">li</span><span class="Identifier">&gt;</span>
<span class="Identifier">&lt;/</span><span class="Statement">ul</span><span class="Identifier">&gt;</span></pre>
<p>and type <span style="color: #ff0000;">J</span></p>
<pre class="vimhtml"><span class="Identifier">&lt;</span><span class="Statement">ul</span><span class="Identifier">&gt;</span>
  <span class="Identifier">&lt;</span><span class="Statement">li</span><span class="Identifier"> </span><span class="Type">class</span><span class="Identifier">=</span><span class="Constant">"list1"</span><span class="Identifier">&gt;</span><span class="Identifier">&lt;/</span><span class="Statement">li</span><span class="Identifier">&gt;</span><span class="Identifier">&lt;</span><span class="Statement">li</span><span class="Identifier"> </span><span class="Type">class</span><span class="Identifier">=</span><span class="Constant">"list2"</span><span class="Identifier">&gt;</span><span class="Identifier">&lt;/</span><span class="Statement">li</span><span class="Identifier">&gt;</span><span class="Identifier">&lt;</span><span class="Statement">li</span><span class="Identifier"> </span><span class="Type">class</span><span class="Identifier">=</span><span class="Constant">"list3"</span><span class="Identifier">&gt;</span><span class="Identifier">&lt;/</span><span class="Statement">li</span><span class="Identifier">&gt;</span>
<span class="Identifier">&lt;/</span><span class="Statement">ul</span><span class="Identifier">&gt;</span></pre>
<h3>8. Remove Tag</h3>
<pre class="vimhtml"><span class="Identifier">&lt;</span><span class="Statement">div</span><span class="Identifier"> </span><span class="Type">class</span><span class="Identifier">=</span><span class="Constant">"foo"</span><span class="Identifier">&gt;</span>
  <span class="Identifier">&lt;</span><span class="Statement">a</span><span class="Identifier">&gt;</span>cursor is here<span class="Identifier">&lt;/</span><span class="Statement">a</span><span class="Identifier">&gt;</span>
<span class="Identifier">&lt;/</span><span class="Statement">div</span><span class="Identifier">&gt;</span></pre>
<p>Press <span style="color: #ff0000;">&lt;c-k&gt;k</span> to remove the tag under the cusor</p>
<pre class="vimhtml"><span class="Identifier">&lt;</span><span class="Statement">div</span><span class="Identifier"> </span><span class="Type">class</span><span class="Identifier">=</span><span class="Constant">"foo"</span><span class="Identifier">&gt;</span>

<span class="Identifier">&lt;/</span><span class="Statement">div</span><span class="Identifier">&gt;</span></pre>
<h3>9. Split/Join Tag</h3>
<pre class="vimhtml"><span class="Identifier">&lt;</span><span class="Statement">div</span><span class="Identifier"> </span><span class="Type">class</span><span class="Identifier">=</span><span class="Constant">"foo"</span><span class="Identifier">&gt;</span>
  cursor is here
<span class="Identifier">&lt;/</span><span class="Statement">div</span><span class="Identifier">&gt;</span></pre>
<p>Press <span style="color: #ff0000;">&lt;c-k&gt;j</span> to join the, press it to split it again</p>
<pre class="vimhtml"><span class="Identifier">&lt;</span><span class="Statement">div</span><span class="Identifier"> </span><span class="Type">class</span><span class="Identifier">=</span><span class="Constant">"foo"</span><span class="Identifier">/&gt;</span></pre>
<h3>10. Toggle Comment</h3>
<pre class="vimhtml"><span class="Identifier">&lt;</span><span class="Statement">div</span><span class="Identifier">&gt;</span>
  hello world
<span class="Identifier">&lt;/</span><span class="Statement">div</span><span class="Identifier">&gt;</span></pre>
<p>Type <span style="color: #ff0000;">&lt;c-k&gt;/</span> to toggle comment for the block</p>
<pre class="vimhtml"><span class="Comment">&lt;!</span><span class="Comment">-- &lt;div&gt;</span>
<span class="Comment">  hello world</span>
<span class="Comment">&lt;/div&gt; --</span><span class="Comment">&gt;</span></pre>
<h3>11. Make anchor from URL</h3>
<pre class="vimhtml">http://kusnier.net</pre>
<p>Type <span style="color: #ff0000;">&lt;c-k&gt;a</span></p>
<pre class="vimhtml"><span class="Identifier">&lt;</span><span class="Statement">a</span><span class="Identifier"> </span><span class="Type">href</span><span class="Identifier">=</span><span class="Constant">"<a href="http://kusnier.net">http://kusnier.net</a>"</span><span class="Identifier">&gt;</span><span class="Underlined">kusnier.net </span><span class="Special">&amp;#8211;</span><span class="Underlined"> Kusnier Sebastian</span><span class="Identifier">&lt;/</span><span class="Statement">a</span><span class="Identifier">&gt;</span></pre>
<h3>12. Make quoted text from URL</h3>
<pre class="vimhtml"><a href="http://www.vim.org">http://www.vim.org</a></pre>
<p>Type <span style="color: #ff0000;">&lt;c-k&gt;A</span></p>
<pre class="vimhtml"><span class="Identifier">&lt;</span><span class="Statement">blockquote</span><span class="Identifier"> </span><span class="Type">class</span><span class="Identifier">=</span><span class="Constant">"quote"</span><span class="Identifier">&gt;</span>
  <span class="Identifier">&lt;</span><span class="Statement">a</span><span class="Identifier"> </span><span class="Type">href</span><span class="Identifier">=</span><span class="Constant">"<a href="http://www.vim.org">http://www.vim.org</a>"</span><span class="Identifier">&gt;</span><span class="Underlined">welcome home : vim online</span><span class="Identifier">&lt;/</span><span class="Statement">a</span><span class="Identifier">&gt;</span><span class="Identifier">&lt;</span><span class="Statement">br</span><span class="Identifier"> /&gt;</span>
  <span class="Identifier">&lt;</span><span class="Statement">p</span><span class="Identifier">&gt;</span>Links added to comment on scripts [2010-02-21] The collection of Vim scripts keeps growing. It gets ...<span class="Identifier">&lt;/</span><span class="Statement">p</span><span class="Identifier">&gt;</span>
  <span class="Identifier">&lt;</span><span class="Statement">cite</span><span class="Identifier">&gt;</span><a href="http://www.vim.org">http://www.vim.org</a><span class="Identifier">&lt;/</span><span class="Statement">cite</span><span class="Identifier">&gt;</span>
<span class="Identifier">&lt;/</span><span class="Statement">blockquote</span><span class="Identifier">&gt;</span></pre>
]]></content:encoded>
			<wfw:commentRss>http://kusnier.net/development/zen-coding-vim-tutorial/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Zen Coding: Highspeed Web Development with VIM</title>
		<link>http://kusnier.net/development/zen-coding-highspeed-web-development</link>
		<comments>http://kusnier.net/development/zen-coding-highspeed-web-development#comments</comments>
		<pubDate>Fri, 12 Mar 2010 19:56:42 +0000</pubDate>
		<dc:creator>Sebastian Kusnier</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Vi-IMproved]]></category>

		<guid isPermaLink="false">http://kusnier.net/?p=438</guid>
		<description><![CDATA[Zen Coding is a new way of writing HTML code using CSS-like selector syntax. This page is only a simple cheat sheet for VIM with Zen Coding plugin. Expand Abbreviation The Expand Abbreviation function transforms CSS-like selectors into XHTML code. E Element name (div, p); E#id Element with identifier (div#content, p#intro, span#error); E.class Element with [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Zen Coding is a new way of writing HTML code using CSS-like selector syntax.<br />
This page is only a simple cheat sheet for VIM with Zen Coding plugin.</p>
<h3>Expand Abbreviation</h3>
<p>The Expand Abbreviation function transforms CSS-like selectors into XHTML code.</p>
<ul>
<li>E<br />
Element name (div, p);</li>
<li>E#id<br />
Element with identifier (div#content, p#intro, span#error);</li>
<li>E.class<br />
Element with classes (div.header, p.error.critial).<br />
You can combine classes and IDs, too: div#content.column.width;</li>
<li>E&gt;N<br />
Child element (div&gt;p, div#footer&gt;p&gt;span);</li>
<li>E+N<br />
Sibling element (h1+p, div#header+div#content+div#footer);</li>
<li>E*N<br />
Element multiplication (ul#nav&gt;li*5&gt;a);</li>
<li>E$*N<br />
Item numbering (ul#nav&gt;li.item-$*5);</li>
</ul>
<p>Enter following text:</p>
<pre class="vimhtml">div#header<span class="Error">&gt;</span>img.logo+ul#nav<span class="Error">&gt;</span>li*3<span class="Error">&gt;</span>a</pre>
<p>Press &lt;C-K&gt;, to expand it to&#8230;</p>
<pre class="vimhtml"><span class="Identifier">&lt;</span><span class="Statement">div</span><span class="Identifier"> </span><span class="Type">id</span><span class="Identifier">=</span><span class="Constant">"header"</span><span class="Identifier">&gt;</span>
  <span class="Identifier">&lt;</span><span class="Statement">img</span><span class="Identifier"> </span><span class="Type">src</span><span class="Identifier">=</span><span class="Constant">""</span><span class="Identifier"> </span><span class="Type">alt</span><span class="Identifier">=</span><span class="Constant">""</span><span class="Identifier"> </span><span class="Type">class</span><span class="Identifier">=</span><span class="Constant">"logo"</span><span class="Identifier"> /&gt;</span>
  <span class="Identifier">&lt;</span><span class="Statement">ul</span><span class="Identifier"> </span><span class="Type">id</span><span class="Identifier">=</span><span class="Constant">"nav"</span><span class="Identifier">&gt;</span>
    <span class="Identifier">&lt;</span><span class="Statement">li</span><span class="Identifier">&gt;</span>
      <span class="Identifier">&lt;</span><span class="Statement">a</span><span class="Identifier"> </span><span class="Type">href</span><span class="Identifier">=</span><span class="Constant">""</span><span class="Identifier">&gt;</span><span class="Identifier">&lt;/</span><span class="Statement">a</span><span class="Identifier">&gt;</span>
    <span class="Identifier">&lt;/</span><span class="Statement">li</span><span class="Identifier">&gt;</span>
    <span class="Identifier">&lt;</span><span class="Statement">li</span><span class="Identifier">&gt;</span>
      <span class="Identifier">&lt;</span><span class="Statement">a</span><span class="Identifier"> </span><span class="Type">href</span><span class="Identifier">=</span><span class="Constant">""</span><span class="Identifier">&gt;</span><span class="Identifier">&lt;/</span><span class="Statement">a</span><span class="Identifier">&gt;</span>
    <span class="Identifier">&lt;/</span><span class="Statement">li</span><span class="Identifier">&gt;</span>
    <span class="Identifier">&lt;</span><span class="Statement">li</span><span class="Identifier">&gt;</span>
      <span class="Identifier">&lt;</span><span class="Statement">a</span><span class="Identifier"> </span><span class="Type">href</span><span class="Identifier">=</span><span class="Constant">""</span><span class="Identifier">&gt;</span><span class="Identifier">&lt;/</span><span class="Statement">a</span><span class="Identifier">&gt;</span>
    <span class="Identifier">&lt;/</span><span class="Statement">li</span><span class="Identifier">&gt;</span>
  <span class="Identifier">&lt;/</span><span class="Statement">ul</span><span class="Identifier">&gt;</span>
<span class="Identifier">&lt;/</span><span class="Statement">div</span><span class="Identifier">&gt;</span></pre>
<p>It&#8217;s not necessary to write abbreviation on a new line. When parsing, ZC is smart enough to understand that in strings like &#8220;&lt;div&gt;ul#nav&gt;li&lt;/div&gt;&#8221;.</p>
<h3>Wrapping With Abbreviation</h3>
<p style="text-align: justify;">Abbreviation wrapping introduces a special abbreviation syntax for wrapping individual lines. Simply skip the number after the multiplication operator, like so: ul#nav&gt;li*&gt;a. When Zen Coding finds an element with an undefined multiplication number, it uses it as a repeating element.</p>
<pre class="vimhtml">News
Development
Downloads
Contact</pre>
<p>Use visual mode to select the text then press &lt;C-K&gt;,<br />
Enter as tag: div#header&gt;ul#navigation&gt;li.item$*&gt;a&gt;span</p>
<pre class="vimhtml"><span class="Identifier">&lt;</span><span class="Statement">div</span><span class="Identifier"> </span><span class="Type">id</span><span class="Identifier">=</span><span class="Constant">"header"</span><span class="Identifier">&gt;</span>
  <span class="Identifier">&lt;</span><span class="Statement">ul</span><span class="Identifier"> </span><span class="Type">id</span><span class="Identifier">=</span><span class="Constant">"navigation"</span><span class="Identifier">&gt;</span>
    <span class="Identifier">&lt;</span><span class="Statement">li</span><span class="Identifier"> </span><span class="Type">class</span><span class="Identifier">=</span><span class="Constant">"item1"</span><span class="Identifier">&gt;</span>
      <span class="Identifier">&lt;</span><span class="Statement">a</span><span class="Identifier"> </span><span class="Type">href</span><span class="Identifier">=</span><span class="Constant">""</span><span class="Identifier">&gt;&lt;</span><span class="Statement">span</span><span class="Identifier">&gt;</span><span class="Underlined">News</span><span class="Identifier">&lt;/</span><span class="Statement">span</span><span class="Identifier">&gt;&lt;/</span><span class="Statement">a</span><span class="Identifier">&gt;</span>
    <span class="Identifier">&lt;/</span><span class="Statement">li</span><span class="Identifier">&gt;</span>
    <span class="Identifier">&lt;</span><span class="Statement">li</span><span class="Identifier"> </span><span class="Type">class</span><span class="Identifier">=</span><span class="Constant">"item2"</span><span class="Identifier">&gt;</span>
      <span class="Identifier">&lt;</span><span class="Statement">a</span><span class="Identifier"> </span><span class="Type">href</span><span class="Identifier">=</span><span class="Constant">""</span><span class="Identifier">&gt;&lt;</span><span class="Statement">span</span><span class="Identifier">&gt;</span><span class="Underlined">Development</span><span class="Identifier">&lt;/</span><span class="Statement">span</span><span class="Identifier">&gt;&lt;/</span><span class="Statement">a</span><span class="Identifier">&gt;</span>
    <span class="Identifier">&lt;/</span><span class="Statement">li</span><span class="Identifier">&gt;</span>
    <span class="Identifier">&lt;</span><span class="Statement">li</span><span class="Identifier"> </span><span class="Type">class</span><span class="Identifier">=</span><span class="Constant">"item3"</span><span class="Identifier">&gt;</span>
      <span class="Identifier">&lt;</span><span class="Statement">a</span><span class="Identifier"> </span><span class="Type">href</span><span class="Identifier">=</span><span class="Constant">""</span><span class="Identifier">&gt;&lt;</span><span class="Statement">span</span><span class="Identifier">&gt;</span><span class="Underlined">Downloads</span><span class="Identifier">&lt;/</span><span class="Statement">span</span><span class="Identifier">&gt;&lt;/</span><span class="Statement">a</span><span class="Identifier">&gt;</span>
    <span class="Identifier">&lt;/</span><span class="Statement">li</span><span class="Identifier">&gt;</span>
    <span class="Identifier">&lt;</span><span class="Statement">li</span><span class="Identifier"> </span><span class="Type">class</span><span class="Identifier">=</span><span class="Constant">"item4"</span><span class="Identifier">&gt;</span>
      <span class="Identifier">&lt;</span><span class="Statement">a</span><span class="Identifier"> </span><span class="Type">href</span><span class="Identifier">=</span><span class="Constant">""</span><span class="Identifier">&gt;&lt;</span><span class="Statement">span</span><span class="Identifier">&gt;</span><span class="Underlined">Contact</span><span class="Identifier">&lt;/</span><span class="Statement">span</span><span class="Identifier">&gt;&lt;/</span><span class="Statement">a</span><span class="Identifier">&gt;</span>
    <span class="Identifier">&lt;/</span><span class="Statement">li</span><span class="Identifier">&gt;</span>
  <span class="Identifier">&lt;/</span><span class="Statement">ul</span><span class="Identifier">&gt;</span>
<span class="Identifier">&lt;/</span><span class="Statement">div</span><span class="Identifier">&gt;</span></pre>
<h3>Filters</h3>
<ul>
<li><span style="color: #ff0000;">|e</span> &#8211; Expand Abbreviation<br />
div#content&gt;p.title|e</li>
<li><span style="color: #ff0000;">|e|e</span> &#8211; Expand the Abbrevation twice<br />
div#content&gt;p.title|e|e</li>
<li><span style="color: #ff0000;">|c</span> &#8211; Add comments around important tags<br />
div&gt;div#page&gt;p.title+p|c</li>
<li><span style="color: #ff0000;">|haml</span> &#8211; HAML syntax filter</li>
<li><span style="color: #ff0000;">|html</span> &#8211; HTML syntax filter</li>
<li><span style="color: #ff0000;">|fc</span> &#8211; Format CSS rule: add whitespace after CSS property name<br />
fl:l|fc</li>
<li><span style="color: #ff0000;">|xsl</span> &#8211; This filter removes select attribute from &lt;xsl:variable&gt;  and &lt;xsl:with-param&gt; tags if they have child nodes<br />
ap&gt;wp&gt;call|xsl</li>
</ul>
<h3>Key Bindings</h3>
<p style="text-align: justify;"><span style="color: #888888;"><em>vimrc: let g:user_zen_leader_key = &#8216;&lt;c-k&gt;&#8217;</em></span><br />
I am using &lt;C-K&gt; as special key for zen coding. The standard keybinding  conflicts with a existing vim functionality.</p>
<ul>
<li>&lt;C-K&gt;a &#8211; Make anchor from URL</li>
<li>&lt;C-K&gt;A &#8211; Make quoted text from URL (Insert Mode)</li>
<li>&lt;C-K&gt;k &#8211; Remove Tag (Insert Mode)</li>
<li>&lt;C-K&gt;j &#8211; Split/Join Tag (Insert Mode)</li>
<li>&lt;C-K&gt;/ &#8211; Toggle Comment (Insert Mode)</li>
<li>&lt;C-K&gt;i &#8211; Update &lt;img&gt; Size (Insert Mode)</li>
<li>&lt;C-K&gt;n &#8211; Go to Next Edit Point (Insert Mode)</li>
<li>&lt;C-K&gt;N &#8211; Go to Previous Edit Point (Insert Mode)</li>
<li>&lt;C-K&gt;d &#8211; Balance Tag Inward (Insert Mode)</li>
<li>&lt;C-K&gt;D &#8211; Balance Tag Outward (Insert Mode)</li>
<li>&lt;C-K&gt;, &#8211; Expand Normal (Insert Mode)</li>
<li>&lt;C-K&gt;, &#8211; Expand Visual (Visual Mode)</li>
<li>J &#8211; Merge Lines (Visual Mode)</li>
</ul>
<h3>Links</h3>
<h6>Zen coding:</h6>
<ul>
<li> <a href="http://code.google.com/p/zen-coding/">http://code.google.com/p/zen-coding/</a></li>
<li> <a href="http://code.google.com/p/zen-coding/wiki/ZenHTMLElementsEn">HTML elements and its aliases for Zen HTML plugins</a></li>
<li> <a href="http://code.google.com/p/zen-coding/wiki/ZenHTMLSelectorsEn">Selectors and aliases for Zen HTML plugins</a></li>
<li> <a href="http://code.google.com/p/zen-coding/wiki/ZenCSSPropertiesEn">CSS-properties and its aliases for Zen CSS plugins</a></li>
<li> <a href="http://zen-coding.googlecode.com/files/ZenCodingCheatSheet.pdf">Cheat sheet</a></li>
</ul>
<h6>Vim Plugin:</h6>
<p><a href="http://www.vim.org/scripts/script.php?script_id=2981">http://www.vim.org/scripts/script.php?script_id=2981</a></p>
<h3>Video</h3>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="275" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=7405114&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="400" height="275" src="http://vimeo.com/moogaloop.swf?clip_id=7405114&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a href="http://vimeo.com/7405114">Zen Coding v0.5</a> from <a href="http://vimeo.com/user2060676">Sergey Chikuyonok</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://kusnier.net/development/zen-coding-highspeed-web-development/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cheatsheets for developers</title>
		<link>http://kusnier.net/development/cheatsheets-for-developers</link>
		<comments>http://kusnier.net/development/cheatsheets-for-developers#comments</comments>
		<pubDate>Thu, 11 Mar 2010 09:50:51 +0000</pubDate>
		<dc:creator>Sebastian Kusnier</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://kusnier.net/?p=433</guid>
		<description><![CDATA[http://www.addedbytes.com/cheat-sheets/ http://www.cheat-sheets.org/ http://devcheatsheet.com/ http://www.extratuts.com/25-cheat-sheets-web-developer-should-have http://www.petefreitag.com/item/455.cfm http://www.tripwiremagazine.com/2009/12/60-very-useful-cheat-sheets-for-web-developers.html http://sixrevisions.com/resources/cheat_sheets_web_developer/ http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html http://www.webhostingsearch.com/articles/30-web-developer-cheat-sheets.php http://www.vim.org/scripts/script.php?script_id=2906 http://www.xmind.net/share/lurkersa/vim-keymap/ http://zen-coding.googlecode.com/files/ZenCodingCheatSheet.pdf]]></description>
			<content:encoded><![CDATA[<ul>
<li> <a href="http://www.addedbytes.com/cheat-sheets/">http://www.addedbytes.com/cheat-sheets/</a></li>
<li> <a href="http://www.cheat-sheets.org/">http://www.cheat-sheets.org/</a></li>
<li> <a href="http://devcheatsheet.com/">http://devcheatsheet.com/</a></li>
<li> <a href="http://www.extratuts.com/25-cheat-sheets-web-developer-should-have">http://www.extratuts.com/25-cheat-sheets-web-developer-should-have</a></li>
<li> <a href="http://www.petefreitag.com/item/455.cfm">http://www.petefreitag.com/item/455.cfm</a></li>
<li> <a href="http://www.tripwiremagazine.com/2009/12/60-very-useful-cheat-sheets-for-web-developers.html">http://www.tripwiremagazine.com/2009/12/60-very-useful-cheat-sheets-for-web-developers.html</a></li>
<li> <a href="http://sixrevisions.com/resources/cheat_sheets_web_developer/">http://sixrevisions.com/resources/cheat_sheets_web_developer/</a></li>
<li> <a href="http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html">http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html</a></li>
<li> <a href="http://www.webhostingsearch.com/articles/30-web-developer-cheat-sheets.php">http://www.webhostingsearch.com/articles/30-web-developer-cheat-sheets.php</a></li>
<li> <a href="http://www.vim.org/scripts/script.php?script_id=2906">http://www.vim.org/scripts/script.php?script_id=2906</a></li>
<li><a href="http://www.xmind.net/share/lurkersa/vim-keymap/">http://www.xmind.net/share/lurkersa/vim-keymap/</a></li>
<li> <a href="http://zen-coding.googlecode.com/files/ZenCodingCheatSheet.pdf">http://zen-coding.googlecode.com/files/ZenCodingCheatSheet.pdf</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://kusnier.net/development/cheatsheets-for-developers/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VIM: dbext, mapping</title>
		<link>http://kusnier.net/development/vim/vim-dbext-mappings</link>
		<comments>http://kusnier.net/development/vim/vim-dbext-mappings#comments</comments>
		<pubDate>Mon, 15 Feb 2010 09:27:07 +0000</pubDate>
		<dc:creator>Sebastian Kusnier</dc:creator>
				<category><![CDATA[Vi-IMproved]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[gvim]]></category>

		<guid isPermaLink="false">http://kusnier.net/?p=407</guid>
		<description><![CDATA[Executing commands &#60;Leader&#62;sbp (:DBPromptForBufferParameters) &#60;Leader&#62;sel &#8211; s (sql) e (execute) l (line) &#60;Leader&#62;se &#8211; s (sql) e (execute) (:DBExecSQLUnderCursor) &#60;Leader&#62;sE &#8211; s (sql) e (execute) Prompt the user for how many rows &#60;Leader&#62;se &#8211; s (sql) e (execute)  (:DBExecVisualSQL) (Visual mode) Selecting from tables &#60;Leader&#62;st &#8211; s (sql) t (table) (:DBSelectFromTable) &#60;Leader&#62;sT s (sql) T [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li>Executing commands
<ul>
<li>&lt;Leader&gt;<strong>sbp</strong> <span style="color: #888888;">(:DBPromptForBufferParameters)</span></li>
<li>&lt;Leader&gt;<strong>sel</strong> &#8211; s (sql) e (execute) l (line)</li>
<li>&lt;Leader&gt;<strong>se</strong> &#8211; s (sql) e (execute) <span style="color: #888888;">(:DBExecSQLUnderCursor)</span></li>
<li>&lt;Leader&gt;<strong>sE</strong> &#8211; s (sql) e (execute) Prompt the user for how many rows</li>
<li>&lt;Leader&gt;<strong>se</strong> &#8211; s (sql) e (execute)  <span style="color: #888888;">(:DBExecVisualSQL)</span> (Visual mode)</li>
</ul>
</li>
<li>Selecting from tables
<ul>
<li>&lt;Leader&gt;<strong>st</strong> &#8211; s (sql) t (table) <span style="color: #888888;">(:DBSelectFromTable)</span></li>
<li>&lt;Leader&gt;<strong>sT</strong> s (sql) T (table) &#8211; Capital <span style="color: #888888;">(:DBSelectFromTableTopX)</span></li>
<li>&lt;Leader&gt;<strong>stw</strong> s (sql) t (table) w (where clause) <span style="color: #888888;">(:DBSelectFromTableWithWhere)</span></li>
<li>&lt;Leader&gt;<strong>sta</strong> s (sql) t (table) a (ask name) <span style="color: #888888;">(:DBSelectFromTableAskName)</span></li>
</ul>
</li>
<li>Describing objects
<ul>
<li>&lt;Leader&gt;<strong>sdt</strong> s (sql) d (describe) t (table) <span style="color: #888888;">(:DBDescribeTable)</span></li>
<li>&lt;Leader&gt;<strong>sda</strong> s (sql) d (describe table) a (ask name) <span style="color: #888888;">(:DBDescribeTableAskName)</span></li>
<li>&lt;Leader&gt;<strong>sdp</strong> s (sql) d (describe) p (procedure) <span style="color: #888888;">(:DBDescribeProcedure)</span></li>
<li>&lt;Leader&gt;<strong>sdpa</strong> s (sql) d (describe) p (procedure) a (ask name) <span style="color: #888888;">(:DBDescribeProcedureAskName)</span></li>
</ul>
<p><span style="color: #888888;"> </span></li>
<li>Listing object
<ul>
<li>&lt;Leader&gt;<strong>slt</strong> s (sql) l (list) t (table) <span style="color: #888888;">(:DBListTable)</span></li>
<li>&lt;Leader&gt;<strong>slp</strong> s (sql) l (list) p (procedure) <span style="color: #888888;">(:DBListProcedure)</span></li>
<li>&lt;Leader&gt;<strong>slv</strong> s (sql) l (list) v (view) <span style="color: #888888;">(:DBListView)</span></li>
<li>&lt;Leader&gt;<strong>slc</strong> s (sql) l (list) c (column) <span style="color: #888888;">(:DBListColumn) (Result is in paste register)</span></li>
</ul>
<p><span style="color: #888888;"> </span></li>
<li>Object Completion
<ul>
<li> hit in insert mode: CTRL-X CTRL-K</li>
<li>Run :DBCompleteTable, :DBCompleteProcedures, :DBCompleteViews to enable completion for a buffer</li>
</ul>
</li>
<li>Host variable replacement
<ul>
<li>&lt;Leader&gt;<strong>slr</strong> (slv was already taken) <span style="color: #888888;">(:DBListVar)</span></li>
<li>stored variables can be removed by placing your cursor on the line above and hitting &#8216;<strong>dd</strong>&#8216;</li>
<li>You can used the DBSetVar command to both define and remove variables:<br />
<em>:DBSetVar :myvar1=&#8217;myvar1&#8242;<br />
:DBSetVar @myvar2=&#8217;myvar2&#8242;<br />
:DBSetVar @myint3=</em></li>
<li>DBSetVar supports TAB completion.</li>
<li>OR In a buffer you can have multiple set statements and use mappings to define (or execute) the variables:<br />
<em>set :myvar4 = &#8216;myvar4&#8242;;<br />
set @myvar5 = &#8216;myvar5&#8242;;<br />
set @myint6 = 6;</em><br />
If your cursor is on one of these lines you can use <strong>&lt;Leader&gt;sal</strong> (sql &#8211; assign &#8211; line),<br />
or you can visually select all 3 lines and use <strong>&lt;Leader&gt;sa</strong> or :&#8217;&lt;,&#8217;&gt;DBVarRangeAssign.</li>
</ul>
</li>
<li>History
<ul>
<li>&lt;Leader&gt;<strong>sh</strong> s (sql) h (history), (:DBHistory)</li>
<li><strong>&lt;Enter&gt;</strong> &#8211; Execute the statement.</li>
<li><strong>q</strong> &#8211; close the window</li>
<li><strong>a</strong> &#8211; Toggle the autoclose feature</li>
<li><strong>dd</strong> &#8211; To remove statements from the history you can press &#8220;dd&#8221; as you would delete a line in a regular Vim buffer</li>
<li><strong>&lt;Space&gt;</strong> &#8211; If using a vertical window will toggle the width to make it easier to read.</li>
</ul>
</li>
</ul>
<p>Result Buffer:</p>
<ul>
<li><strong>q</strong> &#8211; close the window</li>
<li><strong>R</strong> &#8211; repeat last query</li>
<li><strong>a</strong> &#8211; Toggle the autoclose feature</li>
<li><strong>O</strong> &#8211; toggle the orientation (vertical/horizontal) (&lt;Leader&gt;so)</li>
<li><strong>&lt;Space&gt;</strong> &#8211; If using a vertical window will toggle the width to make it easier to read.</li>
</ul>
<p>more later&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://kusnier.net/development/vim/vim-dbext-mappings/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
