Customisation for Vim Editor

Linux, vi No Comments »

When doing some simple programming, I like to use the Vim editor instead of using a full-blown IDE. It’s a good editor but I want to use it more efficiently. Some of the things I customise for myself are:

  • auto indentation - this is a must for programmers
  • tab size - to indent I use the tab key but different applications represent the tab character with different number of spaces; I like mine to be 4
  • I like my colours to be different

These settings are saved in a file named .vimrc in each user’s home directory. Simply save the vi commands in this file to have your customisation. But remember to remove the semicolons. Below is my .vimrc contents to achieve my customisation.

set tabstop=4

set autoindent

colorscheme wombat

wombat is a colour scheme file which I saved in the directory /usr/share/vim/vim71/colors/.

P.S. While searching for some help on setting the file types in Vim, I found this page in wikibooks.org that describes the tips a programmer would use. It’s unbelievably useful. Do check it out if you use vi editor!

Another page with some useful tips is http://tips.webdesign10.com/general/vim

Converting PS files to PDF

Linux, openSUSE No Comments »

In openSUSE 10.3, there is no readily available solution (that I know of) that lets a user print to PDF. The closest thing there is to that is a PostScript (PS) file. Fortunately there is a easy way to convert PS files to PDF. There is a command called ps2pdf which does exactly that. Its usage is very straightforward as well:

ps2pdf document.ps document.pdf

How much simpler can that get?

Installing Fonts in Linux

Linux No Comments »

Installing fonts has been somewhat of a neglect in Linux. Although I haven’t checked, it seems that recent distributions of SUSE Linux has made it GUI-friendly.

Nevertheless, being a console guy, I believe it’s better to know a more reliable way to make things work that is more ‘portable’ (i.e. work in other distributions as well).

So for fonts, the most straightforward way I know is to copy the font into your personal directory’s hidden font folder e.g. /home/coder/.fonts

After having done that, the next step is to then make the font available to your applications. This can be done with the command:

fc-cache -fv

That’s all there is to it!

Eee PC - Installing openSUSE 10.3 on SD Card

EeePC, Linux, openSUSE No Comments »

I’ve always read that installing an operating system, regardless of Windows XP or Linux, on a SD card in the Eee PC is possible. But I haven’t got the chance to prove that - until now.

Read the rest of this entry »

Making the USB Thumbdrive Bootable

EeePC, Linux, openSUSE, sled No Comments »

In my previous post, I mentioned that I sometimes have trouble using the mksusebootdisk script make the thumb drive bootable. In a recent endeavour to install openSUSE 10.3 onto the Eee PC again, I encountered the same problem. This time though, I was in a rush for time and simply refused to do the whole process from formatting the file system (till this date I still have not figured out what is the cause of the problem).

So I turned to Google. Lo and behold, by chance I bumped into John Anderson’s blog. In this particular page he described the manual steps that can be taken to make the thumb drive bootable. And it works!

All that needs to be done are but just a few steps. First step is to simply copy ALL the files under <installation_dvd>/boot/i386/loader/ to the root directory of the thumb drive.

Then rename the file isolinux.cfg to syslinux.cfg in the thumb drive.

Finally unmount the thumb drive and run the command below (the syslinux package has to be installed), assuming that the thumb drive device name is /dev/sdb:

syslinux /dev/sdb1

And you’re done!

Extracting RPM Files

Linux No Comments »

To extract the contents of a RPM file, you need the rpm2cpio and the cpio tools. Use them this way:

rpm2cpio name_of_package.rpm | cpio -iv

This will extract the contents of the RPM file.

Installing SLED10 SP1 on EeePC Part 2

EeePC, Linux, Novell, sled No Comments »

In the previous post, I described how to create the installation thumb drive. After creating the installation thumb drive, the next step, of course, is to use it to install.
Read the rest of this entry »

Changing Line Indentation in VI

Linux, vi No Comments »

Further to my previous post on changing the tab size in the VI editor, I’ve found out how to change the indentation size in VI.

Read the rest of this entry »

Changing the Tab Size in VI Editor

Linux, vi No Comments »

The vi editor is a powerful editor. Problem with it is that it is only for the command line which means that many preferences are not accessible via a ‘Preferences’ page. You need to know how to set preferences using commands.

Recently I’ve found out how to change the tab size in the vi editor. I think by default the tab size is 8 characters, which is too long for coding with proper indentation. To change it to a four character stop, use the following command in command mode:

:set tabstop=4
Read the rest of this entry »

Installing SLED10 SP1 on EeePC Part 1

EeePC, Linux, Novell, sled 2 Comments »

Part of my work requires me to play with the ASUS Eee PC. In particular, I’ve got to install on the Eee PC SUSE Linux Enterprise Desktop (SLED) 10 SP1. The process is more difficult than it sounds. I’m blogging about it here so that other people who are interested in doing the same thing can share my experience and theirs through comments.
Read the rest of this entry »

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in