all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Hard to switch from vi
@ 2006-10-08 23:32 Wen Weng
  2006-10-09  0:12 ` Ignacio Mondino
                   ` (8 more replies)
  0 siblings, 9 replies; 52+ messages in thread
From: Wen Weng @ 2006-10-08 23:32 UTC (permalink / raw)


Hi, I am a vi user for years and am now trying emacs.
I find it hard to get efficient. Can someone teach me some
commands?

1. In vi, to delete a line, I do, "dd" and to delete 5 lines, I do 
"5dd". In emacs, how do I delete a complete line? C-k only delete
from cursor to the end of line. Adding a C-a is really too much work.

2. Is there a repeat last command command like the dot command in vi?

3. In vi, to find a pairing brace I use the "%" command, is there a
command like thins in emacs?

4. Should I really need to switch to emacs?

Thanks
Wen

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-08 23:32 Hard to switch from vi Wen Weng
@ 2006-10-09  0:12 ` Ignacio Mondino
  2006-10-09  7:10   ` Lennart Borgman
       [not found]   ` <mailman.7909.1160377822.9609.help-gnu-emacs@gnu.org>
       [not found] ` <mailman.7907.1160352764.9609.help-gnu-emacs@gnu.org>
                   ` (7 subsequent siblings)
  8 siblings, 2 replies; 52+ messages in thread
From: Ignacio Mondino @ 2006-10-09  0:12 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 564 bytes --]


On Sun, Oct 08, 2006 at 07:32:01PM -0400, Wen Weng wrote:
 
> 4. Should I really need to switch to emacs?

That`s depends on you :) . You should feel confortable in your working 
environment, maybe you don't need to use Emacs at all.

It's just another tool (a REALLY powerfull tool) to learn, just like many of 
us learn vi, which is powerfull a powerfull too. 

:))  

-- 
---------------------------------------------------------------------------
							    Ignacio Mondino
					    JID: ignacio.mondino@jabber.org
								Don't Panic




[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
       [not found] ` <mailman.7907.1160352764.9609.help-gnu-emacs@gnu.org>
@ 2006-10-09  0:40   ` Wen Weng
  2006-10-09  1:48     ` Ajit Mylavarapu
  0 siblings, 1 reply; 52+ messages in thread
From: Wen Weng @ 2006-10-09  0:40 UTC (permalink / raw)


Thanks. I want to give it a try for the reason of learning a (hopefully) 
different way of thinking...


Ignacio Mondino wrote:
> On Sun, Oct 08, 2006 at 07:32:01PM -0400, Wen Weng wrote:
>  
>> 4. Should I really need to switch to emacs?
> 
> That`s depends on you :) . You should feel confortable in your working 
> environment, maybe you don't need to use Emacs at all.
> 
> It's just another tool (a REALLY powerfull tool) to learn, just like many of 
> us learn vi, which is powerfull a powerfull too. 
> 
> :))  
> 

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-09  0:40   ` Wen Weng
@ 2006-10-09  1:48     ` Ajit Mylavarapu
  0 siblings, 0 replies; 52+ messages in thread
From: Ajit Mylavarapu @ 2006-10-09  1:48 UTC (permalink / raw)


Wen Weng wrote:
> Thanks. I want to give it a try for the reason of learning a (hopefully) 
> different way of thinking...
> 
> 
> Ignacio Mondino wrote:
>> On Sun, Oct 08, 2006 at 07:32:01PM -0400, Wen Weng wrote:
>>  
>>> 4. Should I really need to switch to emacs?
>>
>> That`s depends on you :) . You should feel confortable in your working 
>> environment, maybe you don't need to use Emacs at all.
>>
>> It's just another tool (a REALLY powerfull tool) to learn, just like 
>> many of us learn vi, which is powerfull a powerfull too.
>> :)) 
Emacs = lot of keyboard clobbering ... but, yeah, I use emacs anyway ... :-)

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-08 23:32 Hard to switch from vi Wen Weng
  2006-10-09  0:12 ` Ignacio Mondino
       [not found] ` <mailman.7907.1160352764.9609.help-gnu-emacs@gnu.org>
@ 2006-10-09  2:03 ` ext-chunye.wang
  2006-10-09  2:09   ` Pascal Bourguignon
  2006-10-09  2:04 ` Pascal Bourguignon
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 52+ messages in thread
From: ext-chunye.wang @ 2006-10-09  2:03 UTC (permalink / raw)


Wen Weng <WenWeng@charter.net> writes:
I am a emacsen who is used to be a vimer.
the longer you use VI, the harder to switch.

anyway, I can answer some of your question.
> Hi, I am a vi user for years and am now trying emacs.
> I find it hard to get efficient. Can someone teach me some
> commands?
> 
> 1. In vi, to delete a line, I do, "dd" and to delete 5
> lines, I do "5dd". In emacs, how do I delete a complete
> line? C-k only delete
> from cursor to the end of line. Adding a C-a is really too much work.

of course, we can write a piece of elisp and bind it to some keys. It is a
problem for me that there is no such key to bind.

(defun delete-line()
  (interactive)
  (beginning-of-line)
  (call-interactively 'kill-line))


> 2. Is there a repeat last command command like the dot command in vi?
> 
C-x z or M-x repeat. this is not really same as vi dot command, because
it repeat everything, including next-line. if you want repeat many
times, press C-x z z z z z z z ....

> 3. In vi, to find a pairing brace I use the "%" command, is there a
> command like thins in emacs?
>
there are many solution for this problem. I've got my own.
further more, it is more than "%" command. please refer to 
http://ann77.stu.cdut.edu.cn/EmacsEditTips.html.
I hope you can read chinese. if not, feel free to contact me.

(define-key global-map (kbd "C-3") 'wcy-mark-some-thing-at-point)
(defun wcy-mark-some-thing-at-point()
  (interactive)
  (let* ((from (point))
         (a (mouse-start-end from from 1))
         (start (car a))
         (end (cadr a))
         (goto-point (if (= from start )
                            end 
                       start)))
    (if (or (eq last-command 'wcy-mark-some-thing-at-point)
            (and transient-mark-mode mark-active))
        (progn 
          ;; exchange mark and point
          (goto-char (mark-marker))
          (set-marker (mark-marker) from))
      (push-mark (if (= goto-point start) end start) nil t)
      (when (and (interactive-p) (null transient-mark-mode))
        (goto-char (mark-marker))
        (sit-for 0 500 nil))
      (goto-char goto-point))))

> 4. Should I really need to switch to emacs?
> 
If you are curious about Emacs, it is worth to do that. but you should
change the way you are thinking in VI. Emacs is different way. 
Anyway, both VI and Emacs are a powerful tools, just make it confortable
for you.


> Thanks
> Wen

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-08 23:32 Hard to switch from vi Wen Weng
                   ` (2 preceding siblings ...)
  2006-10-09  2:03 ` ext-chunye.wang
@ 2006-10-09  2:04 ` Pascal Bourguignon
  2006-10-10 11:53   ` Hadron Quark
  2006-10-11 13:35   ` martin
  2006-10-09  8:52 ` Markus Triska
                   ` (4 subsequent siblings)
  8 siblings, 2 replies; 52+ messages in thread
From: Pascal Bourguignon @ 2006-10-09  2:04 UTC (permalink / raw)


Wen Weng <WenWeng@charter.net> writes:

> Hi, I am a vi user for years and am now trying emacs.
> I find it hard to get efficient. Can someone teach me some
> commands?

Emacs can do it itself.  The first thing emacs does, when you start
it, is to display a screen that says:

Welcome to GNU Emacs, one component of the GNU/Linux operating system.

Get help           C-h  (Hold down CTRL and press h)
Emacs manual       C-h r
Emacs tutorial     C-h t           Undo changes     C-x u
Buy manuals        C-h C-m         Exit Emacs       C-x C-c
Browse manuals     C-h i
Activate menubar   F10  or  ESC `  or   M-`
(`C-' means use the CTRL key.  `M-' means use the Meta (or Alt) key.
If you have no Meta key, you may instead type ESC followed by the character.)



Then, type CTRL-h and t to get the tutorial that will teach you the
basics. 


> 1. In vi, to delete a line, I do, "dd" and to delete 5 lines, I do
> "5dd". In emacs, how do I delete a complete line? C-k only delete
> from cursor to the end of line. Adding a C-a is really too much work.

C-k  
C-k C-k 

M-5 C-k
C-u 5 C-k
C-5 C-k   ; on X 


> 2. Is there a repeat last command command like the dot command in vi?

No.   But you can repeat any command by prefixing it with
M-<digit>...  or C-u <digit>...

If you have a group of commands that you might want to repeat, you can
put them in a "keyboard macro", and invoke the keyboard macro.

Type: M-x apropos RET kbd-macro RET


> 3. In vi, to find a pairing brace I use the "%" command, is there a
> command like thins in emacs?

C-c , and C-c .   (backward-sexp and forward-sexp)

Also, you can set the variable blink-matching-paren to true to have
the pairing brace be highlighted automatically when the cursor passes
over one of them.

M-x set-variable RET blink-matching-paren RET t RET

Or type in the *scratch* buffer:

(setq blink-matching-paren t) C-x C-e

If you want it always on, you can put the form:

    (setq blink-matching-paren t)

in your ~/.emacs file.


Also, most of the time you don't need to identify manually the
matching parenthese, because you can manipulate the parenthesized
blocks as wholes, using commands such as  kill-sexp (C-M-k).

Imagine I want to exchange the then and else branches:

       if(a==b){
           printf("no");
           a++;
       }else{
           printf("yes");
           b--;
       }

I move on the first {, and type C-M-k

       if(a==b)else{
           printf("yes");
           b--;
       }

then I move forward one word with M-f to reach the remaining {, and
type C-y to yank the first branch there:

       if(a==b)else{
           printf("no");
           a++;
       }{
           printf("yes");
           b--;
       }


and I type C-M-K to kill the else branch, and type C-u 2 C-c ,
to move at the beginning of the else.

       if(a==b)else{
           printf("no");
           a++;
       }

then I type C-y to yank the else branch:

       if(a==b){
           printf("yes");
           b--;
       }else{
           printf("no");
           a++;
       }

There are also specialized minor mode to do even more structuring
editing with some languages, like paredit-mode for lisp and scheme,
where even more low level editing is done automatically.



> 4. Should I really need to switch to emacs?

This is highly advised.   


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

ADVISORY: There is an extremely small but nonzero chance that,
through a process known as "tunneling," this product may
spontaneously disappear from its present location and reappear at
any random place in the universe, including your neighbor's
domicile. The manufacturer will not be responsible for any damages
or inconveniences that may result.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-09  2:03 ` ext-chunye.wang
@ 2006-10-09  2:09   ` Pascal Bourguignon
  2006-10-09  2:44     ` Wen Weng
  0 siblings, 1 reply; 52+ messages in thread
From: Pascal Bourguignon @ 2006-10-09  2:09 UTC (permalink / raw)


ext-chunye.wang@nokia.com writes:
>> 2. Is there a repeat last command command like the dot command in vi?
>> 
> C-x z or M-x repeat. this is not really same as vi dot command, because
> it repeat everything, including next-line. if you want repeat many
> times, press C-x z z z z z z z ....

And don't worry if you still learn new commands after having used
emacs for ten years  ;-)

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

"Logiciels libres : nourris au code source sans farine animale."

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-09  2:09   ` Pascal Bourguignon
@ 2006-10-09  2:44     ` Wen Weng
  2006-10-10 12:59       ` Hadron Quark
  0 siblings, 1 reply; 52+ messages in thread
From: Wen Weng @ 2006-10-09  2:44 UTC (permalink / raw)


Thanks all for your responses. I am (slowly) on my way ...
> 

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-09  0:12 ` Ignacio Mondino
@ 2006-10-09  7:10   ` Lennart Borgman
  2006-10-09 10:57     ` Jeremy Hankins
       [not found]     ` <mailman.7914.1160393911.9609.help-gnu-emacs@gnu.org>
       [not found]   ` <mailman.7909.1160377822.9609.help-gnu-emacs@gnu.org>
  1 sibling, 2 replies; 52+ messages in thread
From: Lennart Borgman @ 2006-10-09  7:10 UTC (permalink / raw)
  Cc: help-gnu-emacs

Ignacio Mondino wrote:
> On Sun, Oct 08, 2006 at 07:32:01PM -0400, Wen Weng wrote:
>  
>   
>> 4. Should I really need to switch to emacs?
>>     
>
> That`s depends on you :) . You should feel confortable in your working 
> environment, maybe you don't need to use Emacs at all.
>
> It's just another tool (a REALLY powerfull tool) to learn, just like many of 
> us learn vi, which is powerfull a powerfull too. 
>
> :))  
>   

Do you know about Viper, a really good vi emulator inside Emacs? At 
least it is very good in Emacs 22. Emacs 22 is not yet released but very 
stable and will hopefully soon be in pretest.

See http://www.emacswiki.org/cgi-bin/wiki/ViperMode

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-08 23:32 Hard to switch from vi Wen Weng
                   ` (3 preceding siblings ...)
  2006-10-09  2:04 ` Pascal Bourguignon
@ 2006-10-09  8:52 ` Markus Triska
  2006-10-09  8:53   ` David Kastrup
                     ` (2 more replies)
       [not found] ` <45299CB0.5090003@speakeasy.net>
                   ` (3 subsequent siblings)
  8 siblings, 3 replies; 52+ messages in thread
From: Markus Triska @ 2006-10-09  8:52 UTC (permalink / raw)


Wen Weng <WenWeng@charter.net> writes:

> "5dd". In emacs, how do I delete a complete line? C-k only delete

With recent versions:

,----
| <C-S-backspace> runs the command kill-whole-line
|    which is an interactive compiled Lisp function in `simple.el'.
| It is bound to <C-S-backspace>.
| (kill-whole-line &optional arg)
`----

Best wishes! Markus Triska

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-09  8:52 ` Markus Triska
@ 2006-10-09  8:53   ` David Kastrup
  2006-10-09 16:28     ` Harald Hanche-Olsen
  2006-10-10  1:36   ` Wen Weng
  2006-10-10 12:20   ` Hadron Quark
  2 siblings, 1 reply; 52+ messages in thread
From: David Kastrup @ 2006-10-09  8:53 UTC (permalink / raw)


Markus Triska <triska@gmx.at> writes:

> Wen Weng <WenWeng@charter.net> writes:
>
>> "5dd". In emacs, how do I delete a complete line? C-k only delete
>
> With recent versions:
>
> ,----
> | <C-S-backspace> runs the command kill-whole-line
> |    which is an interactive compiled Lisp function in `simple.el'.
> | It is bound to <C-S-backspace>.
> | (kill-whole-line &optional arg)
> `----

Not to be confused with <C-M-backspace>...

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
       [not found]   ` <4529A0E4.60403@charter.net>
@ 2006-10-09  9:58     ` ken
  2006-10-10  0:50     ` Stefan Monnier
       [not found]     ` <mailman.7911.1160387922.9609.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 52+ messages in thread
From: ken @ 2006-10-09  9:58 UTC (permalink / raw)


Wen Weng wrote:
> Thanks for taking the time to answer my questions.
> 
> I at least want to learn some basic emacs skills to see where my
> interest will lead me to...
> 
> So far, my understanding is that emacs takes more key strokes on the
> average to accomplish same purposes. It bothers me a little at this point.
> 
> ....

First, I don't know of any comparison of the number of keystrokes.
Secondly, other things are much more important.


-- 
In a time of universal deceit, telling the truth becomes an act of
rebellion.
	--George Orwell

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-09  7:10   ` Lennart Borgman
@ 2006-10-09 10:57     ` Jeremy Hankins
  2006-10-09 14:47       ` Lennart Borgman
       [not found]     ` <mailman.7914.1160393911.9609.help-gnu-emacs@gnu.org>
  1 sibling, 1 reply; 52+ messages in thread
From: Jeremy Hankins @ 2006-10-09 10:57 UTC (permalink / raw)


Lennart Borgman <lennart.borgman.073@student.lu.se> writes:

> Do you know about Viper, a really good vi emulator inside Emacs? At
> least it is very good in Emacs 22. Emacs 22 is not yet released but very
> stable and will hopefully soon be in pretest.
>
> See http://www.emacswiki.org/cgi-bin/wiki/ViperMode

I second viper.  I used vi for many years before starting to use emacs
(so that I could use gnus), and I don't think I'd be able to give up the
command-mode/insert-mode distinction.  It's just too keyboard-friendly.

I personally consider viper to be more of an implementation of vi in
elisp; it generally works quite well with other emacs modes without
interfering with their use.  There are a few exceptions, though -- I'd
love to get viper to work better with folding.el, for example.

-- 
Jeremy Hankins <nowan@nowan.org>
PGP fingerprint: 748F 4D16 538E 75D6 8333  9E10 D212 B5ED 37D0 0A03

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-08 23:32 Hard to switch from vi Wen Weng
                   ` (5 preceding siblings ...)
       [not found] ` <45299CB0.5090003@speakeasy.net>
@ 2006-10-09 12:01 ` lgfang
  2006-10-10  1:17   ` Wen Weng
  2006-10-09 13:28 ` Ken Goldman
  2006-10-11 22:21 ` John Sullivan
  8 siblings, 1 reply; 52+ messages in thread
From: lgfang @ 2006-10-09 12:01 UTC (permalink / raw)


>>>>> "Wen" == Wen Weng <WenWeng@charter.net> writes:
    Wen> 2. Is there a repeat last command command like the dot command in vi?
A better way may be using Keyboard Macros
    Wen> 3. In vi, to find a pairing brace I use the "%" command, is there a
    Wen> command like thins in emacs?
I prefer to:

`C-M-n'
     Move forward over a parenthetical group (`forward-list').

`C-M-p'
     Move backward over a parenthetical group (`backward-list').

`C-M-u'
     Move up in parenthesis structure (`backward-up-list').

`C-M-d'
     Move down in parenthesis structure (`down-list').

    Wen> 4. Should I really need to switch to emacs?
That depends on yourself. But I would like to say emacs isn't as difficult as
you may think. Please don't draw a conclusion until you have been using it for a
month.

-- 
Regards

Fang lun gang

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-08 23:32 Hard to switch from vi Wen Weng
                   ` (6 preceding siblings ...)
  2006-10-09 12:01 ` lgfang
@ 2006-10-09 13:28 ` Ken Goldman
  2006-10-09 15:06   ` Malte Spiess
  2006-10-10  7:18   ` Giorgos Keramidas
  2006-10-11 22:21 ` John Sullivan
  8 siblings, 2 replies; 52+ messages in thread
From: Ken Goldman @ 2006-10-09 13:28 UTC (permalink / raw)


Wen Weng wrote:
> 
> 2. Is there a repeat last command command like the dot command in vi?
> 

You want to read about keyboard macros.  IMHO, this single feature 
distinguishes emacs from any other editor.

With keyboard macros, you save and then replay any key sequence, which 
can include insert and delete, but also search, edit and save, stepping 
through errors, cut and paste, etc.  It's far more powerful than the vi dot.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-09 10:57     ` Jeremy Hankins
@ 2006-10-09 14:47       ` Lennart Borgman
  2006-10-09 17:49         ` Jeremy Hankins
  0 siblings, 1 reply; 52+ messages in thread
From: Lennart Borgman @ 2006-10-09 14:47 UTC (permalink / raw)
  Cc: help-gnu-emacs

Jeremy Hankins wrote:
> Lennart Borgman <lennart.borgman.073@student.lu.se> writes:
>
>   
>> Do you know about Viper, a really good vi emulator inside Emacs? At
>> least it is very good in Emacs 22. Emacs 22 is not yet released but very
>> stable and will hopefully soon be in pretest.
>>
>> See http://www.emacswiki.org/cgi-bin/wiki/ViperMode
>>     
>
> I second viper.  I used vi for many years before starting to use emacs
> (so that I could use gnus), and I don't think I'd be able to give up the
> command-mode/insert-mode distinction.  It's just too keyboard-friendly.
>
> I personally consider viper to be more of an implementation of vi in
> elisp; it generally works quite well with other emacs modes without
> interfering with their use.  There are a few exceptions, though -- I'd
> love to get viper to work better with folding.el, for example.
>   

What version of Emacs do you use? What are the problems with folding.el?

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-09 13:28 ` Ken Goldman
@ 2006-10-09 15:06   ` Malte Spiess
  2006-10-10  7:18   ` Giorgos Keramidas
  1 sibling, 0 replies; 52+ messages in thread
From: Malte Spiess @ 2006-10-09 15:06 UTC (permalink / raw)


Ken Goldman <kgold@watson.ibm.com> writes:

> Wen Weng wrote:
>>
>> 2. Is there a repeat last command command like the dot command in vi?
>>
>
> You want to read about keyboard macros.  IMHO, this single feature
> distinguishes emacs from any other editor.

I really love Emacs, but this feature is also (basically) available in
Eclipse and Visual Studio - see
http://www.codeguru.com/cpp/v-s/devstudio_macros/article.php/c3097/

As I don't use these tools I can't tell how well they work, probably
they are not as good as "our" macro system, but they exist.

Greetings

Malte

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-09  8:53   ` David Kastrup
@ 2006-10-09 16:28     ` Harald Hanche-Olsen
  0 siblings, 0 replies; 52+ messages in thread
From: Harald Hanche-Olsen @ 2006-10-09 16:28 UTC (permalink / raw)


+ David Kastrup <dak@gnu.org>:

| Not to be confused with <C-M-backspace>...

But such confusion is only really dangerous if you have the Alt key
mapped to Meta.  When on a PC keyboard, I have the Windows key as
meta, but still ... the thought of having your entire X11 session
blown away /is/ sobering.

-- 
* Harald Hanche-Olsen     <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
  when there is no ground whatsoever for supposing it is true.
  -- Bertrand Russell

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-09 14:47       ` Lennart Borgman
@ 2006-10-09 17:49         ` Jeremy Hankins
  0 siblings, 0 replies; 52+ messages in thread
From: Jeremy Hankins @ 2006-10-09 17:49 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 2141 bytes --]

Lennart Borgman <lennart.borgman.073@student.lu.se> writes:
> Jeremy Hankins wrote:

>> I personally consider viper to be more of an implementation of vi in
>> elisp; it generally works quite well with other emacs modes without
>> interfering with their use.  There are a few exceptions, though -- I'd
>> love to get viper to work better with folding.el, for example.
>
> What version of Emacs do you use? What are the problems with folding.el?

It's the debian unstable emacs-snapshot package 20061003-1, so 22.  I'm
using folding.el v3.35, which is current, I believe.  I've hacked
folding.el a bit -- mainly to set up an option to not narrow when
folding-shift-in is called.  I've attached a patch against folding.el,
if you're interested, and I'm using this advice for viper-search:

;; This advises viper-search so that it behaves well with folding-mode.
(defadvice viper-search (around jjh/folding-viper-search activate)
  (let ((executing-kbd-macro t))
    ad-do-it)
  (let* ((start (match-beginning 0))
         (end (match-end 0))
         (match (buffer-substring start end)))
    (when folding-mode
      (folding-shift-in))
    (search-forward match end t nil)
    (goto-char start))
  (or executing-kbd-macro
      (memq viper-intermediate-command
            '(viper-repeat viper-digit-argument viper-command-argument))
      (viper-flash-search-pattern))
  ad-return-value)

It's a bit ugly, because it sets executing-kbd-macro so that it can
override the way viper-flash-search-pattern is called.  Unfortunately
this disables the message about the search wrapping the buffer, but
without it folding marks are flashed instead of the search match.  If
anyone has a better suggestion I'd be interested -- I'm pretty new to
elisp.  Ideal would be a hook in viper-search, I guess.

What I'd really like, though, is for ex-style line addressing to work
properly, but I don't really see how that's possible without significant
modifications to viper.  From what I can see it looks like viper handles
generating addresses for lines in a variety of places, and they'd all
have to be tracked down to make it behave with folding-mode.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Patch against folding.el --]
[-- Type: text/x-patch, Size: 2699 bytes --]

--- folding.el-orig	2006-09-29 16:58:26.000000000 -0400
+++ folding.el	2006-10-04 08:55:59.000000000 -0400
@@ -2004,7 +2004,9 @@
 				     (folding-point-folded-p goal))
 				 (folding-shift-in t))
 			     (goto-char goal)))
-		    (folding-narrow-to-region (point-min) (point-max) t)))
+		    (folding-narrow-to-region
+		     (and folding-narrow-by-default (point-min))
+		     (point-max) t)))
 	      (if (or folding-stack (folding-point-folded-p (point)))
 		  (folding-open-buffer))))))))
 
@@ -2114,6 +2116,10 @@
 
 ;;; ........................................................ &v-Config ...
 
+(defvar folding-narrow-by-default t
+  "If t (default) things like isearch will enter folds.  If nil the
+folds will be opened, but not entered.")
+
 ;; Q: should this inherit mouse-yank-at-point's value? maybe not.
 (defvar folding-mouse-yank-at-point t
   "If non-nil, mouse activities are done at point instead of 'mouse cursor'.
@@ -3604,22 +3610,26 @@
 many folds as necessary are entered to make the surrounding text
 visible. This is useful after some commands eg., search commands."
   (interactive)
-  (let ((goal (point)))
-    (if (folding-skip-ellipsis-backward)
-	(while (prog2 (beginning-of-line)
-		      (folding-shift-in t)
-		      (goto-char goal)))
-      (let ((data (folding-show-current-entry noerror t)))
-	(and data
-	     (progn
-	       (setq folding-stack
-		     (if folding-stack
-			 (cons (cons (point-min-marker) (point-max-marker))
-			       folding-stack)
-		       '(folded)))
-	       (folding-set-mode-line)
-	       (folding-narrow-to-region (car data) (nth 1 data))
-	       (nth 2 data)))))))
+  (labels
+      ((open-fold nil
+		  (let ((data (folding-show-current-entry noerror t)))
+		    (and data
+			 (progn
+			   (when folding-narrow-by-default
+			     (setq folding-stack
+				   (if folding-stack
+				       (cons (cons (point-min-marker) (point-max-marker))
+					     folding-stack)
+				     '(folded)))
+			     (folding-set-mode-line))
+			   (folding-narrow-to-region (car data) (nth 1 data)))))))
+    (let ((goal (point)))
+      (while (folding-skip-ellipsis-backward)
+	(beginning-of-line)
+	(open-fold)
+	(goto-char goal))
+      (when (not folding-narrow-by-default)
+	(widen)))))
 
 ;;}}}
 ;;{{{ folding-shift-out
@@ -3764,9 +3774,11 @@
        (re-search-forward "[\n\C-m]" nil 0 (1- line)))
   (let ((goal (point)))
     (while (prog2 (beginning-of-line)
-		  (folding-shift-in t)
-		  (goto-char goal))))
-  (folding-narrow-to-region (point-min) (point-max) t))
+	       (folding-shift-in t)
+	     (goto-char goal))))
+  (folding-narrow-to-region
+   (and folding-narrow-by-default (point-min))
+   (point-max) t))
 
 ;;}}}
 

[-- Attachment #3: Type: text/plain, Size: 106 bytes --]


-- 
Jeremy Hankins <nowan@nowan.org>
PGP fingerprint: 748F 4D16 538E 75D6 8333  9E10 D212 B5ED 37D0 0A03

[-- Attachment #4: Type: text/plain, Size: 152 bytes --]

_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
       [not found]   ` <4529A0E4.60403@charter.net>
  2006-10-09  9:58     ` ken
@ 2006-10-10  0:50     ` Stefan Monnier
       [not found]     ` <mailman.7911.1160387922.9609.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 52+ messages in thread
From: Stefan Monnier @ 2006-10-10  0:50 UTC (permalink / raw)


> So far, my understanding is that Emacs takes more key strokes on the
> average to accomplish same purposes.  It bothers me a little at
> this point.

Of course, Emacs takes more keystrokes to do what `vi' does well.
And conversely, vi takes more keystrokes to do what Emacs does well.

E.g. I never "delete 5 lines".  Instead I "delete this sub-expression" where
the sub-expression may indeed occupy 5 lines, but I don't bother counting
it: C-M-k.


        Stefan

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-09 12:01 ` lgfang
@ 2006-10-10  1:17   ` Wen Weng
  0 siblings, 0 replies; 52+ messages in thread
From: Wen Weng @ 2006-10-10  1:17 UTC (permalink / raw)


lgfang wrote:
>>>>>> "Wen" == Wen Weng <WenWeng@charter.net> writes:
>     Wen> 2. Is there a repeat last command command like the dot command in vi?
> A better way may be using Keyboard Macros
>     Wen> 3. In vi, to find a pairing brace I use the "%" command, is there a
>     Wen> command like thins in emacs?
> I prefer to:
> 
> `C-M-n'
>      Move forward over a parenthetical group (`forward-list').
> 
> `C-M-p'
>      Move backward over a parenthetical group (`backward-list').
> 
> `C-M-u'
>      Move up in parenthesis structure (`backward-up-list').
> 
> `C-M-d'
>      Move down in parenthesis structure (`down-list').
> 
the above keys did not work for me.

>     Wen> 4. Should I really need to switch to emacs?
> That depends on yourself. But I would like to say emacs isn't as difficult as
> you may think. Please don't draw a conclusion until you have been using it for a
> month.
> 
3 months is the plan

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
       [not found]     ` <mailman.7911.1160387922.9609.help-gnu-emacs@gnu.org>
@ 2006-10-10  1:22       ` Wen Weng
  2006-10-10  2:23         ` Micha Feigin
                           ` (2 more replies)
  0 siblings, 3 replies; 52+ messages in thread
From: Wen Weng @ 2006-10-10  1:22 UTC (permalink / raw)


ken wrote:
> Wen Weng wrote:
>> Thanks for taking the time to answer my questions.
>>
>> I at least want to learn some basic emacs skills to see where my
>> interest will lead me to...
>>
>> So far, my understanding is that emacs takes more key strokes on the
>> average to accomplish same purposes. It bothers me a little at this point.
>>
>> ....
> 
> First, I don't know of any comparison of the number of keystrokes.
Well, that's just my experience so far after one week of using emacs.
> Secondly, other things are much more important.
> 
Actually, the number of keystrokes is number one importance to me and
to a lot of people, I guess.
> 

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-09  8:52 ` Markus Triska
  2006-10-09  8:53   ` David Kastrup
@ 2006-10-10  1:36   ` Wen Weng
  2006-10-10 11:16     ` Markus Triska
  2006-10-10 13:05     ` Hadron Quark
  2006-10-10 12:20   ` Hadron Quark
  2 siblings, 2 replies; 52+ messages in thread
From: Wen Weng @ 2006-10-10  1:36 UTC (permalink / raw)


Markus Triska wrote:
> Wen Weng <WenWeng@charter.net> writes:
> 
>> "5dd". In emacs, how do I delete a complete line? C-k only delete
> 
> With recent versions:
> 
> ,----
> | <C-S-backspace> runs the command kill-whole-line
> |    which is an interactive compiled Lisp function in `simple.el'.
> | It is bound to <C-S-backspace>.
> | (kill-whole-line &optional arg)
> `----
> 
the C-S-BS did not work for me.
> Best wishes! Markus Triska

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
       [not found]   ` <mailman.7909.1160377822.9609.help-gnu-emacs@gnu.org>
@ 2006-10-10  1:39     ` Wen Weng
  0 siblings, 0 replies; 52+ messages in thread
From: Wen Weng @ 2006-10-10  1:39 UTC (permalink / raw)


Thanks for suggesting the viper mode. It might be my long term solution 
for using the strengths of both editors...

I'll check it out more in detail...

Lennart Borgman wrote:
> Ignacio Mondino wrote:
>> On Sun, Oct 08, 2006 at 07:32:01PM -0400, Wen Weng wrote:
>>  
>>  
>>> 4. Should I really need to switch to emacs?
>>>     
>>
>> That`s depends on you :) . You should feel confortable in your working 
>> environment, maybe you don't need to use Emacs at all.
>>
>> It's just another tool (a REALLY powerfull tool) to learn, just like 
>> many of us learn vi, which is powerfull a powerfull too.
>> :))    
> 
> Do you know about Viper, a really good vi emulator inside Emacs? At 
> least it is very good in Emacs 22. Emacs 22 is not yet released but very 
> stable and will hopefully soon be in pretest.
> 
> See http://www.emacswiki.org/cgi-bin/wiki/ViperMode
> 
> 

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-10  1:22       ` Wen Weng
@ 2006-10-10  2:23         ` Micha Feigin
  2006-10-21 17:25         ` don provan
  2006-10-21 21:00         ` Dieter Wilhelm
  2 siblings, 0 replies; 52+ messages in thread
From: Micha Feigin @ 2006-10-10  2:23 UTC (permalink / raw)


On Mon, 09 Oct 2006 21:22:39 -0400
Wen Weng <WenWeng@charter.net> wrote:

> ken wrote:
> > Wen Weng wrote:
> >> Thanks for taking the time to answer my questions.
> >>
> >> I at least want to learn some basic emacs skills to see where my
> >> interest will lead me to...
> >>
> >> So far, my understanding is that emacs takes more key strokes on the
> >> average to accomplish same purposes. It bothers me a little at this point.
> >>
> >> ....
> > 
> > First, I don't know of any comparison of the number of keystrokes.
> Well, that's just my experience so far after one week of using emacs.
> > Secondly, other things are much more important.
> > 
> Actually, the number of keystrokes is number one importance to me and
> to a lot of people, I guess.

It's not so much the average number of keystrokes per operation, but the
average number of keystrokes per session, or even more important the average
time it takes you to complete your tasks. If it takes more keystrokes per
operation, but less operations, or less errors, or whatever, then you're still
better off.

Don't know which one is better in that respect though. It's probably a
combination of what you are used to, they way you like to work (which is
probably linked to the previous one), and how much you know. Both of the have a
rather steep learning curve though, which can scare quite a few newbies.

> > 
> _______________________________________________
> help-gnu-emacs mailing list
> help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
>  
>  +++++++++++++++++++++++++++++++++++++++++++
>  This Mail Was Scanned By Mail-seCure System
>  at the Tel-Aviv University CC.
> 

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-09 13:28 ` Ken Goldman
  2006-10-09 15:06   ` Malte Spiess
@ 2006-10-10  7:18   ` Giorgos Keramidas
  1 sibling, 0 replies; 52+ messages in thread
From: Giorgos Keramidas @ 2006-10-10  7:18 UTC (permalink / raw)


On Mon, 09 Oct 2006 09:28:29 -0400, Ken Goldman <kgold@watson.ibm.com> wrote:
> Wen Weng wrote:
>> 2. Is there a repeat last command command like the dot command in vi?
>
> You want to read about keyboard macros.  IMHO, this single feature
> distinguishes emacs from any other editor.
>
> With keyboard macros, you save and then replay any key sequence, which
> can include insert and delete, but also search, edit and save,
> stepping through errors, cut and paste, etc.  It's far more powerful
> than the vi dot.

Exactly :)

Keyboard macros are truly amazing.  They are always the first feature of
Emacs that I demonstrate to people who have completed the basic keyboard
stuff of the tutorial.  Everyone who sees keyboard macros `in action'
instantly loves them!

(This is probably why VIM and other modern vi(1) implementations have
keyboard macro features too, but I am not 100% sure.)

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-10  1:36   ` Wen Weng
@ 2006-10-10 11:16     ` Markus Triska
  2006-10-10 13:05     ` Hadron Quark
  1 sibling, 0 replies; 52+ messages in thread
From: Markus Triska @ 2006-10-10 11:16 UTC (permalink / raw)


Wen Weng <WenWeng@charter.net> writes:

> the C-S-BS did not work for me.

Probably your Emacs version is not recent enough. Try with >= 22.

Best wishes! Markus Triska

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-09  2:04 ` Pascal Bourguignon
@ 2006-10-10 11:53   ` Hadron Quark
  2006-10-11 13:35   ` martin
  1 sibling, 0 replies; 52+ messages in thread
From: Hadron Quark @ 2006-10-10 11:53 UTC (permalink / raw)


Pascal Bourguignon <pjb@informatimago.com> writes:

> Wen Weng <WenWeng@charter.net> writes:
>
>> Hi, I am a vi user for years and am now trying emacs.
>> I find it hard to get efficient. Can someone teach me some
>> commands?
>
> Emacs can do it itself.  The first thing emacs does, when you start
> it, is to display a screen that says:
>
> Welcome to GNU Emacs, one component of the GNU/Linux operating system.
>
> Get help           C-h  (Hold down CTRL and press h)
> Emacs manual       C-h r
> Emacs tutorial     C-h t           Undo changes     C-x u
> Buy manuals        C-h C-m         Exit Emacs       C-x C-c
> Browse manuals     C-h i
> Activate menubar   F10  or  ESC `  or   M-`
> (`C-' means use the CTRL key.  `M-' means use the Meta (or Alt) key.
> If you have no Meta key, you may instead type ESC followed by the character.)
>
>
>
> Then, type CTRL-h and t to get the tutorial that will teach you the
> basics. 
>
>
>> 1. In vi, to delete a line, I do, "dd" and to delete 5 lines, I do
>> "5dd". In emacs, how do I delete a complete line? C-k only delete
>> from cursor to the end of line. Adding a C-a is really too much work.
>
> C-k  
> C-k C-k 

This doesn't do what the OP wanted. He want C-a C-k.

>
> M-5 C-k
> C-u 5 C-k
> C-5 C-k   ; on X 
>
>
>> 2. Is there a repeat last command command like the dot command in vi?
>
> No.   But you can repeat any command by prefixing it with
> M-<digit>...  or C-u <digit>...
>
> If you have a group of commands that you might want to repeat, you can
> put them in a "keyboard macro", and invoke the keyboard macro.
>
> Type: M-x apropos RET kbd-macro RET
>
>
>> 3. In vi, to find a pairing brace I use the "%" command, is there a
>> command like thins in emacs?
>
> C-c , and C-c .   (backward-sexp and forward-sexp)

There are undefined in my snapshot emacs : its M-C-n and M-C-p

>
> Also, you can set the variable blink-matching-paren to true to have
> the pairing brace be highlighted automatically when the cursor passes
> over one of them.
>
> M-x set-variable RET blink-matching-paren RET t RET
>
> Or type in the *scratch* buffer:
>
> (setq blink-matching-paren t) C-x C-e
>
> If you want it always on, you can put the form:
>
>     (setq blink-matching-paren t)
>
> in your ~/.emacs file.

Doesn't work in this version I am posting from :( Just tried it on a c
file and a lisp file.

GNU Emacs 22.0.50.1 (i486-pc-linux-gnu, GTK+ Version 2.8.17) of
2006-08-24 on vernadsky, modified by Debian


>
>
> Also, most of the time you don't need to identify manually the
> matching parenthese, because you can manipulate the parenthesized
> blocks as wholes, using commands such as  kill-sexp (C-M-k).
>
> Imagine I want to exchange the then and else branches:
>
>        if(a==b){
>            printf("no");
>            a++;
>        }else{
>            printf("yes");
>            b--;
>        }
>
> I move on the first {, and type C-M-k
>
>        if(a==b)else{
>            printf("yes");
>            b--;
>        }
>
> then I move forward one word with M-f to reach the remaining {, and
> type C-y to yank the first branch there:
>
>        if(a==b)else{
>            printf("no");
>            a++;
>        }{
>            printf("yes");
>            b--;
>        }
>
>
> and I type C-M-K to kill the else branch, and type C-u 2 C-c ,
> to move at the beginning of the else.
>
>        if(a==b)else{
>            printf("no");
>            a++;
>        }
>
> then I type C-y to yank the else branch:
>
>        if(a==b){
>            printf("yes");
>            b--;
>        }else{
>            printf("no");
>            a++;
>        }

Sounds more complicated than mark, cut and replace :)

>
> There are also specialized minor mode to do even more structuring
> editing with some languages, like paredit-mode for lisp and scheme,
> where even more low level editing is done automatically.
>
>
>
>> 4. Should I really need to switch to emacs?
>
> This is highly advised.   

:))))

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-09  8:52 ` Markus Triska
  2006-10-09  8:53   ` David Kastrup
  2006-10-10  1:36   ` Wen Weng
@ 2006-10-10 12:20   ` Hadron Quark
  2006-10-10 12:32     ` Pascal Bourguignon
  2006-10-10 12:38     ` Markus Triska
  2 siblings, 2 replies; 52+ messages in thread
