Text editor

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sid

    Text editor

    Hi!
    I am sorry that I am asking a little off topic question, but I am
    sure some of you can surely help me. I am writiing a VI like text
    editor in C++ for the console. I would like to know some opensource
    tools that would help me build it faster. Also, What would be the best
    approach to build it?
    Thank You.
  • Gianni Mariani

    #2
    Re: Text editor

    sid wrote:
    Hi!
    I am sorry that I am asking a little off topic question, but I am
    sure some of you can surely help me. I am writiing a VI like text
    editor in C++ for the console. I would like to know some opensource
    tools that would help me build it faster. Also, What would be the best
    approach to build it?
    gcc?

    I'm sorry, your answer is too nonspecific to even being to pointing out
    possible help, let alone the question being off topic.

    Read the faq, that will certainly help in getting good C++ code when you
    do get to write it. If you have any questions about the FAQ then you're
    in luck here !

    Comment

    • jason.cipriani@gmail.com

      #3
      Re: Text editor

      On Mar 20, 5:35 am, sid <kingsiddha...@ gmail.comwrote:
      Hi!
      I am sorry that I am asking a little off topic question, but I am
      sure some of you can surely help me. I am writiing a VI like text
      editor in C++ for the console. I would like to know some opensource
      tools that would help me build it faster. Also, What would be the best
      approach to build it?
      How about VI? It provides VI-like text editor functionality that you
      can add to your console application with just a single API call:

      system("vi");
      Thank You.
      Jason

      Comment

      • Paavo Helde

        #4
        Re: Text editor

        sid <kingsiddharth@ gmail.comwrote in news:f3103bba-029d-47fc-a804-
        a95852690788@d4 g2000prg.google groups.com:
        Hi!
        I am sorry that I am asking a little off topic question, but I am
        sure some of you can surely help me. I am writiing a VI like text
        editor in C++ for the console. I would like to know some opensource
        tools that would help me build it faster. Also, What would be the best
        approach to build it?
        Thank You.
        To reuse vi code? The Linux implementation should be open-source AFAIK. If
        this does not suit you you could at least use ncurses (these are a bit
        portable so should be not totally outlawed in this ng).

        hth
        Paavo

        Comment

        • Thomas Dickey

          #5
          Re: Text editor

          James Kanze <james.kanze@gm ail.comwrote:
          Linux doesn't really have vi, only vim. And although vim does
          have a vi compatible mode, it also has a lot more.
          Actually, Linux doesn't "have" any particular editor.

          Linux distributions and users can "have" a choice of editors.
          For example, I have (on Linux...) elvis, nvi, vim and vile
          (as well as some other editors). nvi is closer to vi than vim.

          --
          Thomas E. Dickey
          Thomas Dickey develops/maintains widely-used tools and libraries for software development (diffstat, yacc, mawk) and terminals (ncurses, lynx, xterm)

          ftp://invisible-island.net

          Comment

          • James Kanze

            #6
            Re: Text editor

            On 22 mar, 15:03, Thomas Dickey <dic...@saltmin e.radix.netwrot e:
            James Kanze <james.ka...@gm ail.comwrote:
            Linux doesn't really have vi, only vim. And although vim does
            have a vi compatible mode, it also has a lot more.
            Actually, Linux doesn't "have" any particular editor.
            Linux distributions and users can "have" a choice of editors.
            For example, I have (on Linux...) elvis, nvi, vim and vile (as
            well as some other editors). nvi is closer to vi than vim.
            In a certain sense, that's true of all systems. And the
            "official" standard editor of Posix (and presumably Posix-like)
            systems, like Linux, is ed. Still, there is a generally
            accepted sense in which vi is the "standard" Unix editor, and at
            least in the Linux distributions I've seen, /usr/bin/vi is a
            symbolic link to vim. (Of course, if you actually have any real
            editing job to do, you'll invoke gvim or emacs. At least under
            Unix or Windows---people working on mainframes have different
            habits.)

            --
            James Kanze (GABI Software) email:james.kan ze@gmail.com
            Conseils en informatique orientée objet/
            Beratung in objektorientier ter Datenverarbeitu ng
            9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

            Comment

            • Jeff Schwab

              #7
              Re: Text editor

              James Kanze wrote:
              least in the Linux distributions I've seen, /usr/bin/vi is a
              symbolic link to vim. (Of course, if you actually have any real
              editing job to do, you'll invoke gvim or emacs.
              Why gvim, as opposed to vim? I almost exclusively use vim inside GNU
              screen, inside a terminal emulator.

              Comment

              • jason.cipriani@gmail.com

                #8
                Re: Text editor

                On Mar 22, 12:20 pm, Jeff Schwab <j...@schwabcen ter.comwrote:
                James Kanze wrote:
                least in the Linux distributions I've seen, /usr/bin/vi is a
                symbolic link to vim. (Of course, if you actually have any real
                editing job to do, you'll invoke gvim or emacs.
                >
                Why gvim, as opposed to vim? I almost exclusively use vim inside GNU
                screen, inside a terminal emulator.
                Emacs is the best of all. Vim sucks. Also Windows has way better text
                editors than Linux.

                Comment

                • red floyd

                  #9
                  Re: Text editor

                  jason.cipriani@ gmail.com wrote:
                  On Mar 22, 12:20 pm, Jeff Schwab <j...@schwabcen ter.comwrote:
                  >James Kanze wrote:
                  >>least in the Linux distributions I've seen, /usr/bin/vi is a
                  >>symbolic link to vim. (Of course, if you actually have any real
                  >>editing job to do, you'll invoke gvim or emacs.
                  >Why gvim, as opposed to vim? I almost exclusively use vim inside GNU
                  >screen, inside a terminal emulator.
                  >
                  Emacs is the best of all. Vim sucks. Also Windows has way better text
                  editors than Linux.
                  Yeah, if you like taking your hands off the keyboard. Vi (or even --
                  gasp -- emacs) is much better if you're a touch typist.

                  Comment

                  • Thomas Dickey

                    #10
                    Re: Text editor

                    James Kanze <james.kanze@gm ail.comwrote:
                    On 22 mar, 15:03, Thomas Dickey <dic...@saltmin e.radix.netwrot e:
                    >James Kanze <james.ka...@gm ail.comwrote:
                    Linux doesn't really have vi, only vim. And although vim does
                    have a vi compatible mode, it also has a lot more.
                    >Actually, Linux doesn't "have" any particular editor.
                    >Linux distributions and users can "have" a choice of editors.
                    >For example, I have (on Linux...) elvis, nvi, vim and vile (as
                    >well as some other editors). nvi is closer to vi than vim.
                    In a certain sense, that's true of all systems. And the
                    "official" standard editor of Posix (and presumably Posix-like)
                    systems, like Linux, is ed. Still, there is a generally
                    vi's been standard for a while...


                    accepted sense in which vi is the "standard" Unix editor, and at
                    least in the Linux distributions I've seen, /usr/bin/vi is a
                    symbolic link to vim. (Of course, if you actually have any real
                    Most of them (not all).
                    editing job to do, you'll invoke gvim or emacs. At least under
                    Unix or Windows---people working on mainframes have different
                    habits.)
                    probably not (though I've started each this week, it was only to check
                    a detail).

                    hand

                    --
                    Thomas E. Dickey
                    Thomas Dickey develops/maintains widely-used tools and libraries for software development (diffstat, yacc, mawk) and terminals (ncurses, lynx, xterm)

                    ftp://invisible-island.net

                    Comment

                    • James Kanze

                      #11
                      Re: Text editor

                      On 22 mar, 17:20, Jeff Schwab <j...@schwabcen ter.comwrote:
                      James Kanze wrote:
                      least in the Linux distributions I've seen, /usr/bin/vi is a
                      symbolic link to vim. (Of course, if you actually have any real
                      editing job to do, you'll invoke gvim or emacs.
                      Why gvim, as opposed to vim? I almost exclusively use vim
                      inside GNU screen, inside a terminal emulator.
                      Because:-). I don't really know why---if I'm inside an xterm,
                      I'll often invoke vim, but most of the time, I want to edit and
                      invoke make from a separate window.

                      --
                      James Kanze (GABI Software) email:james.kan ze@gmail.com
                      Conseils en informatique orientée objet/
                      Beratung in objektorientier ter Datenverarbeitu ng
                      9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

                      Comment

                      • James Kanze

                        #12
                        Re: Text editor

                        On 22 mar, 18:01, "jason.cipri... @gmail.com"
                        <jason.cipri... @gmail.comwrote :
                        On Mar 22, 12:20 pm, Jeff Schwab <j...@schwabcen ter.comwrote:
                        James Kanze wrote:
                        least in the Linux distributions I've seen, /usr/bin/vi is
                        a symbolic link to vim. (Of course, if you actually have
                        any real editing job to do, you'll invoke gvim or emacs.
                        Why gvim, as opposed to vim? I almost exclusively use vim inside GNU
                        screen, inside a terminal emulator.
                        Emacs is the best of all. Vim sucks. Also Windows has way
                        better text editors than Linux.
                        I've never had the occasion to really use any purely Windows
                        editors intensively enough to form an opinion, but all of the
                        best Windows programmers I've met seem to use emacs or vim (most
                        often emacs), rather than a purely Windows editor.

                        My own experience with emacs is that I causes carpal tunnel
                        syndrome, because of the complicated positions it requires my
                        hand to take. (Escape-Meta-Alt-Control-Shift:-).) Perhaps with
                        a different keyboard layout, but I've never taken the time to
                        study the possibilities. And this does seem to be personal, I
                        know more than a few very competent programmers who swear by
                        emacs (and who touch type, like I do), and don't seem to have
                        problems with it.

                        What I like about vim, of course, is that I never have to move
                        my hand from the base position for touch typing, and I rarely
                        have to use key combinations other than with shift (and the
                        shift key is placed in a way to make this comfortable). The
                        result is that I can work considerably faster with vim than with
                        any other editor.

                        --
                        James Kanze (GABI Software) email:james.kan ze@gmail.com
                        Conseils en informatique orientée objet/
                        Beratung in objektorientier ter Datenverarbeitu ng
                        9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

                        Comment

                        • James Kanze

                          #13
                          Re: Text editor

                          On 23 mar, 01:39, Thomas Dickey <dic...@saltmin e.radix.netwrot e:
                          James Kanze <james.ka...@gm ail.comwrote:
                          On 22 mar, 15:03, Thomas Dickey <dic...@saltmin e.radix.netwrot e:
                          James Kanze <james.ka...@gm ail.comwrote:
                          Linux doesn't really have vi, only vim. And although vim does
                          have a vi compatible mode, it also has a lot more.
                          Actually, Linux doesn't "have" any particular editor.
                          Linux distributions and users can "have" a choice of editors.
                          For example, I have (on Linux...) elvis, nvi, vim and vile (as
                          well as some other editors). nvi is closer to vi than vim.
                          In a certain sense, that's true of all systems. And the
                          "official" standard editor of Posix (and presumably Posix-like)
                          systems, like Linux, is ed. Still, there is a generally
                          vi's been standard for a while...
                          Still, I've used Unix where it wasn't present. (I *can* work
                          with ed if I have to.)
                          accepted sense in which vi is the "standard" Unix editor, and at
                          least in the Linux distributions I've seen, /usr/bin/vi is a
                          symbolic link to vim. (Of course, if you actually have any real
                          Most of them (not all).
                          As I said, the ones I've seen (Mandriva, SuSE and RedHat). Of
                          course, any administrator can change this anyway he wishes.
                          editing job to do, you'll invoke gvim or emacs. At least under
                          Unix or Windows---people working on mainframes have different
                          habits.)
                          probably not (though I've started each this week, it was only
                          to check a detail).
                          Some six or seven years ago, I was working on a project where we
                          where communicating with mainframes. I was offered an
                          introductory course, so that I could work on them as well. The
                          first day, they presented the editor. It was 3270 based, with
                          all of the commands on the function keys, and you had to mark
                          the lines before editing them. (The actual "editing" took place
                          locally, on the terminal.) At least there, that was the
                          standard way of working on the mainframe, and it was a far cry
                          from anything I've seen under Windows or Unix. Or anything I
                          really wanted to get into:-).

                          Thinking about it, of course, it wouldn't surprise me if a lot
                          of mainframe programmers simply downloaded the files, edited
                          them on a Windows machine, then uploaded them.

                          --
                          James Kanze (GABI Software) email:james.kan ze@gmail.com
                          Conseils en informatique orientée objet/
                          Beratung in objektorientier ter Datenverarbeitu ng
                          9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

                          Comment

                          Working...