Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re^2: Desparately seeking a bilingual vim/Emacs expert

by TheDamian (Priest)
on Mar 26, 2005 at 19:49 UTC ( #442550=note: print w/replies, xml ) Need Help??

in reply to Re: Desparately seeking a bilingual vim/Emacs expert
in thread Desparately seeking a bilingual vim/Emacs expert

Is the a home page you can point me at (so I can point the readers at it)?



  • Comment on Re^2: Desparately seeking a bilingual vim/Emacs expert

Replies are listed 'Best First'.
Re^3: Desparately seeking a bilingual vim/Emacs expert
by stefp (Vicar) on Mar 26, 2005 at 21:29 UTC
    I am afraid not. emacs shines and sucks in the same way perl5 does. Does the job. Too old, too much history.

    But it is not so daunting. Here is a quick 101 to use emacs for debugging and light editing.

    Until recently, I think that emacs did not include the last version of cperl. This resulted in haphazard hightlighting. Once a perl file is loaded, one can check the cperl version by typing C-h v cperl-version. It must be the same that the most recent file in Currently it is 7.32. If one is root he can adds it to his site specific directory A common place is /usr/share/emacs/site-lisp. Other wise he can add it to a personal elisp directory and he will load it by adding (load-file "elisp/cperl.el") in in .emacs file

    Perl debugging is part of the grand unified debugger scheme gud.el written by the inevitable esr. This is used to debug with gdb too. In my system the file is at /usr/share/emacs/21.3/lisp/gud.el where one can find the perl specific stuff by grepping "perldb".

    You run a session with the command

      M-x perldb RET your_filename
    You get two buffers in your frame. One is the file currently debugged. The other is the debugging session where you get to use all the commands described in the perldebug pod file. So that's known territory.

    You can also interact directly in the perl file buffer thanks to gud-minor-mode. A minor mode adds functionalities to the major mode by adding key-bindings.

    You can get all the bindings of the said buffer using C-h C-b. I paste the binding concerning the gud minor mode. Using the minor binding of the perl file avoid to clutter the debug window by explicit commands.

    C-x SPC		gud-break
    C-x C-a C-p	gud-print
    C-x C-a C-r	gud-cont
    C-x C-a C-n	gud-next
    C-x C-a C-s	gud-step
    C-x C-a C-d	gud-remove
    C-x C-a C-b	gud-break
    C-x C-a C-l	gud-refresh
    One can scroll a buffer using the mouse.

    Here is a list of minimal keybindings for people that want to use emacs for debbugging and minor edition while wanting to go mouseless.

    C-x o   allows to cycle the caret thru all the buffers
    C-x b   list all the buffer in the meacs session.
           In that buffer ENTER  selects a file
    C-x w  write the current file
    C-x q  toggle the read-only mode. Because so many binding do
           something it can be a good stopping gap.
    ^H i gets to the info files
    Here is a chart for moving in progressively coarser granularity from the current position.
    In the vertical axis : char, word, begin/end of line
    In the horizontal axis : line, begin/end of subroutine
    C-a <--- M-b <-- C-b  <-- .  --> C-f --> M-f --> C-e
    M-x woman is nicer the M-x man but slower to start :)
    ...because it compiles the list of man files to provide completion.

    -- stefp

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://442550]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2022-05-28 19:31 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (101 votes). Check out past polls.