From: Hadron Quark @ 2006-10-10 12:20 UTC (permalink / raw)


Markus Triska <triska@gmx.at> writes:

> Wen Weng <WenWeng@charter.net> writes:
>
>> "5dd". In emacs, how do I delete a complete line? C-k only delete
>
> With recent versions:
>
> ,----
> | <C-S-backspace> runs the command kill-whole-line
> |    which is an interactive compiled Lisp function in `simple.el'.
> | It is bound to <C-S-backspace>.
> | (kill-whole-line &optional arg)
> `----
>
> Best wishes! Markus Triska

Hope this isnt too stoopid a question : 

What is -S- prefix? I never saw this before

C & M I know.

Its not a normal "s" as C-s is search.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-10 12:20   ` Hadron Quark
@ 2006-10-10 12:32     ` Pascal Bourguignon
  2006-10-10 12:38     ` Markus Triska
  1 sibling, 0 replies; 52+ messages in thread
From: Pascal Bourguignon @ 2006-10-10 12:32 UTC (permalink / raw)


Hadron Quark <hadronquark@gmail.com> writes:

> Markus Triska <triska@gmx.at> writes:
>
>> Wen Weng <WenWeng@charter.net> writes:
>>
>>> "5dd". In emacs, how do I delete a complete line? C-k only delete
>>
>> With recent versions:
>>
>> ,----
>> | <C-S-backspace> runs the command kill-whole-line
>> |    which is an interactive compiled Lisp function in `simple.el'.
>> | It is bound to <C-S-backspace>.
>> | (kill-whole-line &optional arg)
>> `----
>>
>> Best wishes! Markus Triska
>
> Hope this isnt too stoopid a question : 
>
> What is -S- prefix? I never saw this before
>
> C & M I know.
>
> Its not a normal "s" as C-s is search.

Shift.

It's: Escape
      Meta
      Alt
      Control
      Shift
      super
      Hyper
      -------
      EMACSsH


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

In a World without Walls and Fences, 
who needs Windows and Gates?

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-10 12:20   ` Hadron Quark
  2006-10-10 12:32     ` Pascal Bourguignon
@ 2006-10-10 12:38     ` Markus Triska
  2006-10-10 12:57       ` Hadron Quark
  1 sibling, 1 reply; 52+ messages in thread
From: Markus Triska @ 2006-10-10 12:38 UTC (permalink / raw)


Hadron Quark <hadronquark@gmail.com> writes:

> What is -S- prefix?

Shift

-- Markus Triska

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-10 12:38     ` Markus Triska
@ 2006-10-10 12:57       ` Hadron Quark
  0 siblings, 0 replies; 52+ messages in thread
From: Hadron Quark @ 2006-10-10 12:57 UTC (permalink / raw)


Markus Triska <triska@gmx.at> writes:

> Hadron Quark <hadronquark@gmail.com> writes:
>
>> What is -S- prefix?
>
> Shift
>

How embarassing. I thought it was "super key" or something! Cant believe
I didnt see that!

*blush*

> -- Markus Triska

-- 

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-09  2:44     ` Wen Weng
@ 2006-10-10 12:59       ` Hadron Quark
  0 siblings, 0 replies; 52+ messages in thread
From: Hadron Quark @ 2006-10-10 12:59 UTC (permalink / raw)


Wen Weng <WenWeng@charter.net> writes:

> Thanks all for your responses. I am (slowly) on my way ...
>> 

Stick with it. As Pascal says you learn something new all the time. But
there is a method behind the madness : it takes some time, but after a
while you wonder how you could ever use another editor.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
       [not found]     ` <mailman.7914.1160393911.9609.help-gnu-emacs@gnu.org>
@ 2006-10-10 13:03       ` Hadron Quark
  2006-10-10 13:50         ` Pascal Bourguignon
  2006-10-10 14:11         ` Jeremy Hankins
  0 siblings, 2 replies; 52+ messages in thread
From: Hadron Quark @ 2006-10-10 13:03 UTC (permalink / raw)


Jeremy Hankins <nowan@nowan.org> writes:

> Lennart Borgman <lennart.borgman.073@student.lu.se> writes:
>
>> Do you know about Viper, a really good vi emulator inside Emacs? At
>> least it is very good in Emacs 22. Emacs 22 is not yet released but very
>> stable and will hopefully soon be in pretest.
>>
>> See http://www.emacswiki.org/cgi-bin/wiki/ViperMode
>
> I second viper.  I used vi for many years before starting to use emacs
> (so that I could use gnus), and I don't think I'd be able to give up the
> command-mode/insert-mode distinction.  It's just too keyboard-friendly.
>
> I personally consider viper to be more of an implementation of vi in
> elisp; it generally works quite well with other emacs modes without
> interfering with their use.  There are a few exceptions, though -- I'd
> love to get viper to work better with folding.el, for example.

Jeremy, how did you generate your face header?

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-10  1:36   ` Wen Weng
  2006-10-10 11:16     ` Markus Triska
@ 2006-10-10 13:05     ` Hadron Quark
  2006-10-10 14:02       ` Pascal Bourguignon
  1 sibling, 1 reply; 52+ messages in thread
From: Hadron Quark @ 2006-10-10 13:05 UTC (permalink / raw)


Wen Weng <WenWeng@charter.net> writes:

> Markus Triska wrote:
>> Wen Weng <WenWeng@charter.net> writes:
>> 
>>> "5dd". In emacs, how do I delete a complete line? C-k only delete
>> With recent versions:
>> ,----
>> | <C-S-backspace> runs the command kill-whole-line
>> |    which is an interactive compiled Lisp function in `simple.el'.
>> | It is bound to <C-S-backspace>.
>> | (kill-whole-line &optional arg)
>> `----
>> 
> the C-S-BS did not work for me.

Do "C-h-k" and then hit the key sequence above. I get:

,----
| <C-S-backspace> runs the command kill-whole-line
|    which is an interactive compiled Lisp function in `simple.el'.
| It is bound to <C-S-backspace>.
| (kill-whole-line &optional arg)
| 
| Kill current line.
| With prefix arg, kill that many lines starting from the current line.
| If arg is negative, kill backward.  Also kill the preceding newline.
| (This is meant to make C-x z work well with negative arguments.)
| If arg is zero, kill current line but exclude the trailing newline.
`----




-- 

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-10 13:03       ` Hadron Quark
@ 2006-10-10 13:50         ` Pascal Bourguignon
  2006-10-13 10:36           ` Hadron Quark
  2006-10-10 14:11         ` Jeremy Hankins
  1 sibling, 1 reply; 52+ messages in thread
From: Pascal Bourguignon @ 2006-10-10 13:50 UTC (permalink / raw)


Hadron Quark <hadronquark@gmail.com> writes:
> Jeremy, how did you generate your face header?

You use the compface program.
http://freshmeat.net/projects/compface/

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

"Specifications are for the weak and timid!"

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-10 13:05     ` Hadron Quark
@ 2006-10-10 14:02       ` Pascal Bourguignon
  0 siblings, 0 replies; 52+ messages in thread
From: Pascal Bourguignon @ 2006-10-10 14:02 UTC (permalink / raw)


Hadron Quark <hadronquark@gmail.com> writes:

> Wen Weng <WenWeng@charter.net> writes:
>
>> Markus Triska wrote:
>>> Wen Weng <WenWeng@charter.net> writes:
>>> 
>>>> "5dd". In emacs, how do I delete a complete line? C-k only delete
>>> With recent versions:
>>> ,----
>>> | <C-S-backspace> runs the command kill-whole-line
>>> |    which is an interactive compiled Lisp function in `simple.el'.
>>> | It is bound to <C-S-backspace>.
>>> | (kill-whole-line &optional arg)
>>> `----
>>> 
>> the C-S-BS did not work for me.
>
> Do "C-h-k" and then hit the key sequence above. I get:

It's C-h k, not C-h-k.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

HEALTH WARNING: Care should be taken when lifting this product,
since its mass, and thus its weight, is dependent on its velocity
relative to the user.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-10 13:03       ` Hadron Quark
  2006-10-10 13:50         ` Pascal Bourguignon
@ 2006-10-10 14:11         ` Jeremy Hankins
  1 sibling, 0 replies; 52+ messages in thread
From: Jeremy Hankins @ 2006-10-10 14:11 UTC (permalink / raw)


Hadron Quark <hadronquark@gmail.com> writes:

> Jeremy, how did you generate your face header?

Do you mean gnus-face-from-file?

-- 
Jeremy Hankins <nowan@nowan.org>
PGP fingerprint: 748F 4D16 538E 75D6 8333  9E10 D212 B5ED 37D0 0A03

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-09  2:04 ` Pascal Bourguignon
  2006-10-10 11:53   ` Hadron Quark
@ 2006-10-11 13:35   ` martin
  1 sibling, 0 replies; 52+ messages in thread
From: martin @ 2006-10-11 13:35 UTC (permalink / raw)



>>>>> Pascal Bourguignon <pjb@informatimago.com> writes:
 > Date: Mon, 09 Oct 2006 04:04:43 +0200
 > 
 > Wen Weng <WenWeng@charter.net> writes:
 > 
8<--------------------------------------------------------------------
 >> 3. In vi, to find a pairing brace I use the "%" command, is there a
 >> command like thins in emacs?
 > 
 > C-c , and C-c .   (backward-sexp and forward-sexp)

Hi,

seems to be your personal customization. From "emacs --no-site-file
--no-init-file" i learn:

  backward-sexp                     ESC <C-left>, C-M-b, <C-M-left>
    Command: Move backward across one balanced expression (sexp).
  forward-sexp                      ESC <C-right>, C-M-f, <C-M-right>
    Command: Move forward across one balanced expression (sexp).

Martin
-- 
parozusa at web dot de

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-08 23:32 Hard to switch from vi Wen Weng
                   ` (7 preceding siblings ...)
  2006-10-09 13:28 ` Ken Goldman
@ 2006-10-11 22:21 ` John Sullivan
  8 siblings, 0 replies; 52+ messages in thread
From: John Sullivan @ 2006-10-11 22:21 UTC (permalink / raw)


Wen Weng <WenWeng@charter.net> writes:

> 2. Is there a repeat last command command like the dot command in vi?
>

You've gotten other answers to this; let me add repeat-complex-command.

,----[ C-h f repeat-complex-command RET ]
| repeat-complex-command is an interactive compiled Lisp function in `simple.el'.
| It is bound to <again>, <redo>, <f5> <f5>, C-x M-:, C-x M-ESC.
| (repeat-complex-command ARG)
| 
| Edit and re-evaluate last complex command, or ARGth from last.
| A complex command is one which used the minibuffer.
| The command is placed in the minibuffer as a Lisp form for editing.
| The result is executed, repeating the command as changed.
| If the command has been changed or is not the most recent previous command
| it is added to the front of the command history.
| You can use the minibuffer history commands M-n and M-p
| to get different commands to edit and resubmit.
| 
| [back]
`----

-- 
-John Sullivan
-http://www.wjsullivan.net
-GPG Key: AE8600B6

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-10 13:50         ` Pascal Bourguignon
@ 2006-10-13 10:36           ` Hadron Quark
  0 siblings, 0 replies; 52+ messages in thread
From: Hadron Quark @ 2006-10-13 10:36 UTC (permalink / raw)


Pascal Bourguignon <pjb@informatimago.com> writes:

> Hadron Quark <hadronquark@gmail.com> writes:
>> Jeremy, how did you generate your face header?
>
> You use the compface program.
> http://freshmeat.net/projects/compface/

That is x-face isn't it? Not the same? Jeremy has a Face header which
creates a higher res colour face.

For normal x-face, I find this site to be the best:

http://www.dairiki.org/xface/


-- 

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-10  1:22       ` Wen Weng
  2006-10-10  2:23         ` Micha Feigin
@ 2006-10-21 17:25         ` don provan
  2006-10-22 19:36           ` Lennart Borgman
       [not found]           ` <mailman.132.1161545823.27805.help-gnu-emacs@gnu.org>
  2006-10-21 21:00         ` Dieter Wilhelm
  2 siblings, 2 replies; 52+ messages in thread
From: don provan @ 2006-10-21 17:25 UTC (permalink / raw)


Wen Weng <WenWeng@charter.net> writes:

> ken wrote:
>> First, I don't know of any comparison of the number of keystrokes.
> Well, that's just my experience so far after one week of using emacs.

Could you elaborate? I can't think of any serious inefficiencies in
emacs vs. vi, so I'm wondering if something else is going on. Perhaps
you're mentally ascribing two key strokes to control-f because you
have to push two keys and you aren't used to that, or possibly maybe
the issue is that you're familiar the vi "big commands" but, being a
emacs learner, not the emacs ones, so in emacs you have to do
everything in small steps that in vi you can do with single commands.
Anyway, if you could explain, maybe we could see why your experience
doesn't jive with ours.

There's no doubt that the two editors involve entirely different
approaches to editing, but I think emacs starts getting interesting
when you get past editing and start using the rest of the emacs
system.

>> Secondly, other things are much more important.
> Actually, the number of keystrokes is number one importance to me and
> to a lot of people, I guess.

Well, I actually agree with others that there are many more important
issues, but the one that drives me crazy about vi actually winds up
causing more keystrokes in vi: the modalism. It seems like every vi
session I end up spending the majority of keystrokes cleaning up text
executed as commands because I thought I was in text-enter mode or
commands entered as text because I thought I was in command-mode. Now,
of course, this is in large measure because of me and my inexperience
with vi, but I still consider it a fundamental problem that vi forces
me to be in sync with its idea of what mode we are in.

-don

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-10  1:22       ` Wen Weng
  2006-10-10  2:23         ` Micha Feigin
  2006-10-21 17:25         ` don provan
@ 2006-10-21 21:00         ` Dieter Wilhelm
  2 siblings, 0 replies; 52+ messages in thread
From: Dieter Wilhelm @ 2006-10-21 21:00 UTC (permalink / raw)
  Cc: help-gnu-emacs

Wen Weng <WenWeng@charter.net> writes:

>>
>> First, I don't know of any comparison of the number of keystrokes.
> Well, that's just my experience so far after one week of using emacs.
>> Secondly, other things are much more important.
>>
> Actually, the number of keystrokes is number one importance to me and
> to a lot of people, I guess.
>>

There are only two editors.

First of all, I'm an Emacs user but some years ago I was also
fascinated with the editing approach of vi.  (I think that it is the
only remaining MODE editor still in use.)  First I found out that vi
is no match for Emacs--vim is--but keep in mind that I'm writing here
mainly from the point of view of editing and keystrokes ;-).

I practised vim for approximately half a year quite intensively, till
I realised that even with more practise this hadn't had accelerated my
editing in comparison to Emacs.  I used the following table [*]
comparing the necessary keystrokes.  Please take it with a grain of
salt, the table is not very scientific but I think it shows that
Emacs--in the worst case--does not look so bad in comparison to vim's
keystrokes.  When you take into consideration that you often have to
switch the modes and forced to add ESC (where you have to leave the
home position, or C-[) and switching back to the editing mode, I think
it is a clear draw 8-).

No, I can't proof it with a stop watch, probably very few could
because it takes so (very) long to become really proficient in the
methodologies around the respective keyboard-maps, but still, this
should be food for thought.

If you intend to use the other fast editor stay with vim, if you
intend to use an additional operating system switch to Emacs.

[*] (then I did not know about table.el unfortunately 8-)

==============================
prerequisites:
1.) German keyboard layout
2.) Operating the modifier keys with thumb or outer palm for
   speed reason
3.) Subjective guess of shortcut commonness (first column)

COMMON STUFF:
P       -	keys	input	keys	normal	keys	remark
3       M-digit	2	C-o	3	digit	1	inserting only ONE digit

MOVEMENT

3	M-f	2	S-right	2+1	w/W	1+1	vim: forward WORD or word!
3	M-b	2	S-left	2+1	b/B	1+1	vim: forward WORD or word!
	M-fb	3			e	1
	M-bf	3			ge	2
	C-f	2	right	1+2	l	1
	C-b	2	left	1+2	h	1	
	C-a	2	pos1	1+2	0	1
2	M-m	2	C-o,^	3	^	1
2	M-a	2	C-o,{	4	{	2
2	M-e	2	C-o,}	4	}	2

MARKING

2	C-SPACE 2			ma	2
2	C-uSPC  3			``	3


SEARCHING

3	C-s,RET	4			f/F	1+1
		4			/,RET	4
		C-s	2			f	1	emacs do some other C-command	

