POV-Ray : Newsgroups : povray.off-topic : Emacs Server Time
18 May 2024 16:09:50 EDT (-0400)
  Emacs (Message 340 to 349 of 349)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: nemesis
Subject: Re: Emacs
Date: 22 Apr 2009 17:34:02
Message: <49ef8d4a$1@news.povray.org>
Darren New escreveu:
> nemesis wrote:
>> True, that excellent use for the batch tools.  That's also not typical 
>> source code editing.
> 
> Not in your life, maybe. :-)

Now, come on, man!  Are you really saying you're one of those legendary 
*nix real programmers writing code with cat, then editing with ed, sed 
and awk pipes?

-- 
a game sig: http://tinyurl.com/d3rxz9


Post a reply to this message

From: nemesis
Subject: Re: Emacs
Date: 22 Apr 2009 17:35:36
Message: <49ef8da8$1@news.povray.org>
Mueen Nawaz escreveu:
> Mike Raiford wrote:
>> I've used VI for a semester in a college computer science course.
>>
>> I learned to hate it.
> 
> 	My hatred for it didn't require any learning.<G>

Then I guess you have no right for it. ;)

-- 
a game sig: http://tinyurl.com/d3rxz9


Post a reply to this message

From: Jim Henderson
Subject: Re: Emacs
Date: 22 Apr 2009 17:37:17
Message: <49ef8e0d@news.povray.org>
On Wed, 22 Apr 2009 16:22:35 -0500, Mueen Nawaz wrote:

> The ^C and ^V ones are actually from Apple.

I seem to remember that they come from Wordstar - ^KC for copy and ^KV 
for paste IIRC.

Jim


Post a reply to this message

From: Mike Raiford
Subject: Re: Emacs
Date: 23 Apr 2009 09:04:00
Message: <49f06740@news.povray.org>
Darren New wrote:

> The backspace key *should* send ASCII backspace. But since Emacs broke 
> that, they decided to make it send something else, rather than fixing 
> emacs.

What about EBCDIC backspace (0x16)?


-- 
~Mike


Post a reply to this message

From: Mike Raiford
Subject: Re: Emacs
Date: 23 Apr 2009 09:17:05
Message: <49f06a51@news.povray.org>
nemesis wrote:
> Mike Raiford escreveu:
>> nemesis wrote:
>>
>>> Yeah, Professor Foo probably goes like:  "Now type vi file and here 
>>> are some basic commands for you.  Have fun!"  Surely wasn't a vi 
>>> class and it just got in the way of the tasks.  You surely had no 
>>> time to learn it while you were fighting against it to get your 
>>> assignments done...
>>
>> That's exactly how it happened :)
> 
> And poor vi has nothing to do with it, really. :)
> 
>>> And I remember you're the guy who backed down from my text-copying 
>>> challenge in this thread. ;)
>>
>> ... I think I missed something here. What challenge was that?
> 
> Copy a really big block of text with a mouse and then try y} on vim for 
> the same task. ;)
> 
> Here's another:  open up some big source file, randomly place the cursor 
> somewhere inside, then search for the next call of the nearest function 
> being called (supposing it's not being called in the next line sure). 
> Copy the next block of text following the function call, then go back to 
> where you were and paste it.  Pretty routine source code editing.
> 
> In vim it can be done in a automated way, barely looking at what's being 
> done:  * j 0 y} 2Ctrl+o o Esc p
> 
> * over the function name to search for the next occurrence of name
> j to go to next line
> 0 to go to beginning of line
> y} to yank/copy the statements block following the call
> 2Ctrl-o to go back 2 times in the jump stack (search and copy add to it)
> o to add a line below the line where you were in the first place
> Esc to get out of insert mode
> p to place the copy
> 
> It may sound completely alien, but is completely intuitive once you 
> learn the basics.  Needless to say, I'd be done with it before the mouse 
> guy would still be positioning his cursor beyond the last statement to 
> copy and before using page-ups like mad to reach his original location 
> -- even if he was smart to bookmark it before... :P
> 

Hmmm Let see .. (This is visual studio, so YMMV)

Ctrl-F3 (Find next occurrence)
Down Arrow
Home
Ctrl-I } <enter>
Ctrl-=
Ctrl-c
3xCtrl--
Down Arrow
Enter
Ctrl-v

A few more keystrokes, but comparable.
-- 
~Mike


Post a reply to this message

From: Mueen Nawaz
Subject: Re: Emacs
Date: 23 Apr 2009 10:14:30
Message: <49f077c6$1@news.povray.org>
Jim Henderson wrote:
> On Wed, 22 Apr 2009 16:22:35 -0500, Mueen Nawaz wrote:
> 
>> The ^C and ^V ones are actually from Apple.
> 
> I seem to remember that they come from Wordstar - ^KC for copy and ^KV 
> for paste IIRC.

	Here's what Wikipedia says (and doesn't say it definitively...):

Apple Computer widely popularized the computer-based cut-and-paste
paradigm through the Lisa (1981) and Macintosh (1984) operating systems
and applications. Apple mapped the functionalities to key-combinations
consisting of a special modifier key held down while typing the letters
X (for cut), C (for copy), and V (for paste), choosing a handful of
keyboard sequences to control basic editing operations. The keys
involved all cluster together at the left end of the bottom row of the
standard QWERTY keyboard, and each key is combined with a control or
special modifier key to perform the desired operation:

    * Z to undo
    * X to cut
    * C to copy
    * V to paste

CUA (for OS/2) also uses combinations of the Insert, Del, Shift and
Control keys. Early versions of Windows used the IBM standard. Microsoft
later adopted similar key-combinations with the introduction of Windows.


