VHDL and Emacs (My experience)

Discussion in 'VHDL' started by mans, Apr 28, 2007.

  1. mans

    mans Guest

    Hello,

    I am new in VHDL and Emacs and I tried to use Emacs for editing VHDL
    and attaching it to ISE. My experience is as follow:



    Overall:



    Emacs has a very good editor for VHDL editing. It has several good features
    such as auto indentation and syntax highlighting. Over all it is very good
    if you can use it (I could not!)



    What I did:

    I download my copy of Emacs from
    http://www.ourcomments.org/Emacs/EmacsW32.html . I installed it in my
    windows XP professional system and setup ISE to use it. It works well with
    ISE.



    Problems that I had:



    1- Its keyboard shortcuts are not windows based. I tried to configure
    wmacsw32 without any success.

    2- It is very slow to start ( I didn't use emacs clinets)

    3- I read that you can see a hierarchy of your VHDL code, but I can not
    turn it on (I don't know how to turn it on!).

    4- I can not find any documentation on facilities which are available
    in VHDL mode.

    5- Some times when I try to click on VHDL menu, this menu item
    disappears!



    Best regards



    Ps: Does Eclipse support VHDL?
    mans, Apr 28, 2007
    #1
    1. Advertising

  2. mans wrote:


    >
    > 1- Its keyboard shortcuts are not windows based.


    True, but the the arrow keys, and mouse, and menus
    work without knowing any shortcuts.

    > 2- It is very slow to start ( I didn't use emacs clinets)


    True. I just leave it running all day.

    > 3- I read that you can see a hierarchy of your VHDL code, but I can not
    > turn it on (I don't know how to turn it on!).


    That requires vhdl-mode and speedbar.
    vhdl-mode.el is not included in most windows distributions,
    get it here:
    http://www.iis.ee.ethz.ch/~zimmi/emacs/vhdl-mode.html

    > Ps: Does Eclipse support VHDL?


    Not like it support Java.


    -- Mike Treseler
    Mike Treseler, Apr 28, 2007
    #2
    1. Advertising

  3. On Sat, 28 Apr 2007 19:03:10 GMT, "mans" <(myname_here)> wrote:

    > I am new in VHDL and Emacs and I tried to use Emacs for editing VHDL
    >and attaching it to ISE. My experience is as follow:


    I did the same with gvim. Works nicely. (please not another vi/emacs war!)

    But one this is annoying: If I ask ISE for a syntax check etc, the first thing it does
    is to kill all editor processes it has started. That's bad because some editors may
    contain a changed file that is not yet written back or even may be editing something
    completely unrelated in the meantime.

    I usually have a lot of files open: the file with the entity, instantiation,
    global constants, test bed...

    Is there a switch I may have missed?

    regards, Gerhard
    Gerhard Hoffmann, Apr 28, 2007
    #3
  4. mans

    mans Guest

    >

    > Thanks for telling us about the problems so we may try to get them fixed.


    Thank you for helping me to solve the problem.

    >
    >> 1- Its keyboard shortcuts are not windows based. I tried to
    >> configure wmacsw32 without any success.

    >
    > Can you please tell me what you did and how it failed? There is a quick
    > setup for those things if you use the menus:
    >
    > Options - Customize EmacsW32 ...


    I did use this option and it didn't work for me. I set the CUA in option and
    it is working. One point that probably confuse people is that even in this
    case, the short cuts in edit menu is not C-x and C-c and so on.


    >
    >> 2- It is very slow to start ( I didn't use emacs clinets)

    >
    > You should use EmacsClient and only start Emacs once.
    >
    > Making it easy to get started using EmacsClient is one of the main things
    > the installer for Emacs+EmacsW32 is trying to help you with. Several
    > shortcuts gets installed that lets you start Emacs through EmacsClient.
    > There is one in the start menu and you get one in the SendTo menu. If you
    > prefer working from the command line there is a command line script called
    > e.cmd for this.
    >
    > If you use the patched version then Emacs server gets started
    > automatically through those shortcuts and or the command line scripts.
    > (For the unpatched version you have to start Emacs server yourself, please
    > read the Emacs manual.)




    I think I don't have the patched version. I will try to see what I can do
    with this but as long as I am not closing emacs after each edit, I don't
    need to restart it. I am happy!


    >> 5- Some times when I try to click on VHDL menu, this menu item
    >> disappears!

    >
    > Can you please describe this more? Exactly when does this happen?




    It happens before to me but it is working well now. I will post the details
    if it happens again to me.





    More on new and old problems that I have:



    1- I can set speedbar and used it. It is a very useful facility. The problem
    is that I can not dock it into emacs. Is there any way to dock it into emacs
    so it doesn't start as a new window?

    2- If I have a file that I modified with ISE, when I open it with Emacs, I
    can see a ^M at the end of each line. This generates error during
    indentation. I could not find any way to fix it. I only can remove them
    manually which is time consuming. Any way to do this in emacs or ISE or by
    any other tools?



    One suggestion:

    As during editing, it is possible to edit several files, is there any way
    to save all files just by pressing a button on toolbar or a menu item?



    My view of emacs for editing VHDL is no changed and I am very happy to use
    it with VHDL.



    Best regards and thanks for helping to use emacs.
    mans, Apr 29, 2007
    #4
  5. mans

    JK Guest

    On Apr 29, 7:47 pm, "mans" <(myname_here)> wrote:
    > > Thanks for telling us about the problems so we may try to get them fixed.

    >
    > Thank you for helping me to solve the problem.
    >
    >
    >
    > >> 1- Its keyboard shortcuts are not windows based. I tried to
    > >> configure wmacsw32 without any success.

    >
    > > Can you please tell me what you did and how it failed? There is a quick
    > > setup for those things if you use the menus:

    >
    > > Options - Customize EmacsW32 ...

    >
    > I did use this option and it didn't work for me. I set the CUA in option and
    > it is working. One point that probably confuse people is that even in this
    > case, the short cuts in edit menu is not C-x and C-c and so on.
    >
    >
    >
    >
    >
    >
    >
    > >> 2- It is very slow to start ( I didn't use emacs clinets)

    >
    > > You should use EmacsClient and only start Emacs once.

    >
    > > Making it easy to get started using EmacsClient is one of the main things
    > > the installer for Emacs+EmacsW32 is trying to help you with. Several
    > > shortcuts gets installed that lets you start Emacs through EmacsClient.
    > > There is one in the start menu and you get one in the SendTo menu. If you
    > > prefer working from the command line there is a command line script called
    > > e.cmd for this.

    >
    > > If you use the patched version then Emacs server gets started
    > > automatically through those shortcuts and or the command line scripts.
    > > (For the unpatched version you have to start Emacs server yourself, please
    > > read the Emacs manual.)

    >
    > I think I don't have the patched version. I will try to see what I can do
    > with this but as long as I am not closing emacs after each edit, I don't
    > need to restart it. I am happy!
    >
    > >> 5- Some times when I try to click on VHDL menu, this menu item
    > >> disappears!

    >
    > > Can you please describe this more? Exactly when does this happen?

    >
    > It happens before to me but it is working well now. I will post the details
    > if it happens again to me.
    >
    > More on new and old problems that I have:
    >
    > 1- I can set speedbar and used it. It is a very useful facility. The problem
    > is that I can not dock it into emacs. Is there any way to dock it into emacs
    > so it doesn't start as a new window?
    >
    > 2- If I have a file that I modified with ISE, when I open it with Emacs, I
    > can see a ^M at the end of each line. This generates error during
    > indentation. I could not find any way to fix it. I only can remove them
    > manually which is time consuming. Any way to do this in emacs or ISE or by
    > any other tools?
    >
    > One suggestion:
    >
    > As during editing, it is possible to edit several files, is there any way
    > to save all files just by pressing a button on toolbar or a menu item?
    >
    > My view of emacs for editing VHDL is no changed and I am very happy to use
    > it with VHDL.
    >
    > Best regards and thanks for helping to use emacs.- Hide quoted text -
    >
    > - Show quoted text -


    I downloaded emacs - windows version from http://www.ourcomments.org/cgi-bin/emacsw32-dl-latest.pl
    (Download Latest EmacsW32 + Emacs patched).
    It supports vhdl mode. Its really good. You can give a try.

    JK
    I
    JK, Apr 30, 2007
    #5
  6. mans

    mans Guest

    "JK" <> wrote in message
    news:...
    > On Apr 29, 7:47 pm, "mans" <(myname_here)> wrote:
    >> > Thanks for telling us about the problems so we may try to get them
    >> > fixed.

    >>
    >> Thank you for helping me to solve the problem.
    >>
    >>
    >>
    >> >> 1- Its keyboard shortcuts are not windows based. I tried to
    >> >> configure wmacsw32 without any success.

    >>
    >> > Can you please tell me what you did and how it failed? There is a quick
    >> > setup for those things if you use the menus:

    >>
    >> > Options - Customize EmacsW32 ...

    >>
    >> I did use this option and it didn't work for me. I set the CUA in option
    >> and
    >> it is working. One point that probably confuse people is that even in
    >> this
    >> case, the short cuts in edit menu is not C-x and C-c and so on.
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >> >> 2- It is very slow to start ( I didn't use emacs clinets)

    >>
    >> > You should use EmacsClient and only start Emacs once.

    >>
    >> > Making it easy to get started using EmacsClient is one of the main
    >> > things
    >> > the installer for Emacs+EmacsW32 is trying to help you with. Several
    >> > shortcuts gets installed that lets you start Emacs through EmacsClient.
    >> > There is one in the start menu and you get one in the SendTo menu. If
    >> > you
    >> > prefer working from the command line there is a command line script
    >> > called
    >> > e.cmd for this.

    >>
    >> > If you use the patched version then Emacs server gets started
    >> > automatically through those shortcuts and or the command line scripts.
    >> > (For the unpatched version you have to start Emacs server yourself,
    >> > please
    >> > read the Emacs manual.)

    >>
    >> I think I don't have the patched version. I will try to see what I can do
    >> with this but as long as I am not closing emacs after each edit, I don't
    >> need to restart it. I am happy!
    >>
    >> >> 5- Some times when I try to click on VHDL menu, this menu item
    >> >> disappears!

    >>
    >> > Can you please describe this more? Exactly when does this happen?

    >>
    >> It happens before to me but it is working well now. I will post the
    >> details
    >> if it happens again to me.
    >>
    >> More on new and old problems that I have:
    >>
    >> 1- I can set speedbar and used it. It is a very useful facility. The
    >> problem
    >> is that I can not dock it into emacs. Is there any way to dock it into
    >> emacs
    >> so it doesn't start as a new window?
    >>
    >> 2- If I have a file that I modified with ISE, when I open it with Emacs,
    >> I
    >> can see a ^M at the end of each line. This generates error during
    >> indentation. I could not find any way to fix it. I only can remove them
    >> manually which is time consuming. Any way to do this in emacs or ISE or
    >> by
    >> any other tools?
    >>
    >> One suggestion:
    >>
    >> As during editing, it is possible to edit several files, is there any
    >> way
    >> to save all files just by pressing a button on toolbar or a menu item?
    >>
    >> My view of emacs for editing VHDL is no changed and I am very happy to
    >> use
    >> it with VHDL.
    >>
    >> Best regards and thanks for helping to use emacs.- Hide quoted text -
    >>
    >> - Show quoted text -

    >
    > I downloaded emacs - windows version from
    > http://www.ourcomments.org/cgi-bin/emacsw32-dl-latest.pl
    > (Download Latest EmacsW32 + Emacs patched).
    > It supports vhdl mode. Its really good. You can give a try.
    >
    > JK
    > I


    If you use it with ISE, would you please tell me how did you setup ISE to
    use it?
    In my setup, emacs is runs every time and also when I click on an error in
    ISE, it can not bring me to the specific line in the source code.

    Best regards
    mans, Apr 30, 2007
    #6
  7. mans

    JK Guest

    On Apr 30, 4:27 pm, "mans" <(myname_here)> wrote:
    > "JK" <> wrote in message
    >
    > news:...
    >
    >
    >
    >
    >
    > > On Apr 29, 7:47 pm, "mans" <(myname_here)> wrote:
    > >> > Thanks for telling us about the problems so we may try to get them
    > >> > fixed.

    >
    > >> Thank you for helping me to solve the problem.

    >
    > >> >> 1- Its keyboard shortcuts are not windows based. I tried to
    > >> >> configure wmacsw32 without any success.

    >
    > >> > Can you please tell me what you did and how it failed? There is a quick
    > >> > setup for those things if you use the menus:

    >
    > >> > Options - Customize EmacsW32 ...

    >
    > >> I did use this option and it didn't work for me. I set the CUA in option
    > >> and
    > >> it is working. One point that probably confuse people is that even in
    > >> this
    > >> case, the short cuts in edit menu is not C-x and C-c and so on.

    >
    > >> >> 2- It is very slow to start ( I didn't use emacs clinets)

    >
    > >> > You should use EmacsClient and only start Emacs once.

    >
    > >> > Making it easy to get started using EmacsClient is one of the main
    > >> > things
    > >> > the installer for Emacs+EmacsW32 is trying to help you with. Several
    > >> > shortcuts gets installed that lets you start Emacs through EmacsClient.
    > >> > There is one in the start menu and you get one in the SendTo menu. If
    > >> > you
    > >> > prefer working from the command line there is a command line script
    > >> > called
    > >> > e.cmd for this.

    >
    > >> > If you use the patched version then Emacs server gets started
    > >> > automatically through those shortcuts and or the command line scripts.
    > >> > (For the unpatched version you have to start Emacs server yourself,
    > >> > please
    > >> > read the Emacs manual.)

    >
    > >> I think I don't have the patched version. I will try to see what I can do
    > >> with this but as long as I am not closing emacs after each edit, I don't
    > >> need to restart it. I am happy!

    >
    > >> >> 5- Some times when I try to click on VHDL menu, this menu item
    > >> >> disappears!

    >
    > >> > Can you please describe this more? Exactly when does this happen?

    >
    > >> It happens before to me but it is working well now. I will post the
    > >> details
    > >> if it happens again to me.

    >
    > >> More on new and old problems that I have:

    >
    > >> 1- I can set speedbar and used it. It is a very useful facility. The
    > >> problem
    > >> is that I can not dock it into emacs. Is there any way to dock it into
    > >> emacs
    > >> so it doesn't start as a new window?

    >
    > >> 2- If I have a file that I modified with ISE, when I open it with Emacs,
    > >> I
    > >> can see a ^M at the end of each line. This generates error during
    > >> indentation. I could not find any way to fix it. I only can remove them
    > >> manually which is time consuming. Any way to do this in emacs or ISE or
    > >> by
    > >> any other tools?

    >
    > >> One suggestion:

    >
    > >> As during editing, it is possible to edit several files, is there any
    > >> way
    > >> to save all files just by pressing a button on toolbar or a menu item?

    >
    > >> My view of emacs for editing VHDL is no changed and I am very happy to
    > >> use
    > >> it with VHDL.

    >
    > >> Best regards and thanks for helping to use emacs.- Hide quoted text -

    >
    > >> - Show quoted text -

    >
    > > I downloaded emacs - windows version from
    > >http://www.ourcomments.org/cgi-bin/emacsw32-dl-latest.pl
    > > (Download Latest EmacsW32 + Emacs patched).
    > > It supports vhdl mode. Its really good. You can give a try.

    >
    > > JK
    > > I

    >
    > If you use it with ISE, would you please tell me how did you setup ISE to
    > use it?
    > In my setup, emacs is runs every time and also when I click on an error in
    > ISE, it can not bring me to the specific line in the source code.
    >
    > Best regards- Hide quoted text -
    >
    > - Show quoted text -


    No, I am not using Emacs with ISE. For Design Entry I am using
    Emacs32 only and in this, I set Compiler as Modelsim.
    So, once I complete my coding, I do compilation in Emacs32 itself to
    check syntax errors if any.

    Regards,
    JK
    JK, Apr 30, 2007
    #7
  8. JK wrote:


    > I downloaded emacs - windows version from
    > http://www.ourcomments.org/cgi-bin/emacsw32-dl-latest.pl
    > (Download Latest EmacsW32 + Emacs patched).
    > It supports vhdl mode. Its really good. You can give a try.


    I just did. That's the best windows install I've seen.
    Speedbar and vhdl-mode are built-in and *work*.

    However, I'll keep my linux box until
    there is a real shell integrated
    just as well.

    -- Mike Treseler
    Mike Treseler, Apr 30, 2007
    #8
  9. mans

    JussiJ Guest

    mans (myname_here) wrote:

    > Over all it is very good if you can use it (I could not!)


    You could try the Zeus for Windows IDE:

    http://www.zeusedit.com
    NOTE: Zeus is shareware.

    It should be easy enough to configure Zeus for VHDL.

    FWIW the next Zeus release will come with better configuration
    for VHDL and will also add code folding for the VHDL language.

    > Problems that I had:
    >
    > 1- Its keyboard shortcuts are not windows based. I tried
    > to configure wmacsw32 without any success.


    The Zeus keyboard is Windows aware and is also fully configurable.

    > 2- It is very slow to start ( I didn't use emacs clinets)


    Generally Zeus will load in less than a second.

    > 3- I read that you can see a hierarchy of your VHDL code, but I
    > can not turn it on (I don't know how to turn it on!).


    Zeus provides code hierarchy via the information provided by
    the ctags utility.

    I am not sure if ctags supports VHDL, but if it does this information
    should apear in the class panel of the navigator.

    Cheers Jussi Jumppanen
    Author: Zeus for Windows IDE
    JussiJ, May 10, 2007
    #9
  10. mans

    Guest

    , May 10, 2007
    #10
  11. "mans" <(myname_here)> writes:
    > Emacs has a very good editor for VHDL editing. It has several good features
    > such as auto indentation and syntax highlighting. Over all it is very good
    > if you can use it (I could not!)


    This sounds like a good start. Don't let yourself get discouraged.

    > 1- Its keyboard shortcuts are not windows based. I tried to configure
    > wmacsw32 without any success.


    Personally, I use XEmacs (Linux, Win32 native) which might be a little
    different. Here, the old-school windows shortcuts for copy/paste do work
    (C-Insert, S-Insert, etc.). The others, C-c in particular won't and I
    would not recommend changing the mappings. pc-select mode gives you
    the selection behavior using S-right/left/up/down (cursor keys).

    > 2- It is very slow to start ( I didn't use emacs clinets)


    Depends on what your config file looks like. I'd consider using the
    clients.

    > 3- I read that you can see a hierarchy of your VHDL code, but I can not
    > turn it on (I don't know how to turn it on!).


    You will have to load a package called "speedbar". If that has not
    been installed already you can get it from
    http://cedet.sourceforge.net/

    > 4- I can not find any documentation on facilities which are available
    > in VHDL mode.


    In VHDL mode type: C-c C-h

    > 5- Some times when I try to click on VHDL menu, this menu item
    > disappears!


    Dunno.

    Regards
    -- Marcus

    note that "property" can also be used as syntaxtic sugar to reference
    a property, breaking the clean design of verilog; [...]

    (seen on http://www.veripool.com/verilog-mode_news.html)
    Marcus Harnisch, May 10, 2007
    #11
  12. On Apr 29, 3:47 pm, "mans" <(myname_here)> wrote:
    > 2- If I have a file that I modified with ISE, when I open it with Emacs, I
    > can see a ^M at the end of each line. This generates error during
    > indentation. I could not find any way to fix it. I only can remove them
    > manually which is time consuming. Any way to do this in emacs or ISE or by
    > any other tools?


    That indicates that your file is stored with odd line endings.

    Generally there are two styles of line ending, "Carriage Return" +
    "Line Feed" CRLF which is used in MSDOS. And simple Line-Feed (LF)
    endings, used in Unix and now in Windows.

    What Emacs does is to read the file and find out which sort of endings
    are in use and automatically default to the right ones. The problem
    here is likely that you are saving the file with LF endings and
    opening it again with ISE which uses CRLF endings. Emacs doesn't
    expect the endings to change as you edit the file.

    The solution is probably to open and save the files initially using
    CRLF endings. So, to fix this open up your file using Emacs and type
    C-x RET f "dos" RET. Or select the menu Options->Mule->Set coding
    systems->For Saving this Buffer.

    Post again if doing the above doesn't work.
    Robert Thorpe, May 10, 2007
    #12
  13. mans

    Andy Guest

    On May 10, 6:33 am, Marcus Harnisch <> wrote:
    > "mans" <(myname_here)> writes:
    > > Emacs has a very good editor for VHDL editing. It has several good features
    > > such as auto indentation and syntax highlighting. Over all it is very good
    > > if you can use it (I could not!)

    >
    > This sounds like a good start. Don't let yourself get discouraged.
    >
    > > 1- Its keyboard shortcuts are not windows based. I tried to configure
    > > wmacsw32 without any success.

    >
    > Personally, I use XEmacs (Linux, Win32 native) which might be a little
    > different. Here, the old-school windows shortcuts for copy/paste do work
    > (C-Insert, S-Insert, etc.). The others, C-c in particular won't and I
    > would not recommend changing the mappings. pc-select mode gives you
    > the selection behavior using S-right/left/up/down (cursor keys).
    >
    > > 2- It is very slow to start ( I didn't use emacs clinets)

    >
    > Depends on what your config file looks like. I'd consider using the
    > clients.
    >
    > > 3- I read that you can see a hierarchy of your VHDL code, but I can not
    > > turn it on (I don't know how to turn it on!).

    >
    > You will have to load a package called "speedbar". If that has not
    > been installed already you can get it from
    > http://cedet.sourceforge.net/
    >
    > > 4- I can not find any documentation on facilities which are available
    > > in VHDL mode.

    >
    > In VHDL mode type: C-c C-h
    >
    > > 5- Some times when I try to click on VHDL menu, this menu item
    > > disappears!

    >
    > Dunno.
    >
    > Regards
    > -- Marcus
    >
    > note that "property" can also be used as syntaxtic sugar to reference
    > a property, breaking the clean design of verilog; [...]
    >
    > (seen onhttp://www.veripool.com/verilog-mode_news.html)


    I use xemacs with cua mode and it handles most of the windows
    shortcuts (including C-c, C-x and C-v). I had to set another couple of
    options to get it to treat the selected text as "pending delete" too.
    I just wish there was a handy way to select a word or phrase in the
    code and then search for other occurrences of it, with minimal
    additional typing. There probably is, but I just don't know it yet!

    If you really cannot stomach the rest of the emacs wizardy, try jGrasp
    (free) from University of Auburn. It has very good highlighting and
    indentation (it does not autocapitalize). It also can insert Control
    Structure Diagram (CSD) graphics in the left margin/whitespace
    including buttons for collapsing/expanding code segments, etc. Mousing
    over the appropriate CSD graphic then shows you the top of that
    control structure (process/loop/if-then/case, etc), and if it was off
    screen, it temporarily shows it on the top row. It uses java and is
    portable between unix/linux and windows, but it is not slow like some
    other java based editors.

    Andy
    Andy, May 11, 2007
    #13
  14. Andy <> writes:

    > I use xemacs with cua mode and it handles most of the windows
    > shortcuts (including C-c, C-x and C-v). I had to set another couple of
    > options to get it to treat the selected text as "pending delete" too.
    > I just wish there was a handy way to select a word or phrase in the
    > code and then search for other occurrences of it, with minimal
    > additional typing. There probably is, but I just don't know it yet!
    >


    Hi Andy,

    Does C-s, M-y do what you want?

    This calls up a search and pastes your previous copy into it. I have
    C-s bound to isearch-forward, which may be non-default. C-s might be
    a normal (non-incremental) search, in which case, C-s, C-y might do
    the trick?

    Alternatively, "M-x occur" is useful, it opens another window listing
    which lines a particular phrase (well, regexp) occurs in. If you
    like it, bind a key for that too :)

    I also have a key bound to mark and copy the word/signalname/etc that
    is under the cursor, all in one go. which is quite handy for these
    sorts of things...

    Cheers,
    Martin

    --

    TRW Conekt - Consultancy in Engineering, Knowledge and Technology
    http://www.conekt.net/electronics.html
    Martin Thompson, May 14, 2007
    #14
  15. mans

    Andy Guest

    On May 14, 3:07 am, Martin Thompson <> wrote:
    > Andy <> writes:
    > > I use xemacs with cua mode and it handles most of the windows
    > > shortcuts (including C-c, C-x and C-v). I had to set another couple of
    > > options to get it to treat the selected text as "pending delete" too.
    > > I just wish there was a handy way to select a word or phrase in the
    > > code and then search for other occurrences of it, with minimal
    > > additional typing. There probably is, but I just don't know it yet!

    >
    > Hi Andy,
    >
    > Does C-s, M-y do what you want?
    >
    > This calls up a search and pastes your previous copy into it. I have
    > C-s bound to isearch-forward, which may be non-default. C-s might be
    > a normal (non-incremental) search, in which case, C-s, C-y might do
    > the trick?
    >
    > Alternatively, "M-x occur" is useful, it opens another window listing
    > which lines a particular phrase (well, regexp) occurs in. If you
    > like it, bind a key for that too :)
    >
    > I also have a key bound to mark and copy the word/signalname/etc that
    > is under the cursor, all in one go. which is quite handy for these
    > sorts of things...
    >
    > Cheers,
    > Martin
    >
    > --
    >
    > TRW Conekt - Consultancy in Engineering, Knowledge and Technologyhttp://www.conekt.net/electronics.html


    None of the above worked. Highlighted text when you're typing in the i-
    search pattern is a different color than text selected with the mouse
    or shift-arrow keys.

    Pasting does not seem to work in i-search (C-s).

    I am pretty much a neophyte with emacs yet, so thanks for the hints!

    Andy
    Andy, May 14, 2007
    #15
  16. mans

    Ben Jones Guest

    "Andy" <> wrote in message
    news:...
    >
    > None of the above worked. Highlighted text when you're typing in the i-
    > search pattern is a different color than text selected with the mouse
    > or shift-arrow keys.
    > Pasting does not seem to work in i-search (C-s).


    Tsk. It's been said before and it'll be said again: "Emacs has just about
    every feature you could possibly want from an operating system. Now all it
    needs is a decent editor..." :)

    -Ben-
    Ben Jones, May 14, 2007
    #16
  17. Andy wrote:

    > I had to set another couple of
    > options to get it to treat the selected text as "pending delete" too.


    I do that with query-replace.

    > I just wish there was a handy way to select a word or phrase in the
    > code and then search for other occurrences of it, with minimal
    > additional typing. There probably is, but I just don't know it yet!


    Like most tasks, it's easy once you know how to do it :)

    C-s

    Then type enough letters to see the instances light up.

    C-s again to jump to the next instance, etc.

    -- Mike Treseler
    Mike Treseler, May 14, 2007
    #17
  18. mans

    Andy Guest

    On May 14, 12:07 pm, Mike Treseler <> wrote:
    > Andy wrote:
    > > I had to set another couple of
    > > options to get it to treat the selected text as "pending delete" too.

    >
    > I do that with query-replace.
    >
    > > I just wish there was a handy way to select a word or phrase in the
    > > code and then search for other occurrences of it, with minimal
    > > additional typing. There probably is, but I just don't know it yet!

    >
    > Like most tasks, it's easy once you know how to do it :)
    >
    > C-s
    >
    > Then type enough letters to see the instances light up.
    >
    > C-s again to jump to the next instance, etc.
    >
    > -- Mike Treseler


    Mike,

    Thanks, but I already know how to use C-s (that's what I end up
    using). Unfortunately, it still requires me to type the word (or
    enough of it to be sufficiently unique) to start the search. I was
    looking for something that allows me to select an existing word,
    usually a port or signal/variable name (with mouse or keyboard), and
    search for other occurrences of that word. Typing the entire word gets
    tedious when using long names with specific suffixes, which require
    that virtually the entire name be re-typed. When in I-search (C-s), a
    C-v (paste) does not act like I typed it, but actually inserts the
    copy buffer at the cursor location. It's like the C-v operation
    overrides the fact that one is already in I-search mode.

    Andy
    Andy, May 14, 2007
    #18
  19. Andy wrote:

    > I was
    > looking for something that allows me to select an existing word,
    > usually a port or signal/variable name (with mouse or keyboard), and
    > search for other occurrences of that word. Typing the entire word gets
    > tedious when using long names with specific suffixes, which require
    > that virtually the entire name be re-typed.


    I would just mark with the mouse then, C-s
    and paste into the mini-buffer with
    the center mouse key. Then C-s, C-s, ...


    -- Mike Treseler
    Mike Treseler, May 14, 2007
    #19
  20. mans

    Guest

    On 14 Maj, 21:10, Mike Treseler <> wrote:
    > Andy wrote:
    > > I was
    > > looking for something that allows me to select an existing word,
    > > usually a port or signal/variable name (with mouse or keyboard), and
    > > search for other occurrences of that word. Typing the entire word gets
    > > tedious when using long names with specific suffixes, which require
    > > that virtually the entire name be re-typed.

    >
    > I would just mark with the mouse then, C-s
    > and paste into the mini-buffer with
    > the center mouse key. Then C-s, C-s, ...
    >
    > -- Mike Treseler


    Try C-w (after doing C-s), it will increase the selection, word by
    word,
    following the point where you stand. I find it very useful.

    Be careful, C-w is mapped to kill-region when you are not searching!
    Undo (C-_) is your friend.

    /Pontus
    , May 14, 2007
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Leo
    Replies:
    3
    Views:
    331
    Thomas Heller
    Jul 1, 2003
  2. afd
    Replies:
    1
    Views:
    8,255
    Colin Paul Gloster
    Mar 23, 2007
  3. omara007
    Replies:
    0
    Views:
    1,459
    omara007
    Jan 6, 2010
  4. Adam Funk
    Replies:
    4
    Views:
    217
    Adam Funk
    Jan 29, 2007
  5. alb

    vhdl-gui experience

    alb, Aug 31, 2012, in forum: VHDL
    Replies:
    0
    Views:
    714
Loading...

Share This Page