2	C-l	2			z.	2
3	C-x,o	4	C-ow,n 5	C-ww	3

	TYPOS

2	accents	2	C-k,xx	5	iC-k,xx	6
3	M-/	2	C-n|p	2	iC-n|p	3
3	C-t	2	deldel	4+2	hxp	3
2	C-_	2	C-o,u	3	u	1
3	C-y	2			p/P	1
2	M-y	2	C-r,"xp 6	"xp	4
2	M-l	2			
2	M-c	2			~	1
2	M-t	2			dwbp	4
1	C-xt	3			:m+	3
2	C-o	2			O	2	start editing new line
2	C-ao	3			O,ESC	3	insert an empty line

DELETION

2	C-w	2			d`a	4
2	C-d	2	del	1+2	x	1
3	BSP	1			X	2
3	M-BS	2	C-w	2	db|B	2+1
3	M-D	2	C-odw	4	dw|W	2+1
3	C-k	2	C-o,D	4	D	2
3	M-0,C-k	5	C-ou	3	C-u	2
The following line is redundant now its C-S-BKS 3 
2	C-a,C-k	5	C-odd	5	dd	2
1	C-x,DEL	4			d}	2
1	M-k	2			d{	2

COPYING

	C-k,C-y	5			Y	2
	C-a,C-k,C-y8			yy	2

FORMATTING

1	M-^	2			gJ	3	Join lines without whitespace
2	C-a,TAB	4			C-t	2
	M-^	2			C-d	2
1	C-M-\	4			vap>	4
	C-x,TAB	4
2	M-u	2			guw	3
	M--u	3			gub	3
	M-bu	3			vawu	4
2	M-q	2			vapgq	5

COMMANDS

3	C-h,a	4			:h	3
2	M-xp	3			@:	4
	C-z	2			.	1
1	C-xc	3+1			:xa	4
2	C-x,`	5			:cn	4

	FILES and BUFFERS

2	C-x,3	4			C-wv	3
2	C-x,2	4			:sp	4
3	C-xf    3			:e	3
1	C-x,{|} 5			C-w,>|<	5
1	C-x,+|-	4			C-w,+|-	4
2	C-xs	3			:w	3
1	C-x,s	4			:xa	4
2	C-xb	3			:ls	4
2	C-x,bRET5			:bn	4
1	C-x,4bRET6			C-w^	3
3	C-x,o	4			C-ww	3
3	M-d,C-x,o7			C-wh	3
2	C-x,4f	5			C-w
2	C-x,1	4			C-w,o	4
2	C-x,k	4			:q	3
1	C-xr	3			:vie


-- 
    Best wishes

    H. Dieter Wilhelm
    Darmstadt, Germany

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-21 17:25         ` don provan
@ 2006-10-22 19:36           ` Lennart Borgman
       [not found]           ` <mailman.132.1161545823.27805.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 52+ messages in thread
From: Lennart Borgman @ 2006-10-22 19:36 UTC (permalink / raw)
  Cc: help-gnu-emacs

don provan wrote:
> Wen Weng <WenWeng@charter.net> writes:
>
>   
>> ken wrote:
>>     
>>> First, I don't know of any comparison of the number of keystrokes.
>>>       
>> Well, that's just my experience so far after one week of using emacs.
>>     
>
> Could you elaborate? I can't think of any serious inefficiencies in
> emacs vs. vi, so I'm wondering if something else is going on. Perhaps
> you're mentally ascribing two key strokes to control-f because you
> have to push two keys and you aren't used to that, 


Well, I have to push two keys to type control-f. Don't you? (Whether 
this is important or not is another thing.)

>
>   
>>> Secondly, other things are much more important.
>>>       
>> Actually, the number of keystrokes is number one importance to me and
>> to a lot of people, I guess.
>>     
>
> Well, I actually agree with others that there are many more important
> issues, but the one that drives me crazy about vi actually winds up
> causing more keystrokes in vi: the modalism. It seems like every vi
> session I end up spending the majority of keystrokes cleaning up text
> executed as commands because I thought I was in text-enter mode or
> commands entered as text because I thought I was in command-mode.

Beginning to use vi keys are rather tough. But once you are used to them 
they can be very good. I know since they are good for me ;-)

And they are available in Emacs. Viper in the next release of Emacs is 
very good.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
       [not found]           ` <mailman.132.1161545823.27805.help-gnu-emacs@gnu.org>
@ 2006-10-23 17:15             ` don provan
  2006-10-23 17:53               ` Lennart Borgman
  2006-10-23 18:56               ` Floyd L. Davidson
  0 siblings, 2 replies; 52+ messages in thread
From: don provan @ 2006-10-23 17:15 UTC (permalink / raw)


Lennart Borgman <lennart.borgman.073@student.lu.se> writes:

> Well, I have to push two keys to type control-f. Don't you?

Emacs users don't notice this any more than we notice using shift to
get capital letters: modifiers are an advantage, not an overhead. But
obviously if you see that as two keystrokes, you're likely to get very
near double the number of keystrokes for Emacs over vi.

> Beginning to use vi keys are rather tough. But once you are used to
> them they can be very good. I know since they are good for me ;-)

Yes, I'm obviously not that familiar with the keys, but the point I
was making was about the fact that the vi approach requires my mind to
be in sync with the editor's mode, and whenever the two are out of
sync, there's going to be trouble. I consider this *the* principle
difference between the two editors, and why I would never for a moment
consider switching to vi. I hate CAPSLOCK and the PC Insert key for
the same reason.

-don

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-23 17:15             ` don provan
@ 2006-10-23 17:53               ` Lennart Borgman
  2006-10-23 18:56               ` Floyd L. Davidson
  1 sibling, 0 replies; 52+ messages in thread
From: Lennart Borgman @ 2006-10-23 17:53 UTC (permalink / raw)
  Cc: help-gnu-emacs

don provan wrote:
> Lennart Borgman <lennart.borgman.073@student.lu.se> writes:
>
>   
>> Well, I have to push two keys to type control-f. Don't you?
>>     
>
> Emacs users don't notice this any more than we notice using shift to
> get capital letters: modifiers are an advantage, not an overhead. But
> obviously if you see that as two keystrokes, you're likely to get very
> near double the number of keystrokes for Emacs over vi.
>   

Yes, I do. I always use something like sticky modifiers to save my 
hands. (http://www.emacswiki.org/cgi-bin/wiki/StickyModifiers)

>   
>> Beginning to use vi keys are rather tough. But once you are used to
>> them they can be very good. I know since they are good for me ;-)
>>     
>
> Yes, I'm obviously not that familiar with the keys, but the point I
> was making was about the fact that the vi approach requires my mind to
> be in sync with the editor's mode, and whenever the two are out of
> sync, there's going to be trouble. I consider this *the* principle
> difference between the two editors, and why I would never for a moment
> consider switching to vi. I hate CAPSLOCK and the PC Insert key for
> the same reason.
>   

I respect your choice, but in the long run it is not that difficult. If 
you use Viper in Emacs you can mix the two ways of editing too. I found 
that convenient. Viper also makes you aware of the mode by changing the 
text cursor.

Of course I know very well where the ESC key is ;-)

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-23 17:15             ` don provan
  2006-10-23 17:53               ` Lennart Borgman
@ 2006-10-23 18:56               ` Floyd L. Davidson
  2006-10-24  9:01                 ` Mathias Dahl
  1 sibling, 1 reply; 52+ messages in thread
From: Floyd L. Davidson @ 2006-10-23 18:56 UTC (permalink / raw)


don provan <dprovan@comcast.net> wrote:
>Lennart Borgman <lennart.borgman.073@student.lu.se> writes:
>
>> Well, I have to push two keys to type control-f. Don't you?
>
>Emacs users don't notice this any more than we notice using shift to
>get capital letters: modifiers are an advantage, not an overhead. But
>obviously if you see that as two keystrokes, you're likely to get very
>near double the number of keystrokes for Emacs over vi.
>
>> Beginning to use vi keys are rather tough. But once you are used to
>> them they can be very good. I know since they are good for me ;-)

The actual key bindings have relatively little to do with it.
While one set may be easier to learn initially (and the *same*
set will be harder for someone else), the learning curve is
relatively short compared to using those key bindings for the
rest of your life.

It becomes absolutely automatic.

I've been using one form or another of emacs for well over 20
years now.  I do *not* think about key bindings, at all.  And I
haven't for two decades.  The realization that I want a
particular action happens in my head, but the reflex to get that
command enacted is totally in my fingers.

What you want to be concerned with is how well *that* level of
familiarity works for you.  People are different, and one
interface may well be perfect for me while useless for you.

>Yes, I'm obviously not that familiar with the keys, but the point I
>was making was about the fact that the vi approach requires my mind to
>be in sync with the editor's mode, and whenever the two are out of
>sync, there's going to be trouble. I consider this *the* principle
>difference between the two editors, and why I would never for a moment
>consider switching to vi. I hate CAPSLOCK and the PC Insert key for
>the same reason.

That is exactly the case.  I too think the primary difference is
that for me a modeless editor is easy to use, and a modeful
editor drives me up a tree.  For others it is exactly the
opposite.  (Granted that one method used by people like me to
deal with Vi is to append, automatically, key strokes to the end
of every command to bring it back to one particular mode.)

If Vi fits *you*, go with it.  If emacs does, go with that.  But
don't dwell on the parts that make no difference, such as whether
it uses ESC or CNTL as a key modifier.

-- 
Floyd L. Davidson            <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska)                         floyd@apaflo.com

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-23 18:56               ` Floyd L. Davidson
@ 2006-10-24  9:01                 ` Mathias Dahl
  2006-10-24 10:12                   ` Floyd L. Davidson
  0 siblings, 1 reply; 52+ messages in thread
From: Mathias Dahl @ 2006-10-24  9:01 UTC (permalink / raw)


floyd@apaflo.com (Floyd L. Davidson) writes:

> That is exactly the case.  I too think the primary difference is
> that for me a modeless editor is easy to use, and a modeful editor
> drives me up a tree.  For others it is exactly the opposite.
> (Granted that one method used by people like me to deal with Vi is
> to append, automatically, key strokes to the end of every command to
> bring it back to one particular mode.)

To be fair, Emacs is full of modes, all the time you are working in
different ones. Most are very similar when it comes to basic text
editing, but think about Dired or the M-x prompt, or isearch or...

Sometimes I get stuck in the M-x or Find File prompt without noticing
(because I types those keys by mistake) and I guess that is similar to
the problems people get in vi. Personally, when I open vi, I get
scared, but some day I will try to tame the beast just so that I do
not need to be scared anymore...

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-24  9:01                 ` Mathias Dahl
@ 2006-10-24 10:12                   ` Floyd L. Davidson
  2006-10-24 11:25                     ` Mathias Dahl
  0 siblings, 1 reply; 52+ messages in thread
From: Floyd L. Davidson @ 2006-10-24 10:12 UTC (permalink / raw)


Mathias Dahl <brakjoller@gmail.com> wrote:
>floyd@apaflo.com (Floyd L. Davidson) writes:
>
>> That is exactly the case.  I too think the primary difference is
>> that for me a modeless editor is easy to use, and a modeful editor
>> drives me up a tree.  For others it is exactly the opposite.
>> (Granted that one method used by people like me to deal with Vi is
>> to append, automatically, key strokes to the end of every command to
>> bring it back to one particular mode.)
>
>To be fair, Emacs is full of modes, all the time you are working in
>different ones. Most are very similar when it comes to basic text
>editing, but think about Dired or the M-x prompt, or isearch or...

To be specific, the type of interface used by emacs is known
as modeless.  It has many modes, but it *automatically* defaults
back to insert mode when any of the other modes is completed.

>Sometimes I get stuck in the M-x or Find File prompt without noticing
>(because I types those keys by mistake) and I guess that is similar to
>the problems people get in vi. Personally, when I open vi, I get
>scared, but some day I will try to tame the beast just so that I do
>not need to be scared anymore...

-- 
Floyd L. Davidson            <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska)                         floyd@apaflo.com

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-24 10:12                   ` Floyd L. Davidson
@ 2006-10-24 11:25                     ` Mathias Dahl
  2006-10-24 18:23                       ` Floyd L. Davidson
  0 siblings, 1 reply; 52+ messages in thread
From: Mathias Dahl @ 2006-10-24 11:25 UTC (permalink / raw)


floyd@apaflo.com (Floyd L. Davidson) writes:

>>To be fair, Emacs is full of modes, all the time you are working in
>>different ones. Most are very similar when it comes to basic text
>>editing, but think about Dired or the M-x prompt, or isearch or...
>
> To be specific, the type of interface used by emacs is known as
> modeless.  It has many modes, but it *automatically* defaults back
> to insert mode when any of the other modes is completed.

>From wikipedia (http://en.wikipedia.org/wiki/Modeless):

  Modelessness is a property of computer user interfaces. In a
  modeless interface, the same input from the user will always trigger
  the same perceived action. This is opposed to a modal interface,
  where the action perceived to have been executed is dependent on the
  current state of the system.

  The purpose of modeless interfaces is to avoid mode errors by making
  it impossible for the user to commit them.

If we agree on the definition above, Emacs is indeed a modal
application in many ways.

/Mathias

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-24 11:25                     ` Mathias Dahl
@ 2006-10-24 18:23                       ` Floyd L. Davidson
  2006-10-25 14:21                         ` Mathias Dahl
  0 siblings, 1 reply; 52+ messages in thread
From: Floyd L. Davidson @ 2006-10-24 18:23 UTC (permalink / raw)


Mathias Dahl <brakjoller@gmail.com> wrote:
>floyd@apaflo.com (Floyd L. Davidson) writes:
>
>>>To be fair, Emacs is full of modes, all the time you are working in
>>>different ones. Most are very similar when it comes to basic text
>>>editing, but think about Dired or the M-x prompt, or isearch or...
>>
>> To be specific, the type of interface used by emacs is known as
>> modeless.  It has many modes, but it *automatically* defaults back
>> to insert mode when any of the other modes is completed.
>
>From wikipedia (http://en.wikipedia.org/wiki/Modeless):
>
>  Modelessness is a property of computer user interfaces. In a
>  modeless interface, the same input from the user will always trigger
>  the same perceived action. This is opposed to a modal interface,
>  where the action perceived to have been executed is dependent on the
>  current state of the system.
>
>  The purpose of modeless interfaces is to avoid mode errors by making
>  it impossible for the user to commit them.
>
>If we agree on the definition above, Emacs is indeed a modal
>application in many ways.

That definition is not particularly good.  Using it make a
modeless editor impossible.

I'll stick with VI being modeful and Emacs modeless.  And will
reject as obviously flawed *any* definitions that do not work
with that premise.   That is an intrinsic difference between
those two editors.

-- 
Floyd L. Davidson            <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska)                         floyd@apaflo.com

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: Hard to switch from vi
  2006-10-24 18:23                       ` Floyd L. Davidson
@ 2006-10-25 14:21                         ` Mathias Dahl
  0 siblings, 0 replies; 52+ messages in thread
From: Mathias Dahl @ 2006-10-25 14:21 UTC (permalink / raw)


floyd@apaflo.com (Floyd L. Davidson) writes:

> That definition is not particularly good.  Using it make a modeless
> editor impossible.

That is quite likely, yes.

> I'll stick with VI being modeful and Emacs modeless.  And will
> reject as obviously flawed *any* definitions that do not work with
> that premise.  That is an intrinsic difference between those two
> editors.

Good for you.

^ permalink raw reply	[flat|nested] 52+ messages in thread

end of thread, other threads:[~2006-10-25 14:21 UTC | newest]

Thread overview: 52+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-08 23:32 Hard to switch from vi Wen Weng
2006-10-09  0:12 ` Ignacio Mondino
2006-10-09  7:10   ` Lennart Borgman
2006-10-09 10:57     ` Jeremy Hankins
2006-10-09 14:47       ` Lennart Borgman
2006-10-09 17:49         ` Jeremy Hankins
     [not found]     ` <mailman.7914.1160393911.9609.help-gnu-emacs@gnu.org>
2006-10-10 13:03       ` Hadron Quark
2006-10-10 13:50         ` Pascal Bourguignon
2006-10-13 10:36           ` Hadron Quark
2006-10-10 14:11         ` Jeremy Hankins
     [not found]   ` <mailman.7909.1160377822.9609.help-gnu-emacs@gnu.org>
2006-10-10  1:39     ` Wen Weng
     [not found] ` <mailman.7907.1160352764.9609.help-gnu-emacs@gnu.org>
2006-10-09  0:40   ` Wen Weng
2006-10-09  1:48     ` Ajit Mylavarapu
2006-10-09  2:03 ` ext-chunye.wang
2006-10-09  2:09   ` Pascal Bourguignon
2006-10-09  2:44     ` Wen Weng
2006-10-10 12:59       ` Hadron Quark
2006-10-09  2:04 ` Pascal Bourguignon
2006-10-10 11:53   ` Hadron Quark
2006-10-11 13:35   ` martin
2006-10-09  8:52 ` Markus Triska
2006-10-09  8:53   ` David Kastrup
2006-10-09 16:28     ` Harald Hanche-Olsen
2006-10-10  1:36   ` Wen Weng
2006-10-10 11:16     ` Markus Triska
2006-10-10 13:05     ` Hadron Quark
2006-10-10 14:02       ` Pascal Bourguignon
2006-10-10 12:20   ` Hadron Quark
2006-10-10 12:32     ` Pascal Bourguignon
2006-10-10 12:38     ` Markus Triska
2006-10-10 12:57       ` Hadron Quark
     [not found] ` <45299CB0.5090003@speakeasy.net>
     [not found]   ` <4529A0E4.60403@charter.net>
2006-10-09  9:58     ` ken
2006-10-10  0:50     ` Stefan Monnier
     [not found]     ` <mailman.7911.1160387922.9609.help-gnu-emacs@gnu.org>
2006-10-10  1:22       ` Wen Weng
2006-10-10  2:23         ` Micha Feigin
2006-10-21 17:25         ` don provan
2006-10-22 19:36           ` Lennart Borgman
     [not found]           ` <mailman.132.1161545823.27805.help-gnu-emacs@gnu.org>
2006-10-23 17:15             ` don provan
2006-10-23 17:53               ` Lennart Borgman
2006-10-23 18:56               ` Floyd L. Davidson
2006-10-24  9:01                 ` Mathias Dahl
2006-10-24 10:12                   ` Floyd L. Davidson
2006-10-24 11:25                     ` Mathias Dahl
2006-10-24 18:23                       ` Floyd L. Davidson
2006-10-25 14:21                         ` Mathias Dahl
2006-10-21 21:00         ` Dieter Wilhelm
2006-10-09 12:01 ` lgfang
2006-10-10  1:17   ` Wen Weng
2006-10-09 13:28 ` Ken Goldman
2006-10-09 15:06   ` Malte Spiess
2006-10-10  7:18   ` Giorgos Keramidas
2006-10-11 22:21 ` John Sullivan

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.