Wednesday, June 2, 2010

Gvim as a c++ IDE

The VI was / is one of the most famous text editor, and the main reason why it got an important role is the fact that it is much more than a simple editor.
Many software developer also likes it (especially it's derives vim and gvim), because it can be used as an IDE, the only thing you should do is to install additional plugins for it.

Here a list you should try if haven't done it already:
To install them, create a ~/.vim directory, copy the zip files into it, then unzip the files.
To use c.vim consider modifying in ~/.vim/c-support/templates directory a few files, like: Templates, c.comments.template and cpp.comments.template
Modify your .vimrc file for a.vim, add these lines:
" a.vim: to search e.g. .hh files, too
let g:alternateExtensions_hh = "c,cpp,cxx,cc,CC"
let g:alternateExtensions_cc = "h,hh,hpp"

The plugins above are using tags file, which can be created by ctags. Note! Do not use emacs' ctags use exuberant ctags instead (default in Slackware).
To generate tags file use this command (e.g.):
ctags --c++-kinds=+p --fields=+iaS --extra=+q -R * *.cc *.c *.hh *.h
I've added an alias in my .bashrc:
alias ctagscppr='ctags --c++-kinds=+p --fields=+iaS --extra=+q -R * *.cc *.c *.hh *.h'

To use TagList type :TlistToggle in gvim.
To use OmniCppComplete just press "." or "->". By default "::" won't do anything (If I remember well C-x o is the default trigger for this plugin.)


Monday, May 31, 2010

Slackware 13.1 released

A few days ago the release of Slackware 13.1 was announced on slackware.com.
Just like the previous release it is has both 32 and 64 bit versions.
The main features / changes of it:
  • 2.6.33.4 version of the Linux kernel
  • GNU C Library version 2.11.1
  • gcc-4.4.4
  • KDE Software Compilation 4.4.3
  • Firefox 3.6.3
  • and a lot more
Download it from here: http://slackware.com/getslack/.

Saturday, January 2, 2010

My packages for Slackware

I created a few packages - well, buildscripts to be more specific -, and the maintainers of the slackware.hu web page were so kind to let me hold these scripts on their server.
You can find my packages here: http://packages.slackware.hu/czappa/

At the moment there aren't to much things there;
  • gtypist - if you want to practice touch typing
  • vm - an e-mail client for emacs
  • ratposion - a lightweight wm, which requires no mouse
  • ratmen - a menu application for ratposion.

Under the _other directory there are some not buildscript related stuff, for example
a script to create initrd, etc.

Monday, October 19, 2009

Make your terminal colorful

If you are using a color-monitor then it is possible to make your shell colorful,
for example to make the output of the ls command use different colors; to make the directories have different color than standard files.
To do it use the ls command with --color=yes parameter. You may also put an alias to your .bashrc file to make the colorful output a permanent setting.

My .bashrc file:
bash-3.1$ cat .bashrc
#!/bin/bash
export PATH=$PATH:/home/tamas/bin

alias cemacs="emacs-22.3-no-x11"
alias ls="ls --color=yes"

Sunday, October 18, 2009

How to switch the CAPS-LOCK and CTRL buttons

To switch the caps-lock and (left) ctrl keys may be a good idea if you use programs like Emacs where the ctrl key is often used.
There are a few methods to switch these keys, in so called "user-friendly" desktop environments (KDE, GNOME, etc.) it is possible to be changed from the (GUI) menu.
Although there are traditional, and universal methods as well.
The solution used by me is the following:
Create a file in your $HOME, in this example it is called .xmodmap.

The content of ~/.xmodmap is:
!
! Swap Caps_Lock and Control_L
!
remove Lock = Caps_Lock
remove Control = Control_L
keysym Control_L = Caps_Lock
keysym Caps_Lock = Control_L
add Lock = Caps_Lock
add Control = Control_L

The last thing is to make these setting executed every time you start your X.
So put the line below into your .xinitrc:
xmodmap ~/.xmodmap

For example my .xinitrc looks as follows:
# Switch left CTRL and CAPS-LOCK
xmodmap ~/.xmodmap

# Start the window manager:
#exec /usr/bin/wmaker $NOCPP
exec ratpoison

Sunday, August 30, 2009

Slackware 13.0 is released!

Three days ago "Pat and the Slackware crew"announced the Slackware 13.0!

Here is a short list about some of the major changes:
  • This is the first release which has an official 64bit (x86_64) version
  • New package format (tgz -> txz)
  • Reworked collection of X packages
  • KDE 4.2.4
Announcement: http://www.slackware.com/announce/13.0

Tuesday, August 4, 2009

OpenOffice for Slackware64-current

Unfortunatelly there is no OpenOffice package for Slackware64 (as well as there is no one for Slackware), but it's still easy to install ooo.
First download 64bit-rpm packages from http://download.openoffice.org/other.html#en-US,
then untar it (tar xzvf ...), step into 'untared-directory'/RPMS.
Here, type in rpm2tgz *.rpm. This takes a few minutes, just be patient.
When it finished, use su to become root, and type in:
installpkg *.tgz

After the ooo packages were installed the binary files are in /opt. To use the ooo binaries (like swriter for OpenOffice.org writer) this should be in your PATH environment variable.
In my case I didn't add it to my PATH, instead I used my "bin" directory (~/bin) which was already part of my PATH. All I had to do is to create a symlink for swriter AND soffice (you may need to add simpress if you want to use Impress, etc).

Happy typing! :)