Working enviorment

Home page | Curriculum Vitae | Acid | Face detection and recognition | Papers | Wonder computer | DarkCut | Dark | Environment | Tips | Links |

My working environment is very useful for working with several files at the same time. I use mostly the Vim editor, although Kwrite is getting some attention from me nowadays. Keeping two overlapped Vim consoles, one small konsole for 'make' and 'debug' and always gkrellm, really helps when developing an application.

Running what?

  • Mandrake 9.1
  • KDE 3.1.0 with IceWM decoration
  • Tree konsoles
  • One with Vim
  • All with transparent to MC squeme
  • Gkrellm (blueHeart_gkrellm theme)
  • XawTV connected to Philips ToUCam Pro
  • Background image from DigitalBlasphemy, named sierramoon

  • Vim configuration

    It is a very simple one (named and located at ~/.vimrc):

    set ts=3
    set vb
    map < S-Insert > < MiddleMouse >
    map! < S-Insert > < MiddleMouse >
    hi comment ctermfg=cyan
    set noautoindent


    Bashrc configuration

    Named and located at ~/.bashrc:

    # .bashrc

    # Source global definitions
    if [ -f /etc/bashrc ]; then
    . /etc/bashrc
    fi

    alias ll='ls -lh'

    PATH=/sbin:/usr/sbin:/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/Acrobat5/bin
    ENV=$HOME/.bashrc
    USERNAME="ftomaz"

    # ****************
    # QT RELATED PATHS
    # ****************
    QTDIR=/usr/lib/qt3.1.2
    PATH=$QTDIR/bin:$PATH
    MANPATH=$QTDIR/doc/man:$MANPATH
    LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH


    # ****************
    # POSTGRES PATHS
    # ****************
    PGDATA=/var/lib/pgsql/data

    export USERNAME ENV PATH QTDIR MANPATH LD_LIBRARY_PATH PGDATA


    Search and replace recursive strings

    A very common task that I had trouble to manage was to search and replace a string in a recursive way. In the following example I'm replacing the word 'xtrato' to 'xtracto' in ALL files from the current location. You should backup your data before using this script.

    for n in `grep -l 'xtrato' * -r`;
    do mv $n $n.tmptmp; sed -s s/'xtrato'/'xtracto'/g $n.tmptmp > $n;
    rm -f $n.tmptmp;
    done

    Filipe António Gonçalves Tomaz
    This page is hosted in the University of Algarve
    Last update: Mon, 25 Aug 2003 18:09:10 GMT