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

Re: vi



>>>>> Craig Sanders writes:

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: