Loading ...
Sorry, an error occurred while loading the content.

Re: vim is too smart for its own good

Expand Messages
  • Michael Hernandez
    ... you might try nvi? http://www.bostic.com/vi/ Mike
    Message 1 of 12 , Aug 31, 2006
    • 0 Attachment
      On Aug 31, 2006, at 3:19 PM, Bruce Korb wrote:

      > Hi,
      >
      > I'd like to use a plain text editor.
      > I don't want any surprises.
      > I don't want it to think it understands language syntax.
      > I don't want it to colorize things.
      > I don't want it to do anything at all for me, unless I explicitly
      > say it is okay for it to do so.
      >
      > In short, I want vi. Except Linux distributions now alias vi
      > to vim and all its wondrous wizardry. ``set compatible'' is
      > insufficient. I still get automated commenting when the silly
      > thing has decided that I must be editing a C file. Leave me
      > alone, please. I want it all turned off. I have been unable
      > to find a simple way to do that. Or even any way to do that,
      > because I have not found any way at all to turn off the
      > ``you must want this line prefixed with a double slash''
      > feature. Help! Suggestions, please? Thank you! - Bruce

      you might try nvi?

      http://www.bostic.com/vi/

      Mike
    • Diwaker Gupta
      ... And vim -u NONE doesn t work for you? -- Web/Blog/Gallery: http://floatingsun.net/blog
      Message 2 of 12 , Aug 31, 2006
      • 0 Attachment
        > alone, please. I want it all turned off. I have been unable
        > to find a simple way to do that. Or even any way to do that,
        > because I have not found any way at all to turn off the
        > ``you must want this line prefixed with a double slash''
        > feature. Help! Suggestions, please? Thank you! - Bruce

        And 'vim -u NONE' doesn't work for you?
        --
        Web/Blog/Gallery: http://floatingsun.net/blog
      • Bruce Korb
        Hi, I d like to use a plain text editor. I don t want any surprises. I don t want it to think it understands language syntax. I don t want it to colorize
        Message 3 of 12 , Aug 31, 2006
        • 0 Attachment
          Hi,

          I'd like to use a plain text editor.
          I don't want any surprises.
          I don't want it to think it understands language syntax.
          I don't want it to colorize things.
          I don't want it to do anything at all for me, unless I explicitly
          say it is okay for it to do so.

          In short, I want vi. Except Linux distributions now alias vi
          to vim and all its wondrous wizardry. ``set compatible'' is
          insufficient. I still get automated commenting when the silly
          thing has decided that I must be editing a C file. Leave me
          alone, please. I want it all turned off. I have been unable
          to find a simple way to do that. Or even any way to do that,
          because I have not found any way at all to turn off the
          ``you must want this line prefixed with a double slash''
          feature. Help! Suggestions, please? Thank you! - Bruce
        • A.J.Mechelynck
          ... alias vi= vim -u NONE Best regards, Tony.
          Message 4 of 12 , Aug 31, 2006
          • 0 Attachment
            Bruce Korb wrote:
            > Hi,
            >
            > I'd like to use a plain text editor.
            > I don't want any surprises.
            > I don't want it to think it understands language syntax.
            > I don't want it to colorize things.
            > I don't want it to do anything at all for me, unless I explicitly
            > say it is okay for it to do so.
            >
            > In short, I want vi. Except Linux distributions now alias vi
            > to vim and all its wondrous wizardry. ``set compatible'' is
            > insufficient. I still get automated commenting when the silly
            > thing has decided that I must be editing a C file. Leave me
            > alone, please. I want it all turned off. I have been unable
            > to find a simple way to do that. Or even any way to do that,
            > because I have not found any way at all to turn off the
            > ``you must want this line prefixed with a double slash''
            > feature. Help! Suggestions, please? Thank you! - Bruce
            >

            alias vi='vim -u NONE'


            Best regards,
            Tony.
          • Bruce Korb
            ... $ type nvi ksh: type: nvi: not found Hi Mike, If distributions were to normally install it, that would be fine. Installing my own vi is way over the top
            Message 5 of 12 , Aug 31, 2006
            • 0 Attachment
              Michael Hernandez wrote:
              > you might try nvi?
              >
              > http://www.bostic.com/vi/
              >
              > Mike

              $ type nvi
              ksh: type: nvi: not found

              Hi Mike,

              If distributions were to normally install it, that would be fine.
              Installing my own vi is way over the top for what my needs ought
              to require. Surely getting vim to act like a plain text editor
              cannot be _that_ hard!!!

              Thanks - Bruce
            • Bruce Korb
              ... alias vi= vim -u NONE OK. That works. Can t that be done with something a little more obvious in ~/.vimrc ?? So, I ll burn that in my brain and not be
              Message 6 of 12 , Aug 31, 2006
              • 0 Attachment
                Diwaker Gupta wrote:
                > And 'vim -u NONE' doesn't work for you?

                alias vi='vim -u NONE'

                OK. That works. Can't that be done with something a little more
                obvious in ~/.vimrc ?? So, I'll burn that in my brain and not be
                bothered anymore. Thank you all. Bruce
              • A.J.Mechelynck
                ... Something a little more obvious in vimrc will prevent neither setting nocompatible (which Vim does as soon as it finds a .vimrc or _vimrc) nor running
                Message 7 of 12 , Aug 31, 2006
                • 0 Attachment
                  Bruce Korb wrote:
                  > Diwaker Gupta wrote:
                  >> And 'vim -u NONE' doesn't work for you?
                  >
                  > alias vi='vim -u NONE'
                  >
                  > OK. That works. Can't that be done with something a little more
                  > obvious in ~/.vimrc ?? So, I'll burn that in my brain and not be
                  > bothered anymore. Thank you all. Bruce
                  >

                  "Something a little more obvious in vimrc" will prevent neither setting
                  'nocompatible' (which Vim does as soon as it finds a .vimrc or _vimrc)
                  nor running the global plugins. "vim -u NONE" is really what makes it
                  look most like a "bare-bones" vi (sets 'compatible', doesn't read the
                  vimrc, doesn't source any plugins, and, because of the program-name
                  "vim", not "gvim", doesn't start the GUI even if enabled).

                  Side-effect: if you have a ~/.exrc (old-style vi startup script) it
                  won't be read either.

                  Of course, this is still Vim: if you use any valid Vim commands unknown
                  to vi, they will be executed, not give an error.


                  Best regards,
                  Tony.
                • Tim Chase
                  ... [tongue in cheek] There s always ed ... -more ubiquitous in its presence -consistent in its behavior -powerful -tools like diff interoperate with it -it
                  Message 8 of 12 , Aug 31, 2006
                  • 0 Attachment
                    > If distributions were to normally install it, that would be
                    > fine. Installing my own vi is way over the top for what my
                    > needs ought to require. Surely getting vim to act like a
                    > plain text editor cannot be _that_ hard!!!

                    [tongue in cheek]

                    There's always "ed"...

                    -more ubiquitous in its presence
                    -consistent in its behavior
                    -powerful
                    -tools like "diff" interoperate with it
                    -it can be used on a slow TTY
                    -can be used on with a one-line display
                    -smaller executable size
                    -easier to remember: "*ed*itor", not "*vi*sual editor"
                    -no time or machine cycles wasted on screen refreshes
                    -historically significant

                    so many other bountiful blessings to using ed. ;)

                    Granted, I haven't come across an "ed users mailing list", let
                    alone one as helpful as this list.

                    Hmmm...I wonder how hard it would be to add syntax highlighting
                    to ed... ;)

                    -tim
                  • Alan G Isaac
                    ... For those missing the reference: http://www.gnu.org/fun/jokes/ed.msg.html Cheers, Alan Isaac
                    Message 9 of 12 , Aug 31, 2006
                    • 0 Attachment
                      On Thu, 31 Aug 2006, Tim Chase apparently wrote:
                      > There's always "ed"...
                      > -more ubiquitous in its presence
                      > -consistent in its behavior
                      > -powerful
                      > -tools like "diff" interoperate with it
                      > -it can be used on a slow TTY
                      > -can be used on with a one-line display
                      > -smaller executable size
                      > -easier to remember: "*ed*itor", not "*vi*sual editor"
                      > -no time or machine cycles wasted on screen refreshes
                      > -historically significant
                      > so many other bountiful blessings to using ed. ;)

                      For those missing the reference:
                      http://www.gnu.org/fun/jokes/ed.msg.html

                      Cheers,
                      Alan Isaac
                    • Gary Johnson
                      ... I was just looking through :help starting.txt and it seems to me that putting set all& set compatible set noloadplugins filetype off at the very start of
                      Message 10 of 12 , Aug 31, 2006
                      • 0 Attachment
                        On 2006-08-31, Bruce Korb <bruce.korb@...> wrote:
                        > Diwaker Gupta wrote:
                        > > And 'vim -u NONE' doesn't work for you?
                        >
                        > alias vi='vim -u NONE'
                        >
                        > OK. That works. Can't that be done with something a little more
                        > obvious in ~/.vimrc ?? So, I'll burn that in my brain and not be
                        > bothered anymore. Thank you all. Bruce

                        I was just looking through ":help starting.txt" and it seems to me
                        that putting

                        set all&
                        set compatible
                        set noloadplugins
                        filetype off

                        at the very start of your ~/.vimrc or ~/.exrc ought to give you as
                        basic a vi as you can get from vim, even if a system vimrc has
                        already been sourced.

                        I'm not sure about the proper ordering of those first two, or if it
                        makes a difference.

                        HTH,
                        Gary

                        --
                        Gary Johnson | Agilent Technologies
                        garyjohn@... | Wireless Division
                        | Spokane, Washington, USA
                      • Matthew Winn
                        On Thu, 31 Aug 2006 14:49:32 -0500, Tim Chase ... The wonderful thing about ed is that it encourages you to learn about the power of
                        Message 11 of 12 , Sep 1, 2006
                        • 0 Attachment
                          On Thu, 31 Aug 2006 14:49:32 -0500, Tim Chase <vim@...>
                          wrote:

                          > There's always "ed"...
                          >
                          > -more ubiquitous in its presence
                          > -consistent in its behavior
                          > -powerful
                          > -tools like "diff" interoperate with it
                          > -it can be used on a slow TTY
                          > -can be used on with a one-line display
                          > -smaller executable size
                          > -easier to remember: "*ed*itor", not "*vi*sual editor"
                          > -no time or machine cycles wasted on screen refreshes
                          > -historically significant
                          >
                          > so many other bountiful blessings to using ed. ;)
                          >
                          > Granted, I haven't come across an "ed users mailing list", let
                          > alone one as helpful as this list.
                          >
                          > Hmmm...I wonder how hard it would be to add syntax highlighting
                          > to ed... ;)

                          The wonderful thing about ed is that it encourages you to learn about
                          the power of regular expressions really, _really_ quickly, mainly
                          because there's no other way to make changes within a line.

                          In the late 1980s I used the Georgia Tech screen editor, which was a
                          sort of visual ed. You entered commands just like ed, but the top
                          of the screen was used to display twenty or so lines of your buffer
                          around the area you were editing. Each displayed line had a capital
                          letter associated with it and you could use this letter as a line
                          address instead of the line's number. An example of its display taken
                          from the manual:

                          A |
                          B |#include <stdio.h>
                          C |
                          D *| register int i;
                          E |
                          . -> | for (i = 1; i <= 12; i++)
                          G | putc ('\n', stderr);
                          $ |
                          cmd> |_
                          11:39 myfile ...............................

                          You can still get it, if you want to remember the good old days:
                          http://hpux.cs.utah.edu/hppd/hpux/Editors/se-1.3/

                          --
                          Matthew Winn
                        • Yakov Lerner
                          ... Yakov
                          Message 12 of 12 , Sep 1, 2006
                          • 0 Attachment
                            On 8/31/06, Bruce Korb <bruce.korb@...> wrote:
                            > Hi,
                            >
                            > I'd like to use a plain text editor.
                            > I don't want any surprises.
                            > I don't want it to think it understands language syntax.
                            > I don't want it to colorize things.
                            > I don't want it to do anything at all for me, unless I explicitly
                            > say it is okay for it to do so.
                            >
                            > In short, I want vi. Except Linux distributions now alias vi
                            > to vim and all its wondrous wizardry. ``set compatible'' is
                            > insufficient. I still get automated commenting when the silly
                            > thing has decided that I must be editing a C file. Leave me
                            > alone, please. I want it all turned off. I have been unable
                            > to find a simple way to do that.

                            :set paste

                            Yakov
                          Your message has been successfully submitted and would be delivered to recipients shortly.