<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss'><id>tag:blogger.com,1999:blog-34829202</id><updated>2009-12-22T02:46:16.142+09:00</updated><title type='text'>私のTech記憶</title><subtitle type='html'>Any piece of knowledge I acquire today has a value at this moment exactly proportioned to my skill to deal with it. Tomorrow, when I know more, I recall that piece of knowledge and use it better.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://piao-tech.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default?orderby=updated'/><link rel='alternate' type='text/html' href='http://piao-tech.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default?start-index=26&amp;max-results=25&amp;orderby=updated'/><author><name>龍神</name><uri>http://www.blogger.com/profile/16648963337079496096</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>88</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-34829202.post-4024172964918082761</id><published>2009-12-17T17:02:00.003+09:00</published><updated>2009-12-19T21:30:36.913+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenSSH'/><title type='text'>Manage SSH and GPG keys efficiently in KDE</title><content type='html'>&lt;h3&gt;Introduction&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;Here I present a simple way to handle SSH and GPG keys easily in KDE4. These method presents several advantages:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Works great with KDE4 that ships with Kubuntu Jaunty and may work in other KDE distributions without too much trouble.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Use Kwallet as the passphrase manager so you unlock Kwallet once on login and from there it will handle all passphrase requests.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Works great with automated tasks (via cron or incron) that use SSH key authentication (e.g. famous rsync unexplained error 255).&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Pre-requisities&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;Considering that you are reading this post because you need a better way to manage you ssh and gpg keys then it is safe to assume you have already generated your ssh/gpg keys and that you know how to use them. &lt;br /&gt;&lt;br /&gt;&lt;h3&gt;SSH Key management with KWallet&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;The steps are very simple. First we install the needed software packages:&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;sudo aptitude install keychain ksshaskpass&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Then create an script called &lt;b&gt;keychain.sh&lt;/b&gt; inside your KDE autostart folder that loads the key manager (keychain) and configure KWallet to handle the keys passphrases.&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;vi keychain.sh&lt;br /&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="c"&gt;#! /usr/bin/env bash&lt;/span&gt;&lt;br /&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; -f /usr/bin/keychain &lt;span class="o"&gt;]&lt;/span&gt;; &lt;span class="k"&gt;then&lt;/span&gt;&lt;br /&gt;&lt;span class="k"&gt;  if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; -f /usr/bin/ksshaskpass &lt;span class="o"&gt;]&lt;/span&gt;; &lt;span class="k"&gt;then&lt;/span&gt;&lt;br /&gt;&lt;span class="k"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;SSH_ASKPASS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/usr/bin/ksshaskpass&lt;br /&gt;  &lt;span class="k"&gt;else&lt;/span&gt;&lt;br /&gt;&lt;span class="k"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;SSH_ASKPASS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/usr/bin/askpass&lt;br /&gt;  &lt;span class="k"&gt;fi&lt;/span&gt;&lt;br /&gt;  /usr/bin/keychain id_rsa&lt;br /&gt;  &lt;span class="nb"&gt;source&lt;/span&gt; &lt;span class="nv"&gt;$HOME&lt;/span&gt;/.keychain/&lt;span class="nv"&gt;$HOSTNAME&lt;/span&gt;-sh&lt;br /&gt;&lt;span class="k"&gt;fi&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;chmod +x keychain.sh&lt;br /&gt;cp keychain.sh $HOME/.kde/Autostart&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Now edit your .bashrc and add the following line to load keychain so all applications you start in the terminal will have access to the ssh-agent and gpg-agent sockets:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;source $HOME/.kde/Autostart/keychain.sh&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Now when you log back to KDE KWallet will ask you if you want to allow the keychain application to use KWallet. Tell it to allow always and provide your passphrase. From that point on KWallet will take care of that ssh key. &lt;br /&gt;&lt;br /&gt;You may add as many ssh/gpg keys as you want by adding them to the keychain.sh script like:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;/usr/bin/keychain id_rsa&lt;br /&gt;/usr/bin/keychain id_rsa2&lt;br /&gt;/usr/bin/keychain id_rsa3&lt;br /&gt;...&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34829202-4024172964918082761?l=piao-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://piao-tech.blogspot.com/feeds/4024172964918082761/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=34829202&amp;postID=4024172964918082761' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/4024172964918082761'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/4024172964918082761'/><link rel='alternate' type='text/html' href='http://piao-tech.blogspot.com/2009/12/manage-ssh-and-gpg-keys-efficiently-in.html' title='Manage SSH and GPG keys efficiently in KDE'/><author><name>龍神</name><uri>http://www.blogger.com/profile/16648963337079496096</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11487716133742490173'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34829202.post-9128808992734066300</id><published>2009-09-03T11:51:00.007+09:00</published><updated>2009-12-17T17:01:33.780+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Gadget'/><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Embbed cover art in MP3 files with command line</title><content type='html'>&lt;h2&gt;Introduction&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;I needed a command line (cli) application that would allow me to embed cover art to my MP3 collection in order to get the covers diplay correctly in my wife's iPhone and my own gPhone (HTC-Hero). After months looking I finally found the ideal tool: eyed3.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Embedding cover art in MP3 files&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;In Ubuntu/Kubuntu install ImageMagick and Eyed3 with the following command:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;sudo aptitude install imagemagick eyed3&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Then get your cover art in JPG or PNG format using your favorite cover art download tool (I use amarok) or scan your original CD case. Finally use this command to embed the image in the MP3 files:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;convert AlbumArt.jpg -resize 300x300\&gt; AlbumArt.jpg &lt;br /&gt;eyeD3 --add-image AlbumArt.jpg:FRONT_COVER *.mp3&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The first command uses ImageMagick to resize the image if any dimension is larger than 300px. The second command adds the cover art to all the MP3 files present in the current directory. You can of course use the full path of the location where the MP3 files are located or better write a bash script to apply the covert art to all your MP3 collection.&lt;br /&gt;&lt;br /&gt;Note that the cover image is called AlbumArt.jpg and that the resize operation overwrites it. If you prefer to keep the original change the name of the output to something else. Also you can embed more than one image to each MP3 and assign it different types like FRONT_COVER, BACK_COVER, MEDIA, etc.  Check eyeD3 help for more information.&lt;br /&gt;&lt;br /&gt;The embedded cover art will display correctly in iTunes, iPhone and gPhone without problems.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;gPhone cover art for Ogg/Vorbis files&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;All my Japanese music is in Ogg/Vorbis format mostly because MP3 players cannot agree in the metadata encoding. Each MP3 player I have tried (including Amarok) use a custom (i.e. no standard) way to save non ASCII characters making it impossible to display Japanese correctly in all devices/players I use.&lt;br /&gt;&lt;br /&gt;In the other hand Ogg/Vorbis displays the Japanese correctly in all players I use (Amarok/gPhone/ffmpeg/mplayer). The problem I had was with cover art until recently.&lt;br /&gt;&lt;br /&gt;For this to work you MUST organize your music in different folders by album and in each album you must create an AlbumArt.jpg file that will be used as cover art for all Ogg/Vorbis files inside that album/folder.&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;|--Aerosmith&lt;br /&gt;|    |-- Armageddon&lt;br /&gt;|            |-- AlbumArt.jpg&lt;br /&gt;|            |-- I Dont Want To Miss A Thing.ogg&lt;br /&gt;|--Shakira&lt;br /&gt;     |-- Laundry Service&lt;br /&gt;            |--AlbumArt.jpg&lt;br /&gt;            |--Eyes Like Yours.ogg&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;As you can see I have Artist folders and inside each one I have a different folder for each Album of that artist and finally in each album folder I have an AlbumArt.jpg that is the cover image and all Ogg or MP3 files that belong to that album.&lt;br /&gt;&lt;br /&gt;With this layout both Amarok and the gPhone are able to display the cover art of all Ogg/Vorbis files correctly. Note that you must have exactly the same folder layout in the gPhone SD card for this to work and that the cover MUST be called AlbumArt.jpg or the gPhone won't recognize it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34829202-9128808992734066300?l=piao-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://piao-tech.blogspot.com/feeds/9128808992734066300/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=34829202&amp;postID=9128808992734066300' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/9128808992734066300'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/9128808992734066300'/><link rel='alternate' type='text/html' href='http://piao-tech.blogspot.com/2009/09/embbed-cover-art-in-mp3-files-with.html' title='Embbed cover art in MP3 files with command line'/><author><name>龍神</name><uri>http://www.blogger.com/profile/16648963337079496096</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11487716133742490173'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34829202.post-3407109061338862233</id><published>2009-10-08T16:51:00.006+09:00</published><updated>2009-10-08T17:43:18.665+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Netem'/><title type='text'>How to create Netem distribution tables</title><content type='html'>The &lt;a href="http://www.linuxfoundation.org/en/Net:Netem"&gt;Netem&lt;/a&gt; and &lt;a href="http://info.iet.unipi.it/~luigi/ip_dummynet/"&gt;Dummynet&lt;/a&gt; emulators are widely used in networking research to achieve emulated network environments that can be used to evaluate new protocols and applications under controlled and repeateable conditions. In the case of Netem it is possible to use custom ditribution tables to better approximate the round-trip-time variations in the nework.&lt;br /&gt;&lt;br /&gt;Unfortunately there is little information on how to generate this distribution tables based on real measured data. The only reference available is in the iproute2 source code itself and is a little confusing. After some reading and re-reading I think I finally got the magic formula and here I present it so others can benefit of my work.&lt;br /&gt;&lt;br /&gt;First download the iproute2 source code:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;git clone \&lt;br /&gt;git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Then enter the netem subdirectory and compile the maketable and stats utilities:&lt;br /&gt;&lt;br /&gt;&lt;div clas="code"&gt;&lt;br /&gt;cd iproute2/netem&lt;br /&gt;gcc -lm -o maketable maketable.c&lt;br /&gt;gcc -lm -o stats stats.c&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Next you need to extract some delay statistics of the channel you want to emulate. Suppose you want to emulate the network between a server in Japan and a client PC in Chile. Then simply run a ping between both machines for some period of time. A whole day of ping data would be enough:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;ping 192.168.4.111 &gt; mydata.txt&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The command above does a ping to the address 192.168.4.111 and stores the output to a file named mydata.txt. The file will contain the round-trip-times between the local machine and the machine with address 192.168.4.111 like shown below:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;PING 192.168.4.111 (192.168.4.111) 56(84) bytes of data.&lt;br /&gt;64 bytes from 192.168.4.111: icmp_seq=1 ttl=43 time=306 ms&lt;br /&gt;64 bytes from 192.168.4.111: icmp_seq=2 ttl=43 time=273 ms&lt;br /&gt;64 bytes from 192.168.4.111: icmp_seq=3 ttl=43 time=310 ms&lt;br /&gt;64 bytes from 192.168.4.111: icmp_seq=4 ttl=43 time=300 ms&lt;br /&gt;64 bytes from 192.168.4.111: icmp_seq=5 ttl=43 time=300 ms&lt;br /&gt;64 bytes from 192.168.4.111: icmp_seq=6 ttl=43 time=304 ms&lt;br /&gt;...&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The more data you have the better so leave the ping running for some long period of time. Next we need to extract the round-trip-time data only:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;cat mydata.txt | grep icmp_seq | cut -d'=' -f4 | cut -d' ' -f1 &gt; myrtt.txt&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The above command will extract all the round-trip-times from mydata.txt and put them in a single column in a file named myrtt.txt. Finally we can create a distribution table that Netem understands using the maketable utility:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;./maketable myrtt.txt &gt; mydist.dist&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;This will create a distribution table and store it in the file mydist.dist that must be copied in a special folder (/usr/lib/tc) so Netem can find it:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;sudo cp mydist.dist /usr/lib/tc&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Additionally we can obtain the mean and standard deviation of the round-trip-time using the stats utility:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;./stats myrtt.txt&lt;br /&gt;&gt; mu =      296.636364&lt;br /&gt;&gt; sigma =    12.808378&lt;br /&gt;&gt; rho =      -0.103472&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;This command gives use the mean (mu) the deviation (sigma) and the correlation (rho) of the round-trip-time. And at last we can now use Netem to emulate the channel's round-trip-time using the following command:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;sudo tc  qdisc add dev eth0 root netem delay 296.636364ms 12.808378ms distribution mydist&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Note the the distribution name is the same as that of the file we copied inside the /usr/lib/tc folder but without the .dist extension. Now Netem will provide you with a channel that has similar round-trip-time characteristics as those of the real channel.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34829202-3407109061338862233?l=piao-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://piao-tech.blogspot.com/feeds/3407109061338862233/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=34829202&amp;postID=3407109061338862233' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/3407109061338862233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/3407109061338862233'/><link rel='alternate' type='text/html' href='http://piao-tech.blogspot.com/2009/10/how-to-create-netem-distribution-tables.html' title='How to create Netem distribution tables'/><author><name>龍神</name><uri>http://www.blogger.com/profile/16648963337079496096</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11487716133742490173'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34829202.post-6857098958218005916</id><published>2008-10-08T14:43:00.009+09:00</published><updated>2009-07-13T00:45:44.970+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Kubuntu'/><title type='text'>Basic .vimrc file</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_99Fzui5MBLY/SO3gwQSlmfI/AAAAAAAAAMY/jmZy0aQprn0/s1600-h/vimsnap.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_99Fzui5MBLY/SO3gwQSlmfI/AAAAAAAAAMY/jmZy0aQprn0/s320/vimsnap.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5255103459822508530" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;My first Vim configuration files: .vimrc, plugins, color schemes, etc were very small and modest. It's been eight years since I started using Vim and these configuration files have morphed, evolved, grown and recently shrink in too many ways, more than I can remember, and every time I check www.vim.org I find new ways I would like my Vim to evolve even further.&lt;br /&gt;&lt;br /&gt;Here is the simplest version of my .vimrc file with no ctags or desktop integration as these topics require a separate post to explain. Most of the options here can be understood directly from Vim help files and by the comments in the file itself.&lt;br /&gt;&lt;br /&gt;If you would like to use this file make sure to copy it in your home directory and read the comments as to get full functionality.&lt;br /&gt;&lt;br /&gt;For comparison see the default install and my older configuration screenshot at the end of the post and compare it with my current configuration screenshot at the top of this post.&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;font face="monospace"&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;quot; General Vim Settings&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp; In Kubuntu/Ubuntu make sure you have a complete vim install&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp; i.e.&amp;nbsp;&amp;nbsp;sudo aptitude install vim-ruby vim-scripts vim-common&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Disable compatibility with vi&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#5fd7ff"&gt;nocompatible&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Use the Unix file format&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#5fd7ff"&gt;fileformats&lt;/font&gt;=unix&lt;font color="#ffff00"&gt;,&lt;/font&gt;dos&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Display line number in front of each line in the left margin.&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#5fd7ff"&gt;number&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; I keep my own backups and all those files ending in '~' are&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; anoying.&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#5fd7ff"&gt;nobackup&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Display commands in the bottom right corner as they are typed.&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#5fd7ff"&gt;showcmd&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Smoother redraws&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#5fd7ff"&gt;ttyfast&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Avoid vim complains about not written file when jumping&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; between buffers using ctags.&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#5fd7ff"&gt;autowrite&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Vim Tip #1160 - Auto Save files when focus is lost.&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;au&lt;/font&gt;&amp;nbsp;&lt;font color="#87ffaf"&gt;FocusLost&lt;/font&gt;&amp;nbsp;*&amp;nbsp;:wa&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Vim Tip #1279 - Highlight current line in Insert Mode&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;autocmd&lt;/font&gt;&amp;nbsp;&lt;font color="#87ffaf"&gt;InsertLeave&lt;/font&gt;&amp;nbsp;*&amp;nbsp;&lt;font color="#ffff00"&gt;se&lt;/font&gt;&amp;nbsp;nocul&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;autocmd&lt;/font&gt;&amp;nbsp;&lt;font color="#87ffaf"&gt;InsertEnter&lt;/font&gt;&amp;nbsp;*&amp;nbsp;&lt;font color="#ffff00"&gt;se&lt;/font&gt;&amp;nbsp;cul&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Enable syntax highlighting with 256 color support so we&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; can use nicer color schemes. For more information and to&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; get some nice color schemes check:&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp; &lt;a href="http://www.frexx.de/xterm-256-notes/"&gt;http://www.frexx.de/xterm-256-notes/&lt;/a&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Tested with Konsole-2.1 and yakuake 2.9.4&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#5fd7ff"&gt;t_Co&lt;/font&gt;=256&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;syntax&lt;/font&gt;&amp;nbsp;&lt;font color="#87ffaf"&gt;on&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Set this background depending on your console and color scheme.&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#5fd7ff"&gt;background&lt;/font&gt;=light&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;set background=dark&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; My favorite color schemes. You must download the color themes&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; and put them inside the color folder of your vim installation.&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;colors default&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot; Good fro transparent consoles&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;colors zenburn&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot; Vim Tip #415&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;colors&lt;/font&gt;&amp;nbsp;&lt;font color="#ff40ff"&gt;256&lt;/font&gt;_asu1dark &lt;font color="#00ffff"&gt;&amp;quot; &lt;a href="http://www.frexx.de/xterm-256-notes/"&gt;http://www.frexx.de/xterm-256-notes/&lt;/a&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;colors pyte&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;quot; Vim Tip #1492&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; If in diff mode (vimdiff) use the inkpot color scheme&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; that better highlights file differences&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;if&lt;/font&gt;&amp;nbsp;&amp;amp;diff&lt;br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;font color="#ffff00"&gt;colors&lt;/font&gt;&amp;nbsp;inkpot&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#00ffff"&gt;&amp;quot; Vim Tip #1143&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;endif&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Additional filetypes&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;au&lt;/font&gt;&amp;nbsp;&lt;font color="#87ffaf"&gt;BufRead&lt;/font&gt;,&lt;font color="#87ffaf"&gt;BufNewFile&lt;/font&gt;&amp;nbsp;sconstruct&amp;nbsp;&lt;font color="#ffff00"&gt;setlocal&lt;/font&gt;&amp;nbsp;&lt;font color="#5fd7ff"&gt;filetype&lt;/font&gt;=python&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;au&lt;/font&gt;&amp;nbsp;&lt;font color="#87ffaf"&gt;BufRead&lt;/font&gt;,&lt;font color="#87ffaf"&gt;BufNewFile&lt;/font&gt;&amp;nbsp;*.rl&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#ffff00"&gt;setlocal&lt;/font&gt;&amp;nbsp;&lt;font color="#5fd7ff"&gt;filetype&lt;/font&gt;=ragel&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;au&lt;/font&gt;&amp;nbsp;&lt;font color="#87ffaf"&gt;BufRead&lt;/font&gt;,&lt;font color="#87ffaf"&gt;BufNewFile&lt;/font&gt;&amp;nbsp;*.rb&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#ffff00"&gt;setlocal&lt;/font&gt;&amp;nbsp;&lt;font color="#5fd7ff"&gt;filetype&lt;/font&gt;=ruby&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Additional Syntax Files. The ragel.vim file can be downloaded&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; from Ragel's home page &lt;a href="http://www.complang.org/ragel/."&gt;http://www.complang.org/ragel/.&lt;/a&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;au&lt;/font&gt;! &lt;font color="#87ffaf"&gt;Syntax&lt;/font&gt;&amp;nbsp;ragel&amp;nbsp;&lt;font color="#ffff00"&gt;source&lt;/font&gt;&amp;nbsp;ragel&lt;font color="#ffff00"&gt;.&lt;/font&gt;&lt;font color="#ffff00"&gt;vim&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Set path to search (i.e. gf) files recursively&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#5fd7ff"&gt;path&lt;/font&gt;=/usr/include&lt;font color="#ffff00"&gt;,&lt;/font&gt;/usr/local/include&lt;font color="#ffff00"&gt;,&lt;/font&gt;**;$HOME&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Vim Tip #1274 - Highlight trailing whitespace characters&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#5fd7ff"&gt;list&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#5fd7ff"&gt;listchars&lt;/font&gt;=tab&lt;font color="#ffff00"&gt;:&lt;/font&gt;-&amp;gt;&lt;font color="#ffff00"&gt;,&lt;/font&gt;trail&lt;font color="#ffff00"&gt;:&lt;/font&gt;·&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Number of spaces used for (auto)indenting&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;set shiftwidth=2&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Number of spaces to insert for a tab&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;set softtabstop=2&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#5fd7ff"&gt;tabstop&lt;/font&gt;=2&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Insert spaces when the tab key is pressed&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; If you want a real tab use &lt;/font&gt;&lt;font color="#ff40ff"&gt;&amp;quot;ctrl-v, tab&amp;quot;&lt;/font&gt;&lt;font color="#00ffff"&gt;&amp;nbsp;in insert mode. This&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; is usefull for Makefiles that require real tabs to work.&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#5fd7ff"&gt;expandtab&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Word wrap with line breaks if they are longer than 80 characters &lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; long. If you prefer to wrap lines visually only use the wrap and&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; lbr commands below instead. If you have a document that has lines&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; longer than 80 characters you can use &lt;/font&gt;&lt;font color="#ff40ff"&gt;&amp;quot;gq}&amp;quot;&lt;/font&gt;&lt;font color="#00ffff"&gt;&amp;nbsp;to format it as a &lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; paragraph. This is more easier format for navigating the text.&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#5fd7ff"&gt;textwidth&lt;/font&gt;=80&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#5fd7ff"&gt;formatoptions&lt;/font&gt;=tcq&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Vim Tip #989: Word wrap without line breaks&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;set wrap&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;set lbr&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Enable specific indenting&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#5fd7ff"&gt;autoindent&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#5fd7ff"&gt;smartindent&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Enable code folding&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#5fd7ff"&gt;foldmethod&lt;/font&gt;=syntax&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Show briefly matching bracket when closing it.&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#5fd7ff"&gt;showmatch&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Show cursor position&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#5fd7ff"&gt;ruler&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Additonal key mappings&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;map&lt;/font&gt;&amp;nbsp;&lt;font color="#ffd7d7"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#ffd7d7"&gt;F12&lt;/font&gt;&lt;font color="#ffd7d7"&gt;&amp;gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#ffd7d7"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#ffd7d7"&gt;ESC&lt;/font&gt;&lt;font color="#ffd7d7"&gt;&amp;gt;&lt;/font&gt;ggVGg?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot; ROT13 fun&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;quot; Mini buffer explorer features&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;let&lt;/font&gt;&amp;nbsp;g:miniBufExplSplitBelow&lt;font color="#ffff00"&gt;=&lt;/font&gt;&lt;font color="#ff40ff"&gt;0&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;let&lt;/font&gt;&amp;nbsp;g:miniBufExplSplitToEdge&amp;nbsp;&lt;font color="#ffff00"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color="#ff40ff"&gt;0&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;let&lt;/font&gt;&amp;nbsp;g:miniBufExplVSplit&amp;nbsp;&lt;font color="#ffff00"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color="#ff40ff"&gt;20&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;let&lt;/font&gt;&amp;nbsp;g:miniBufExplMapCTabSwitchBufs&amp;nbsp;&lt;font color="#ffff00"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color="#ff40ff"&gt;1&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;let&lt;/font&gt;&amp;nbsp;g:miniBufExplUseSingleClick&amp;nbsp;&lt;font color="#ffff00"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color="#ff40ff"&gt;1&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;let&lt;/font&gt;&amp;nbsp;g:miniBufExplorerMoreThanOne&lt;font color="#ffff00"&gt;=&lt;/font&gt;&lt;font color="#ff40ff"&gt;0&lt;/font&gt;&amp;nbsp;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;let&lt;/font&gt;&amp;nbsp;g:miniBufExplModSelTarget&amp;nbsp;&lt;font color="#ffff00"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color="#ff40ff"&gt;1&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Map Tab and Shift-Tab for buffer navigation&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Note that S-TAB does not work in certain consoles (i.e. KDE Konsole)&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;map&lt;/font&gt;&amp;nbsp;&lt;font color="#ffd7d7"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#ffd7d7"&gt;TAB&lt;/font&gt;&lt;font color="#ffd7d7"&gt;&amp;gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#ffd7d7"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#ffd7d7"&gt;ESC&lt;/font&gt;&lt;font color="#ffd7d7"&gt;&amp;gt;&amp;lt;&lt;/font&gt;&lt;font color="#ffd7d7"&gt;C-TAB&lt;/font&gt;&lt;font color="#ffd7d7"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;map&lt;/font&gt;&amp;nbsp;&lt;font color="#ffd7d7"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#ffd7d7"&gt;S-TAB&lt;/font&gt;&lt;font color="#ffd7d7"&gt;&amp;gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#ffd7d7"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#ffd7d7"&gt;ESC&lt;/font&gt;&lt;font color="#ffd7d7"&gt;&amp;gt;&amp;lt;&lt;/font&gt;&lt;font color="#ffd7d7"&gt;C-S-TAB&lt;/font&gt;&lt;font color="#ffd7d7"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;quot; Improve VIM autocomplete features&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Enable search as you type:&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#5fd7ff"&gt;incsearch&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;improve autocomplete menu color&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;highlight&lt;/font&gt;&amp;nbsp;Pmenu&amp;nbsp;&lt;font color="#87ffaf"&gt;ctermbg&lt;/font&gt;=&lt;font color="#ff40ff"&gt;238&lt;/font&gt;&amp;nbsp;&lt;font color="#87ffaf"&gt;gui&lt;/font&gt;=&lt;font color="#5fd7ff"&gt;bold&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; &lt;a href="http://www.cuberick.com/2008/10/ruby-autocomplete-in-vim.html"&gt;http://www.cuberick.com/2008/10/ruby-autocomplete-in-vim.html&lt;/a&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;autocmd&lt;/font&gt;&amp;nbsp;&lt;font color="#87ffaf"&gt;FileType&lt;/font&gt;&amp;nbsp;ruby,eruby&amp;nbsp;&lt;font color="#ffff00"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#5fd7ff"&gt;omnifunc&lt;/font&gt;=rubycomplete#Complete&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;autocmd&lt;/font&gt;&amp;nbsp;&lt;font color="#87ffaf"&gt;FileType&lt;/font&gt;&amp;nbsp;ruby,eruby&amp;nbsp;&lt;font color="#ffff00"&gt;let&lt;/font&gt;&amp;nbsp;g:rubycomplete_buffer_loading&amp;nbsp;&lt;font color="#ffff00"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color="#ff40ff"&gt;1&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;autocmd&lt;/font&gt;&amp;nbsp;&lt;font color="#87ffaf"&gt;FileType&lt;/font&gt;&amp;nbsp;ruby,eruby&amp;nbsp;&lt;font color="#ffff00"&gt;let&lt;/font&gt;&amp;nbsp;g:rubycomplete_rails&amp;nbsp;&lt;font color="#ffff00"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color="#ff40ff"&gt;1&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;autocmd&lt;/font&gt;&amp;nbsp;&lt;font color="#87ffaf"&gt;FileType&lt;/font&gt;&amp;nbsp;ruby,eruby&amp;nbsp;&lt;font color="#ffff00"&gt;let&lt;/font&gt;&amp;nbsp;g:rubycomplete_classes_in_global&amp;nbsp;&lt;font color="#ffff00"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color="#ff40ff"&gt;1&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Vim tip #90 Enable VCS integration in vim&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;Get vcscommand.zip from &lt;a href="http://www.vim.org/scripts/script.php?script_id=90"&gt;http://www.vim.org/scripts/script.php?script_id=90&lt;/a&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;Uncompress to your vim directory:&amp;nbsp;&amp;nbsp;unzip -d ~/.vim vcscommand.zip&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;Now when editing a file that is under revision control (SVN, CVS, Git,...)&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;we can access the versioning commands:&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;VCSAdd&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;VCSAnnotate&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;VCSCommit&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;VCSDelete&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;VCSDiff&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;VCSGotoOriginal&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;VCSGotoOriginal!&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;VCSInfo&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;VCSLog&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;VCSLock&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;VCSReview&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;VCSStatus&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;VCSUpdate&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;VCSUnlock&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;VCSVimDiff&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Map F4 to VimDiff to check differences&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;map&lt;/font&gt;&amp;nbsp;&lt;font color="#ffd7d7"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#ffd7d7"&gt;F4&lt;/font&gt;&lt;font color="#ffd7d7"&gt;&amp;gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#ffd7d7"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#ffd7d7"&gt;ESC&lt;/font&gt;&lt;font color="#ffd7d7"&gt;&amp;gt;&lt;/font&gt;:VCSVimDiff&lt;font color="#ffd7d7"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#ffd7d7"&gt;CR&lt;/font&gt;&lt;font color="#ffd7d7"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Latex Configuration&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; &lt;a href="http://vim-latex.sourceforge.net/documentation/latex-suite/recommended-settings.html"&gt;http://vim-latex.sourceforge.net/documentation/latex-suite/recommended-settings.html&lt;/a&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;au&lt;/font&gt;&amp;nbsp;&lt;font color="#87ffaf"&gt;BufRead&lt;/font&gt;,&lt;font color="#87ffaf"&gt;BufNewFile&lt;/font&gt;&amp;nbsp;*.cls&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#ffff00"&gt;setlocal&lt;/font&gt;&amp;nbsp;&lt;font color="#5fd7ff"&gt;filetype&lt;/font&gt;=tex&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;let g:tex_flavor='latex'&amp;nbsp;&amp;nbsp; &amp;quot; loads latexsuite with empty tex files.&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#5fd7ff"&gt;iskeyword&lt;/font&gt;+=&lt;font color="#ffff00"&gt;:&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#00ffff"&gt;&amp;quot; type /ref{fig: and press &amp;lt;C-n&amp;gt; to autocomplete references&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Working with Makefiles&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Press F5 to compile and open the error window if there&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; are errors. If there are errors you can use :cn and :cN to&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; jump foward and backward thru the error list. Press :ccl to&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; close the error list or F5 again to recompile&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;map&lt;/font&gt;&amp;nbsp;&lt;font color="#ffd7d7"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#ffd7d7"&gt;F5&lt;/font&gt;&lt;font color="#ffd7d7"&gt;&amp;gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#ffd7d7"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#ffd7d7"&gt;ESC&lt;/font&gt;&lt;font color="#ffd7d7"&gt;&amp;gt;&lt;/font&gt;:make&lt;font color="#ffd7d7"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#ffd7d7"&gt;CR&lt;/font&gt;&lt;font color="#ffd7d7"&gt;&amp;gt;&amp;lt;&lt;/font&gt;&lt;font color="#ffd7d7"&gt;ESC&lt;/font&gt;&lt;font color="#ffd7d7"&gt;&amp;gt;&lt;/font&gt;:botright cwindow&lt;font color="#ffd7d7"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#ffd7d7"&gt;CR&lt;/font&gt;&lt;font color="#ffd7d7"&gt;&amp;gt;&lt;/font&gt;&amp;nbsp;&amp;quot; Compile and open quick fix list&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;map&lt;/font&gt;&amp;nbsp;&lt;font color="#ffd7d7"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#ffd7d7"&gt;F6&lt;/font&gt;&lt;font color="#ffd7d7"&gt;&amp;gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#ffd7d7"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#ffd7d7"&gt;ESC&lt;/font&gt;&lt;font color="#ffd7d7"&gt;&amp;gt;&lt;/font&gt;:cN&lt;font color="#ffd7d7"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#ffd7d7"&gt;CR&lt;/font&gt;&lt;font color="#ffd7d7"&gt;&amp;gt;&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot; Jump to prev error/warn&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;map&lt;/font&gt;&amp;nbsp;&lt;font color="#ffd7d7"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#ffd7d7"&gt;F7&lt;/font&gt;&lt;font color="#ffd7d7"&gt;&amp;gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#ffd7d7"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#ffd7d7"&gt;ESC&lt;/font&gt;&lt;font color="#ffd7d7"&gt;&amp;gt;&lt;/font&gt;:cn&lt;font color="#ffd7d7"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#ffd7d7"&gt;CR&lt;/font&gt;&lt;font color="#ffd7d7"&gt;&amp;gt;&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot; Jump to next error/warn&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Enable spell checking in latex, bib and txt files&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&lt;/font&gt;&amp;nbsp;&lt;font color="#5fd7ff"&gt;Commands:&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;gt;&amp;nbsp;&amp;nbsp;jump to next bad word&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;]s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;gt;&amp;nbsp;&amp;nbsp;jump to prev bad word&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;z=&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;gt;&amp;nbsp;&amp;nbsp;suggest word&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;zg&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;gt;&amp;nbsp;&amp;nbsp;mark word as good (add to dictionary)&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;zw&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;gt;&amp;nbsp;&amp;nbsp;mark word as bad&amp;nbsp;&amp;nbsp;(remove from dictionary)&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;:h spell -&amp;gt; get more details about spelling&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;au&lt;/font&gt;&amp;nbsp;&lt;font color="#87ffaf"&gt;BufRead&lt;/font&gt;,&lt;font color="#87ffaf"&gt;BufNewFile&lt;/font&gt;&amp;nbsp;*.txt,*.tex,*.bib&amp;nbsp;&amp;nbsp;&lt;font color="#ffff00"&gt;setlocal&lt;/font&gt;&amp;nbsp;&lt;font color="#5fd7ff"&gt;spell&lt;/font&gt;&amp;nbsp;&lt;font color="#5fd7ff"&gt;spelllang&lt;/font&gt;=en_us&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Other Good Vim tips not used here&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Vim Tip #64&amp;nbsp;&amp;nbsp; - Set working dir to the file you are editing&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Why not used: Makes difficult the management of sessions and&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; makefiles.&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Vim Tip #305&amp;nbsp;&amp;nbsp;- List of editing vim tips&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Why not used: I can remember all the commands I use.&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Vim Tip #1203 - mapping to set up vtreeexplorer and taglist in left window&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Why not used: I use MiniBufExpl instead of vtreeexplorer&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Vim Tip #1318 - An attempt to emulate TextMate's snippet expansion&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Why not used: I am unable to get this working correctly.&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Vim Tip #???? - Force gf to open in new tabs&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#5fd7ff"&gt;Command:&lt;/font&gt;&lt;font color="#00ffff"&gt;&amp;nbsp;nnoremap gf &amp;lt;C-W&amp;gt;gf &lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Why not used: I use MiniBufExpl so no more tabs for me.&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot; Vim Tip #565&amp;nbsp;&amp;nbsp;- Never see ^M and pesky trailing spaces again&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#5fd7ff"&gt;Command:&lt;/font&gt;&lt;font color="#00ffff"&gt;&amp;nbsp;autocmd BufRead * silent! %s/[\r \t]\+$//&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Why not used: Not a good idea when working with others source&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;code. All the automatically deleted chars will be seen as &lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;changes in the diff files making it difficult to review the &lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;changes. Never use this if you plan to submit patches to ffmpeg &lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;or the Linux kernel or they will spam filter you forever!&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/4210/3782/1600/screen3.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/4210/3782/320/screen3.png" border="1" alt="" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34829202-6857098958218005916?l=piao-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://piao-tech.blogspot.com/feeds/6857098958218005916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=34829202&amp;postID=6857098958218005916' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/6857098958218005916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/6857098958218005916'/><link rel='alternate' type='text/html' href='http://piao-tech.blogspot.com/2008/10/basic-vimrc-file.html' title='Basic .vimrc file'/><author><name>龍神</name><uri>http://www.blogger.com/profile/16648963337079496096</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11487716133742490173'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_99Fzui5MBLY/SO3gwQSlmfI/AAAAAAAAAMY/jmZy0aQprn0/s72-c/vimsnap.png' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34829202.post-2776719073031246359</id><published>2009-06-12T13:26:00.008+09:00</published><updated>2009-06-21T15:29:16.374+09:00</updated><title type='text'>Vim tips for Latex editing</title><content type='html'>&lt;h4&gt;Simple Latex Makefile&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;With this simple Makefile you can compile your latex projects from within vim and use the quickfix window in case of errors to traverse and fix them one by one.&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;font face="monospace"&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;# &lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;# This makefile generates a PDF of the MAINTEX file.&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;# The output can be found inside the build subdirectory.&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;#&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;# Makefile based on&amp;nbsp;&amp;nbsp;&lt;a href="http://www.wlug.org.nz/LatexMakefiles"&gt;http://www.wlug.org.nz/LatexMakefiles&lt;/a&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;#&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;#&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;# This makefile has been tested in Kubuntu 9.04&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;#&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;# Prerequisites:&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;#&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;# sudo aptitude install ptex-bin ptex-base okumura-clsfiles ptex-jisfonts \&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xdvik-ja dvipsk-ja dvi2ps gv jbibtex-bin jmpost mendexk okumura-clsfiles \&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vfdata-morisawa5 dvi2ps-fontdesc-morisawa5 texlive-latex-extra latexmk \&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dvipng xpdf gs-cjk-resource vfdata-morisawa5 dvi2ps-fontdesc-morisawa5 \ &lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cmap-adobe-japan1 cmap-adobe-japan2 cmap-adobe-cns1 cmap-adobe-gb1&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;# sudo jisftconfig add&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;#&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;# When writing Japanese make sure your editor is saving the tex files&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;# in euc-jp encoding. In VIM this can be accomplished by setting the fenc &lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;# variable:&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;#&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;#&amp;nbsp;&amp;nbsp;- Open file as normal using vim &amp;lt;filename&amp;gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;#&amp;nbsp;&amp;nbsp;- Type&amp;nbsp;&amp;nbsp;:edit ++enc=euc-jp&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;#&amp;nbsp;&amp;nbsp;- Type&amp;nbsp;&amp;nbsp;:set fenc=euc-jp&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;#&amp;nbsp;&amp;nbsp;- Type&amp;nbsp;&amp;nbsp;:set enc=utf-8 &lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;## &lt;/font&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#87af87"&gt;&lt;b&gt;TODO&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&lt;font color="#87af87"&gt;&amp;nbsp;Add rule to convert images&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;## &lt;/font&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#87af87"&gt;&lt;b&gt;TODO&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&lt;font color="#87af87"&gt;&amp;nbsp;Add makeindex to create .toc files&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;###########################################################################&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;## Put here the file name of the main tex file.&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;MAINTEX&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/font&gt;= main&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;############################################################################&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;## Change the followin only if you know what you are doing&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;LATEXCMD&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;&lt;/font&gt;= platex&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#87af87"&gt;# [latex | platex]&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;BIBCMD&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;&lt;/font&gt;= jbibtex&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#87af87"&gt;# [bibtex | jbibtex]&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;DVIPDFCMD&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/font&gt;= dvipdf&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#87af87"&gt;# [dvipdf | dvipdfm | dvipdfmx]&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;PDFVIEWER&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/font&gt;= xpdf&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#87af87"&gt;# [okular | xpdf | evince ]&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;DVIVIEWER&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/font&gt;= xdvi-ja&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#87af87"&gt;# [xdvi | xdvi-ja | kdvi ]&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;## No need to change anything below this line&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;TEXFILES&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/b&gt;&lt;/font&gt;= &lt;font color="#ffd7af"&gt;&lt;b&gt;$(&lt;/b&gt;&lt;/font&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;wildcard&lt;/font&gt;&lt;/span&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;&amp;nbsp;*.tex)&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;TEXINPUTS&lt;/b&gt;&lt;/font&gt;=:&lt;font color="#ffd7af"&gt;&lt;b&gt;$(PWD)&lt;/b&gt;&lt;/font&gt;//:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#87af87"&gt;# Path to search for .tex, .cls and .sty files&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;BSTINPUTS&lt;/b&gt;&lt;/font&gt;=:&lt;font color="#ffd7af"&gt;&lt;b&gt;$(PWD)&lt;/b&gt;&lt;/font&gt;//:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#87af87"&gt;# Path to search for .bst files&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;BIBINPUTS&lt;/b&gt;&lt;/font&gt;=:&lt;font color="#ffd7af"&gt;&lt;b&gt;$(PWD)&lt;/b&gt;&lt;/font&gt;//:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#87af87"&gt;# Path to search for .bib files&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;TEXMFOUTPUT&lt;/b&gt;&lt;/font&gt;=&lt;font color="#ffd7af"&gt;&lt;b&gt;$(PWD)&lt;/b&gt;&lt;/font&gt;/build&amp;nbsp;&amp;nbsp;&lt;font color="#87af87"&gt;# Output dir for bibtex and jbibtex&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;LATEXOPTS&lt;/b&gt;&lt;/font&gt;= -output-directory=build -file-line-error -interaction=nonstopmode&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;export&lt;/font&gt;&lt;/span&gt;&amp;nbsp;TEXFILES TEXINPUTS BSTINPUTS BIBINPUTS TEXMFOUPUT&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff87"&gt;.PHONY:&lt;/font&gt;&amp;nbsp;all wordcount charcount pdf dvi&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff87"&gt;all:&lt;/font&gt;&amp;nbsp;build/&lt;font color="#ffd7af"&gt;&lt;b&gt;$(MAINTEX)&lt;/b&gt;&lt;/font&gt;.pdf&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff87"&gt;build :&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#d7afaf"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@&lt;/font&gt;&lt;font color="#87d7d7"&gt;echo &lt;/font&gt;&lt;font color="#d78787"&gt;&amp;quot;Creating build directory&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#d7afaf"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@&lt;/font&gt;&lt;font color="#87d7d7"&gt;mkdir build&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff87"&gt;build/$(MAINTEX).aux:&lt;/font&gt;&amp;nbsp;&lt;font color="#ffd7af"&gt;&lt;b&gt;$(MAINTEX)&lt;/b&gt;&lt;/font&gt;.tex &lt;font color="#ffd7af"&gt;&lt;b&gt;$(TEXFILES)&lt;/b&gt;&lt;/font&gt;&amp;nbsp;build&lt;br&gt;&lt;br /&gt;&lt;font color="#87d7d7"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;$(LATEXCMD)&lt;/b&gt;&lt;/font&gt;&lt;font color="#87d7d7"&gt;&amp;nbsp;&lt;/font&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;$(LATEXOPTS)&lt;/b&gt;&lt;/font&gt;&lt;font color="#87d7d7"&gt;&amp;nbsp;&lt;/font&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;$(MAINTEX)&lt;/b&gt;&lt;/font&gt;&lt;font color="#87d7d7"&gt;&amp;nbsp;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff87"&gt;build/$(MAINTEX).bbl:&lt;/font&gt;&amp;nbsp;build/&lt;font color="#ffd7af"&gt;&lt;b&gt;$(MAINTEX)&lt;/b&gt;&lt;/font&gt;.aux&lt;br&gt;&lt;br /&gt;&lt;font color="#87d7d7"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;$(BIBCMD)&lt;/b&gt;&lt;/font&gt;&lt;font color="#87d7d7"&gt;&amp;nbsp;build/&lt;/font&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;$(MAINTEX)&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff87"&gt;build/$(MAINTEX).dvi:&lt;/font&gt;&amp;nbsp;build/&lt;font color="#ffd7af"&gt;&lt;b&gt;$(MAINTEX)&lt;/b&gt;&lt;/font&gt;.bbl&lt;br&gt;&lt;br /&gt;&lt;font color="#87d7d7"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;$(LATEXCMD)&lt;/b&gt;&lt;/font&gt;&lt;font color="#87d7d7"&gt;&amp;nbsp;&lt;/font&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;$(LATEXOPTS)&lt;/b&gt;&lt;/font&gt;&lt;font color="#87d7d7"&gt;&amp;nbsp;&lt;/font&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;$(MAINTEX)&lt;/b&gt;&lt;/font&gt;&lt;font color="#87d7d7"&gt;&amp;nbsp;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87d7d7"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;$(LATEXCMD)&lt;/b&gt;&lt;/font&gt;&lt;font color="#87d7d7"&gt;&amp;nbsp;&lt;/font&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;$(LATEXOPTS)&lt;/b&gt;&lt;/font&gt;&lt;font color="#87d7d7"&gt;&amp;nbsp;&lt;/font&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;$(MAINTEX)&lt;/b&gt;&lt;/font&gt;&lt;font color="#87d7d7"&gt;&amp;nbsp;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff87"&gt;build/$(MAINTEX).pdf:&lt;/font&gt;&amp;nbsp;build/&lt;font color="#ffd7af"&gt;&lt;b&gt;$(MAINTEX)&lt;/b&gt;&lt;/font&gt;.dvi&lt;br&gt;&lt;br /&gt;&lt;font color="#87d7d7"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;$(DVIPDFCMD)&lt;/b&gt;&lt;/font&gt;&lt;font color="#87d7d7"&gt;&amp;nbsp;build/&lt;/font&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;$(MAINTEX)&lt;/b&gt;&lt;/font&gt;&lt;font color="#87d7d7"&gt;.dvi build/&lt;/font&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;$(MAINTEX)&lt;/b&gt;&lt;/font&gt;&lt;font color="#87d7d7"&gt;.pdf&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff87"&gt;dvi:&lt;/font&gt;&amp;nbsp;build/&lt;font color="#ffd7af"&gt;&lt;b&gt;$(MAINTEX)&lt;/b&gt;&lt;/font&gt;.dvi&lt;br&gt;&lt;br /&gt;&lt;font color="#87d7d7"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;$(DVIVIEWER)&lt;/b&gt;&lt;/font&gt;&lt;font color="#87d7d7"&gt;&amp;nbsp;build/&lt;/font&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;$(MAINTEX)&lt;/b&gt;&lt;/font&gt;&lt;font color="#87d7d7"&gt;.dvi &lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff87"&gt;pdf:&lt;/font&gt;&amp;nbsp;build/&lt;font color="#ffd7af"&gt;&lt;b&gt;$(MAINTEX)&lt;/b&gt;&lt;/font&gt;.pdf&lt;br&gt;&lt;br /&gt;&lt;font color="#87d7d7"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;$(PDFVIEWER)&lt;/b&gt;&lt;/font&gt;&lt;font color="#87d7d7"&gt;&amp;nbsp;build/&lt;/font&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;$(MAINTEX)&lt;/b&gt;&lt;/font&gt;&lt;font color="#87d7d7"&gt;.pdf &lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;# Word counting can be done in VIM usng Ctrl-g g but this command also includes&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;# latex commands. This make rule strips the latex and counts what is left&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff87"&gt;wordcount:&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#d7afaf"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@&lt;/font&gt;&lt;font color="#87d7d7"&gt;echo Approximate word count: `grep -v &lt;/font&gt;&lt;font color="#d78787"&gt;'^\\\\'&lt;/font&gt;&lt;font color="#87d7d7"&gt;&amp;nbsp;&lt;/font&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;$(TEXFILES)&lt;/b&gt;&lt;/font&gt;&lt;font color="#87d7d7"&gt;|grep -v &lt;/font&gt;&lt;font color="#d78787"&gt;'^&lt;/font&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;%&lt;/b&gt;&lt;/font&gt;&lt;font color="#d78787"&gt;'&lt;/font&gt;&lt;font color="#87d7d7"&gt;|wc -w`&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff87"&gt;charcount:&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#d7afaf"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@&lt;/font&gt;&lt;font color="#87d7d7"&gt;echo Approximate char count: `grep -v &lt;/font&gt;&lt;font color="#d78787"&gt;'^\\\\'&lt;/font&gt;&lt;font color="#87d7d7"&gt;&amp;nbsp;&lt;/font&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;$(TEXFILES)&lt;/b&gt;&lt;/font&gt;&lt;font color="#87d7d7"&gt;|grep -v &lt;/font&gt;&lt;font color="#d78787"&gt;'^&lt;/font&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;%&lt;/b&gt;&lt;/font&gt;&lt;font color="#d78787"&gt;'&lt;/font&gt;&lt;font color="#87d7d7"&gt;|wc -c`&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Put all your tex files, images, sty, cls, bib, bst files inside a directory with any subfolder tree structure you like. This Makefile sets some environment variables that allow it to find all these files as long as they are below the current directory tree.&lt;br /&gt;&lt;br /&gt;Make sure your main tex file is called &lt;span style="font-weight:bold;"&gt;main.tex&lt;/span&gt; or if you prefer another one replace the &lt;span style="font-weight:bold;"&gt;MAINTEX&lt;/span&gt; variable in the Makefile. Take note that it has no extension!.&lt;br /&gt;&lt;br /&gt;Also note that this Makefile is to compile Japanese EUC-JP tex files (IEICE Trans). If you do not need Japanese replace &lt;span style="font-weight:bold;"&gt;platex&lt;/span&gt; with simple &lt;span style="font-weight:bold;"&gt;latex&lt;/span&gt; and &lt;span style="font-weight:bold;"&gt;jbibtex&lt;/span&gt; with &lt;span style="font-weight:bold;"&gt;bibtex&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;All output files generated by latex/platex, bibtex/jbibtex are stored inside a build subdirectory. &lt;br /&gt;&lt;br /&gt;Now in your .vimrc you can add the following parameter to compile your latex project:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;font face="monospace"&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot; Working with Makefiles&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot; Press F5 to compile and open the error window if there&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot; are errors. If there are errors you can use :cn and :cN to&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot; jump foward and backward thru the error list. Press :ccl to&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot; close the error list or F5 again to recompile&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;map&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color="#8a8a8a"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#d7afaf"&gt;F5&lt;/font&gt;&lt;font color="#8a8a8a"&gt;&amp;gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#8a8a8a"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#d7afaf"&gt;ESC&lt;/font&gt;&lt;font color="#8a8a8a"&gt;&amp;gt;&lt;/font&gt;:make&lt;font color="#8a8a8a"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#d7afaf"&gt;CR&lt;/font&gt;&lt;font color="#8a8a8a"&gt;&amp;gt;&amp;lt;&lt;/font&gt;&lt;font color="#d7afaf"&gt;ESC&lt;/font&gt;&lt;font color="#8a8a8a"&gt;&amp;gt;&lt;/font&gt;:botright cwindow&lt;font color="#8a8a8a"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#d7afaf"&gt;CR&lt;/font&gt;&lt;font color="#8a8a8a"&gt;&amp;gt;&lt;/font&gt;&amp;nbsp;&amp;quot; Compile and open quick fix list&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;map&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color="#8a8a8a"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#d7afaf"&gt;F6&lt;/font&gt;&lt;font color="#8a8a8a"&gt;&amp;gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#8a8a8a"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#d7afaf"&gt;ESC&lt;/font&gt;&lt;font color="#8a8a8a"&gt;&amp;gt;&lt;/font&gt;:cN&lt;font color="#8a8a8a"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#d7afaf"&gt;CR&lt;/font&gt;&lt;font color="#8a8a8a"&gt;&amp;gt;&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot; Jump to prev error/warn&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;map&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color="#8a8a8a"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#d7afaf"&gt;F7&lt;/font&gt;&lt;font color="#8a8a8a"&gt;&amp;gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#8a8a8a"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#d7afaf"&gt;ESC&lt;/font&gt;&lt;font color="#8a8a8a"&gt;&amp;gt;&lt;/font&gt;:cn&lt;font color="#8a8a8a"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#d7afaf"&gt;CR&lt;/font&gt;&lt;font color="#8a8a8a"&gt;&amp;gt;&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot; Jump to next error/warn&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Now when editing you latex files press &amp;lt;F5&amp;gt; to compile them and if errors occur you will be presented with a quickfix window where you can use &amp;lt;F6&amp;gt; and &amp;lt;F7&amp;gt; to quickly jump to the previous and next error message.&lt;br /&gt;&lt;br /&gt;Additionally this Makefile also has a few useful commands you can invoke from within vim:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;:!make pdf&lt;/span&gt; to display the pdf file using xpdf or if you prefer a different viewer replace the PDFVIEWER variable in the Makefile.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;:!make dvi&lt;/span&gt; to display the dvi file using xdvi or if you prefer a different viewer replace the DVIVIEWER variable in the Makefile.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;:!make wordcount&lt;/span&gt; to display the number of words in all the tex documents. In vim you can also use g&amp;lt;ctrl-g&amp;gt; in normal mode but this also counts latex commands.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;:!make charcount&lt;/span&gt; same as wordcount but for characters instead of words.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Latex with Vim TagList plugin&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_99Fzui5MBLY/SjIVTAt75II/AAAAAAAAANk/uiwZb7gXVZo/s1600-h/vim-latex01.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 247px;" src="http://4.bp.blogspot.com/_99Fzui5MBLY/SjIVTAt75II/AAAAAAAAANk/uiwZb7gXVZo/s320/vim-latex01.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5346359123996566658" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;We can enable TagList to display important keywords like section, labels and references for easy navigation (&lt;a href="http://vim.wikia.com/wiki/Use_Taglist_with_LaTeX_files"&gt;link&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;First create a ~/.ctags file that contains the following:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;--langdef=tex&lt;br /&gt;--langmap=tex:.tex&lt;br /&gt;--regex-tex=/\\subsubsection[ \t]*\*?\{[ \t]*([^}]*)\}/- \1/s,subsubsection/&lt;br /&gt;--regex-tex=/\\subsection[ \t]*\*?\{[ \t]*([^}]*)\}/+\1/s,subsection/&lt;br /&gt;--regex-tex=/\\section[ \t]*\*?\{[ \t]*([^}]*)\}/\1/s,section/&lt;br /&gt;--regex-tex=/\\chapter[ \t]*\*?\{[ \t]*([^}]*)\}/\1/c,chapter/&lt;br /&gt;--regex-tex=/\\label[ \t]*\*?\{[ \t]*([^}]*)\}/\1/l,label/&lt;br /&gt;--regex-tex=/\\ref[ \t]*\*?\{[ \t]*([^}]*)\}/\1/r,ref/&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Then modify the taflist.vim file and add a new language. To do this search for "yacc language" and add these line before it:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;" tex language&lt;br /&gt;let s:tlist_def_tex_settings = 'tex;s:section;c:chapter;l:label;r:ref'&lt;br /&gt;&lt;br /&gt;" yacc language&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Now when you open the taglist window you will get a nice list of section, subsections, chapters, references, labels, etc... that you can navigate and use to jump quickly to each of them.&lt;br /&gt;&lt;br /&gt;If you do not have the taglist plugin installed you can follow my instructions &lt;a href="http://piao-tech.blogspot.com/2008/10/make-vim-and-ctag-play-nice-together.html"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Reference autocompletion&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_99Fzui5MBLY/SjIXjzzwlmI/AAAAAAAAANs/srnkrNvvpGY/s1600-h/vim-latex02.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 247px;" src="http://4.bp.blogspot.com/_99Fzui5MBLY/SjIXjzzwlmI/AAAAAAAAANs/srnkrNvvpGY/s320/vim-latex02.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5346361611612362338" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you write your labels as \label{fig:something}, then put this in your ~/.vimrc file:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;font face="monospace"&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;set&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color="#ffd7af"&gt;&lt;b&gt;iskeyword&lt;/b&gt;&lt;/font&gt;+=&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;:&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#87af87"&gt;&amp;quot; type /ref{fig: and prec &amp;lt;C-n&amp;gt; to autocomplete references&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;With this now you can type \ref{fig: and press &lt;C-n&gt; to get a list of labels you can cycle as shown in the image above.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Spell checking&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;This is not only for latex files. Simply put the following in your ~/.vimrc file to enable automatic spell checking. Learn how to use the spell checker to correct, add and/or ignore words.&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;font face="monospace"&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot; Enable spell checking in latex, bib and txt files&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&lt;/font&gt;&amp;nbsp;&lt;font color="#ffd7af"&gt;&lt;b&gt;Commands:&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;gt;&amp;nbsp;&amp;nbsp;jump to next bad word&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;]s&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;gt;&amp;nbsp;&amp;nbsp;jump to prev bad word&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;z=&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;gt;&amp;nbsp;&amp;nbsp;suggest word&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;zg&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;gt;&amp;nbsp;&amp;nbsp;mark word as good (add to dictionary)&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;zw&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;gt;&amp;nbsp;&amp;nbsp;mark word as bad&amp;nbsp;&amp;nbsp;(remove from dictionary)&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;:h spell -&amp;gt; get more details about spelling&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;au&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color="#d7d7af"&gt;&lt;b&gt;BufRead&lt;/b&gt;&lt;/font&gt;,&lt;font color="#d7d7af"&gt;&lt;b&gt;BufNewFile&lt;/b&gt;&lt;/font&gt;&amp;nbsp;*.txt,*.tex,*.bib&amp;nbsp;&amp;nbsp;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;setlocal&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color="#ffd7af"&gt;&lt;b&gt;spell&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#ffd7af"&gt;&lt;b&gt;spelllang&lt;/b&gt;&lt;/font&gt;=en_us&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34829202-2776719073031246359?l=piao-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://piao-tech.blogspot.com/feeds/2776719073031246359/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=34829202&amp;postID=2776719073031246359' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/2776719073031246359'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/2776719073031246359'/><link rel='alternate' type='text/html' href='http://piao-tech.blogspot.com/2009/06/vim-tips-for-latex-editing.html' title='Vim tips for Latex editing'/><author><name>龍神</name><uri>http://www.blogger.com/profile/16648963337079496096</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11487716133742490173'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_99Fzui5MBLY/SjIVTAt75II/AAAAAAAAANk/uiwZb7gXVZo/s72-c/vim-latex01.png' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34829202.post-3249813218759212810</id><published>2008-10-09T21:59:00.003+09:00</published><updated>2009-06-12T18:00:38.782+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Vim'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><title type='text'>My Vim Tips</title><content type='html'>List of my Vim Tips&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://piao-tech.blogspot.com/2008/10/basic-vimrc-file.html"&gt;Basic Vim Configuration with some nice features like 256 color terminal support.&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://piao-tech.blogspot.com/2008/10/make-vim-and-ctag-play-nice-together.html"&gt;How to configure Vim to take full advantage of exuberant-ctags&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://piao-tech.blogspot.com/2008/10/open-new-files-as-tabs-in-current-vim.html"&gt;How to open new files as tabs in already opened vim console&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://piao-tech.blogspot.com/2008/10/use-vimdiff-as-subversion-diff-command.html"&gt;How to use vimdiff as Subversion diff command&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://piao-tech.blogspot.com/2009/06/handling-multiple-encodings-in-vim.html"&gt;How to handle different file encodings with Vim&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://piao-tech.blogspot.com/2009/06/vim-tips-for-latex-editing.html"&gt;Working Latex with Vim&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34829202-3249813218759212810?l=piao-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://piao-tech.blogspot.com/feeds/3249813218759212810/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=34829202&amp;postID=3249813218759212810' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/3249813218759212810'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/3249813218759212810'/><link rel='alternate' type='text/html' href='http://piao-tech.blogspot.com/2008/10/my-vim-tips.html' title='My Vim Tips'/><author><name>龍神</name><uri>http://www.blogger.com/profile/16648963337079496096</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11487716133742490173'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34829202.post-9170664006837978516</id><published>2009-06-12T13:27:00.003+09:00</published><updated>2009-06-12T15:25:51.041+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Vim'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><title type='text'>Handling multiple encodings in Vim</title><content type='html'>Most people edit, load and save files in a single character encoding (i.e. en_US.UTF-8) but for many this is not the case. For me I need to write documents and emails in japanese UTF-8 (ja_JP.UTF-8), Latex in EUC-JP (ja_JP.EUC-JP) and source code comments in Shift-JIS (ja_JP.SJIS). &lt;br /&gt;&lt;br /&gt;To handle a certain character encoding there are three things you must consider:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Your editor character encoding&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Your terminal character encoding&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Your font character encoding support&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;In the prehistoric era editors and terminal could support a single character encoding so you needed a different pair for each encoding you needed. Believe me when I tell you this was not fun at all.&lt;br /&gt;&lt;br /&gt;These days most editors and terminals support a large array of character encodings and a lot of free fonts are available that support all the character sets I need. Still it is necessary to reconfigure each part (editor/terminal) or create different profiles for each character encoding you needed to edit (i.e. &lt;a href="http://www.running-dog.net/2008/08/kde4_konqueror_konsole.html"&gt;link&lt;/a&gt;) for the editor and the console.&lt;br /&gt;&lt;br /&gt;Today I took the time to understand how vim character encoding support works and I found that it has everything I need and a lot more. By carefully manipulating the the fenc, fencs, enc and tenc configuration parameters I can edit any file in any character encoding with little effort. Here are my .vimrc configuration parameters:&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;font face="monospace"&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;quot; Character encoding settings&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;quot; By manipulating this variables it is possible to edit all files in one &lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;quot; encoding while using the terminal in a different encoding and writing/reading&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;quot; the file in another encoding. Here we set all three variables to UTF-8.&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot; Default file encoding for new files&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;setglobal&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color="#ffd7af"&gt;&lt;b&gt;fenc&lt;/b&gt;&lt;/font&gt;=utf-8&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot; Auto detect file encoding when opening a file. To check what file encoding was&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot; selected run &lt;/font&gt;&lt;font color="#d78787"&gt;&amp;quot;:set fenc&amp;quot;&lt;/font&gt;&lt;font color="#87af87"&gt;&amp;nbsp;and if you know the auto detection failed and want to&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot; force another one run &lt;/font&gt;&lt;font color="#d78787"&gt;&amp;quot;:edit ++enc=&amp;lt;your_enc&amp;gt;&amp;quot;&lt;/font&gt;&lt;font color="#87af87"&gt;.&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;set&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color="#ffd7af"&gt;&lt;b&gt;fencs&lt;/b&gt;&lt;/font&gt;=utf-8&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;,&lt;/font&gt;&lt;/span&gt;euc-jp&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;,&lt;/font&gt;&lt;/span&gt;sjis&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot; Internal encoding used by vim buffers, help and commands&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;set&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color="#ffd7af"&gt;&lt;b&gt;enc&lt;/b&gt;&lt;/font&gt;=utf-8&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot; Terminal encoding used for input and terminal display&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot; Make sure your terminal is configured with the same encoding.&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;set&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color="#ffd7af"&gt;&lt;b&gt;tenc&lt;/b&gt;&lt;/font&gt;=utf-8&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;h3&gt;tenc:&lt;/h3&gt; This is the character encoding used to display and input text to the terminal. I configure my terminal (Konsole) always in UTF-8 and as far as I know my input method for Japanese (scim/anthy) is also UTF-8 so to avoid visual/input problems I leave this in UTF-8.&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;h3&gt;enc:&lt;/h3&gt; The encoding used internally by vim buffers, help and commands. This does not need to be the same as &lt;span style="font-weight:bold;"&gt;tenc&lt;/span&gt; as vim will convert from one encoding to the other if they differ. This way you can use your native language encoding in your terminal and input method and let vim handle everything internally using UTF-8.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;h3&gt;fenc:&lt;/h3&gt; Is the character encoding used for reading/writing files. Again this can differ from &lt;span style="font-weight:bold;"&gt;enc&lt;/span&gt; and &lt;span style="font-weight:bold;"&gt;tenc&lt;/span&gt; because vim will convert between them if they differ. This way you can have your terminal configured with your native language (i.e. Japanese, Russian, Chinese...), let vim work internally in UTF-8 and finally save your files in any coding you want by setting fenc.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;h3&gt;fencs:&lt;/h3&gt; This is used by vim to try to auto detect the character encoding when opening an already existing file. The order in which you put the options is important so read the help &lt;span style="font-weight:bold;"&gt;":h fencs"&lt;/span&gt; to learn how to set this correctly. For example if I put euc-jp first in the list all my English documents will be detected as euc-jp instead of utf-8 because all English characters are a subset of euc-jp, the same goes for latin1 and cp1250 encodings so make sure to put these at the end of the list. If the auto detection fails and your document is not displayed correctly you can always reload it forcing an encoding using &lt;span style="font-weight:bold;"&gt;":edit ++enc=euc-jp"&lt;/span&gt; of course replace euc-jp with your desired encoding.&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;In my example above I set everything to UTF-8 that is recommended because converting from other encodings may cause loss of information. The only parameter I change is &lt;span style="font-weight:bold;"&gt;fenc&lt;/span&gt; when I need edit/save a file in a different encoding.&lt;br /&gt;&lt;br /&gt;For example if I want to create a new file in euc-jp encoding:&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  - Open new file as normal using vim&lt; &lt;filename&gt;&lt;br /&gt;  - Set file encoding using :set fenc=euc-jp&lt;br /&gt;  - Edit/Save as much as you like and rest assured that your file is euc-jp.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;To edit an existing file simply open it and let vim auto detect the encoding using the options available in &lt;span style="font-weight:bold;"&gt;fencs&lt;/span&gt;. To check what encoding was set by vim you can use the command &lt;span style="font-weight:bold;"&gt;":set fenc"&lt;/span&gt; and it will display the auto detected encoding. If it is not the correct one you can force the encoding by reloading the file using the command &lt;span style="font-weight:bold;"&gt;":edit ++enc=euc-jp"&lt;/span&gt; replacing "euc-jp" with the encoding you desire.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34829202-9170664006837978516?l=piao-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://piao-tech.blogspot.com/feeds/9170664006837978516/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=34829202&amp;postID=9170664006837978516' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/9170664006837978516'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/9170664006837978516'/><link rel='alternate' type='text/html' href='http://piao-tech.blogspot.com/2009/06/handling-multiple-encodings-in-vim.html' title='Handling multiple encodings in Vim'/><author><name>龍神</name><uri>http://www.blogger.com/profile/16648963337079496096</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11487716133742490173'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34829202.post-1977807154279183961</id><published>2008-10-09T21:22:00.004+09:00</published><updated>2009-06-12T13:18:27.035+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Vim'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Kubuntu'/><title type='text'>Open new files as tabs in current Vim Console</title><content type='html'>When programming I like to have a single Vim editor open with all my files as tabs. Until now I was using the ":tabnew" command to open files in the current Vim window as I knew no other way.&lt;br /&gt;&lt;br /&gt;Some research led me to the --remote-tab switch that allows to open files as tabs in currently open Vim processes but it seemed to work only with the graphical interface (gvim) and not with the console (vim). But as I made some tests I found this can work with the vim in console mode and more over can be nicely integrated with my favorite file managers (Konqueror/Dolphin). &lt;br /&gt;&lt;br /&gt;All I needed to do was configure my bash so it will always start vim in server mode if it is not already and to always use the --remote-tab switch when opening files. To do this I simply added these functions to my ~/.bashrc file:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;font color="#ffff87"&gt;function&lt;/font&gt;&amp;nbsp;v &lt;font color="#8a8a8a"&gt;{&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;font color="#ffd7af"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#ffffd7"&gt;[&lt;/font&gt;&amp;nbsp;&lt;font color="#ffffd7"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;$#&lt;/b&gt;&lt;/font&gt;&lt;font color="#ffffd7"&gt;&amp;quot;&lt;/font&gt;&amp;nbsp;&lt;font color="#ffd7af"&gt;&lt;b&gt;-eq&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#ffffd7"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#d78787"&gt;0&lt;/font&gt;&lt;font color="#ffffd7"&gt;&amp;quot;&lt;/font&gt;&amp;nbsp;&lt;font color="#ffffd7"&gt;]&lt;/font&gt;&lt;font color="#ffffd7"&gt;;&lt;/font&gt;&amp;nbsp;&lt;font color="#ffd7af"&gt;&lt;b&gt;then&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/usr/bin/vim --servername VIMLOCAL&lt;br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;font color="#ffd7af"&gt;&lt;b&gt;else&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#ffd7af"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;echo&lt;/font&gt;&lt;/span&gt;&lt;font color="#d78787"&gt;&amp;nbsp;&lt;/font&gt;&lt;font color="#ffffd7"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;$*&lt;/b&gt;&lt;/font&gt;&lt;font color="#ffffd7"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#d78787"&gt;&amp;nbsp;&lt;/font&gt;&lt;font color="#ffffd7"&gt;|&lt;/font&gt;&amp;nbsp;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;grep&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color="#ffd7af"&gt;&lt;b&gt;-q&lt;/b&gt;&lt;/font&gt;&amp;nbsp;-- &lt;font color="#ffffd7"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#d78787"&gt;--servername&lt;/font&gt;&lt;font color="#ffffd7"&gt;&amp;quot;&lt;/font&gt;&amp;nbsp;&lt;font color="#ffffd7"&gt;;&lt;/font&gt;&amp;nbsp;&lt;font color="#ffd7af"&gt;&lt;b&gt;then&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#87af87"&gt;# echo &amp;quot;Command already has --servername use it&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/usr/bin/vim &lt;font color="#ffd7af"&gt;&lt;b&gt;$*&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#ffd7af"&gt;&lt;b&gt;else&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#87af87"&gt;#echo &amp;quot;Use default VIM server VIMLOCAL&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/usr/bin/vim --servername VIMLOCAL --remote-tab-silent &lt;font color="#ffd7af"&gt;&lt;b&gt;$*&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#ffd7af"&gt;&lt;b&gt;fi&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;font color="#ffd7af"&gt;&lt;b&gt;fi&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#8a8a8a"&gt;}&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff87"&gt;function&lt;/font&gt;&amp;nbsp;gv &lt;font color="#8a8a8a"&gt;{&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;font color="#ffd7af"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#ffffd7"&gt;[&lt;/font&gt;&amp;nbsp;&lt;font color="#ffffd7"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;$#&lt;/b&gt;&lt;/font&gt;&lt;font color="#ffffd7"&gt;&amp;quot;&lt;/font&gt;&amp;nbsp;&lt;font color="#ffd7af"&gt;&lt;b&gt;-eq&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#ffffd7"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#d78787"&gt;0&lt;/font&gt;&lt;font color="#ffffd7"&gt;&amp;quot;&lt;/font&gt;&amp;nbsp;&lt;font color="#ffffd7"&gt;]&lt;/font&gt;&lt;font color="#ffffd7"&gt;;&lt;/font&gt;&amp;nbsp;&lt;font color="#ffd7af"&gt;&lt;b&gt;then&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/usr/bin/gvim --servername GVIMLOCAL&lt;br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;font color="#ffd7af"&gt;&lt;b&gt;else&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#ffd7af"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;echo&lt;/font&gt;&lt;/span&gt;&lt;font color="#d78787"&gt;&amp;nbsp;&lt;/font&gt;&lt;font color="#ffffd7"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;$*&lt;/b&gt;&lt;/font&gt;&lt;font color="#ffffd7"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#d78787"&gt;&amp;nbsp;&lt;/font&gt;&lt;font color="#ffffd7"&gt;|&lt;/font&gt;&amp;nbsp;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;grep&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color="#ffd7af"&gt;&lt;b&gt;-q&lt;/b&gt;&lt;/font&gt;&amp;nbsp;-- &lt;font color="#ffffd7"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#d78787"&gt;--servername&lt;/font&gt;&lt;font color="#ffffd7"&gt;&amp;quot;&lt;/font&gt;&amp;nbsp;&lt;font color="#ffffd7"&gt;;&lt;/font&gt;&amp;nbsp;&lt;font color="#ffd7af"&gt;&lt;b&gt;then&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#87af87"&gt;# echo &amp;quot;Command already has --servername use it&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/usr/bin/gvim &lt;font color="#ffd7af"&gt;&lt;b&gt;$*&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#ffd7af"&gt;&lt;b&gt;else&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#87af87"&gt;#echo &amp;quot;Use default VIM server VIMLOCAL&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/usr/bin/gvim --servername GVIMLOCAL --remote-tab-silent &lt;font color="#ffd7af"&gt;&lt;b&gt;$*&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#ffd7af"&gt;&lt;b&gt;fi&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;font color="#ffd7af"&gt;&lt;b&gt;fi&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#8a8a8a"&gt;}&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;alias &lt;/font&gt;&lt;/span&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;vi&lt;/b&gt;&lt;/font&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;=&lt;/font&gt;&lt;/span&gt;v&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;alias &lt;/font&gt;&lt;/span&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;vim&lt;/b&gt;&lt;/font&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;=&lt;/font&gt;&lt;/span&gt;v&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;alias &lt;/font&gt;&lt;/span&gt;&lt;font color="#ffd7af"&gt;&lt;b&gt;gvim&lt;/b&gt;&lt;/font&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;=&lt;/font&gt;&lt;/span&gt;gv&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;With these functions loaded (i.e. source ~/.bashrc) the first time you execute vim/gvim it will start a new process in server mode. &lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;# this command will open vim in the current console&lt;br /&gt;# and display first_file.txt for editing.&lt;br /&gt;&lt;br /&gt;vim first_file.txt &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The second and all subsequent times you execute vim/gvim the files you set as parameters will be opened as tabs in the already opened vim/gvim instance.&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;# This command in other console will open the files&lt;br /&gt;# second_file.txt and third_file.txt as tabs in the&lt;br /&gt;# other console with first_file.txt open&lt;br /&gt;&lt;br /&gt;vim second_file.txt third_file.txt&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The above examples work also with gvim instead of vim. The only drawback is that now it is difficult to open files in a separate console. The best solution I found is to call vim with a different server name:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;# This command will create a new instance of vim in the current console window&lt;br /&gt;# and display the other_file.txt file for editing.&lt;br /&gt;&lt;br /&gt;vim --servername OTHERNAME other_file.txt&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;If you prefer not to use tabs and like files to be opened as buffers inside a current running Vim instance then simply replace "--remote-tab-silent" with "--remote-silent" in the above scripts.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34829202-1977807154279183961?l=piao-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://piao-tech.blogspot.com/feeds/1977807154279183961/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=34829202&amp;postID=1977807154279183961' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/1977807154279183961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/1977807154279183961'/><link rel='alternate' type='text/html' href='http://piao-tech.blogspot.com/2008/10/open-new-files-as-tabs-in-current-vim.html' title='Open new files as tabs in current Vim Console'/><author><name>龍神</name><uri>http://www.blogger.com/profile/16648963337079496096</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11487716133742490173'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34829202.post-9130122878161532579</id><published>2008-10-09T19:48:00.009+09:00</published><updated>2009-06-12T13:15:08.062+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Vim'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Kubuntu'/><title type='text'>Make Vim and Ctag play nice together</title><content type='html'>CTags and Vim are a killer combination for developing all kinds of programs in all kinds of languages. These tools are very flexible by themselves and combined we have so many options on how to use them together that it becomes very difficult to do efficiently.&lt;br /&gt;&lt;br /&gt;For example you can configure Vim to auto generate ctags based on programming language and to search for tags files in every imaginable part of your hard disk. So how should one decide were to put the ctag files, how to generate them and how to access them?. &lt;br /&gt;&lt;br /&gt;Here I talk about how I personally handle ctag files and how I configure vim to auto generate and search them.&lt;br /&gt;&lt;br /&gt;&lt;B&gt;Pre requisites &lt;/B&gt;&lt;br /&gt;&lt;br /&gt;The following instructions were tested on a Linux machine installed using Kubuntu 8.10, 9.04 and 9.10. The first step is of course to make sure you have installed Vim and exuberant-ctags in you machine. For instruction on how to install Vim with minimal configuration refer to this &lt;a href="http://piao-tech.blogspot.com/2008/10/basic-vimrc-file.html"&gt;link&lt;/a&gt;. To install exuberant-ctags simply execute the following command in a konsole window:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;sudo aptitude install exuberant-ctags&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;B&gt; Generate system wide ctags &lt;/B&gt;&lt;br /&gt;&lt;br /&gt;I usually generate ctag files for the languages and libraries I use in my projects and save them inside my ~/.vim directory. This way I can easily jump to these library definitions.&lt;br /&gt;&lt;br /&gt;To do so create some folders to store the ctag files:&lt;br /&gt;&lt;br /&gt;&lt;div class=code&gt;&lt;br /&gt;mkdir -p ~/.vim/tags/linux&lt;br /&gt;mkdir -p ~/.vim/tags/local&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Then generate ctag files for each library and language you intent to use:&lt;br /&gt;&lt;br /&gt;&lt;div class=code&gt;&lt;br /&gt;&lt;pre&gt;# Create system tags for linux kernel. This will allow you to jump &lt;br /&gt;# to the linux header files:&lt;br /&gt;&lt;br /&gt;sudo aptitude install linux-headers-`uname -r`&lt;br /&gt;ctags -R -f ~/.vim/tags/linux/ctags /usr/src/linux-headers-`uname -r`&lt;br /&gt;&lt;br /&gt;# Create system tags for ruby&lt;br /&gt;&lt;br /&gt;ctags -R -f ~/.vim/tags/linux/rbtags /usr/lib/ruby&lt;br /&gt;&lt;br /&gt;# Create system tags for Java&lt;br /&gt;&lt;br /&gt;# For the java tags to work you need to install java source package. &lt;br /&gt;# In Kubuntu/Ubuntu follow these instructions:&lt;br /&gt;&lt;br /&gt;sudo aptitude install sun-java6-source&lt;br /&gt;sudo mkdir -p /usr/lib/jvm/java-6-sun/src&lt;br /&gt;sudo unzip -d /usr/lib/jvm/java-6-sun/ /usr/lib/jvm/java-6-sun/src.zip&lt;br /&gt;ctags -R -f ~/.vim/tags/linux/javatags /usr/lib/jvm/java-6-sun/src&lt;br /&gt;&lt;br /&gt;# You may create additional ctag files for other libraries like QT, &lt;br /&gt;# SDL, etc.&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;B&gt;Configure Vim to generate/update your local ctag files&lt;/B&gt;&lt;br /&gt;&lt;br /&gt;Creating ctag files for libraries can be done when a new version is available or when you modify/replace it. On the other hand your own projects may change in a daily or even hour basis so you need to update your ctag files all the time in order to use them during your project development.&lt;br /&gt;&lt;br /&gt;To tackle this I create some local ctag files, one for each programming language I use, and tell Vim to update them every time a file I edit changes. This is very simple to do by adding the following lines to the vim configuration file (i.e. ~/.vimrc):&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;let _ctag_ = "ctags -a -f ~/.vim/tags/local/ctags --extra=+q "&lt;br /&gt;au BufWritePost *.cpp,*.h,*.c,*.rl,*.def call system(_ctag_ . expand("%:p"))&lt;br /&gt;&lt;br /&gt;let _rbtag_ = "ctags -a -f ~/.vim/tags/local/rbtags --extra=+q "&lt;br /&gt;au BufWritePost *.rb call system(_rbtag_ . expand("%:p"))&lt;br /&gt;&lt;br /&gt;let _pytag_ = "ctags -a -f ~/.vim/tags/local/pytags --extra=+q "&lt;br /&gt;au BufWritePost *.py call system(_pytag_ . expand("%:p"))&lt;br /&gt;&lt;br /&gt;let _jtag_ = "ctags -a -f ~/.vim/tags/local/javatags --extra=+q "&lt;br /&gt;au BufWritePost *.java call system(_jtag_ . expand("%:p"))&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Finally we must tell vim where to look for these tags by adding the following to the ~/.vimrc configuration file:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;pre&gt;au BufRead,BufNewFile *.rb setlocal tags+=~/.vim/tags/local/rbtags,~/.vim/tags/linux/rbtags&lt;br /&gt;au BufRead,BufNewFile *.cpp,*.h,*.c setlocal tags+=~/.vim/tags/local/ctags,~/.vim/tags/linux/ctags&lt;br /&gt;au BufRead,BufNewFile *.rl,*.def setlocal tags+=~/.vim/tags/local/ctags,~/.vim/tags/linux/ctags&lt;br /&gt;au BufRead,BufNewFile *.py setlocal tags+=~/.vim/tags/local/pytags,~/.vim/tags/linux/pytags&lt;br /&gt;au BufRead,BufNewFile *.java setlocal tags+=~/.vim/tags/local/javatags,~/.vim/tags/linux/javatags&lt;br /&gt;&lt;br /&gt;set tags=./.tags;${HOME}&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Note that we use setlocal instead of simply set so the tag files are added to the current edit buffer only. This is done so we do not add all tag files to every file as we do not need for example the ruby tag file when editing a python script.&lt;br /&gt;&lt;br /&gt;The last set command is to tell vim to search for ".tags" files inside the current folder recursively up to your HOME directory. We do not want vim tracking all the tag files up to ROOT do we?&lt;br /&gt;&lt;br /&gt;Additionally I recommend you to use the TagList plugin that will provide a nice list with all your tags so you can easily jump from tag to tag.&lt;br /&gt;&lt;br /&gt;Here is the complete vim configuration. Simply copy paste this in your own .vimrc file and follow the instructions in the comments.&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;font face="monospace"&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;quot; Make vim work nice with exuberant ctags&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot; Install exuberant-ctags in your system&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;- i.e. for Kubuntu:&amp;nbsp;&amp;nbsp;sudo aptitude install exuberant-ctags&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot; Vim Tip #1299 - Update local tags when files are saved&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Create a folder to store the tag files: mkdir -p ~/.vim/tags/local&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;let&lt;/font&gt;&lt;/span&gt;&amp;nbsp;_ctag_&amp;nbsp;&lt;font color="#ffffd7"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color="#d78787"&gt;&amp;quot;ctags -a -f ~/.vim/tags/local/ctags --extra=+q &amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;au&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color="#d7d7af"&gt;&lt;b&gt;BufWritePost&lt;/b&gt;&lt;/font&gt;&amp;nbsp;*.cpp,*.h,*.c,*.rl,*.def&amp;nbsp;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;call&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color="#ffff87"&gt;system&lt;/font&gt;&lt;font color="#ffffd7"&gt;(&lt;/font&gt;_ctag_ &lt;font color="#ffffd7"&gt;.&lt;/font&gt;&amp;nbsp;expand&lt;font color="#ffffd7"&gt;(&lt;/font&gt;&lt;font color="#d78787"&gt;&amp;quot;%:p&amp;quot;&lt;/font&gt;&lt;font color="#ffffd7"&gt;))&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;let&lt;/font&gt;&lt;/span&gt;&amp;nbsp;_rbtag_&amp;nbsp;&lt;font color="#ffffd7"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color="#d78787"&gt;&amp;quot;ctags -a -f ~/.vim/tags/local/rbtags --extra=+q &amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;au&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color="#d7d7af"&gt;&lt;b&gt;BufWritePost&lt;/b&gt;&lt;/font&gt;&amp;nbsp;*.rb&amp;nbsp;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;call&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color="#ffff87"&gt;system&lt;/font&gt;&lt;font color="#ffffd7"&gt;(&lt;/font&gt;_rbtag_ &lt;font color="#ffffd7"&gt;.&lt;/font&gt;&amp;nbsp;expand&lt;font color="#ffffd7"&gt;(&lt;/font&gt;&lt;font color="#d78787"&gt;&amp;quot;%:p&amp;quot;&lt;/font&gt;&lt;font color="#ffffd7"&gt;))&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;let&lt;/font&gt;&lt;/span&gt;&amp;nbsp;_pytag_&amp;nbsp;&lt;font color="#ffffd7"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color="#d78787"&gt;&amp;quot;ctags -a -f ~/.vim/tags/local/pytags --extra=+q &amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;au&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color="#d7d7af"&gt;&lt;b&gt;BufWritePost&lt;/b&gt;&lt;/font&gt;&amp;nbsp;*.py&amp;nbsp;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;call&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color="#ffff87"&gt;system&lt;/font&gt;&lt;font color="#ffffd7"&gt;(&lt;/font&gt;_pytag_ &lt;font color="#ffffd7"&gt;.&lt;/font&gt;&amp;nbsp;expand&lt;font color="#ffffd7"&gt;(&lt;/font&gt;&lt;font color="#d78787"&gt;&amp;quot;%:p&amp;quot;&lt;/font&gt;&lt;font color="#ffffd7"&gt;))&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;let&lt;/font&gt;&lt;/span&gt;&amp;nbsp;_jtag_&amp;nbsp;&lt;font color="#ffffd7"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color="#d78787"&gt;&amp;quot;ctags -a -f ~/.vim/tags/local/javatags --extra=+q &amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;au&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color="#d7d7af"&gt;&lt;b&gt;BufWritePost&lt;/b&gt;&lt;/font&gt;&amp;nbsp;*.java&amp;nbsp;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;call&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color="#ffff87"&gt;system&lt;/font&gt;&lt;font color="#ffffd7"&gt;(&lt;/font&gt;_jtag_ &lt;font color="#ffffd7"&gt;.&lt;/font&gt;&amp;nbsp;expand&lt;font color="#ffffd7"&gt;(&lt;/font&gt;&lt;font color="#d78787"&gt;&amp;quot;%:p&amp;quot;&lt;/font&gt;&lt;font color="#ffffd7"&gt;))&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot; Vim Tip #804 - Generate System Tags for your favorite languages&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Create a folder to store the system tag files: mkdir -p ~/.vim/tags/linux&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Create system tags for linux kernel.&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sudo aptitude install linux-headers-`uname -r`&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctags -R -f ~/.vim/tags/linux/ctags /usr/src/linux-headers-`uname -r`&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Create system tags for ruby&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctags -R -f ~/.vim/tags/linux/rbtags /usr/lib/ruby&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Create system tags for Java&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sudo aptitude install sun-java6-source&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cd /usr/lib/jvm/java-6-sun&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sudo mkdir src&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sudo unzip -d src src.zip&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctags -R -f ~/.vim/tags/linux/javatags /usr/lib/jvm/java-6-sun/src&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Finally configure vim to read these tags depending of the buffer filetype.&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Also you may add other system tags for perl and/or python&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;au&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color="#d7d7af"&gt;&lt;b&gt;BufRead&lt;/b&gt;&lt;/font&gt;,&lt;font color="#d7d7af"&gt;&lt;b&gt;BufNewFile&lt;/b&gt;&lt;/font&gt;&amp;nbsp;*.rb&amp;nbsp;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;setlocal&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color="#ffd7af"&gt;&lt;b&gt;tags&lt;/b&gt;&lt;/font&gt;+=~/.vim/tags/local/rbtags&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;,&lt;/font&gt;&lt;/span&gt;~/.vim/tags/linux/rbtags&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;au&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color="#d7d7af"&gt;&lt;b&gt;BufRead&lt;/b&gt;&lt;/font&gt;,&lt;font color="#d7d7af"&gt;&lt;b&gt;BufNewFile&lt;/b&gt;&lt;/font&gt;&amp;nbsp;*.cpp,*.h,*.c&amp;nbsp;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;setlocal&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color="#ffd7af"&gt;&lt;b&gt;tags&lt;/b&gt;&lt;/font&gt;+=~/.vim/tags/local/ctags&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;,&lt;/font&gt;&lt;/span&gt;~/.vim/tags/linux/ctags&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;au&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color="#d7d7af"&gt;&lt;b&gt;BufRead&lt;/b&gt;&lt;/font&gt;,&lt;font color="#d7d7af"&gt;&lt;b&gt;BufNewFile&lt;/b&gt;&lt;/font&gt;&amp;nbsp;*.rl,*.def&amp;nbsp;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;setlocal&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color="#ffd7af"&gt;&lt;b&gt;tags&lt;/b&gt;&lt;/font&gt;+=~/.vim/tags/local/ctags&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;,&lt;/font&gt;&lt;/span&gt;~/.vim/tags/linux/ctags&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;au&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color="#d7d7af"&gt;&lt;b&gt;BufRead&lt;/b&gt;&lt;/font&gt;,&lt;font color="#d7d7af"&gt;&lt;b&gt;BufNewFile&lt;/b&gt;&lt;/font&gt;&amp;nbsp;*.py&amp;nbsp;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;setlocal&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color="#ffd7af"&gt;&lt;b&gt;tags&lt;/b&gt;&lt;/font&gt;+=~/.vim/tags/local/pytags&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;,&lt;/font&gt;&lt;/span&gt;~/.vim/tags/linux/pytags&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;au&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color="#d7d7af"&gt;&lt;b&gt;BufRead&lt;/b&gt;&lt;/font&gt;,&lt;font color="#d7d7af"&gt;&lt;b&gt;BufNewFile&lt;/b&gt;&lt;/font&gt;&amp;nbsp;*.java&amp;nbsp;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;setlocal&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color="#ffd7af"&gt;&lt;b&gt;tags&lt;/b&gt;&lt;/font&gt;+=~/.vim/tags/local/javatags&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;,&lt;/font&gt;&lt;/span&gt;~/.vim/tags/linux/javatags&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot; Vim Tip #94 - Set tags search path recursive up to $HOME&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;set&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color="#ffd7af"&gt;&lt;b&gt;tags&lt;/b&gt;&lt;/font&gt;=./.tags;${HOME}&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;quot; Tag list features&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;quot; Install the all powerfull taglist plugin so you can browse using the ctags&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;quot;&amp;nbsp;&amp;nbsp; Get taglist_45.zip from &lt;a href="http://vim-taglist.sourceforge.net/"&gt;http://vim-taglist.sourceforge.net/&lt;/a&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;quot;&amp;nbsp;&amp;nbsp; Uncompress to your vim directory:&amp;nbsp;&amp;nbsp;unzip -d ~/.vim taglist_45.zip&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;let&lt;/font&gt;&lt;/span&gt;&amp;nbsp;Tlist_Auto_Open&lt;font color="#ffffd7"&gt;=&lt;/font&gt;&lt;font color="#87d7d7"&gt;1&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;let&lt;/font&gt;&lt;/span&gt;&amp;nbsp;Tlist_Auto_Update&lt;font color="#ffffd7"&gt;=&lt;/font&gt;&lt;font color="#87d7d7"&gt;1&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;let&lt;/font&gt;&lt;/span&gt;&amp;nbsp;Tlist_Use_Horiz_Window&amp;nbsp;&lt;font color="#ffffd7"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color="#87d7d7"&gt;0&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;let Tlist_Inc_Winwidth=0&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;let Tlist_Show_One_File=1&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;let&lt;/font&gt;&lt;/span&gt;&amp;nbsp;Tlist_Exist_OnlyWindow&lt;font color="#ffffd7"&gt;=&lt;/font&gt;&lt;font color="#87d7d7"&gt;1&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;let&lt;/font&gt;&lt;/span&gt;&amp;nbsp;Tlist_Use_Right_Window&amp;nbsp;&lt;font color="#ffffd7"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color="#87d7d7"&gt;1&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;let&lt;/font&gt;&lt;/span&gt;&amp;nbsp;Tlist_Sort_Type&lt;font color="#ffffd7"&gt;=&lt;/font&gt;&lt;font color="#d78787"&gt;&amp;quot;name&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;let&lt;/font&gt;&lt;/span&gt;&amp;nbsp;Tlist_Display_Prototype&lt;font color="#ffffd7"&gt;=&lt;/font&gt;&lt;font color="#87d7d7"&gt;0&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;let&lt;/font&gt;&lt;/span&gt;&amp;nbsp;Tlist_Compact_Format&lt;font color="#ffffd7"&gt;=&lt;/font&gt;&lt;font color="#87d7d7"&gt;1&lt;/font&gt;&amp;nbsp;&lt;font color="#87af87"&gt;&amp;quot; Compact?&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;let&lt;/font&gt;&lt;/span&gt;&amp;nbsp;Tlist_GainFocus_On_ToggleOpen&lt;font color="#ffffd7"&gt;=&lt;/font&gt;&lt;font color="#87d7d7"&gt;1&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;let&lt;/font&gt;&lt;/span&gt;&amp;nbsp;Tlist_Display_Tag_Scope&lt;font color="#ffffd7"&gt;=&lt;/font&gt;&lt;font color="#87d7d7"&gt;1&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;let&lt;/font&gt;&lt;/span&gt;&amp;nbsp;Tlist_Close_On_Select&lt;font color="#ffffd7"&gt;=&lt;/font&gt;&lt;font color="#87d7d7"&gt;1&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #3a3a3a"&gt;&lt;font color="#d7d7af"&gt;let&lt;/font&gt;&lt;/span&gt;&amp;nbsp;Tlist_Enable_Fold_Column&lt;font color="#ffffd7"&gt;=&lt;/font&gt;&lt;font color="#87d7d7"&gt;1&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#87af87"&gt;&amp;quot;let TList_WinWidth=25&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34829202-9130122878161532579?l=piao-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://piao-tech.blogspot.com/feeds/9130122878161532579/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=34829202&amp;postID=9130122878161532579' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/9130122878161532579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/9130122878161532579'/><link rel='alternate' type='text/html' href='http://piao-tech.blogspot.com/2008/10/make-vim-and-ctag-play-nice-together.html' title='Make Vim and Ctag play nice together'/><author><name>龍神</name><uri>http://www.blogger.com/profile/16648963337079496096</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11487716133742490173'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34829202.post-1736730252781149943</id><published>2007-02-08T00:25:00.001+09:00</published><updated>2009-02-02T10:08:56.143+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Servers'/><title type='text'>Faking POP</title><content type='html'>As part of a networking class at my lab we teach students protocols by asking them to implement a simple POP3 client in Java. The client must connect to the POP3 server and interact with the server as a normal POP client.&lt;br /&gt;&lt;br /&gt;As soon as the class started we realized the university POP server uses SSL to encrypt the connection (for obvious security reasons) and asking the students to implement the SSL part of the client was not an option. &lt;br /&gt;&lt;br /&gt;We needed a POP server set up quickly before the students could present their programs or at least something that behaves like a POP server. A quick search resulted in &lt;a href="http://www.ledge.co.za/software/fakepop/"&gt;FakePOP&lt;/a&gt; and the great Ubuntu has it in their repositories. &lt;br /&gt;&lt;br /&gt;I simply issued the following command:&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;sudo aptitude install xinetd fakepop&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Then create a xinetd configuration file "/etc/xinet.d/fakepop" that contains the following:&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;service pop3&lt;br /&gt;{&lt;br /&gt;        server          = /usr/sbin/in.fakepop&lt;br /&gt;        disable         = no&lt;br /&gt;        socket_type     = stream&lt;br /&gt;        protocol        = tcp&lt;br /&gt;        user            = nobody&lt;br /&gt;        wait            = no&lt;br /&gt;}&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;and restart the xinetd daemon:&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;sudo /etc/init.d/xinetd restart&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;and in less than a minute I had a POP3 server (or at least something that behaves like one) on my machine and the class was saved.&lt;br /&gt;&lt;br /&gt;Also you can create a custom message to be delivered to anyone connecting to the fakepop server. You can create as many messages as you want by putting them as text files inside the "/etc/fakepop" directory. Some examples can be found in the "/usr/share/doc/fakepop/examples" directory like the one below:&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;From: System Administrator &lt;nobody@nowhere.invalid&gt;&lt;br /&gt;Subject: example message - text only&lt;br /&gt;Mime-Version: 1.0&lt;br /&gt;Content-Type: text/plain; charset=us-ascii&lt;br /&gt;Content-Disposition: inline&lt;br /&gt;&lt;br /&gt;This is a simple message.&lt;br /&gt;It contains only text.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34829202-1736730252781149943?l=piao-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://piao-tech.blogspot.com/feeds/1736730252781149943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=34829202&amp;postID=1736730252781149943' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/1736730252781149943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/1736730252781149943'/><link rel='alternate' type='text/html' href='http://piao-tech.blogspot.com/2007/02/faking-pop.html' title='Faking POP'/><author><name>龍神</name><uri>http://www.blogger.com/profile/16648963337079496096</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11487716133742490173'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34829202.post-116204983297693679</id><published>2006-10-29T00:33:00.001+09:00</published><updated>2009-01-09T15:20:27.283+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Kubuntu'/><title type='text'>MPlayer on Kubuntu Edgy Eft</title><content type='html'>No matter how many media player for linux I try I always end up using MPlayer. In my opinion is the best player ever.&lt;br /&gt;&lt;br /&gt;To install it in Edgy Eft we must add the multiverse repositories to the source.list file. Simply add these lines to the /etc/apt/sources.list file:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;deb http://archive.ubuntu.com/ubuntu edgy multiverse&lt;br /&gt;deb-src http://archive.ubuntu.com/ubuntu edgy multiverse&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Then simply update and install mplayer repository with:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;sudo aptitude update&lt;br /&gt;sudo aptitude install mplayer&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;To add the win32codecs (for wmv playback) first download the lastest version from &lt;a href="http://packages.medibuntu.org/intrepid/w32codecs.html"&gt;here&lt;/a&gt; and install it using dpkg:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;sudo dpkg -i w32codecs_xxxxxxxxi386.deb&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Replace the xxxxxxxx with the version you downloaded and enjoy!.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:red;"&gt;update:&lt;/span&gt; In Feisty Fawn there is no need to enable the multiverse repositories. Mplayer seems to be included in the default repositories.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34829202-116204983297693679?l=piao-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://piao-tech.blogspot.com/feeds/116204983297693679/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=34829202&amp;postID=116204983297693679' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/116204983297693679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/116204983297693679'/><link rel='alternate' type='text/html' href='http://piao-tech.blogspot.com/2006/10/mplayer-on-kubuntu-edgy-eft.html' title='MPlayer on Kubuntu Edgy Eft'/><author><name>龍神</name><uri>http://www.blogger.com/profile/16648963337079496096</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11487716133742490173'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34829202.post-5212406987970723713</id><published>2007-03-26T15:36:00.003+09:00</published><updated>2009-01-05T21:48:02.428+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Gadget'/><title type='text'>Sony NW-A808 PMP Linux review</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_99Fzui5MBLY/Rgkil8-QxUI/AAAAAAAAAE4/nZc-sox_TRo/s1600-h/walkman_NW-A808.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp2.blogger.com/_99Fzui5MBLY/Rgkil8-QxUI/AAAAAAAAAE4/nZc-sox_TRo/s400/walkman_NW-A808.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5046602892863128898" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I recently got this little piece of hardware and I really like it. It supports video, audio and images in a very small and stylish pack. I was deciding between the NW-A808 and the iRiver X20 but finally decided to go with the NW-A808 mostly for the cool factor. The iRiver X20 is bigger and has a plastic case that makes it feel like a toy. The NW-A808 has a very slim and metallic case (iPod like) that feels just right on my hand. Also the NW-A808 has a nice variety of colours to choose while the X20 comes only with a black version.&lt;br /&gt;&lt;br /&gt;The NW-A808 GUI supports various languages so I can set it up in English or Spanish if I want instead of the default Japanese. It supports album covers, video thumbnails and has a lot of play list features like search, bookmarks, and much more.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;The good and the bad&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The good thing is that this device supports &lt;a href="http://en.wikipedia.org/wiki/USB_mass_storage_device_class"&gt;MSC&lt;/a&gt; (aka UMS) that is very well supported by Linux. Plugging the player to my laptop running Kubuntu Feisty I get a pop-up window asking me if I want to open it in a new window.&lt;br /&gt;&lt;br /&gt;Opening the device (/media/WALKMAN) in Konqueror shows me the content of the device and I can easily copy/delete files into it. It is possible to add images and videos to the device by directly copying them into the flash memory.&lt;br /&gt;&lt;br /&gt;The bad thing is that first: it does not support Ogg and second: that to add music files to the device we are forced to use a crappy piece of proprietary software called Sonic Stage on Windows. I haven't found yet any Linux alternatives to replace Sonic Stage but rest assured that someone (maybe me), someday (far in the future) will take the task to make this device Linux friendly. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Uploading Images&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To upload your images to the NW-A808 flash memory you MUST create sub folders inside the &lt;span style="font-style:italic;"&gt;DCIM&lt;/span&gt; directory that is in the flash memory and copy your images inside those sub folders. You can copy them directly inside the DCIM folder but they will not get listed on the device library browser.&lt;br /&gt;&lt;br /&gt;From the instruction manual the images format supported is:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;File Format: DCF 2.0/Exif 2.21&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Extension:   .jpg&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Codec:       JPEG(Baseline)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Max Resolution: 4,000x4,000 (16 Megapixels)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Quantity:    Maximum 10,000 files&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Uploading Videos&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As with the photos we only need to copy our video files in mp4 format inside the VIDEO folder that is inside the device flash memory. Pay attention to the supported video format as any file not supported may be listed in the video library but the player will refuse to play it.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;File Format: MP4&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Extension: .mp4, .m4v&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Video Codecs:&lt;br /&gt;    &lt;ul&gt;&lt;br /&gt;         &lt;li&gt;MPEG-4&lt;br /&gt;             &lt;ul&gt;&lt;br /&gt;                 &lt;li&gt;Profile:  Simple Profile&lt;/li&gt;&lt;br /&gt;                 &lt;li&gt;Max bitrate: 2,500 kbps&lt;/li&gt;&lt;br /&gt;                 &lt;li&gt;Max fps: 30 fps&lt;/li&gt;&lt;br /&gt;                 &lt;li&gt;Max resolution : 320x240(QVGA)&lt;/li&gt;&lt;br /&gt;             &lt;/ul&gt;&lt;br /&gt;         &lt;/li&gt; &lt;br /&gt;         &lt;li&gt;AVC (H.264/AVC)&lt;br /&gt;             &lt;ul&gt;&lt;br /&gt;                 &lt;li&gt;Profile: Baseline Profile level 1.2 and 1.3&lt;/li&gt;&lt;br /&gt;                 &lt;li&gt;Max bitrate: 768 kbps&lt;/li&gt;&lt;br /&gt;                 &lt;li&gt;Max fps: 30 fps&lt;/li&gt;&lt;br /&gt;                 &lt;li&gt;Max resolution : 320x240(QVGA)&lt;/li&gt;&lt;br /&gt;             &lt;/ul&gt;&lt;br /&gt;         &lt;/li&gt;&lt;br /&gt;   &lt;/ul&gt;&lt;br /&gt;&lt;/li&gt; &lt;br /&gt;&lt;li&gt;Audio Codecs: AAC-LC&lt;br /&gt;    &lt;ul&gt; &lt;br /&gt;        &lt;li&gt;Number of Channels: 2&lt;/li&gt;&lt;br /&gt;        &lt;li&gt;Samplig rates: 24, 32, 44.1 and 48 kHz&lt;/li&gt;&lt;br /&gt;        &lt;li&gt;Bitrate: 288kbps per channel&lt;/li&gt;&lt;br /&gt;    &lt;/ul&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;     &lt;br /&gt;&lt;br /&gt;Based on the video/audio specifications above we can use the all mighty ffmpeg to convert almost any video to a format that can be played on the device:&lt;br /&gt;Since this is a device created by Sony I concluded it supports the same video format the PSP does . A simple Google search for "mencoder PSP" led me to this &lt;a href="http://lists.mplayerhq.hu/pipermail/mencoder-users/2006-June/003420.html"&gt;post&lt;/a&gt; with the following command:&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;ffmpeg -y -i $infile -vcodec libx264 -b 768k -bt 768k -level 13 \&lt;br /&gt;-r 30 -croptop auto -cropbottom auto -s 320x240  -acodec libfaac \&lt;br /&gt;-ar 48000 -ab 100k -ac 2 -f mp4 $outfile.mp4&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;With this command I was able to convert most of my mpg and avi files to mp4 and play them in the NW-A808. Once you transcode you videos copy them to the Videos directory inside the device flash and they will be listed on the video library. &lt;br /&gt;&lt;br /&gt;There is a little functionality drawback if we copy files directly to the flash. The NW-A808 displays the video file name and a nice THM thumbnail in the video browser when the files are copied using Sony's proprietary software. I have tried in several ways to create the thumbnail file manually without success so far.&lt;br /&gt; &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Filenames and Folders&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_99Fzui5MBLY/RgooROAiMJI/AAAAAAAAAFA/S6DUj936jJg/s1600-h/nwa808lay.png"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;" src="http://bp2.blogger.com/_99Fzui5MBLY/RgooROAiMJI/AAAAAAAAAFA/S6DUj936jJg/s320/nwa808lay.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5046890608705286290" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It is possible to copy images and videos in any folder inside the device flash. It is also possible to create sub folders in any place and put files inside those sub folders. But only the images and videos that are inside the DCIM and VIDEO folders respectively will get listed on the device browser. See the image above to get an idea of the folder layout.&lt;br /&gt;&lt;br /&gt;You can copy all video files directly inside the VIDEO folder in flash or create sub folders (one level deep only) and put the video files on those sub folders. &lt;br /&gt;&lt;br /&gt;For images you cannot directly put the files inside the DCIM directory. You must create sub folders (one level deep) inside the DCIM folder and copy the images inside those sub folders.&lt;br /&gt; &lt;br /&gt;Also make sure the extensions are jpg for images and mp4/m4v for video or the player won't list them.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Uploading Audio Files&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now the biggest drawback of this and all other Network Walkman devices produced by Sony. To upload music files we must use Sonic Stage on windows because simply copying the music files on the device won't list them on the album browser.&lt;br /&gt;&lt;br /&gt;So far the closest I have found to make this device work on Linux is the libnw library created by &lt;a href="http://www.waider.ie/hacks/workshop/c/libnw/"&gt;Waider&lt;/a&gt;.  Too bad this library does not work on my device but Waider has shown interest in modifying his library to support the NW-A808. Once libnw supports this device it won't be difficult to write an Amarok &lt;a href="http://amarok.kde.org/wiki/Media_Device"&gt;MediaDevice interface&lt;/a&gt; to manage it.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Sony uses GPL software?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Not really sure why but inside the NW-A808 box came a copy of the GPLv2 licence. It means (maybe?) that the software provided by Sony to handle the deviceuses some GPLed software/libraries. &lt;br /&gt;&lt;br /&gt;I am no lawyer but as I understand if this is true then isn't Sony supposed to release the source code of such applications?. With a source code it would be easier to implement a Linux alternative to make these devices more Linux friendly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34829202-5212406987970723713?l=piao-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://piao-tech.blogspot.com/feeds/5212406987970723713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=34829202&amp;postID=5212406987970723713' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/5212406987970723713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/5212406987970723713'/><link rel='alternate' type='text/html' href='http://piao-tech.blogspot.com/2007/03/sony-nw-a808-pmp-linux-review.html' title='Sony NW-A808 PMP Linux review'/><author><name>龍神</name><uri>http://www.blogger.com/profile/16648963337079496096</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11487716133742490173'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_99Fzui5MBLY/Rgkil8-QxUI/AAAAAAAAAE4/nZc-sox_TRo/s72-c/walkman_NW-A808.jpg' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34829202.post-6081995091006477032</id><published>2008-11-12T10:53:00.002+09:00</published><updated>2008-12-02T10:11:14.893+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><title type='text'>Mounting Windows Shares Using CIFS on Ubuntu</title><content type='html'>So you have a cool &lt;a href="http://www.buffalotech.com/products/network-storage/linkstation/linkstation-pro-duo/"&gt;Buffalo LinkStation Pro Duo&lt;/a&gt; or a Windows machine with some shared folders you want to access from your super Linux machine. No problems we have CIFS to the rescue!!&lt;br /&gt;&lt;br /&gt;These instructions were tested in Kubuntu 8.10 (Ibex) but shall work with previous versions and future versions of Kubuntu and/or Ubuntu. Also I assume you want the share to be available to all users in the system so you need root access (i.e. sudo).&lt;br /&gt;&lt;br /&gt;First install smbfs package:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;sudo aptitude install smbfs&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Create a directory were you want to mount the shared folder, any place is ok:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;sudo mkdir /media/share&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;If the share requires username and password to access create a password file in you home directory:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;sudo echo -e "username=my_username\npassword=my_password" &gt; /root/.share_pass&lt;br /&gt;sudo chown root:root /root&lt;br /&gt;sudo chmod 700 /root/.share_pass&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Replace "my_username" and "my_password" with the corresponding user and pass to access the remote share.&lt;br /&gt;&lt;br /&gt;Finally create an entry in the "/etc/fstab" file to mount the shared folder in the desired mount point:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;//ip-address/share /media/share credentials=/root/.share_pass,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Here you must replace //ip-address/share with the ip address of the machine with the shared folder and the complete path to the respective folder. &lt;br /&gt;&lt;br /&gt;Finally mount all partitions:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;sudo mount -a&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Now you must be able to access the shared folder at the remote machine by accessing the /media/share directory.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;References&lt;/h1&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://ubuntuforums.org/showthread.php?t=288534"&gt;http://ubuntuforums.org/showthread.php?t=288534&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34829202-6081995091006477032?l=piao-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://piao-tech.blogspot.com/feeds/6081995091006477032/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=34829202&amp;postID=6081995091006477032' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/6081995091006477032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/6081995091006477032'/><link rel='alternate' type='text/html' href='http://piao-tech.blogspot.com/2008/11/mounting-windows-shares-using-cifs-on.html' title='Mounting Windows Shares Using CIFS on Ubuntu'/><author><name>龍神</name><uri>http://www.blogger.com/profile/16648963337079496096</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11487716133742490173'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34829202.post-6473392386252874801</id><published>2008-10-19T13:10:00.002+09:00</published><updated>2008-10-19T13:45:49.096+09:00</updated><title type='text'>NVidia InitialPixmapPlacement=2 really improves KDE speed</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_99Fzui5MBLY/SPq1ikO9cUI/AAAAAAAAAMo/R6wY5vAKe1c/s1600-h/penrose01.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_99Fzui5MBLY/SPq1ikO9cUI/AAAAAAAAAMo/R6wY5vAKe1c/s320/penrose01.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5258715120355078466" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Some people say KDE4 rendering speed is slow when using Nvidia cards. I never felt this so I never bothered in applying the proposed solutions. Using firefox (note: this test does not run in konqueror) simply access the &lt;a href="http://intertwingly.net/stories/2006/07/10/penroseTiling.html"&gt;penroseTitling&lt;/a&gt; test page and run both tests. My first tests are in the image above and as you can see not bad as I have read in the Internet that for some people the Canvas test can take up to 30 seconds while it took 3 seconds on my machine.&lt;br /&gt;&lt;br /&gt;Anyway I tried one of the solutions that is simply running this command in the konsole:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;nvidia-settings -a InitialPixmapPlacement=2 -a GlyphCache=1&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;And here are the new times:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_99Fzui5MBLY/SPq2W_BrM0I/AAAAAAAAAMw/kQVWKkUE8Vo/s1600-h/penrose02.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://3.bp.blogspot.com/_99Fzui5MBLY/SPq2W_BrM0I/AAAAAAAAAMw/kQVWKkUE8Vo/s320/penrose02.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5258716020900311874" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Wow this is a real improvement so now I have a kde startup script that calls this command when KDE starts:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;# ~/.kde4/Autostart/nvidia.sh&lt;br /&gt;!#/bin/bash&lt;br /&gt;nvidia-settings -a InitialPixmapPlacement=2 -a GlyphCache=1 &amp;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Resources:&lt;br /&gt;&lt;a href="http://movingparts.net/2008/10/03/kde-42-trunk-now-rocking-on-my-thinkpad-t61/"&gt;http://movingparts.net/2008/10/03/kde-42-trunk-now-rocking-on-my-thinkpad-t61/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://techbase.kde.org/User:Lemma/KDE4-NVIDIA"&gt;http://techbase.kde.org/User:Lemma/KDE4-NVIDIA&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34829202-6473392386252874801?l=piao-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://piao-tech.blogspot.com/feeds/6473392386252874801/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=34829202&amp;postID=6473392386252874801' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/6473392386252874801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/6473392386252874801'/><link rel='alternate' type='text/html' href='http://piao-tech.blogspot.com/2008/10/nvidia-initialpixmapplacement2-really.html' title='NVidia InitialPixmapPlacement=2 really improves KDE speed'/><author><name>龍神</name><uri>http://www.blogger.com/profile/16648963337079496096</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11487716133742490173'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_99Fzui5MBLY/SPq1ikO9cUI/AAAAAAAAAMo/R6wY5vAKe1c/s72-c/penrose01.png' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34829202.post-3753435949176738722</id><published>2008-10-09T22:19:00.000+09:00</published><updated>2008-10-09T22:29:51.675+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Vim'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><title type='text'>Use vimdiff as Subversion diff command</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_99Fzui5MBLY/SO4HP94JMfI/AAAAAAAAAMg/S3TbtGtic1E/s1600-h/vimdiff.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://1.bp.blogspot.com/_99Fzui5MBLY/SO4HP94JMfI/AAAAAAAAAMg/S3TbtGtic1E/s320/vimdiff.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5255145786077426162" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;First create a script svbdiff inside the ~/.vim/scripts/ directory that contains the following&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;#!/bin/bash&lt;br /&gt;shift 5;/usr/bin/vimdiff -f "$@"&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;and make it executable:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;chmod +x ~/.vim/scripts/svndiff&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Then create an alias in your ~/.bashrc file like:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;alias svndiff="svn diff --diff-cmd ~/.vim/scripts/svndiff"&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Now you can go to any Subversion repository and display file differences with&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;svndiff h264.c&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The screenshot above shows the diff output of the h264.c of libavcodec. Make sure you have a color scheme that highlights the file differences. The screenshot above uses the &lt;a href="http://www.vim.org/scripts/script.php?script_id=1143"&gt;inkpot&lt;/a&gt; color scheme.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34829202-3753435949176738722?l=piao-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://piao-tech.blogspot.com/feeds/3753435949176738722/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=34829202&amp;postID=3753435949176738722' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/3753435949176738722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/3753435949176738722'/><link rel='alternate' type='text/html' href='http://piao-tech.blogspot.com/2008/10/use-vimdiff-as-subversion-diff-command.html' title='Use vimdiff as Subversion diff command'/><author><name>龍神</name><uri>http://www.blogger.com/profile/16648963337079496096</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11487716133742490173'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_99Fzui5MBLY/SO4HP94JMfI/AAAAAAAAAMg/S3TbtGtic1E/s72-c/vimdiff.png' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34829202.post-116297507386992988</id><published>2006-11-08T16:52:00.001+09:00</published><updated>2008-10-08T14:42:35.929+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Kubuntu'/><title type='text'>Better Bash prompt</title><content type='html'>&lt;span style="font-weight:bold;"&gt;More colorfull and useful bash prompt&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here is what I did to give a little more color and style to my bash prompt following this &lt;a href="http://physos.org/2006/07/12/bash-prompting/"&gt;blog post&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;Edit the .bashrc file in your home directory and define your PS1 env variable in the section that looks like this:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;# Comment in the above and uncomment this below for a color prompt&lt;br /&gt;PS1='\[\e[32m\][\u@\h]\[\e[0m\]\[\e[37m\][\t]\[\e[0m\]\n\[\e[34m\][\w]\[\e[0m\]&gt; '&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Make sure to replace the PS1 value to anything you prefer. For more information on the meaning of the PS1 values check the Bash-Prompt &lt;a href="http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/index.html"&gt;How-To&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;To make the change take effect in the current bash session simply source the .bashrc file like:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;[~]&gt; source ~/.bashrc&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34829202-116297507386992988?l=piao-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://piao-tech.blogspot.com/feeds/116297507386992988/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=34829202&amp;postID=116297507386992988' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/116297507386992988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/116297507386992988'/><link rel='alternate' type='text/html' href='http://piao-tech.blogspot.com/2006/11/better-bash-prompt-and-vim-in-kubunty.html' title='Better Bash prompt'/><author><name>龍神</name><uri>http://www.blogger.com/profile/16648963337079496096</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11487716133742490173'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34829202.post-2723121582162763650</id><published>2008-09-25T10:47:00.000+09:00</published><updated>2008-09-25T10:59:53.109+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Kubuntu'/><title type='text'>Canon Satera LBP5910 Linux Driver</title><content type='html'>If you have a Canon printer based on the LIPSLX driver (i.e. LBP family) then you are lucky because Canon provides the linux drivers for these printers.&lt;br /&gt;&lt;br /&gt;Simply go to this page &lt;a href="http://cweb.canon.jp/drv-upd/lasershot/drv_linux.html"&gt;Canon Linux Driver&lt;/a&gt; check for the supported printers and the respective drivers. For my case I have the LBP5910F printer that is supported by the LIPS LX Printer Driver so I enter this page and download the two corresponding .deb packages for Ubuntu/Debian. If you use Redhat or any other distribution that uses RPMs then download the corresponding RPMs.&lt;br /&gt;&lt;br /&gt;To install in Ubuntu/Debian:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;sudo dpkg -i cndrvcups-common_1.70-1_i386.deb&lt;br /&gt;sudo dpkg -i cndrvcups-lipslx_1.70-1_i386.deb&lt;br /&gt;sudo /etc/init.d/cupsys restart&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Now enter CUPS configuration page (i.e. http://localhost:631) and follow the steps. In my case the printer was already listed in the select box of printers with IP address and everithing. In Make/Manufacturer select Canon and finally in Model/Driver select the corresponding driver:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_99Fzui5MBLY/SNrwWWS40dI/AAAAAAAAAMQ/hHKaJfcGkQc/s1600-h/cupsys.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_99Fzui5MBLY/SNrwWWS40dI/AAAAAAAAAMQ/hHKaJfcGkQc/s320/cupsys.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5249772582386323922" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And that is all now you can try to print a test page.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34829202-2723121582162763650?l=piao-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://piao-tech.blogspot.com/feeds/2723121582162763650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=34829202&amp;postID=2723121582162763650' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/2723121582162763650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/2723121582162763650'/><link rel='alternate' type='text/html' href='http://piao-tech.blogspot.com/2008/09/canon-satera-lbp5910-linux-driver.html' title='Canon Satera LBP5910 Linux Driver'/><author><name>龍神</name><uri>http://www.blogger.com/profile/16648963337079496096</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11487716133742490173'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_99Fzui5MBLY/SNrwWWS40dI/AAAAAAAAAMQ/hHKaJfcGkQc/s72-c/cupsys.png' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34829202.post-1239531344841338307</id><published>2007-03-14T17:16:00.001+09:00</published><updated>2008-09-05T15:30:14.048+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Servers'/><category scheme='http://www.blogger.com/atom/ns#' term='Kubuntu'/><title type='text'>Testing SMTP and POP services from a console</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Test a non-secure SMTP server&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To test a non-secure SMTP server we simply connect to the port 25 of that machine using telnet:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;telnet smtp_ip_address 25&lt;/span&gt;&lt;br /&gt;Trying smtp_ip_address...&lt;br /&gt;Connected to smtp_ip_address.&lt;br /&gt;Escape character is '^]'.&lt;br /&gt;&lt;span style="color:blue;"&gt;220 Welcome to Postfix ESMTP Server&lt;/span&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;ehlo localhost&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;&lt;span style="color:blue;"&gt;250-testmail&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;250-PIPELINING&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;250-SIZE 10240000&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;250-VRFY&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;250-ETRN&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;250-STARTTLS&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;250-AUTH LOGIN PLAIN&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;250-AUTH=LOGIN PLAIN&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;250-ENHANCEDSTATUSCODES&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;250-8BITMIME&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;250 DSN&lt;/span&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;mail from:auser@internaldomain.org&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;250 2.1.0 Ok&lt;/span&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;rcpt to:noone@externaldomain.org&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;554 5.7.1 &lt;noone@externaldomain.org&gt;: Relay access denied&lt;/span&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;rcpt to:noone@internaldomain.com&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;550 5.1.1 &lt;noone@internaldomain.com&gt;: Recipient address rejected: User unknown in local recipient&lt;br /&gt;&lt;span style="color:green;"&gt;rcpt to:realuser@internaldomain.com&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;250 2.1.5 Ok&lt;/span&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;data&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;354 End data with &amp;#60;CR&amp;#62;&amp;#60;LF&amp;#62;.&amp;#60;CR&amp;#62;&amp;#60;LF&amp;#62;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;Hello There!!&lt;/span&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;250 2.0.0 Ok: queued as 7ECF05100C6&lt;/span&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;quit&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;221 2.0.0 Bye&lt;/span&gt;&lt;br /&gt;Connection closed by foreign host.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The green text are the commands you send to the server while the blue text indicates the server responses. The example above is for a simple Postfix SMTP server.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Testing the AUTH command&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;From the previous example we can see that the Postfix SMTP server supports the AUTH command that allows roaming users to use the server as relay. To test this command we must first encode our authentication credentials in base64 format:&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;perl -MMIME::Base64 -e 'print encode_base64("\000username\@domain.net\000password")'&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;You must have the MIME::Base64 perl module in your system (is installed by default in Kununtu). Also make sure you replace the username, domain.net and password in the command to reflect your own valid values.&lt;br /&gt;&lt;br /&gt;After the command finishes it will output your authentication credentials as a base64 encoded string that looks like:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;AGptczFAam1zMS5uZXQAbm90Lm15LnJlYWwucGFzc3dvcmQ=&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Copy that string somewhere and proceed to connect to the server as in the previous example:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;telnet smtp_ip_address 25&lt;/span&gt;&lt;br /&gt;Trying smtp_ip_address...&lt;br /&gt;Connected to smtp_ip_address.&lt;br /&gt;Escape character is '^]'.&lt;br /&gt;&lt;span style="color:blue;"&gt;220 Welcome to Postfix ESMTP Server&lt;/span&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;ehlo localhost&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;250-testmail&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;250-PIPELINING&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;250-SIZE 10240000&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;250-VRFY&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;250-ETRN&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;250-STARTTLS&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;250-AUTH LOGIN PLAIN&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;250-AUTH=LOGIN PLAIN&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;250-ENHANCEDSTATUSCODES&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;250-8BITMIME&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;250 DSN&lt;/span&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;auth plain AGptczFAam1zMS5uZXQAbm90Lm15LnJlYWwucGFzc3dvcmQ=&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;235 2.0.0 Authentication successful&lt;/span&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;mail from:auser@internaldomain.org&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;250 2.1.0 Ok&lt;/span&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;rcpt to:noone@externaldomain.org&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;250 2.1.5 Ok&lt;/span&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;data&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;354 End data with &amp;#60;CR&amp;#62;&amp;#60;LF&amp;#62;.&amp;#60;CR&amp;#62;&amp;#60;LF&amp;#62;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;hahahaha&lt;/span&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;250 2.0.0 Ok: queued as 7B6265100C6&lt;/span&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;quit&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;221 2.0.0 Bye&lt;/span&gt;&lt;br /&gt;Connection closed by foreign host.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In this example we used the "auth plain" command to authenticate ourselves against the SMTP server. Once authenticated we are allowed to relay mails to any domain (not only internal domains) from anywhere (roaming). &lt;br /&gt;&lt;br /&gt;A closer look at the the previous example will reveal that when we send the "rcpt to" command to an external domain (noone@externaldomain.org) the server response was a "554 relay access denied". In this example we are authenticated with the server (via the AUTH command) so now the "rcpt to" command was accepted.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Test a non-secure POP server&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Similar to SMTP we can test a POP server by connecting to it using telnet:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;telnet pop_ip_address 110&lt;/span&gt;&lt;br /&gt;Trying pop_ip_address...&lt;br /&gt;Connected to pop_ip_address.&lt;br /&gt;Escape character is '^]'.&lt;br /&gt;&lt;span style="color:blue;"&gt;+OK Hello there.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;user username&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;+OK Password required.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;pass password&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;+OK logged in.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;list&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;+OK POP3 clients that break here, they violate STD53.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;1 520&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;quit&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;+OK Bye-bye.&lt;/span&gt;&lt;br /&gt;Connection closed by foreign host.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Again green are your commands and blue are the server responses. In this example we simply connect to the server, authenticate and get the list of mails in our inbox. We can also see the contents of the mails with the "retr num" command replacing num with the mail number as displayed by the "list" command.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Test secure SMTP/POP servers&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If the SMTP/POP server supports encryption (TLS/SSL) we won't be able to test it using simple text telnet connections. In this case we must use the openssl command utility that will take care of all TLS/SSL negotiations, connect to the server and allow us to send plain text commands over the encrypted connection.&lt;br /&gt;&lt;br /&gt;For SMTP we can check if the server support TLS encryption by looking at the server response to the "ehlo" command. If we get a "&lt;span style="color:blue;"&gt;250-STARTTLS&lt;/span&gt;" within all the responses then the server supports TLS.&lt;br /&gt;&lt;br /&gt;To connect to the SMTP server over a TLS encrypted connection we can use the following command:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;openssl s_client -starttls smtp -crlf -connect smtp_ip_address:25&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;You will get a lot of messages from this command that show the SSL negotiations. You really don't need to care about all those messages. When openssl finishes setting up the encrypted connection you will see the same welcome message we got on the first example:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;220 Welcome to Postfix ESMTP Server&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;From here on you can proceed with plain text commands as in the first two examples. &lt;br /&gt;&lt;br /&gt;In the case of POP the server it is a little more difficult to check if it supports TLS/SSL connections. POP uses a different port (995 instead of 110) for SSL encrypted connections. This means that as long as the server uses the default ports if the server has the port 995 open we can assume it supports POP over SSL.&lt;br /&gt;&lt;br /&gt;To connect to the POP server we must use the openssl utility command to take care of all the SSL negotiation procedures. The following command will do the trick:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;openssl s_client  -crlf -connect pop_ip_address:995&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;After all the SSL certificates are exchanged and the encrypted connection is established we are greeted by the POP server hello message as in the previous POP example:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;+OK Hello there.&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;From this point on we can proceed issuing normal text commands and  getting server responses. All the encryption part will be handled automatically by openssl.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;References&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I learned about testing the AUTH command and SMTP over TLS from the following page: &lt;a href="http://qmail.jms1.net/test-auth.shtml"&gt;http://qmail.jms1.net/test-auth.shtml&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34829202-1239531344841338307?l=piao-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://piao-tech.blogspot.com/feeds/1239531344841338307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=34829202&amp;postID=1239531344841338307' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/1239531344841338307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/1239531344841338307'/><link rel='alternate' type='text/html' href='http://piao-tech.blogspot.com/2007/03/testing-smtp-and-pop-services-from.html' title='Testing SMTP and POP services from a console'/><author><name>龍神</name><uri>http://www.blogger.com/profile/16648963337079496096</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11487716133742490173'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34829202.post-1197929848483300660</id><published>2008-06-25T12:38:00.000+09:00</published><updated>2008-06-25T13:11:22.634+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='SftpDrive'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenSSH'/><title type='text'>Use PuTTY generated keys with SftpDrive</title><content type='html'>So you created a public/private key pair using &lt;a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html"&gt;PuTTYgen&lt;/a&gt; and now you want to use these keys in other applications like &lt;a href="http://sshwindows.sourceforge.net/"&gt;OpenSSH&lt;/a&gt; and/or &lt;a href="http://www.sftpdrive.com/"&gt;SftpDrive&lt;/a&gt; but you realise that the private key generated by PuTTYgen is not compatible with these programs??&lt;br /&gt;&lt;br /&gt;No worries...  all you have to do is convert your PuTTYgen key (.ppk) to and OpenSSH compatible key and it happens to be that PuTTYgen can do this conversion.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_99Fzui5MBLY/SGHCVS7MTII/AAAAAAAAAJ8/2ykzfh1PCrQ/s1600-h/puttygen2.PNG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp0.blogger.com/_99Fzui5MBLY/SGHCVS7MTII/AAAAAAAAAJ8/2ykzfh1PCrQ/s320/puttygen2.PNG" border="0" alt=""id="BLOGGER_PHOTO_ID_5215663514584894594" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Open PuTTYgen and load your private key using the "load" button and opening your private key .ppk file. Once loaded select from the top menu "Conversions -&gt; Export OpenSSH key" and select a file name to save the exported key. Now this saved key can be used in other applications that are OpenSSH compatible.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_99Fzui5MBLY/SGHDSXrL8iI/AAAAAAAAAKE/7A_lYzZwYck/s1600-h/sftpdrive1.PNG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp3.blogger.com/_99Fzui5MBLY/SGHDSXrL8iI/AAAAAAAAAKE/7A_lYzZwYck/s320/sftpdrive1.PNG" border="0" alt=""id="BLOGGER_PHOTO_ID_5215664563831960098" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;To use this key with SftpDrive open SftpDrive Manager and on "New Driver" change the Authentication method (see image above) to "Use a public key to log in...". This will open a dialog box (see image below).&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_99Fzui5MBLY/SGHD0Gov21I/AAAAAAAAAKM/FGQCf16yAIg/s1600-h/sftpdrive2.PNG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp2.blogger.com/_99Fzui5MBLY/SGHD0Gov21I/AAAAAAAAAKM/FGQCf16yAIg/s320/sftpdrive2.PNG" border="0" alt=""id="BLOGGER_PHOTO_ID_5215665143373880146" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here you can generate a new public/private key pair but we want to use the one we generated with PuTTYgen so select "Import Existing Key Pair" that will open yet another dialog box (see image below):&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_99Fzui5MBLY/SGHEOOJvpUI/AAAAAAAAAKU/2kGm0Zc1UzM/s1600-h/sftpdrive3.PNG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp2.blogger.com/_99Fzui5MBLY/SGHEOOJvpUI/AAAAAAAAAKU/2kGm0Zc1UzM/s320/sftpdrive3.PNG" border="0" alt=""id="BLOGGER_PHOTO_ID_5215665592067925314" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here simply browse the location of the private and the corresponding public keys and press "OK". Now SftpDrive will use these keys to connect to your SSH server.&lt;br /&gt;&lt;br /&gt;If you get errors make sure you have selected the exported OpenSSH compatible key and not the PuTTYgen generated one (i.e. .ppk). Also if you saved the public key using the PuTTYgen "save public key" button then this key has a format SftpDrive does not understands so it will be unable to read the key. To solve this copy and paste the public key as it appears in PuTTYgen text box (i.e. the large string starting with ssh-rsa or ssh-dsa) in a text file (i.e. mykey.pub) and then import that file as the public key. This format is OpenSSH compatible so should work with no problems.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34829202-1197929848483300660?l=piao-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://piao-tech.blogspot.com/feeds/1197929848483300660/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=34829202&amp;postID=1197929848483300660' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/1197929848483300660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/1197929848483300660'/><link rel='alternate' type='text/html' href='http://piao-tech.blogspot.com/2008/06/use-putty-generated-keys-with-sftpdrive.html' title='Use PuTTY generated keys with SftpDrive'/><author><name>龍神</name><uri>http://www.blogger.com/profile/16648963337079496096</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11487716133742490173'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_99Fzui5MBLY/SGHCVS7MTII/AAAAAAAAAJ8/2ykzfh1PCrQ/s72-c/puttygen2.PNG' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34829202.post-7526363447212366530</id><published>2008-06-24T09:10:00.002+09:00</published><updated>2008-06-25T12:13:55.867+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Subversion'/><category scheme='http://www.blogger.com/atom/ns#' term='Servers'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenSSH'/><title type='text'>Subversion + OpenSSH Server + PuTTY Client Setup</title><content type='html'>This setup is of a &lt;a href="http://subversion.tigris.org/"&gt;subversion&lt;/a&gt; server running on Linux (Kubuntu 8.04) and subversion clients (&lt;a href="http://tortoisesvn.tigris.org/"&gt;Tortoise SVN&lt;/a&gt;) running in Windows (WinXP).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Pre-requisites&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I assume you already have a subversion repository working and now you want to access it using ssh tunnelling for security reasons. Also the server must have remote ssh access and be configured to do Private Key authentication.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Setting up Putty&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The best SSH client and related tools for Windows are the PuTTY family of programs that can be found at &lt;a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/"&gt;http://www.chiark.greenend.org.uk/~sgtatham/putty/&lt;/a&gt;. You can download the individual ".exe" files an put them in your path but I recommend you to use the &lt;a href="http://the.earth.li/~sgtatham/putty/latest/x86/putty-0.60-installer.exe"&gt;installer&lt;/a&gt; that will install all the tools and set them nicely in your start menu.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Create public/private key pair&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_99Fzui5MBLY/SGBAZdZ7FJI/AAAAAAAAAJs/yNW6mcYvvcI/s1600-h/puttygen.PNG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp2.blogger.com/_99Fzui5MBLY/SGBAZdZ7FJI/AAAAAAAAAJs/yNW6mcYvvcI/s320/puttygen.PNG" border="0" alt=""id="BLOGGER_PHOTO_ID_5215239174629299346" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Objective&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To access the subversion server via ssh you need a public/private key pair. To generate these key pair you can use the PuTTY Key Generator (PuTTYgen.exe) that was installed along with PuTTY installer.&lt;br /&gt;&lt;br /&gt;Simply execute the PuTTYgen.exe program and press the "generate" button. After that keep moving your mouse, to generate some randomness, until the progress bar reaches the end. At this point you will get your public and private keys generated.&lt;br /&gt;&lt;br /&gt;Make sure you add a "Key passphrase" that will be like a password to access the keys. The comment part is not necessary but is customary to put your email address.&lt;br /&gt;&lt;br /&gt;Also make sure you are generating a SSH-2 key pair as SSH-1 is not secure. Choosing between RSA or DSA keys is a matter of application. It is known that DSA is fast at key generation and signing while RSA is faster at verification. So if your application requires a lot of signing (i.e. SSL Web Application) then DSA is good but if your application requires a lot of verifying (i.e. Subversion) then RSA is best. Since we are going to use this key for Subversion I recommend subversion but you are free to use the one you prefer.&lt;br /&gt;&lt;br /&gt;Now we need to save your generated keys somewhere in your hard disk. The public key is visible in the PuTTYgen application widget (i.e. the long sequence of letters in the top text box). This key starts usually with "ssh-rsa" or "ssh-dsa" depending on what type of key you generated (RSA or DSA).&lt;br /&gt;&lt;br /&gt;To save your public key on disk do not use the "save public key" button as this will generate a key in a format that is not compatible with OpenSSH. Simply copy and paste the key from the text box to a file on disk. You can save this file with whatever name you like but I recommend putting a ".pub" extension just as OpenSSH does.&lt;br /&gt;&lt;br /&gt;The private key you must save it using the "save private key" button as this generates a file with ".ppk" extension that is understood only by PuTTY programs. Make sure you put the same name as the public key but with the ".ppk" extension instead of ".pub".&lt;br /&gt;&lt;br /&gt;As an additional step if you would like to use your private key with other applications like SftpDrive so these can also connect to the OpenSSH server without need for a password, then you must convert your private key (.ppk file) to the OpenSSH key format. To do this simply select "Conversions" in the PuTTYgen.exe menu and then "Export OpenSSH key" to generate a key that can be used with OpenSSH compatible applications. &lt;br /&gt;&lt;br /&gt;Note that with PuTTYgen.exe you can convert your private keys between PuTTY (.ppk) format and OpenSSH format so if you generate your public/private keys using OpenSSH ssh-keygen program you can use them in PuTTY by importing the private key using PuTTYgen.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Setting your public keys&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The way the public/private key pair are used is simple. You keep the private key in your local machine usually in a key manager like ssh-agent or pageant and send your public key to all the servers you want to access via ssh.&lt;br /&gt;&lt;br /&gt;To set up your public key in the SSH server (assumed OpenSSH server) simply log to the server shell using your account username and password (if you don't have one ask you administrator or if you are the administrator create one yourself). Then copy the contents of your public key file inside the file "~/.ssh/authorized_keys2".&lt;br /&gt;&lt;br /&gt;To do this edit the "~/.ssh/authorized_keys2" file with any text editor (Vi, Nano, Kwrite, gEdit) and make sure it looks like in the next figure:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_99Fzui5MBLY/SGBG7r8G9BI/AAAAAAAAAJ0/mxK9gWInL9g/s1600-h/putty-openssh-13.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp2.blogger.com/_99Fzui5MBLY/SGBG7r8G9BI/AAAAAAAAAJ0/mxK9gWInL9g/s320/putty-openssh-13.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5215246359716099090" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The key must start with ssh-rsa or ssh-dsa depending on the key you generated followed by the key all in one line (i.e. no new lines and spaces) and finally the comment again all in one line.&lt;br /&gt;&lt;br /&gt;Finally make sure the authorized_keys2 file has correct permissions by executing "chmod 600 authorized_keys2".&lt;br /&gt;&lt;br /&gt;You can set the public key in as many SSH servers as you like so you can access them all using the same private key.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Setting your private key&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Your private key must be your most guarded secret and shall not be passed to anyone. Only you should have access to this key because anyone who gets his/her hands on that private key can access all the servers where you installed your public key and we don't want anyone to have that access power do we?&lt;br /&gt;&lt;br /&gt;To use a your private key we usually use a SSH authentication agent like ssh-agent in Linux/Unix or pageant in Windows. The PuTTY installer comes with pageant.exe that is the one I use and recommend.&lt;br /&gt;&lt;br /&gt; Simply execute pageant.exe from the application menu and a small icon will appear in your system tray. Right click the icon and select "Add key" on the context menu, then browse the directory where you saved your private key (i.e. &lt;hostname&gt;.ppk) and select it. And that is it....&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Testing SSH access&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To test open the PuTTY.exe SSH client and create a new session to connect to your SSH server (make sure you save the session). When you open the session it should log you in without asking for any username and passwords. If it asks you for username and password then you did something wrong. Make sure the publickey format is correct on the server and that the private key is set in pageant. Of course make sure the OpenSSH server is running on the remote machine and that pageant is running on the local machine.&lt;br /&gt;&lt;br /&gt;Once you can connect to the SSH server without need for a username and password then we can proceed to set up TortoiseSVN to access your Subversion repositories via SSH tunnels.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Setting TortoiseSVN with SSH tunnelling&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Once you have SSH set to work with public/private key authentication and have pageant configured configuring TortoiseSVN is a breeze. All you have to do is make sure you use the correct URL format to access the repository.&lt;br /&gt;&lt;br /&gt;If you have TortoiseSVN installed try to make a checkout and in the URL put something like:&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;svn+ssh://username@hostname/dir/to/repo&lt;br /&gt;&lt;/div&gt; &lt;br /&gt;And you should be able to ckeck out that project over an SSH tunnel. You don't even need to have svnserve running on the server as the svn+ssh scheme tells the TortoiseSVN to start it for you and tunnel it over SSH.&lt;br /&gt;&lt;br /&gt;Of course replace username with the username you use to access the SSH server and hostname with the IP address or FQDN of your SSH server. The path to the repository must be absolute path starting from the root "/" directory and have correct access privileges (read/write) for the username you use.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Resources&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://neubia.com/archives/000191.html"&gt;http://neubia.com/archives/000191.html&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.unixwiz.net/techtips/putty-openssh.html"&gt;http://www.unixwiz.net/techtips/putty-openssh.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34829202-7526363447212366530?l=piao-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://piao-tech.blogspot.com/feeds/7526363447212366530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=34829202&amp;postID=7526363447212366530' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/7526363447212366530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/7526363447212366530'/><link rel='alternate' type='text/html' href='http://piao-tech.blogspot.com/2008/06/subversion-openssh-server-putty-client.html' title='Subversion + OpenSSH Server + PuTTY Client Setup'/><author><name>龍神</name><uri>http://www.blogger.com/profile/16648963337079496096</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11487716133742490173'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_99Fzui5MBLY/SGBAZdZ7FJI/AAAAAAAAAJs/yNW6mcYvvcI/s72-c/puttygen.PNG' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34829202.post-2094442945594256762</id><published>2008-04-27T01:16:00.006+09:00</published><updated>2008-06-14T12:05:05.267+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pulseaudio'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Kubuntu'/><title type='text'>Pulse audio and SPDIF output in Kubuntu (Hardy Heron 8.04)</title><content type='html'>&lt;b&gt;Preface&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Here I will explain how I got my Realteck ALC888 SPDIF digital output working with pulseaudio in Kubuntu Hardy Heron (8.04).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Background (rant so skip if you are in a hurry)&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I have a MSI board with integrated Realtek ALC888 Audio card that came with analog outputs only. Fortunately these boards usually come with a SPDIF header where you can connect a SPDIF bracket to get a digital output. These brackets are difficult to get and in my case I had to call the main board dealer (calling customer support) and they sold me one for about USD/30.00. Another alternative I considered was to buy a cheap sound card with SPDIF outputs for about the same amount like the &lt;a href="http://kakaku.com/item/05604010163/"&gt;ENVY24HTS-PCI&lt;/a&gt; or the &lt;a href="http://kakaku.com/item/05604010260/"&gt;CMI8768-8CHPCI&lt;/a&gt; but the idea of wasting the ALC888 was daunting.&lt;br /&gt;&lt;br /&gt;I needed the SPDIF ouput because my &lt;a href="http://www.alla.co.jp/product01_006.html"&gt;ALLA VIBRAR 5.1ch Headphones&lt;/a&gt; have only SPDIF (Coax and Fiber) inputs. &lt;br /&gt;&lt;br /&gt;After trying a lot, and I mean a LOT!, alsa was not working well with my Headphones, anything I played througth the digial output would be accompanied by all kinds of artifacts (cracks, skips, pauses) coming out from the headphones.&lt;br /&gt;&lt;br /&gt;So I decided to try the recent &lt;a href="http://pulseaudio.org/"&gt;pulseaudio&lt;/a&gt; and once I got my audio working I never looked back at alsa again.&lt;br /&gt;&lt;br /&gt;For some reason pulseaudio did not came as default with any of the beta, rc and final installations of Hardy Heron (Kubuntu 8.04 KDE4) so here is how I managed to get Pulseaudio working for me.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Pulse Audio in Kubuntu (Hardy Heron 8.04)&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;First we install the necessary packages:&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;font face="monospace"&gt;&lt;br /&gt;sudo aptitude install pulseaudio libao-pulse pulseaudio-module-hal &lt;font color="#ffff00"&gt;&lt;b&gt;\&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&amp;nbsp; pulseaudio-module-x11 pulseaudio-utils libsdl1.2debian-pulseaudio &lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;and then create a &lt;i&gt;.asoundrc&lt;/i&gt; configuration file to tell all ALSA applications to use pulse. &lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;span&gt;pcm.!default {&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;type plug&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;slave {&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pcm &amp;quot;spdif&amp;quot;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span&gt; }&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;This configuration file will set pulseaudio as the default sound server and in this particular case it will also set the digital (SPDIF) output as default. If you prefer the analog outputs simply remove the &lt;i&gt;type plug&lt;/i&gt; and &lt;i&gt;slave&lt;/i&gt; sections.&lt;br /&gt;&lt;br /&gt;The above configuration works and I get sound on the SPDIF output but I also have a stereo jack in the front panel of the PC that was getting wasted. So after some research I got the following asoundrc configuration file:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;span class=""&gt;pcm.&lt;/span&gt;&lt;span class="Special"&gt;!&lt;/span&gt;&lt;span class="Statement"&gt;default&lt;/span&gt;&lt;span class=""&gt;&amp;nbsp;{&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="Statement"&gt;type&lt;/span&gt;&lt;span class=""&gt;&amp;nbsp;pulse&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="Statement"&gt;type&lt;/span&gt;&lt;span class=""&gt;&amp;nbsp;plug&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; slave {&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="Comment"&gt;#pcm &amp;quot;spdif&amp;quot;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pcm multi&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ttable.0.0 1.0&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ttable.1.1 1.0&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ttable.0.2 1.0&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ttable.1.3 1.0&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;}&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;clt.&lt;/span&gt;&lt;span class="Special"&gt;!&lt;/span&gt;&lt;span class="Statement"&gt;default&lt;/span&gt;&lt;span class=""&gt;&amp;nbsp;{&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class="Statement"&gt;type&lt;/span&gt;&lt;span class=""&gt;&amp;nbsp;pulse&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;}&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;pcm.stereo {&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="Statement"&gt;type&lt;/span&gt;&lt;span class=""&gt;&amp;nbsp;pulse&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="Statement"&gt;type&lt;/span&gt;&lt;span class=""&gt;&amp;nbsp;plug&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;slave {&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;pcm multi&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;ttable.0.0 1.0&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;ttable.1.1 1.0&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;ttable.0.2 1.0&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;ttable.1.3 1.0&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;ctl.stereo {&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="Statement"&gt;type&lt;/span&gt;&lt;span class=""&gt;&amp;nbsp;pulse&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="Statement"&gt;card&lt;/span&gt;&lt;span class=""&gt;&amp;nbsp;0&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;pcm.multi {&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="Statement"&gt;type&lt;/span&gt;&lt;span class=""&gt;&amp;nbsp;multi&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;slaves.a.pcm &lt;/span&gt;&lt;span class="Constant"&gt;&amp;quot;analog-hw&amp;quot;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;slaves.a.channels 2&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;slaves.b.pcm &lt;/span&gt;&lt;span class="Constant"&gt;&amp;quot;digital-hw&amp;quot;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;slaves.b.channels 2&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;bindings.0.slave a&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;bindings.0.channel 0&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;bindings.1.slave a&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;bindings.1.channel 1&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;bindings.2.slave b&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;bindings.2.channel 0&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;bindings.3.slave b&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;bindings.3.channel 1&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;ctl.multi {&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="Statement"&gt;type&lt;/span&gt;&lt;span class=""&gt;&amp;nbsp;hw&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="Statement"&gt;card&lt;/span&gt;&lt;span class=""&gt;&amp;nbsp;0&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span class=""&gt;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;I really do not understand this file so don't ask. This configuration file also allows output from the front stereo jack so I can have both the 5.1ch headphones on SPDIF and an additional stereo headphone working simultaneously.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Starting the server&lt;/b&gt;&lt;br /&gt;Let us start the pulseaudio server so we can test some applications:&lt;br /&gt;&lt;div class ="code"&gt;&lt;br /&gt;&lt;font face="monospace"&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;1 &lt;/b&gt;&lt;/font&gt;pulseaudio –&lt;font color="#00ffff"&gt;&lt;b&gt;system&lt;/b&gt;&lt;/font&gt;=&lt;font color="#ff40ff"&gt;&lt;b&gt;1&lt;/b&gt;&lt;/font&gt;&amp;nbsp;–high-&lt;font color="#00ffff"&gt;&lt;b&gt;priority&lt;/b&gt;&lt;/font&gt;=&lt;font color="#ff40ff"&gt;&lt;b&gt;1&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#ff6060"&gt;&lt;b&gt;-D&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;The recomended way to start the pulseaudio system is per user/session so instead of editing the &lt;i&gt;/etc/default/pulseaudio&lt;/i&gt; file I simply create a pulsestart.sh script and put it in our KDE Autostart dir (i.e. $HOME/.kde4/Autostart).&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;font face="monospace"&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;1 &lt;/b&gt;&lt;/font&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;!&lt;/b&gt;&lt;/font&gt;&lt;font color="#00ffff"&gt;&lt;b&gt;#/bin/bash&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;2 &lt;/b&gt;&lt;/font&gt;pulseaudio –&lt;font color="#00ffff"&gt;&lt;b&gt;system&lt;/b&gt;&lt;/font&gt;=&lt;font color="#ff40ff"&gt;&lt;b&gt;1&lt;/b&gt;&lt;/font&gt;&amp;nbsp;–high-&lt;font color="#00ffff"&gt;&lt;b&gt;priority&lt;/b&gt;&lt;/font&gt;=&lt;font color="#ff40ff"&gt;&lt;b&gt;1&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#ff6060"&gt;&lt;b&gt;-D&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;This way everytime I start KDE the pulseaudio server gets started too. Now with the server running we need to tell our applications to use it instead of directly accessing alsa.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Pulse audio with Amarok in Kubuntu  (Hardy Heron 8.04)&lt;/b&gt;&lt;br /&gt;This one is the easiest as it has a configuration panel that allows you to choose the output plugin. See screenshot:&lt;br /&gt;&lt;a href="http://bp2.blogger.com/_99Fzui5MBLY/SBNa7sqzZwI/AAAAAAAAAJI/Wal6IBGZY00/s1600-h/amarok.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp2.blogger.com/_99Fzui5MBLY/SBNa7sqzZwI/AAAAAAAAAJI/Wal6IBGZY00/s320/amarok.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5193594776937785090" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Pulse audio with MPlayer in Kubuntu (Hardy Heron 8.04)&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;MPlayer in Kubuntu Hardy Heron comes by default with pulseaudio support and in fact uses it as default. If it is not default then you can also force mplayer to use pulse audio with the &lt;i&gt;-ao pulse&lt;/i&gt; switch. One way to check if mplayer is really using pulseaudio is to run mplayer from command line and look for a line that looks like &lt;i&gt;AO: [pulse] 48000Hz 2ch s16le (2 bytes per sample)&lt;/i&gt;. If instead you see alsa or anything else between the square brackets then something is wrong with your installation.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Pulse audio with SDL applications in Kubuntu  (Hardy Heron 8.04)&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Most games in Linux (i.e. Urban Terror) use SDL audio so we must ensure all SDL applications use the pulseaudio server. When you install the pulseaudio packages this should be done automatically but one &lt;a href="https://bugs.launchpad.net/ubuntu/+source/libsdl1.2/+bug/203158"&gt;bug&lt;/a&gt; was preventing the dependency manager to install the needed package: &lt;i&gt;libsdl1.2debian-pulseaudio&lt;/i&gt; with:&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;sudo aptitude install libsdl1.2debian-pulseaudio&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Installing this package will enable SDL applications to use the pulseaudio server. We can check this by running a game like &lt;a href="http://www.urbanterror.net"&gt;Urban Terror&lt;/a&gt; and looking at the console. We should see something like:&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;------ Initializing Sound ------&lt;br /&gt;Initializing SDL audio driver...&lt;br /&gt;SDL audio driver is "pulse".&lt;br /&gt;SDL_AudioSpec:&lt;br /&gt;  Format:   AUDIO_S16LSB&lt;br /&gt;  Freq:     22050&lt;br /&gt;  Samples:  1024&lt;br /&gt;  Channels: 2&lt;br /&gt;Starting SDL audio callback...&lt;br /&gt;SDL audio initialized.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Pay attention to the SDL audio driver and see what it says. If it says alsa or anything different from pulse then you are not using pulse audio.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Pulse audio with Flash player in Kubuntu  (Hardy Heron 8.04)&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This one is a little more complicated as we need to install an &lt;a href="http://www.pulseaudio.org/wiki/FlashPlayer9Solution"&gt;experimental library&lt;/a&gt; but not that complicated and it worked flawlessly in Konqueror and Firefox. Simply follow the next steps:&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;font face="monospace"&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;1 &lt;/b&gt;&lt;/font&gt;sudo aptitude install&amp;nbsp;&amp;nbsp;build-essential automake1.&lt;font color="#ff40ff"&gt;&lt;b&gt;9&lt;/b&gt;&lt;/font&gt;&amp;nbsp;autoconf libtool libesd0-dev libpulse-dev libssl-dev&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;2 &lt;/b&gt;&lt;/font&gt;git-clone &lt;a href="http://git.0pointer.de/repos/libflashsupport.git/"&gt;http://git.0pointer.de/repos/libflashsupport.git/&lt;/a&gt; libflashsupport&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;3 &lt;/b&gt;&lt;/font&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;cd&lt;/b&gt;&lt;/font&gt;&amp;nbsp;libflashsupport&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;4 &lt;/b&gt;&lt;/font&gt;./bootstrap.sh&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;5 &lt;/b&gt;&lt;/font&gt;make&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;6 &lt;/b&gt;&lt;/font&gt;sudo make install&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;What we are doing here is installing some dependencies, downloading the source code of the library from a Git repository, compiling, installing and that is it. Now we have pulse audio support in flash. &lt;br /&gt;&lt;br /&gt;The only way I can test that flash is really using the pulseaudio server is to play a flash video and at the same time play music in amarok. If flash is using pulseaudio then you should be able to hear both the flash audio and amarok music simultaneously. If flash is not using pulse audio then the flash video will have no sound or amarok will not play any audio.&lt;br /&gt; &lt;br /&gt;&lt;b&gt;Pulse audio with AC3/DTS pass thru  in Kubuntu  (Hardy Heron 8.04)&lt;/b&gt;&lt;br /&gt;Ok so not everything is perfect and pulseaudio does not solves all my desires. The whole idea of the digital ouput (SPDIF) is to be able to send raw AC3 sound to my headphones receivers. This offers the best quality since these headphones have a hardware AC3 decoder so I can get full 5.1 channel surround sound out of them. The problem is that pulseaudio is not able to pass thru the AC3/DTS streams to the SPDIF output.&lt;br /&gt;&lt;br /&gt;The solution is to use alsa in this case with the mplayer hwac3 switch like:&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;mplayer -ac hwac3 &lt;file with AC3 audio or DVD source&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;that works perfect and there is no need to stop the pulseaudio server. The only inconvenient is that you cannot use any other sound application while the AC3 audio is playing. This is because during the time the AC3 audio is playing alsa is taking control of the sound card and all other applications that rely now in pulseaudio cannot get access to the card. &lt;br /&gt;&lt;br /&gt;In my case is not really that big of a problem because when I am seeing a DVD I do not want to hear any other sounds from my PC like knotify.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;References&lt;/b&gt;&lt;br /&gt;&lt;a href="http://pulseaudio.org/wiki/PerfectSetup"&gt;http://pulseaudio.org/wiki/PerfectSetup&lt;/a&gt;&lt;br /&gt;&lt;a href="http://forums.debian.net/viewtopic.php?t=12497"&gt;http://forums.debian.net/viewtopic.php?t=12497&lt;/a&gt;&lt;br /&gt;&lt;a href="http://ubuntuforums.org/showthread.php?t=714712"&gt;http://ubuntuforums.org/showthread.php?t=714712&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34829202-2094442945594256762?l=piao-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://piao-tech.blogspot.com/feeds/2094442945594256762/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=34829202&amp;postID=2094442945594256762' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/2094442945594256762'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/2094442945594256762'/><link rel='alternate' type='text/html' href='http://piao-tech.blogspot.com/2008/04/pulse-audio-and-spdif-output-in-kubuntu.html' title='Pulse audio and SPDIF output in Kubuntu (Hardy Heron 8.04)'/><author><name>龍神</name><uri>http://www.blogger.com/profile/16648963337079496096</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11487716133742490173'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_99Fzui5MBLY/SBNa7sqzZwI/AAAAAAAAAJI/Wal6IBGZY00/s72-c/amarok.png' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34829202.post-5635281598832844310</id><published>2008-06-14T11:47:00.000+09:00</published><updated>2008-06-14T11:50:22.883+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Rant'/><title type='text'>Best gift ever??</title><content type='html'>Now I can reaffirm that I married the right person, just look what I got for fathers day!!!&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_99Fzui5MBLY/SFMxps6PeAI/AAAAAAAAAJk/zrVNw5ciW-8/s1600-h/IMG_1373.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp2.blogger.com/_99Fzui5MBLY/SFMxps6PeAI/AAAAAAAAAJk/zrVNw5ciW-8/s400/IMG_1373.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5211563786297636866" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I know I do not blog that often but be assured that now I will be blogging none at all for at least a few weeks, or months....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34829202-5635281598832844310?l=piao-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://piao-tech.blogspot.com/feeds/5635281598832844310/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=34829202&amp;postID=5635281598832844310' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/5635281598832844310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/5635281598832844310'/><link rel='alternate' type='text/html' href='http://piao-tech.blogspot.com/2008/06/best-gift-ever.html' title='Best gift ever??'/><author><name>龍神</name><uri>http://www.blogger.com/profile/16648963337079496096</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11487716133742490173'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_99Fzui5MBLY/SFMxps6PeAI/AAAAAAAAAJk/zrVNw5ciW-8/s72-c/IMG_1373.JPG' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34829202.post-2199566126864711914</id><published>2008-04-17T10:18:00.000+09:00</published><updated>2008-04-17T10:25:04.375+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Rant'/><title type='text'>Plotting SVN history??</title><content type='html'>Found a &lt;a href="http://www.wand.net.nz/~stj2/blog/?p=629"&gt;blog post&lt;/a&gt; by Samuel Jansen were he plots his subversion repository history so out of curiosity I plotted mine too...  &lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_99Fzui5MBLY/SAamgWc6M1I/AAAAAAAAAJA/P1IDlhwU9bk/s1600-h/repo.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp3.blogger.com/_99Fzui5MBLY/SAamgWc6M1I/AAAAAAAAAJA/P1IDlhwU9bk/s400/repo.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5190018695303934802" /&gt;&lt;/a&gt;&lt;br /&gt;actually nothing interesting, steady development almost linear and as you can see but it made me notice that I am almost near my 1000 mark!!  when I reach it then I will have an excuse to celebrate and give a nice "1000 SVN passed mark present".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34829202-2199566126864711914?l=piao-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://piao-tech.blogspot.com/feeds/2199566126864711914/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=34829202&amp;postID=2199566126864711914' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/2199566126864711914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/2199566126864711914'/><link rel='alternate' type='text/html' href='http://piao-tech.blogspot.com/2008/04/plotting-svn-history.html' title='Plotting SVN history??'/><author><name>龍神</name><uri>http://www.blogger.com/profile/16648963337079496096</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11487716133742490173'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_99Fzui5MBLY/SAamgWc6M1I/AAAAAAAAAJA/P1IDlhwU9bk/s72-c/repo.png' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34829202.post-8350379595390040248</id><published>2008-04-13T17:00:00.000+09:00</published><updated>2008-04-13T17:07:03.618+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Rant'/><title type='text'>Linux Cafe in Akihabara</title><content type='html'>Have been in &lt;a href="http://en.wikipedia.org/wiki/Akihabara"&gt;Akihabara&lt;/a&gt; (Electric Town) several times but never saw this shop before:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_99Fzui5MBLY/SAG-RGc6MyI/AAAAAAAAAIo/YR-uKXAAjx4/s1600-h/CRW_3742.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp1.blogger.com/_99Fzui5MBLY/SAG-RGc6MyI/AAAAAAAAAIo/YR-uKXAAjx4/s400/CRW_3742.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5188637446706443042" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_99Fzui5MBLY/SAG-bGc6MzI/AAAAAAAAAIw/xVRNYJA7s0I/s1600-h/CRW_3744.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp1.blogger.com/_99Fzui5MBLY/SAG-bGc6MzI/AAAAAAAAAIw/xVRNYJA7s0I/s320/CRW_3744.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5188637618505134898" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you read the details below the logo you will see this shop is been there since 2001!! and I never saw it... I must go check my eyes.  Anyway if you are an Open Source person walking around Akihabara you may well pass a get yourself a nice cup of open source coffee.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_99Fzui5MBLY/SAG-8Gc6M0I/AAAAAAAAAI4/yZepkGi9zuc/s1600-h/CRW_3745.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp1.blogger.com/_99Fzui5MBLY/SAG-8Gc6M0I/AAAAAAAAAI4/yZepkGi9zuc/s400/CRW_3745.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5188638185440817986" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34829202-8350379595390040248?l=piao-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://piao-tech.blogspot.com/feeds/8350379595390040248/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=34829202&amp;postID=8350379595390040248' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/8350379595390040248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/8350379595390040248'/><link rel='alternate' type='text/html' href='http://piao-tech.blogspot.com/2008/04/linux-cafe-in-akihabara.html' title='Linux Cafe in Akihabara'/><author><name>龍神</name><uri>http://www.blogger.com/profile/16648963337079496096</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11487716133742490173'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_99Fzui5MBLY/SAG-RGc6MyI/AAAAAAAAAIo/YR-uKXAAjx4/s72-c/CRW_3742.jpg' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34829202.post-1771592333071915074</id><published>2008-04-09T09:05:00.003+09:00</published><updated>2008-04-09T10:06:14.645+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Servers'/><title type='text'>Simple Mail Server (Kubuntu)</title><content type='html'>If you need a small personal mail server to send log reports and system alarms from your Kubuntu machines to a local and/or external mail address then you may use Exim4 that is the default mail server (MTA) that comes with (K)Ubuntu.&lt;br /&gt;&lt;br /&gt;To install is very easy:&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;font face="monospace"&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;1 &lt;/b&gt;&lt;/font&gt;sudo aptitude install exim4 exim4-base&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;and to configure simply run:&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;font face="monospace"&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;1 &lt;/b&gt;&lt;/font&gt;sudo dpkg-reconfigure exim4-config&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;and in the first dialog (image below) select "internet site". For all next options I used the defaults that would allow local users and services to send emails locally and to remote addresses (i.e. gmail accounts).&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_99Fzui5MBLY/R_wNst22ijI/AAAAAAAAAIg/MsRbq_NIIOQ/s1600-h/exim01.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp2.blogger.com/_99Fzui5MBLY/R_wNst22ijI/AAAAAAAAAIg/MsRbq_NIIOQ/s320/exim01.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5187035932699036210" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now to test the new server you can send a simple email to your Gmail account:&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;font face="monospace"&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;1 &lt;/b&gt;&lt;/font&gt;mail -s test mygmail@gmail.com&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;2 &lt;/b&gt;&lt;/font&gt;test mail&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;3 &lt;/b&gt;&lt;/font&gt;.&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;4 &lt;/b&gt;&lt;/font&gt;Cc:&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;The "-s" switch is the mail subject. After the command simply type whatever you want in the mail body. To finish the email press &lt;enter&gt; followed by a dot "." and then &lt;enter&gt; again. After this you will be prompted with "Cc:" so press &lt;enter&gt; and then check your Gmail account. You should have received an email with the message and subject you used above.&lt;br /&gt;&lt;br /&gt;Now say you want to receive &lt;a href="http://piao-tech.blogspot.com/2007/04/receive-log-reports-via-email-ubuntu.html"&gt;LogWatch&lt;/a&gt; reports or any other mail directed to root in your Gmail account. Then you can simply create an alias in the "/etc/aliases" file like:&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;font face="monospace"&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;1 &lt;/b&gt;&lt;/font&gt;&lt;font color="#00ffff"&gt;&lt;b&gt;# Added by installer for initial user&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;2 &lt;/b&gt;&lt;/font&gt;&lt;font color="#00ffff"&gt;&lt;b&gt;root&lt;/b&gt;&lt;/font&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;:&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&amp;nbsp; &lt;font color="#ff40ff"&gt;&lt;b&gt;mygmail@gmail.com&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;then rebuild the aliases database&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;font face="monospace"&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;1 &lt;/b&gt;&lt;/font&gt;sudo newaliases&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;If you require more complex mail configurations you may check my previous posts about Sendmail and Postfix setup in (K)Ubuntu &lt;a href="http://piao-tech.blogspot.com/2007/03/linux-mail-server-setup.html"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34829202-1771592333071915074?l=piao-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://piao-tech.blogspot.com/feeds/1771592333071915074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=34829202&amp;postID=1771592333071915074' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/1771592333071915074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34829202/posts/default/1771592333071915074'/><link rel='alternate' type='text/html' href='http://piao-tech.blogspot.com/2008/04/simple-mail-server-kubuntu.html' title='Simple Mail Server (Kubuntu)'/><author><name>龍神</name><uri>http://www.blogger.com/profile/16648963337079496096</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='11487716133742490173'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_99Fzui5MBLY/R_wNst22ijI/AAAAAAAAAIg/MsRbq_NIIOQ/s72-c/exim01.png' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry></feed>