[prev in list] [next in list] [prev in thread] [next in thread] 

List:       quanta
Subject:    Re: [Quanta] total line count?
From:       Sasha Andric <sasha () goldnet ! ca>
Date:       2006-09-20 22:49:44
Message-ID: 200609201949.44778.sasha () goldnet ! ca
[Download RAW message or body]

On Wednesday 20 September 2006 19:21, Anthony Ettinger wrote:
> I know i'm lazy, but I don't like to scroll and loose my place. Is there a
> quick way to see total line count?
>
> I want to know i'm on line 22 of xxx

There must be easier way, but if not, you can create new script action and 
assign it some shorcut. Quanta provides dcop interface for the stuff you are 
looking for so it would be just a matter of displaying it with kommander, or 
just kdialog for an example

#!/bin/sh
PID=$1  
DOCNUMBER=`dcop quanta-$PID WindowManagerIf currentEditorIfNum`
TOTALLINES=`dcop quanta-$PID EditInterface\#$DOCNUMBER numLines`
CURRENTLINE=`dcop quanta-$PID ViewCursorInterface\#$DOCNUMBER-$DOCNUMBER 
cursorLine`
kdialog --msgbox "line $CURRENTLINE of $TOTALLINES"

Again, I am sure there is easier way to do this, but I like to complicate 
things.

Sasha
_______________________________________________
Quanta mailing list
Quanta@mail.kde.org
https://mail.kde.org/mailman/listinfo/quanta
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic