<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' version='2.0'><channel><atom:id>tag:blogger.com,1999:blog-34829202</atom:id><lastBuildDate>Fri, 25 Dec 2009 13:12:51 +0000</lastBuildDate><title>私のTech記憶</title><description>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.</description><link>http://piao-tech.blogspot.com/</link><managingEditor>noreply@blogger.com (龍神)</managingEditor><generator>Blogger</generator><openSearch:totalResults>88</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34829202.post-4024172964918082761</guid><pubDate>Thu, 17 Dec 2009 08:02:00 +0000</pubDate><atom:updated>2009-12-19T21:30:36.913+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Tips</category><category domain='http://www.blogger.com/atom/ns#'>OpenSSH</category><title>Manage SSH and GPG keys efficiently in KDE</title><description>&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;</description><link>http://piao-tech.blogspot.com/2009/12/manage-ssh-and-gpg-keys-efficiently-in.html</link><author>noreply@blogger.com (龍神)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34829202.post-3407109061338862233</guid><pubDate>Thu, 08 Oct 2009 07:51:00 +0000</pubDate><atom:updated>2009-10-08T17:43:18.665+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Tips</category><category domain='http://www.blogger.com/atom/ns#'>Netem</category><title>How to create Netem distribution tables</title><description>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;</description><link>http://piao-tech.blogspot.com/2009/10/how-to-create-netem-distribution-tables.html</link><author>noreply@blogger.com (龍神)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34829202.post-9128808992734066300</guid><pubDate>Thu, 03 Sep 2009 02:51:00 +0000</pubDate><atom:updated>2009-12-17T17:01:33.780+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Tips</category><category domain='http://www.blogger.com/atom/ns#'>Gadget</category><category domain='http://www.blogger.com/atom/ns#'>Android</category><title>Embbed cover art in MP3 files with command line</title><description>&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;</description><link>http://piao-tech.blogspot.com/2009/09/embbed-cover-art-in-mp3-files-with.html</link><author>noreply@blogger.com (龍神)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34829202.post-9170664006837978516</guid><pubDate>Fri, 12 Jun 2009 04:27:00 +0000</pubDate><atom:updated>2009-06-12T15:25:51.041+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Vim</category><category domain='http://www.blogger.com/atom/ns#'>Tips</category><title>Handling multiple encodings in Vim</title><description>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;</description><link>http://piao-tech.blogspot.com/2009/06/handling-multiple-encodings-in-vim.html</link><author>noreply@blogger.com (龍神)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34829202.post-2776719073031246359</guid><pubDate>Fri, 12 Jun 2009 04:26:00 +0000</pubDate><atom:updated>2009-06-21T15:29:16.374+09:00</atom:updated><title>Vim tips for Latex editing</title><description>&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;</description><link>http://piao-tech.blogspot.com/2009/06/vim-tips-for-latex-editing.html</link><author>noreply@blogger.com (龍神)</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></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34829202.post-6081995091006477032</guid><pubDate>Wed, 12 Nov 2008 01:53:00 +0000</pubDate><atom:updated>2008-12-02T10:11:14.893+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Tips</category><category domain='http://www.blogger.com/atom/ns#'>Windows</category><title>Mounting Windows Shares Using CIFS on Ubuntu</title><description>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;</description><link>http://piao-tech.blogspot.com/2008/11/mounting-windows-shares-using-cifs-on.html</link><author>noreply@blogger.com (龍神)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34829202.post-6473392386252874801</guid><pubDate>Sun, 19 Oct 2008 04:10:00 +0000</pubDate><atom:updated>2008-10-19T13:45:49.096+09:00</atom:updated><title>NVidia InitialPixmapPlacement=2 really improves KDE speed</title><description>&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;</description><link>http://piao-tech.blogspot.com/2008/10/nvidia-initialpixmapplacement2-really.html</link><author>noreply@blogger.com (龍神)</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></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34829202.post-3753435949176738722</guid><pubDate>Thu, 09 Oct 2008 13:19:00 +0000</pubDate><atom:updated>2008-10-09T22:29:51.675+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Vim</category><category domain='http://www.blogger.com/atom/ns#'>Tips</category><title>Use vimdiff as Subversion diff command</title><description>&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;</description><link>http://piao-tech.blogspot.com/2008/10/use-vimdiff-as-subversion-diff-command.html</link><author>noreply@blogger.com (龍神)</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></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34829202.post-3249813218759212810</guid><pubDate>Thu, 09 Oct 2008 12:59:00 +0000</pubDate><atom:updated>2009-06-12T18:00:38.782+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Vim</category><category domain='http://www.blogger.com/atom/ns#'>Tips</category><title>My Vim Tips</title><description>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;</description><link>http://piao-tech.blogspot.com/2008/10/my-vim-tips.html</link><author>noreply@blogger.com (龍神)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34829202.post-1977807154279183961</guid><pubDate>Thu, 09 Oct 2008 12:22:00 +0000</pubDate><atom:updated>2009-06-12T13:18:27.035+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Vim</category><category domain='http://www.blogger.com/atom/ns#'>Tips</category><category domain='http://www.blogger.com/atom/ns#'>Kubuntu</category><title>Open new files as tabs in current Vim Console</title><description>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;</description><link>http://piao-tech.blogspot.com/2008/10/open-new-files-as-tabs-in-current-vim.html</link><author>noreply@blogger.com (龍神)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>4</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34829202.post-9130122878161532579</guid><pubDate>Thu, 09 Oct 2008 10:48:00 +0000</pubDate><atom:updated>2009-12-23T21:13:21.471+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Ctags</category><category domain='http://www.blogger.com/atom/ns#'>Vim</category><category domain='http://www.blogger.com/atom/ns#'>Tips</category><category domain='http://www.blogger.com/atom/ns#'>Kubuntu</category><title>Make Vim and Ctag play nice together</title><description>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_99Fzui5MBLY/SzIJTI943DI/AAAAAAAAAN4/fy1ezb0HP8c/s1600-h/ctags.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 210px;" src="http://1.bp.blogspot.com/_99Fzui5MBLY/SzIJTI943DI/AAAAAAAAAN4/fy1ezb0HP8c/s320/ctags.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5418403526109355058" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The classic tutorial of Ctags + Vim will go something like:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;- Install exuberant ctags&lt;/li&gt;&lt;br /&gt;&lt;li&gt;- Generate tags for your project&lt;/li&gt;&lt;br /&gt;&lt;li&gt;- Also install the tag list plugin&lt;/li&gt;&lt;br /&gt;&lt;li&gt;- Use ^] and ^T to jump around the code&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;In this post I will try to go a little further and show how I manage tags in vim for real and large C projects. &lt;br /&gt;&lt;br /&gt;Note that I mostly program in C (not C++), Ruby and Bash so I cannot guarantee my method works for all languages. In special Ctags has &lt;a href="http://stackoverflow.com/questions/656702/vim-ctags-and-identically-named-identifiers"&gt;problems&lt;/a&gt; supporting &lt;a href="http://stackoverflow.com/questions/1932396/c-source-tagging"&gt;C++&lt;/a&gt;. On the other side I have worked in small projects in Java and Python and I had no problems navigating them with my method.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Pre requisites &lt;/h2&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: &lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;sudo aptitude install vim-ruby vim-scripts vim-common exuberant-ctags&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;If you are new to Vim then you should take some time to set your minimal configuration. You may follow mine if you want &lt;a href="http://piao-tech.blogspot.com/2008/10/basic-vimrc-file.html"&gt;link&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt; Generate system wide ctags &lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;All large projects will use at some point external libraries. My C projects usually use the Linux/FreeBSD system calls, SDL, OpenGL, libavcodec and libavformat among others. &lt;br /&gt;&lt;br /&gt;To be able to jump to these libraries we must generate tags for each of them. I usually generate them inside my vim directory but you may create them in a system wide folder.&lt;br /&gt;&lt;br /&gt;This is extremely useful to easily find out the members of libavcodec large structs  or to quickly find out what are the arguments of SDL functions or system calls.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Ctags for Linux System Calls&lt;/h3&gt;&lt;br /&gt;&lt;div class=code&gt;&lt;br /&gt;mkdir -p ~/.vim/tags&lt;br /&gt;sudo aptitude install linux-headers-`uname -r`&lt;br /&gt;ctags -R -f ~/.vim/tags/kerneltags /usr/src/linux-headers-`uname -r`&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Ctags for Ruby core and gem libraries&lt;/h3&gt;&lt;br /&gt;&lt;div class=code&gt;&lt;br /&gt;mkdir -p ~/.vim/tags&lt;br /&gt;ctags -R -f ~/.vim/tags/rbtags /usr/lib/ruby&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Ctags Java libraries&lt;/h3&gt;&lt;br /&gt;&lt;div class=code&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;mkdir -p ~/.vim/tags&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/javatags /usr/lib/jvm/java-6-sun/src&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;At this you should be able to create tags for all the libraries you use in your projects. Simply get the source code or development packages of the library and run ctags on the folder that contains the source code and save the tags in a file you can access.&lt;br /&gt;&lt;br /&gt;TODO: I really need to research what are the best ctags flags for each language in order to generate the most information possible per tag.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Updating your system wide ctags&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;Here we have three options:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Update your system/library tags manually each time you upgrade them&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Use a cron job to update them every certain period of time (e.g. once a week).&lt;li&gt;&lt;br /&gt;&lt;li&gt;Use &lt;a href="http://inotify.aiken.cz/?section=incron&amp;page=about&amp;lang=en"&gt;incrontab&lt;/a&gt; to monitor changes in the system/library folders and automatically update the tags every time these folders change.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Personally I use the cron job method and for some libraries that I update often (e.g. libavcodec from subversion) I manually generate the tags soon after I update the library.&lt;br /&gt;&lt;br /&gt;I found about &lt;a href="http://inotify.aiken.cz/?section=incron&amp;page=about&amp;lang=en"&gt;incrontab&lt;/a&gt; just recently and I think will be the best way to update system wide tags. It behaves mostly like crontab but instead of triggering actions based on time periods it triggers by file system events like file change, move, save, etc. It should be easy to monitor the folders containing the libraries of interest and regenerate the tags for each library based on change events in the folder contents. The tricky part would be to determine what file system event we must listen to decide if we should regenerate or not the tags.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Generating ctags for your own libraries/projects&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;Now we need to generate tags for projects/libraries we are developing at the moment. These projects are constantly changing so we need to update them as soon as possible.&lt;br /&gt;&lt;br /&gt;This is a common problem that lot's of people solve in different ways. See for example these links:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://stackoverflow.com/questions/155449/vim-auto-generate-ctags"&gt;Vim auto-generate ctags&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://stackoverflow.com/questions/563616/vimctags-tips-and-tricks"&gt;Vim+ctags tips and tricks&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.vim.org/scripts/script.php?script_id=1535"&gt;TagsParser : Automatic tagfile updating and tag viewer&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://linux.byexamples.com/archives/385/vim-with-ctags-for-multi-level-directory-hierarchy/"&gt;vim with ctags for multi-level directory hierarchy&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://vim.wikia.com/wiki/Tags_generation_for_current_file"&gt;http://vim.wikia.com/wiki/Tags_generation_for_current_file&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://vim.wikia.com/wiki/Auto_tags_by_project.vim"&gt;Auto tags by project.vim&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Most methods I found do the same more or less: they set some auto commands to autogenerate tag files when a file is edited and set the search path in a way it can find the generated tags.&lt;br /&gt;&lt;br /&gt;I used to have some autocommands in vim to generate tags every time I modified a file in a project. Unfortunately I never figured out how to generate a single tags file per project/library. I always ended with a global tag file for all projects or a single tag file per folder. &lt;br /&gt;&lt;br /&gt;Another methods worked by adding tags generation commands to the build system so the tags get generated when we recompile the project (e.g. Makefile, Ant, CMake) and others simply created scripts per project and executed them manually from the project root directory or within vim using a key map.&lt;br /&gt;&lt;br /&gt;Since I use the Project.vim plugin it is natural for me to use it to generate the tags files as it is done &lt;a href="http://vim.wikia.com/wiki/Auto_tags_by_project.vim"&gt;here&lt;/a&gt;. My method is a lot different in that I do not use a Makefile to generate the tags and I only re-generate them when a file has been edited, not every time we open a file.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Auto-generating Ctags Using the Project.vim plugin&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;Anyone that has used the Project.vim plugin is familiar with the snippet shown below:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt; myproj=&amp;lt;src-path&amp;gt; in=in.vim out=out.vim CD=&amp;lt;src-path&amp;gt; {&lt;br /&gt;   CMakeLists.txt&lt;br /&gt;   in.vim&lt;br /&gt;   out.vim&lt;br /&gt;   include----------------- &lt;br /&gt;   src---------------------&lt;br /&gt;   test--------------------&lt;br /&gt;   tools-------------------&lt;br /&gt; }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;This corresponds to a project entry called "myproj" with root directory set to "src-path". Here the important parts are the "in", "out" and "CD" parameters.&lt;br /&gt;&lt;br /&gt;The "CD" parameter makes sure that you are at the project root directory when editing a file from that project. This is useful to have a single tags file per project.&lt;br /&gt;&lt;br /&gt;The "in" and "out" parameters are simple vim scripts. The "in" script is executed when opening a file from the project and the "out" script when leaving the file. In these scripts is where I set/unset the autocommands that take care of generating the tags files per project.&lt;br /&gt;&lt;br /&gt;Every time I create a new project using the Project.vim plugin I also create these in.vim and out.vim scripts:&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;in.vim&lt;/h4&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;font face="monospace"&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#87d787"&gt;&amp;quot; let ctags_cmd='/usr/local/bin/exctags'&amp;nbsp;&amp;nbsp; &amp;quot; Use this one in FreeBSD&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;let&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;ctags_cmd&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#ff8700"&gt;'/usr/bin/ctags'&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;&amp;nbsp;&amp;nbsp; &lt;span style="background-color: #121212"&gt;&lt;font color="#87d787"&gt;&amp;quot; Use this one in Linux&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;let&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;proj_path&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#8787ff"&gt;escape&lt;/font&gt;&lt;/span&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#00ffff"&gt;(&lt;/font&gt;&lt;/span&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#8787ff"&gt;getcwd&lt;/font&gt;&lt;/span&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#00ffff"&gt;()&lt;/font&gt;&lt;/span&gt;, &lt;span style="background-color: #121212"&gt;&lt;font color="#ff8700"&gt;' '&lt;/font&gt;&lt;/span&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#00ffff"&gt;)&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;let&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;_ctagargs_&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ff8700"&gt;&amp;quot; --fields=+iaS --extra=+q -R &amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;let&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;_ctag_&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;ctags_cmd&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;_ctagargs_&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ff8700"&gt;&amp;quot; -f &amp;quot;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;proj_path&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ff8700"&gt;&amp;quot;/.tags &amp;quot;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;proj_path&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;au&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ff5f87"&gt;BufWritePost&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;lt;buffer&amp;gt;&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;call&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#8787ff"&gt;system&lt;/font&gt;&lt;/span&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#00ffff"&gt;(&lt;/font&gt;&lt;/span&gt;_ctag_&lt;span style="background-color: #121212"&gt;&lt;font color="#00ffff"&gt;)&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;out.vim&lt;/h4&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: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;au&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;! * &lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;&amp;lt;&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;buffer&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;&amp;gt;&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Now every time you open a file from a project an autocommand will be created for that file that will regenerate tags for the whole project every time the file is saved. The generated tags file is always in the root directory of the project. You may prefer to use the "--append" switch of ctags to generate tags for the current file only but I personally prefer regenerating the tags of the whole project every time.&lt;br /&gt;&lt;br /&gt;When you leave the file the autocommand is removed in the out.vim script. If we do not remove the autocommand, it will be created every time we enter the file that results in a lot of autocommands around. I am not really sure if this can cause problems but is better go on the safe side.&lt;br /&gt;&lt;br /&gt;Now the last piece of the puzzle is how to tell Vim where to search for the tags.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Tell Vim where to search for tags&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;To find the per project tags we can simply add this to our vimrc file:&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;font face="monospace"&gt;&lt;br /&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;set&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#5fff5f"&gt;tags&lt;/font&gt;&lt;/span&gt;=./.tags;${HOME}&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;This simple command tells vim to search tag files from the current directory backwards up to our $HOME directory. Since we are sure that we are always at the projects root directory where the tags file is automatically generated we can be sure that vim will always find the tag we are looking for.&lt;br /&gt;&lt;br /&gt;There are some system wide tags that we want to always load depending on the language we are developing. For example when I develop in C I would like to have the kernel system calls tag file (that we generated before) or when developing in Ruby/Java I expect to have these languages core tags loaded too.&lt;br /&gt;&lt;br /&gt;To do this I load all system wide libraries based on filetype using these commands in my vimrc file:&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;font face="monospace"&gt;&lt;br /&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;au&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ff5f87"&gt;BufRead&lt;/font&gt;&lt;/span&gt;,&lt;span style="background-color: #121212"&gt;&lt;font color="#ff5f87"&gt;BufNewFile&lt;/font&gt;&lt;/span&gt;&amp;nbsp;*.rb&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;setlocal&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#5fff5f"&gt;tags&lt;/font&gt;&lt;/span&gt;+=~/.vim/tags/rbtags&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;au&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ff5f87"&gt;BufRead&lt;/font&gt;&lt;/span&gt;,&lt;span style="background-color: #121212"&gt;&lt;font color="#ff5f87"&gt;BufNewFile&lt;/font&gt;&lt;/span&gt;&amp;nbsp;*.cpp,*.h,*.c&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;setlocal&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#5fff5f"&gt;tags&lt;/font&gt;&lt;/span&gt;+=~/.vim/tags/kerneltags&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;au&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ff5f87"&gt;BufRead&lt;/font&gt;&lt;/span&gt;,&lt;span style="background-color: #121212"&gt;&lt;font color="#ff5f87"&gt;BufNewFile&lt;/font&gt;&lt;/span&gt;&amp;nbsp;*.rl,*.def&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;setlocal&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#5fff5f"&gt;tags&lt;/font&gt;&lt;/span&gt;+=~/.vim/tags/kerneltags&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;au&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ff5f87"&gt;BufRead&lt;/font&gt;&lt;/span&gt;,&lt;span style="background-color: #121212"&gt;&lt;font color="#ff5f87"&gt;BufNewFile&lt;/font&gt;&lt;/span&gt;&amp;nbsp;*.py&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;setlocal&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#5fff5f"&gt;tags&lt;/font&gt;&lt;/span&gt;+=~/.vim/tags/pytags&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;au&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ff5f87"&gt;BufRead&lt;/font&gt;&lt;/span&gt;,&lt;span style="background-color: #121212"&gt;&lt;font color="#ff5f87"&gt;BufNewFile&lt;/font&gt;&lt;/span&gt;&amp;nbsp;*.java&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;setlocal&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#5fff5f"&gt;tags&lt;/font&gt;&lt;/span&gt;+=~/.vim/tags/javatags&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;What these commands do is to load the system wide tag files we generated before depending on the file type. For example when editing a ruby file it loads the Ruby tags file.&lt;br /&gt;&lt;br /&gt;We must note that the commands only apply to the current file being edited (e.g. setlocal), not all the files in the project and that we are adding the tags file not replacing the current one (e.g. += ).&lt;br /&gt;&lt;br /&gt;Finally how can we add other tag files to the project that are not from the project itself and not system wide?. For example my project requires external libraries like libavcodec and SDL so it would be nice to query the function and struct definitions of these libraries.&lt;br /&gt;&lt;br /&gt;To do this I use the "in.vim" script of the Project.vim plugin like:&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: #121212"&gt;&lt;font color="#87d787"&gt;&amp;quot; let ctags_cmd='/usr/local/bin/exctags'&amp;nbsp;&amp;nbsp; &amp;quot; Use this one in FreeBSD&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;let&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;ctags_cmd&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#ff8700"&gt;'/usr/bin/ctags'&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;&amp;nbsp;&amp;nbsp; &lt;span style="background-color: #121212"&gt;&lt;font color="#87d787"&gt;&amp;quot; Use this one in Linux&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;let&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;proj_path&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#8787ff"&gt;escape&lt;/font&gt;&lt;/span&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#00ffff"&gt;(&lt;/font&gt;&lt;/span&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#8787ff"&gt;getcwd&lt;/font&gt;&lt;/span&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#00ffff"&gt;()&lt;/font&gt;&lt;/span&gt;, &lt;span style="background-color: #121212"&gt;&lt;font color="#ff8700"&gt;' '&lt;/font&gt;&lt;/span&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#00ffff"&gt;)&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;let&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;_ctagargs_&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ff8700"&gt;&amp;quot; --c++-kinds=+p --fields=+iaS --extra=+q -R &amp;quot;&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;let&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;_ctag_&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;ctags_cmd&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;_ctagargs_&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ff8700"&gt;&amp;quot; -f &amp;quot;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;proj_path&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ff8700"&gt;&amp;quot;/.tags &amp;quot;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;proj_path&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;au&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ff5f87"&gt;BufWritePost&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;lt;buffer&amp;gt;&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;call&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#8787ff"&gt;system&lt;/font&gt;&lt;/span&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#00ffff"&gt;(&lt;/font&gt;&lt;/span&gt;_ctag_&lt;span style="background-color: #121212"&gt;&lt;font color="#00ffff"&gt;)&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#87d787"&gt;&amp;quot; Add external library tag files&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;setlocal&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#5fff5f"&gt;tags&lt;/font&gt;&lt;/span&gt;+=~/.vim/tags/sdltags&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #121212"&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;setlocal&lt;/b&gt;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: #121212"&gt;&lt;font color="#5fff5f"&gt;tags&lt;/font&gt;&lt;/span&gt;+=~/.vim/tags/ffmpegtags&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;This is exactly the same "in.vim" script as above with two added lines that include the libavcodec (FFMpeg) and SDL library tags files to the search path of vim for all files in the project. These files were of course generated before the same way we created the system wide tag files and updated via a cron job.&lt;br /&gt;&lt;br /&gt;Once you setup this once you don't need to worry about this anymore until you reinstall your computer. The system wide libraries will be always updated if you configured the corresponding cron jobs and once a project is created it will always have the tags files updated and ready to query.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Setting up the TagList Plugin&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;No blog post about Vim+Ctags is complete without the mighty TagList plugin. To install this plugin go to &lt;a href="http://vim-taglist.sourceforge.net/"&gt;http://vim-taglist.sourceforge.net/&lt;/a&gt; and download the taglist_45.zip file. Then add it to your vim installation using the command:&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;unzip -d ~/.vim taglist_45.zip&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Then add these commands to your vimrc file:&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;&lt;font face="monospace"&gt;&lt;br /&gt;&lt;font color="#008080"&gt;&amp;quot; let Tlist_Ctags_Cmd='/usr/local/bin/exctags'&amp;nbsp;&amp;nbsp; &amp;quot; Use this one in FreeBSD&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;let&lt;/font&gt;&amp;nbsp;Tlist_Ctags_Cmd&lt;font color="#00ff00"&gt;=&lt;/font&gt;&lt;font color="#ffff00"&gt;'/usr/bin/ctags'&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; &lt;font color="#008080"&gt;&amp;quot; Use this one in Linux&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;let&lt;/font&gt;&amp;nbsp;Tlist_Auto_Open&lt;font color="#00ff00"&gt;=&lt;/font&gt;&lt;font color="#87ffaf"&gt;0&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;let&lt;/font&gt;&amp;nbsp;Tlist_Auto_Update&lt;font color="#00ff00"&gt;=&lt;/font&gt;&lt;font color="#87ffaf"&gt;1&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;let&lt;/font&gt;&amp;nbsp;Tlist_Use_Horiz_Window&amp;nbsp;&lt;font color="#00ff00"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color="#87ffaf"&gt;0&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#008080"&gt;&amp;quot;let Tlist_Inc_Winwidth=0&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#008080"&gt;&amp;quot;let Tlist_Show_One_File=1&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;let&lt;/font&gt;&amp;nbsp;Tlist_Exist_OnlyWindow&lt;font color="#00ff00"&gt;=&lt;/font&gt;&lt;font color="#87ffaf"&gt;1&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;let&lt;/font&gt;&amp;nbsp;Tlist_Use_Right_Window&amp;nbsp;&lt;font color="#00ff00"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color="#87ffaf"&gt;1&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;let&lt;/font&gt;&amp;nbsp;Tlist_Sort_Type&lt;font color="#00ff00"&gt;=&lt;/font&gt;&lt;font color="#ffff00"&gt;&amp;quot;name&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;let&lt;/font&gt;&amp;nbsp;Tlist_Display_Prototype&lt;font color="#00ff00"&gt;=&lt;/font&gt;&lt;font color="#87ffaf"&gt;0&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;let&lt;/font&gt;&amp;nbsp;Tlist_Compact_Format&lt;font color="#00ff00"&gt;=&lt;/font&gt;&lt;font color="#87ffaf"&gt;1&lt;/font&gt;&amp;nbsp;&lt;font color="#008080"&gt;&amp;quot; Compact?&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;let&lt;/font&gt;&amp;nbsp;Tlist_GainFocus_On_ToggleOpen&lt;font color="#00ff00"&gt;=&lt;/font&gt;&lt;font color="#87ffaf"&gt;1&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;let&lt;/font&gt;&amp;nbsp;Tlist_Display_Tag_Scope&lt;font color="#00ff00"&gt;=&lt;/font&gt;&lt;font color="#87ffaf"&gt;1&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;let&lt;/font&gt;&amp;nbsp;Tlist_Close_On_Select&lt;font color="#00ff00"&gt;=&lt;/font&gt;&lt;font color="#87ffaf"&gt;1&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;let&lt;/font&gt;&amp;nbsp;Tlist_Enable_Fold_Column&lt;font color="#00ff00"&gt;=&lt;/font&gt;&lt;font color="#87ffaf"&gt;1&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#008080"&gt;&amp;quot;let TList_WinWidth=25&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#008080"&gt;&amp;quot; Map a F8 to the TlistToggle command for easy tags list access&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ffff00"&gt;nnoremap&lt;/font&gt;&amp;nbsp;&lt;font color="#00ff00"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#ff6060"&gt;silent&lt;/font&gt;&lt;font color="#00ff00"&gt;&amp;gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#00ff00"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#ff6060"&gt;F8&lt;/font&gt;&lt;font color="#00ff00"&gt;&amp;gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#00ff00"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#ff6060"&gt;ESC&lt;/font&gt;&lt;font color="#00ff00"&gt;&amp;gt;&lt;/font&gt;:TlistToggle&lt;font color="#00ff00"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#ff6060"&gt;CR&lt;/font&gt;&lt;font color="#00ff00"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Of course I recommend you to read the help file and set the configuration as it fits you better. With my configuration you can press &lt;F8&gt; to open the tags list window and when you press &lt;Enter&gt; on a tag the windows automatically closes. This is specially useful on small screen laptops to allow more code visible all the time.&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;</description><link>http://piao-tech.blogspot.com/2008/10/make-vim-and-ctag-play-nice-together.html</link><author>noreply@blogger.com (龍神)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_99Fzui5MBLY/SzIJTI943DI/AAAAAAAAAN4/fy1ezb0HP8c/s72-c/ctags.png' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34829202.post-6857098958218005916</guid><pubDate>Wed, 08 Oct 2008 05:43:00 +0000</pubDate><atom:updated>2009-07-13T00:45:44.970+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Tips</category><category domain='http://www.blogger.com/atom/ns#'>Kubuntu</category><title>Basic .vimrc file</title><description>&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;</description><link>http://piao-tech.blogspot.com/2008/10/basic-vimrc-file.html</link><author>noreply@blogger.com (龍神)</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></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34829202.post-2723121582162763650</guid><pubDate>Thu, 25 Sep 2008 01:47:00 +0000</pubDate><atom:updated>2008-09-25T10:59:53.109+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Tips</category><category domain='http://www.blogger.com/atom/ns#'>Kubuntu</category><title>Canon Satera LBP5910 Linux Driver</title><description>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;</description><link>http://piao-tech.blogspot.com/2008/09/canon-satera-lbp5910-linux-driver.html</link><author>noreply@blogger.com (龍神)</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></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34829202.post-1197929848483300660</guid><pubDate>Wed, 25 Jun 2008 03:38:00 +0000</pubDate><atom:updated>2008-06-25T13:11:22.634+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Tips</category><category domain='http://www.blogger.com/atom/ns#'>SftpDrive</category><category domain='http://www.blogger.com/atom/ns#'>OpenSSH</category><title>Use PuTTY generated keys with SftpDrive</title><description>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;</description><link>http://piao-tech.blogspot.com/2008/06/use-putty-generated-keys-with-sftpdrive.html</link><author>noreply@blogger.com (龍神)</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></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34829202.post-7526363447212366530</guid><pubDate>Tue, 24 Jun 2008 00:10:00 +0000</pubDate><atom:updated>2008-06-25T12:13:55.867+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Tips</category><category domain='http://www.blogger.com/atom/ns#'>Subversion</category><category domain='http://www.blogger.com/atom/ns#'>Servers</category><category domain='http://www.blogger.com/atom/ns#'>OpenSSH</category><title>Subversion + OpenSSH Server + PuTTY Client Setup</title><description>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;</description><link>http://piao-tech.blogspot.com/2008/06/subversion-openssh-server-putty-client.html</link><author>noreply@blogger.com (龍神)</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></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34829202.post-5635281598832844310</guid><pubDate>Sat, 14 Jun 2008 02:47:00 +0000</pubDate><atom:updated>2008-06-14T11:50:22.883+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Rant</category><title>Best gift ever??</title><description>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;</description><link>http://piao-tech.blogspot.com/2008/06/best-gift-ever.html</link><author>noreply@blogger.com (龍神)</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></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34829202.post-2094442945594256762</guid><pubDate>Sat, 26 Apr 2008 16:16:00 +0000</pubDate><atom:updated>2008-06-14T12:05:05.267+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>pulseaudio</category><category domain='http://www.blogger.com/atom/ns#'>Tips</category><category domain='http://www.blogger.com/atom/ns#'>Kubuntu</category><title>Pulse audio and SPDIF output in Kubuntu (Hardy Heron 8.04)</title><description>&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;</description><link>http://piao-tech.blogspot.com/2008/04/pulse-audio-and-spdif-output-in-kubuntu.html</link><author>noreply@blogger.com (龍神)</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></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34829202.post-2199566126864711914</guid><pubDate>Thu, 17 Apr 2008 01:18:00 +0000</pubDate><atom:updated>2008-04-17T10:25:04.375+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Rant</category><title>Plotting SVN history??</title><description>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;</description><link>http://piao-tech.blogspot.com/2008/04/plotting-svn-history.html</link><author>noreply@blogger.com (龍神)</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></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34829202.post-8350379595390040248</guid><pubDate>Sun, 13 Apr 2008 08:00:00 +0000</pubDate><atom:updated>2008-04-13T17:07:03.618+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Rant</category><title>Linux Cafe in Akihabara</title><description>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;</description><link>http://piao-tech.blogspot.com/2008/04/linux-cafe-in-akihabara.html</link><author>noreply@blogger.com (龍神)</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></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34829202.post-1771592333071915074</guid><pubDate>Wed, 09 Apr 2008 00:05:00 +0000</pubDate><atom:updated>2008-04-09T10:06:14.645+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Tips</category><category domain='http://www.blogger.com/atom/ns#'>Servers</category><title>Simple Mail Server (Kubuntu)</title><description>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;</description><link>http://piao-tech.blogspot.com/2008/04/simple-mail-server-kubuntu.html</link><author>noreply@blogger.com (龍神)</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></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34829202.post-5024787254007856300</guid><pubDate>Fri, 04 Apr 2008 06:46:00 +0000</pubDate><atom:updated>2008-04-04T17:11:35.342+09:00</atom:updated><title>Get latest ffmpeg (svn) in FreeBSD-7.0</title><description>If you want to compile the latest ffmpeg from subversion with some external libraries support like x264, faac, Theora and Vorbis in the latest FreeBSD release (7.0) then follow this simple steps:&lt;br /&gt;&lt;br /&gt;If you do not have the ports tree installed (i.e. /usr/ports is empty or non existent) then you can use portsnap to download and update it (these commands must be done as root):&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;pkg_add &lt;font color="#ff6060"&gt;&lt;b&gt;-r&lt;/b&gt;&lt;/font&gt;&amp;nbsp;portsnap&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;2 &lt;/b&gt;&lt;/font&gt;mkdir /usr/ports&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;3 &lt;/b&gt;&lt;/font&gt;portsnap fetch&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;4 &lt;/b&gt;&lt;/font&gt;portsnap extract&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;5 &lt;/b&gt;&lt;/font&gt;portsnap update&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Install some ports to enable more funcionality in ffmpeg (these commands also must be done as root):&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;&amp;nbsp;1 &lt;/b&gt;&lt;/font&gt;&lt;font color="#00ffff"&gt;&lt;b&gt;# faac support&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;&amp;nbsp;2 &lt;/b&gt;&lt;/font&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;cd&lt;/b&gt;&lt;/font&gt;&amp;nbsp;/usr/ports/audio/faac&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;&amp;nbsp;3 &lt;/b&gt;&lt;/font&gt;make install clean&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;&amp;nbsp;4 &lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;&amp;nbsp;5 &lt;/b&gt;&lt;/font&gt;&lt;font color="#00ffff"&gt;&lt;b&gt;# vorbis support&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;&amp;nbsp;6 &lt;/b&gt;&lt;/font&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;cd&lt;/b&gt;&lt;/font&gt;&amp;nbsp;/usr/ports/audio/vorbis-tools&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;&amp;nbsp;7 &lt;/b&gt;&lt;/font&gt;make install clean&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;&amp;nbsp;8 &lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;&amp;nbsp;9 &lt;/b&gt;&lt;/font&gt;&lt;font color="#00ffff"&gt;&lt;b&gt;# x264 support&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;10 &lt;/b&gt;&lt;/font&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;cd&lt;/b&gt;&lt;/font&gt;&amp;nbsp;/usr/ports/multimedia/x264&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;11 &lt;/b&gt;&lt;/font&gt;make install clean&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;12 &lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;13 &lt;/b&gt;&lt;/font&gt;&lt;font color="#00ffff"&gt;&lt;b&gt;# theora support&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;14 &lt;/b&gt;&lt;/font&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;cd&lt;/b&gt;&lt;/font&gt;&amp;nbsp;/usr/ports/multimedia/libtheora&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;15 &lt;/b&gt;&lt;/font&gt;make install clean&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;16 &lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;17 &lt;/b&gt;&lt;/font&gt;&lt;font color="#00ffff"&gt;&lt;b&gt;# ffplay support&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;18 &lt;/b&gt;&lt;/font&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;cd&lt;/b&gt;&lt;/font&gt;&amp;nbsp;/usr/ports/deve/sdl12&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;19 &lt;/b&gt;&lt;/font&gt;make install clean&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Checkout ffmpeg from subversion, configure, compile and install (only the last command needs root priviledges);&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;&amp;nbsp;1 &lt;/b&gt;&lt;/font&gt;&lt;font color="#00ffff"&gt;&lt;b&gt;# checkout ffmpeg from subversion&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;&amp;nbsp;2 &lt;/b&gt;&lt;/font&gt;svn co svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;&amp;nbsp;3 &lt;/b&gt;&lt;/font&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;cd&lt;/b&gt;&lt;/font&gt;&amp;nbsp;ffmpeg&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;&amp;nbsp;4 &lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;&amp;nbsp;5 &lt;/b&gt;&lt;/font&gt;&lt;font color="#00ffff"&gt;&lt;b&gt;# export library and include paths &lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;&amp;nbsp;6 &lt;/b&gt;&lt;/font&gt;&lt;font color="#00ffff"&gt;&lt;b&gt;# so configure can find the external &lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;&amp;nbsp;7 &lt;/b&gt;&lt;/font&gt;&lt;font color="#00ffff"&gt;&lt;b&gt;# libraries (i.e. x264)&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;&amp;nbsp;8 &lt;/b&gt;&lt;/font&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;export&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#00ffff"&gt;&lt;b&gt;LIBRARY_PATH&lt;/b&gt;&lt;/font&gt;=/usr/local/lib&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;&amp;nbsp;9 &lt;/b&gt;&lt;/font&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;export&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#00ffff"&gt;&lt;b&gt;CPATH&lt;/b&gt;&lt;/font&gt;=/usr/local/include&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;10 &lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;11 &lt;/b&gt;&lt;/font&gt;&lt;font color="#00ffff"&gt;&lt;b&gt;# run configure with desired options&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;12 &lt;/b&gt;&lt;/font&gt;./configure &lt;font color="#ff6060"&gt;&lt;b&gt;--enable-gpl&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#ff6060"&gt;&lt;b&gt;--enable-pthreads&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#ffff00"&gt;&lt;b&gt;\&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;13 &lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#ff6060"&gt;&lt;b&gt;--enable-shared&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#ff6060"&gt;&lt;b&gt;--enable-swscale&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color="#ffff00"&gt;&lt;b&gt;\&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;14 &lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#ff6060"&gt;&lt;b&gt;--enable-libx264&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#ff6060"&gt;&lt;b&gt;--enable-libfaac&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#ffff00"&gt;&lt;b&gt;\&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;15 &lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#ff6060"&gt;&lt;b&gt;--enable-libtheora&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#ff6060"&gt;&lt;b&gt;--enable-libvorbis&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#ffff00"&gt;&lt;b&gt;\&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;16 &lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#ff6060"&gt;&lt;b&gt;--enable-encoder=g726&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#ff6060"&gt;&lt;b&gt;--enable-encoder=ljpeg&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#ffff00"&gt;&lt;b&gt;\&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;17 &lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#ff6060"&gt;&lt;b&gt;--enable-encoder=mjpeg&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;18 &lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;19 &lt;/b&gt;&lt;/font&gt;&lt;font color="#00ffff"&gt;&lt;b&gt;# compile using GNU Make (gmake), not BSD Make&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;20 &lt;/b&gt;&lt;/font&gt;gmake&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;21 &lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;22 &lt;/b&gt;&lt;/font&gt;&lt;font color="#00ffff"&gt;&lt;b&gt;# install&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#ff6060"&gt;&lt;b&gt;23 &lt;/b&gt;&lt;/font&gt;su root &lt;font color="#ff6060"&gt;&lt;b&gt;-c&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#ffff00"&gt;&lt;b&gt;'&lt;/b&gt;&lt;/font&gt;&lt;font color="#ff40ff"&gt;&lt;b&gt;gmake install&lt;/b&gt;&lt;/font&gt;&lt;font color="#ffff00"&gt;&lt;b&gt;'&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;If you want to enable other external codec libraries supported by ffmpeg make sure to install their respective ports (if available) and then run the configure script with the desired libraries enabled. You can see a list of supported codec libraries with ".configure --help".&lt;br /&gt;&lt;br /&gt;Note that this instructions were tested with revision 12684 of ffmpeg subverion but ffmpeg is a very active project and this instructions are not guarantee to work with the latest subversion revision.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34829202-5024787254007856300?l=piao-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://piao-tech.blogspot.com/2008/04/get-latest-ffmpeg-svn-in-freebsd-70.html</link><author>noreply@blogger.com (龍神)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34829202.post-8464901854248479412</guid><pubDate>Thu, 03 Apr 2008 01:57:00 +0000</pubDate><atom:updated>2008-04-03T11:20:04.375+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Tips</category><category domain='http://www.blogger.com/atom/ns#'>Kubuntu</category><title>Japanese Input in KDE 4.0.3 (Anthy)</title><description>So you want to try the newest and greatest KDE 4.0.3 release but you can't because you need to be able to write other languages other than English like in my case Japanese, Chinese and/or Korean?? &lt;br /&gt;&lt;br /&gt;After googling I found &lt;a href="http://www.nabble.com/Call-for-test-for-scim-bridge-td15405990.html"&gt;here&lt;/a&gt; that there is a scim input method that allows input of these languages in KDE4 and also fixes some problems with proprietary software like Skype, Adobe Reader, etc.&lt;br /&gt;&lt;br /&gt;This input method is called scim-bridge and can be easily installed in Kubuntu with the command:&lt;br /&gt;&lt;div class=code&gt;&lt;br /&gt;sudo aptitude install scim-bridge-agent scim-bridge-client-qt4 scim-bridge-client-qt scim-bridge-client-gtk &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Then to enable scim-bridge as your input method you can use im-switch:&lt;br /&gt;&lt;div class=code&gt;&lt;br /&gt;im-switch -s scim-bridge&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;or if you do not have im-switch then you can do it manually with:&lt;br /&gt;&lt;div class=code&gt;&lt;br /&gt;sudo ln -sf /etc/alternatives/xinput-all_ALL /etc/X11/xinit/xinput.d/scim-bridge &lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Seems that scim-bridge is now the default input method in Ubuntu/Kubuntu but not sure, see resources below to get  more detailed explanation on how to setup SCIM in Ubuntu.&lt;br /&gt;&lt;br /&gt;&lt;a href="https://help.ubuntu.com/community/SCIM"&gt;https://help.ubuntu.com/community/SCIM&lt;/a&gt;&lt;br /&gt;&lt;a href="https://help.ubuntu.com/community/SCIM/Kubuntu"&gt;https://help.ubuntu.com/community/SCIM/Kubuntu&lt;/a&gt;&lt;br /&gt;&lt;a href="https://wiki.ubuntu.com/InputMethods/SCIM/Setup"&gt;https://wiki.ubuntu.com/InputMethods/SCIM/Setup&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34829202-8464901854248479412?l=piao-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://piao-tech.blogspot.com/2008/04/japanese-input-in-kde-403-anthy.html</link><author>noreply@blogger.com (龍神)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34829202.post-5398001950654493430</guid><pubDate>Mon, 03 Mar 2008 14:05:00 +0000</pubDate><atom:updated>2008-03-05T09:58:54.603+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Android</category><category domain='http://www.blogger.com/atom/ns#'>Netbeans</category><title>Developing Android in Netbeans</title><description>Anyone who reads this blog would know that I like Netbeans a lot for mobile development (see &lt;a href="http://piao-tech.blogspot.com/2006/10/developing-for-japanese-phones-in.html"&gt;here&lt;/a&gt;, &lt;a href="http://piao-tech.blogspot.com/2006/10/developing-for-japanese-phones-in_06.html"&gt;here&lt;/a&gt;, &lt;a href="http://piao-tech.blogspot.com/2006/10/developing-for-japanese-phones-in_11.html"&gt;here&lt;/a&gt; and &lt;a href="http://piao-tech.blogspot.com/2007/06/doja-development-in-netbeans.html"&gt;here&lt;/a&gt;) and when I found that Google's mobile platform (&lt;a href="http://code.google.com/android/"&gt;Android&lt;/a&gt;) does not have a Netbeans plugin I was very disappointed. &lt;br /&gt;&lt;br /&gt;Of course Netbeans enthusiasts developed a plugin (&lt;a href="http://undroid.nolimit.cz/"&gt;Undroid&lt;/a&gt;) but it is not supported by Google, I could not get it to launch the emulator directly from the IDE and currently it does not work with the latest Android SDK so still we do not have a full solution for Android development in Netbeans.&lt;br /&gt;&lt;br /&gt;Now if you don't mind working in a mixed setting using Android tools from command line and using Netbeans to code, compile and install your Android applications then here is how you can do it.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Prerequisites&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I assume you have the latest Netbeans 6.0.1 already installed and the latest Android SDK m5-rc14 also installed in your computer. I have tested this configuration in my Linux (Kubuntu) machine but should also work in Windows and other Linux distributions.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Creating a new project&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The first thing is to create a new project using the  activityCreator.py script that comes with the Android SDK:&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;activityCreator.py --out HelloAndroid org.piaotech.android&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;this script will create the project skeleton and more important the build.xml file that can be used by Netbeans to build/install your Android applications.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_99Fzui5MBLY/R8wKuFfmXGI/AAAAAAAAAH4/JR9kFj0zC0o/s1600-h/android1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp0.blogger.com/_99Fzui5MBLY/R8wKuFfmXGI/AAAAAAAAAH4/JR9kFj0zC0o/s320/android1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5173521858806832226" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Start Netbeans and create a new "Java Project with Existing Ant Script" as shown in the figure above. In the next screen browse the location of the project directory created by the activityCreator.py script (HelloAndroid above) and the rest of the fields will be filled automatically by Netbeans. You can change the project name if you wish but the default is ok.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_99Fzui5MBLY/R8wLxlfmXHI/AAAAAAAAAIA/vztA1rwN4Vk/s1600-h/android2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp2.blogger.com/_99Fzui5MBLY/R8wLxlfmXHI/AAAAAAAAAIA/vztA1rwN4Vk/s320/android2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5173523018448002162" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In the next screen (figure above) select the Ant tasks that each of the Netbeans commands should execute. I simply put &lt;span style="font-style:italic;"&gt;compile&lt;/span&gt; for &lt;span style="font-style:italic;"&gt;Build Project&lt;/span&gt; and &lt;span style="font-style:italic;"&gt;install&lt;/span&gt; for &lt;span style="font-style:italic;"&gt;Run Project&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_99Fzui5MBLY/R8wNR1fmXII/AAAAAAAAAII/KNJ4UqbKmLc/s1600-h/android3.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp3.blogger.com/_99Fzui5MBLY/R8wNR1fmXII/AAAAAAAAAII/KNJ4UqbKmLc/s320/android3.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5173524672010411138" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In the last screen make sure to add the &lt;span style="font-style:italic;"&gt;src&lt;/span&gt; and &lt;span style="font-style:italic;"&gt;res&lt;/span&gt; of the project to the &lt;span style="font-style:italic;"&gt;Source Package Folders&lt;/span&gt; as shown above.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_99Fzui5MBLY/R8wPeFfmXJI/AAAAAAAAAIQ/s0dih168VRM/s1600-h/android4.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp0.blogger.com/_99Fzui5MBLY/R8wPeFfmXJI/AAAAAAAAAIQ/s0dih168VRM/s320/android4.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5173527081487064210" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;finally select &lt;span style="font-style:italic;"&gt;Java Sources Classpath&lt;/span&gt; in categories and add the &lt;span style="font-style:italic;"&gt;doc&lt;/span&gt; directory that is inside the Android SDK as shown in the picture above and press finish.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Running you project&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Now you should have your new Android project in Netbeans project view and now you can code and build it as you would using any other Netbeans project. Now if you try to run the application you will get an error indicating that there is no device. This is because I still have not found a way to launch the emulator from within Netbeans so we must launch it manually. From the command line run the emulator:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;android-sdk_m5-rc14_linux-x86/tools/emulator&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;now with the emulator running if you run your project from within Netbeans the Android application will be automatically installed in the emulator. &lt;br /&gt; &lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_99Fzui5MBLY/R8wTCVfmXKI/AAAAAAAAAIY/dfg61PggLfg/s1600-h/android6.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp1.blogger.com/_99Fzui5MBLY/R8wTCVfmXKI/AAAAAAAAAIY/dfg61PggLfg/s320/android6.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5173531002792205474" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It takes some effort to setup an Android project in Netbeans and actually there is no benefit from doing this as any java editor with support for Ant scripts can do the same. In my case is simply a matter of preference as all my Java projects are in Netbeans I did not want to have a separate project format only for Android applications. &lt;br /&gt;&lt;br /&gt;Note that there is no need to close the emulator each time you rebuild your application so leave it running during the time you are developing. I also recommend you set up a console running the &lt;span style="font-style:italic;"&gt;adb logcat&lt;/span&gt; command so you can see all the debugging messages (Log.v()) that Android throws.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34829202-5398001950654493430?l=piao-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://piao-tech.blogspot.com/2008/03/developing-android-in-netbeans.html</link><author>noreply@blogger.com (龍神)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_99Fzui5MBLY/R8wKuFfmXGI/AAAAAAAAAH4/JR9kFj0zC0o/s72-c/android1.png' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34829202.post-5727449121760402254</guid><pubDate>Sat, 23 Feb 2008 08:56:00 +0000</pubDate><atom:updated>2008-02-23T17:58:32.256+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Others</category><title>Dr. Randy Pausch</title><description>A very inspirational talk by Dr. Randy Paush.&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="355"&gt;&lt;param name="movie" value="http://www.youtube.com/v/_tIyt8oSLVs&amp;rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999&amp;border=0"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/_tIyt8oSLVs&amp;rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999&amp;border=0" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34829202-5727449121760402254?l=piao-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://piao-tech.blogspot.com/2008/02/dr-randy-pausch.html</link><author>noreply@blogger.com (龍神)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-34829202.post-1761964076290030900</guid><pubDate>Thu, 21 Feb 2008 16:25:00 +0000</pubDate><atom:updated>2008-03-05T09:59:07.860+09:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Tips</category><title>Reduce GIF size using RMagick</title><description>If you are creating GIF images using RMagick and your application has very stringent size restrictions (i.e. mobile devices) then this post may help you get the most of RMagick.&lt;br /&gt;&lt;br /&gt;While it is possible to control the compression of JPEG and PNG files using the quality parameter for GIF files we are left with almost no options. Fortunately a little understanding of the default, and only, compression scheme used in GIF can help you improve the compression performance of your images.&lt;br /&gt;&lt;br /&gt;The LZW compression algorithm used in GIF images and developed by Abraham Lempel, Jakob Ziv and Terry Welch, contructs a color table for an image wherein each color value is matched to a pixel. Thus, &lt;font color="#ff40ff"&gt;images with large areas of one color will be compressed far better than those that those that do not have such color blocks&lt;/font&gt;.&lt;br /&gt;&lt;br /&gt;So to get better compression (smaller images) we must ensure we have large contiguous blocks of the same color in our image. When creating images in ImageMagick we can use these tips to ensure small size results:&lt;br /&gt;&lt;br /&gt;First: Make use simple graphics with flat colors (i.e. avoid using  Magick::GradientFill).&lt;br /&gt;&lt;br /&gt;Second: when using an RMagick::Draw object always make sure you call the stroke_antialias(false) method on it:&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;1 &lt;/font&gt;&lt;font color="#ff6060"&gt;require&lt;/font&gt;&amp;nbsp;&lt;font color="#008080"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#ff40ff"&gt;RMagick&lt;/font&gt;&lt;font color="#008080"&gt;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;2 &lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;3 &lt;/font&gt;gc = &lt;font color="#00ff00"&gt;Magick&lt;/font&gt;::&lt;font color="#00ff00"&gt;Draw&lt;/font&gt;.new&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;4 &lt;/font&gt;gc.stroke_antialias(&lt;font color="#ff40ff"&gt;false&lt;/font&gt;)&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;5 &lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;6 &lt;/font&gt;&lt;font color="#ff6060"&gt;# your drawing code below&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Third: When writing text using the annotate method from the Magick::Draw or Magick::Image classes do not use text antialiasing:&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;1 &lt;/font&gt;&lt;font color="#ff6060"&gt;require&lt;/font&gt;&amp;nbsp;&lt;font color="#008080"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#ff40ff"&gt;RMagick&lt;/font&gt;&lt;font color="#008080"&gt;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;2 &lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;3 &lt;/font&gt;gc = &lt;font color="#00ff00"&gt;Magick&lt;/font&gt;::&lt;font color="#00ff00"&gt;Draw&lt;/font&gt;.new&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;4 &lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;5 &lt;/font&gt;gc.annotate(img,...) {&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;6 &lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color="#ff40ff"&gt;self&lt;/font&gt;.text_antialias = &lt;font color="#ff40ff"&gt;false&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;font color="#00ffff"&gt;7 &lt;/font&gt;}&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;A very simple method to reduce the image size is using the despeckle filter on the image. This will reduce the color dither making the color distribution more planar so we have larger portions of the image with the same color. By doing this the LZW algorithm can reduce the final image size up to a 20% of the original size depending on the image.&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;1 &lt;/font&gt;&lt;font color="#ff6060"&gt;require&lt;/font&gt;&amp;nbsp;&lt;font color="#008080"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#ff40ff"&gt;RMagick&lt;/font&gt;&lt;font color="#008080"&gt;&amp;quot;&lt;/font&gt;&lt;br&gt;&lt;font color="#00ffff"&gt;2 &lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;&lt;font color="#00ffff"&gt;3 &lt;/font&gt;small_image = big_image.despeckle&lt;br&gt;&lt;font color="#00ffff"&gt;4 &lt;/font&gt;small_image.write(&lt;font color="#008080"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#ff40ff"&gt;small_image.gif&lt;/font&gt;&lt;font color="#008080"&gt;&amp;quot;&lt;/font&gt;){&lt;br&gt;&lt;font color="#00ffff"&gt;5 &lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#ff40ff"&gt;self&lt;/font&gt;.compression = &lt;font color="#00ff00"&gt;Magick&lt;/font&gt;::&lt;font color="#00ff00"&gt;LZWCompression&lt;/font&gt;&lt;br&gt;&lt;font color="#00ffff"&gt;6 &lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#ff40ff"&gt;self&lt;/font&gt;.dither = &lt;font color="#ff40ff"&gt;false&lt;/font&gt;&lt;br&gt;&lt;font color="#00ffff"&gt;7 &lt;/font&gt;}&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Actually calling self.compression is not needed as it is set by default by RMagick but is good just to make sure.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Resources&lt;/b&gt;&lt;br /&gt;&lt;a href="http://rmagick.rubyforge.org/"&gt;http://rmagick.rubyforge.org/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.faqs.org/faqs/jpeg-faq/part1/section-9.html"&gt;http://www.faqs.org/faqs/jpeg-faq/part1/section-9.html&lt;/a&gt;&lt;br /&gt;&lt;a href="http://rmagick.rubyforge.org/src_over.html"&gt;http://rmagick.rubyforge.org/src_over.html&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.webdevelopersnotes.com/graphics/gifs_compression_algorithm.php3"&gt;http://www.webdevelopersnotes.com/graphics/gifs_compression_algorithm.php3&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34829202-1761964076290030900?l=piao-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://piao-tech.blogspot.com/2008/02/reduce-gif-size-using-rmagick.html</link><author>noreply@blogger.com (龍神)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item></channel></rss>