[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: vi



Kai Grossjohann wrote:
> 
> >>>>> Craig Sanders writes:
>
vi looks to be about 1/2 the keystrokes (and no double strikes) and you
still haven't exited emacs. I think I'll stick with vi.  I also like
:!cp % %.970415
 
> vi:
> 
>   Craig> 1G                  # move to start of file
>   Craig> /192.168.1          # search for 192.168.1
>   Craig> 5cw192.168.200<ESC> # change 5 'words' to 192.168.2
>   Craig> n                   # find next
>   Craig> .                   # repeat change
>   Craig> n                   # find next
>   Craig> .                   # repeat change
>   Craig> n                   # find next
>   Craig> .                   # repeat change
>   Craig> :x                  # save and exit
> 
> emacs:
> 
> M-<                     ; go to beginning of file
> C-x (                   ; start recording kbd macro
> C-s 129.168.1 RET       ; search for 192.168.1
> M-b M-b M-b             ; go back three words
> M-d M-d M-d             ; delete three words
> 129.168.200             ; insert new string
> C-x )                   ; end kbd macro
> C-x e                   ; repeat
> C-x e                   ; repeat
> C-x e                   ; repeat
> 
> Nothing to do with "modeless".
> 
> kai
> --
> Two caf\'e au lait please, but without milk.
> (American tourist in paris.)


Reply to: