• How to disable colors in vi (vim) editor on Linux (or WSL)?

    From James@21:1/5 to All on Tue Feb 15 12:13:02 2022
    All I want is white on dark background or vise versa.

    Thanks
    James

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From James@21:1/5 to Keith Thompson on Tue Feb 15 12:48:43 2022
    On Tuesday, February 15, 2022 at 12:30:56 PM UTC-8, Keith Thompson wrote:
    James writes:
    All I want is white on dark background or vise versa.
    Try ":syntax off".

    --
    Keith Thompson (The_Other_Keith) Keith.S.T...@gmail.com
    Working, but not speaking, for Philips
    void Void(void) { Void(); } /* The recursive call of the void */

    Thanks, it worked. Also added in ~/.vimrc

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Eli the Bearded@21:1/5 to Keith.S.Thompson+u@gmail.com on Tue Feb 15 21:00:21 2022
    In comp.unix.shell, Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
    James <hslee911@yahoo.com> writes:
    All I want is white on dark background or vise versa.
    Try ":syntax off".

    That turns off syntax highlighting, but colors can still slip through
    (I think search highlighting, for example).

    I use ":set t_Co=0" to tell vim the terminal supports zero colors, then
    it doesn't ever try to use them. If enabled, syntax highlighting falls
    back to things like bold text.

    Elijah
    ------
    but usually disables syntax highlighting, too

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Keith Thompson@21:1/5 to James on Tue Feb 15 12:30:49 2022
    James <hslee911@yahoo.com> writes:
    All I want is white on dark background or vise versa.

    Try ":syntax off".

    --
    Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
    Working, but not speaking, for Philips
    void Void(void) { Void(); } /* The recursive call of the void */

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kenny McCormack@21:1/5 to *@eli.users.panix.com on Tue Feb 15 22:08:25 2022
    In article <eli$2202151600@qaz.wtf>,
    Eli the Bearded <*@eli.users.panix.com> wrote:
    ...
    I use ":set t_Co=0" to tell vim the terminal supports zero colors, then
    it doesn't ever try to use them. If enabled, syntax highlighting falls
    back to things like bold text.

    That's really neat! I've long been frustrated by the fact that syntax highlighting looks like junk on the default terminal setup on the RPi.

    I really like syntax highlighting, so I don't want to turn it off, and I usually use GVIM, wherein the colors are handled right and it is very
    pretty, but in the terminal, it is junk.

    I note, incidentally, that you can't put this in a modeline (it complains),
    but you can do:

    $ vim -c 'set t_Co=0' file

    and it works nicely.

    --
    Modern Conservative: Someone who can take time out from flashing her wedding ring around and bragging about her honeymoon to complain that a
    fellow secretary who keeps a picture of her girlfriend on her desk is "flauting her sexuality" and "forcing her lifestyle down our throats".

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Keith Thompson@21:1/5 to Eli the Bearded on Tue Feb 15 15:52:34 2022
    Eli the Bearded <*@eli.users.panix.com> writes:
    In comp.unix.shell, Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
    James <hslee911@yahoo.com> writes:
    All I want is white on dark background or vise versa.
    Try ":syntax off".

    That turns off syntax highlighting, but colors can still slip through
    (I think search highlighting, for example).

    I use ":set t_Co=0" to tell vim the terminal supports zero colors, then
    it doesn't ever try to use them. If enabled, syntax highlighting falls
    back to things like bold text.

    ":help termcap-options" for more information.

    --
    Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
    Working, but not speaking, for Philips
    void Void(void) { Void(); } /* The recursive call of the void */

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ottavio Caruso@21:1/5 to All on Wed Feb 16 07:58:29 2022
    Le 15/02/22 à 20:13, James a écrit :
    All I want is white on dark background or vise versa.

    Thanks
    James


    I don't know if it's only me, but if I save the file as .txt, the syntax highlighting is off.

    --
    Ottavio Caruso

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Spiros Bousbouras@21:1/5 to James on Wed Feb 16 17:00:37 2022
    On Tue, 15 Feb 2022 12:13:02 -0800 (PST)
    James <hslee911@yahoo.com> wrote:
    All I want is white on dark background or vise versa.

    For future reference , comp.editors is more appropriate for this kind
    of question.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Javier@21:1/5 to James on Fri Mar 11 19:40:47 2022
    James <hslee911@yahoo.com> wrote:
    All I want is white on dark background or vise versa.

    Just make vi (or any other program) believe that you are working in an
    old monochrome terminal.

    TERM=vt220 vi

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Janis Papanagnou@21:1/5 to Javier on Sat Mar 12 06:02:14 2022
    On 12.03.2022 02:40, Javier wrote:
    James <hslee911@yahoo.com> wrote:
    All I want is white on dark background or vise versa.

    Just make vi (or any other program) believe that you are working in an
    old monochrome terminal.

    TERM=vt220 vi

    I recall from former times that a generic term (pun not intended) for
    the terminal identifier was 'dumb' (TERM=dumb vi). I just tried and
    noticed that it works but (e.g.) using the arrow keys for navigation
    would not be possible any more (as opposed to using vt100 or similar),
    so you'd have to use HJKL. - Are there such side effects for mimicking
    any VT terminal? - If so, the syntax-deactivation would be preferable.

    Janis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Javier@21:1/5 to Janis Papanagnou on Sat Mar 12 03:58:09 2022
    Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
    On 12.03.2022 02:40, Javier wrote:
    James <hslee911@yahoo.com> wrote:
    All I want is white on dark background or vise versa.

    Just make vi (or any other program) believe that you are working in an
    old monochrome terminal.

    TERM=vt220 vi

    I recall from former times that a generic term (pun not intended) for
    the terminal identifier was 'dumb' (TERM=dumb vi). I just tried and
    noticed that it works but (e.g.) using the arrow keys for navigation
    would not be possible any more (as opposed to using vt100 or similar),
    so you'd have to use HJKL. - Are there such side effects for mimicking
    any VT terminal? - If so, the syntax-deactivation would be preferable.

    With TERM=vt220 all keys should be working. With something older
    like 'TERM=vt100 vi' you would be missing 'Page Up/Page Down' keys.

    That's why I used TERM=vt220 in my former message, as it is more modern
    (from year 1990) and had more features than vt100 (like Page Up/Page Down).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Christian Weisgerber@21:1/5 to Janis Papanagnou on Sat Mar 12 20:54:32 2022
    On 2022-03-12, Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:

    TERM=vt220 vi

    I recall from former times that a generic term (pun not intended) for
    the terminal identifier was 'dumb' (TERM=dumb vi). I just tried and
    noticed that it works but (e.g.) using the arrow keys for navigation
    would not be possible any more (as opposed to using vt100 or similar),

    Traditionally, a "dumb" terminal has the features of a teletype or
    such:

    $ TERM=dumb infocmp
    # Reconstructed via infocmp from file: /usr/share/terminfo/d/dumb dumb|80-column dumb tty,
    am,
    cols#80,
    bel=^G, cr=^M, cud1=^J, ind=^J,

    In particular, it does not support arbitrary cursor positioning.
    vi(1) is not usable with it, although ex(1) is.

    so you'd have to use HJKL. - Are there such side effects for mimicking
    any VT terminal? - If so, the syntax-deactivation would be preferable.

    It's not what you had in mind, but there were VT terminals before
    the VT100. The control sequences of the VT52 are not compatible
    with the VT100 et seq.

    --
    Christian "naddy" Weisgerber naddy@mips.inka.de

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Chris Elvidge@21:1/5 to James on Sun Mar 13 11:46:24 2022
    On 15/02/2022 20:13, James wrote:
    All I want is white on dark background or vise versa.

    Thanks
    James


    Put 'syntax off' at the end of your .vimrc file.

    --
    Chris Elvidge
    England

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)