<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://hawking.nonlogic.org/styles/feed.css"?>
<rss version="2.0" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:admin="http://webns.net/mvcb/">
<channel>
<title>hawking's weblog</title>
<link>http://hawking.nonlogic.org/archives/vim/</link>
<description>quark! quark! beware the quantum duck!</description>
<dc:language>en-us</dc:language>
<dc:creator>hawking</dc:creator>
<dc:date>2008-05-05T14:29:39+03:00</dc:date>
<admin:generatorAgent rdf:resource="http://nanoblogger.sourceforge.net" />
<item>
<link>http://hawking.nonlogic.org/archives/2008/04/21/vim_and_lzma/</link>
<title>vim and lzma</title>
<dc:date>2008-04-21T00:22:46+03:00</dc:date>
<dc:creator>hawking</dc:creator>
<dc:subject>english, vim</dc:subject>
<description>
<![CDATA[To edit .lzma files with vim add the following snippet to your vimrc:
<pre>
augroup lzma
        au!

        au BufReadPre,FileReadPre       *.lzma setlocal bin
        au BufReadPost,FileReadPost     *.lzma call gzip#read("lzma -d")
        au BufWritePost,FileWritePost   *.lzma call gzip#write("lzma")
        au FileAppendPre                *.lzma call gzip#appre("lzma -d")
        au FileAppendPost               *.lzma call gzip#write("lzma")
augroup END " augroup lzma
</pre>

Note you need to have <a
href="http://packages.gentoo.org/package/app-arch/lzma-utils">lzma-utils</a>
, not <a href="http://packages.gentoo.org/package/app-arch/lzma">lzma</a>, for
this to work.]]>
</description>
</item>
<item>
<link>http://hawking.nonlogic.org/archives/2008/04/06/viewing_man_pages_with_vim/</link>
<title>viewing man pages with vim</title>
<dc:date>2008-04-06T12:29:17+03:00</dc:date>
<dc:creator>hawking</dc:creator>
<dc:subject>english, gentoo, vim</dc:subject>
<description>
<![CDATA[There are two ways to use vim to display man pages. The first one is using
vimmanpager and the second one is using the :Man command from within vim.
Today I fixed <a href="https://bugs.gentoo.org/show_bug.cgi?id=212844">bug
212844</a> which was a problem about vimmanpager and colour codes. You'll have
to reinstall vim to get the updated vimmanpager.
<br /><br />
To use vimmanpager as your default man pager build vim with vim-pager USE flag
and set the environment variable <strong>MANPAGER</strong> to vimmanpager.
<br /><br />
For those who want to use the command <strong>:Man</strong> from within vim,
here is a trick to get things right. Add the following lines to your vimrc:
<pre>
" make :Man command avaliable
source $VIMRUNTIME/ftplugin/man.vim
" Default MANPAGER vimmanpager doesn't play well
" with the :Man command and we don't want to see raw colour codes
" so we use sed to strip them.
let $MANPAGER = "sed -e 's:\\x1B\\[[[:digit:]\\+m::g'"
</pre>
<br />
Happy vimming :-)]]>
</description>
</item>
<item>
<link>http://hawking.nonlogic.org/archives/2007/04/12/vimgdb/</link>
<title>vimgdb</title>
<dc:date>2007-04-12T02:31:15+03:00</dc:date>
<dc:creator>hawking</dc:creator>
<dc:subject>english, vim</dc:subject>
<description>
<![CDATA[There are many scripts to use gdb with vim. But the best and most useful
implementation is the <a href="http://clewn.sourceforge.net/">clewn</a>.It
implements full gdb support in the vim editor: breakpoints, watch variables,
gdb command completion, assembly windows, etc.  Clewn uses netbeans interface
to connect to vim and runs concurrently.
<br />
There is also the patch vimGdb which is developed by the same people. They
share the same base source code set to interface with gdb. The main difference
is clewn runs as a seperate process but it has some features vimGdb doesn't
have:
<br />
        <ul>
                <li>display of gdb expression values in a balloon</li>
                <li>gdb run commands do input and output on the clewn
                terminal, while vimgdb users must use the gdb 'tty' or
                'attach' commands to control the debuged program input/output</li>
                <li>support of $cdir in the gdb directory list, allowing vim
                to access the names of the source files compilation
                directories as stored with the program debugging
                information.</li>
        </ul>
<br />  
There is an ebuild for clewn in the
<a href="http://overlays.gentoo.org/proj/sunrise/browser/reviewed/app-vim/clewn/">sunrise overlay</a>.
You need to emerge gvim with the netbeans USE flag to use it. I wrote an ebuild for the newest
version 1.10 and bumped it, hopefully someone will review it and put it to
reviewed/ soon.
<br />
I also wanted to try the vimGdb patch so I made some changes to the
vim.eclass and added gdb USE flags to vim and gvim. The patch applies cleanly
among with other vim patches in the gentoo tree.
<br />
To use the vimGdb :call gdb("") when you want to do debugging. You might
want to put 'set autochdir' in your vimrc so that vim will change to the
working directory and find other source files of the program as well. Here is
a screenshot:
<br />
<img src="images/vim/vimgdb-example.png" alt="vimgdb example" />
<br />
The source code is from app-misc/slmon which has some problems smiley.
There is a breakpoint on the blueline. vim and gvim ebuilds with gdb USE flag
are in my overlay if you want to try. Emerge it and do <pre>:help gdb</pre>
from within vim to learn how to use it. Happy vimming!]]>
</description>
</item>
<item>
<link>http://hawking.nonlogic.org/archives/2007/03/14/vim_script_hints_man3/</link>
<title>vim script: hints_man3</title>
<dc:date>2007-03-14T07:00:09+03:00</dc:date>
<dc:creator>hawking</dc:creator>
<dc:subject>english, vim</dc:subject>
<description>
<![CDATA[<p>I found a new vim script called <a
        href="http://www.vim.org/scripts/script.php?script_id=1826">hints_man3</a>.
It shows the prototype of C library functions as you write them. You need to
set your cmdheight option to at least 2 for it to work. This can be done by
adding:</p>
<pre>au BufRead,BufNewFile *.c,*.h set ch=2</pre>
<p>to your .vimrc file. Here is a screenshot:<br />
<img src="images/vim/hints_man3.png" alt="hints_man3 screenshot" /></p>]]>
</description>
</item>
</channel>
</rss>