-- 
"The security of the Enterprise is of Paramount importance.


                    /\  /\               /\  /
                   /  \/  \ u e e n     /  \/  a w a z
                       >>>>>>mue### [at] nawazorg<<<<<<
                                   anl


Post a reply to this message

From: nemesis
Subject: Re: Emacs
Date: 23 Apr 2009 12:59:02
Message: <49f09e56@news.povray.org>
Mike Raiford escreveu:
> nemesis wrote:
>> Here's another:  open up some big source file, randomly place the 
>> cursor somewhere inside, then search for the next call of the nearest 
>> function being called (supposing it's not being called in the next 
>> line sure). Copy the next block of text following the function call, 
>> then go back to where you were and paste it.  Pretty routine source 
>> code editing.
>>
>> In vim it can be done in a automated way, barely looking at what's 
>> being done:  * j 0 y} 2Ctrl+o o Esc p
>>
>> * over the function name to search for the next occurrence of name
>> j to go to next line
>> 0 to go to beginning of line
>> y} to yank/copy the statements block following the call
>> 2Ctrl-o to go back 2 times in the jump stack (search and copy add to it)
>> o to add a line below the line where you were in the first place
>> Esc to get out of insert mode
>> p to place the copy
>>
>> It may sound completely alien, but is completely intuitive once you 
>> learn the basics.  Needless to say, I'd be done with it before the 
>> mouse guy would still be positioning his cursor beyond the last 
>> statement to copy and before using page-ups like mad to reach his 
>> original location -- even if he was smart to bookmark it before... :P
>>
> 
> Hmmm Let see .. (This is visual studio, so YMMV)
> 
> Ctrl-F3 (Find next occurrence)
> Down Arrow
> Home
> Ctrl-I } <enter>
> Ctrl-=
> Ctrl-c
> 3xCtrl--
> Down Arrow
> Enter
> Ctrl-v
> 
> A few more keystrokes, but comparable.

I see you chose to ditch the mouse, which the original challenge was 
about.  Good for you anyway! :)

BTW, 2Ctrl+o is just that:  press 2, press Ctrl+o. ;)  No need to press 
it 2 or 3 times... May not sound much for short repetitions where indeed 
repressing the same key may be faster, but for numerous repetitious it 
can be very worth it, like yy10p to copy the current line and paste it 
10 times bellow.

As far as I know, VS has emacs keyboard shortcuts emulation, so it 
surely must have similar editings capabilities.  I know I had set up it 
once to do the wonderful copy buffer cycling.  I also know Netbeans has 
keyboard shortcuts resembling vi.  Not really surprising coming from 
Bill Joy's Sun Microsystems.

Anyway, someone suggested mouse would make emacs (and vim by extension) 
obsolete, but this is clearly dull as the mouse is an imprecise analogic 
tool which simply can't compare to the ease of discrete and concise 
commands typed as keyboard shortcuts...

I rest my case. :)

-- 
a game sig: http://tinyurl.com/d3rxz9


Post a reply to this message

From: Mike Raiford
Subject: Re: Emacs
Date: 23 Apr 2009 13:24:29
Message: <49f0a44d$1@news.povray.org>
nemesis wrote:

> 
> Anyway, someone suggested mouse would make emacs (and vim by extension) 
> obsolete, but this is clearly dull as the mouse is an imprecise analogic 
> tool which simply can't compare to the ease of discrete and concise 
> commands typed as keyboard shortcuts...

Yeah... no. I still use a lot of keyboard shortcuts. When using 
Photoshop, for example, I usually have the tablet's stylus in my right 
hand, and my left hand over the keyboard. I rarely do any "mousing" with 
the stylus. Everything that needs to be done usually has a keyboard 
shortcut. :)

> I rest my case. :)
> 

Yep. But it was the quickest way I could think of. Granted I do scroll 
through a lot with the mouse, or use the drop-down lists to navigate to 
a specific function within a class. I'm also the type that tends to use 
regular expressions to change things en masse.

But here it is with the mouse involved...:

^F3
In the left column, mouse down, drag until you see the first } Mouse Up
^C
^- x2
^V


-- 
~Mike


Post a reply to this message

From: Jim Henderson
Subject: Re: Emacs
Date: 23 Apr 2009 13:58:32
Message: <49f0ac48$1@news.povray.org>
On Thu, 23 Apr 2009 09:14:30 -0500, Mueen Nawaz wrote:

> and doesn't say it definitively..

That's the part I'm having trouble with.  ISTR that WordStar predated 
Apple, and I'm pretty sure that those control codes (the ^K prefixed 
ones) were correct in WordStar.

Jim


Post a reply to this message

From: Jim Henderson
Subject: Re: Emacs
Date: 23 Apr 2009 14:10:37
Message: <49f0af1d@news.povray.org>
On Thu, 23 Apr 2009 13:58:32 -0400, Jim Henderson wrote:

> On Thu, 23 Apr 2009 09:14:30 -0500, Mueen Nawaz wrote:
> 
>> and doesn't say it definitively..
> 
> That's the part I'm having trouble with.  ISTR that WordStar predated
> Apple, and I'm pretty sure that those control codes (the ^K prefixed
> ones) were correct in WordStar.

Found a reference that confirms my memory - ^KV was "move" not "paste", 
but otherwise I recall pretty much correctly.

http://www.glinx.com/~grifwood/WSCOMSUM.PDF

WordStar was first developed for CP/M in 1978; Apple was founded in 1976 
(incorporated in 1977), so they may have beaten Wordstar to the punch 
there, though the bit you cited said it was popularlized in 1981 with the 
Lisa, so it's possible that they were following a modified version of 
WordStar's choices or they came up with them independently.

Jim


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.