Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Reapplying syntax highlighting in vim Post 302913068 by treesloth on Wednesday 13th of August 2014 03:04:17 PM
Old 08-13-2014
Reapplying syntax highlighting in vim

I had a bash script (ma_report.sh) that I was editing when my VPN connection died. So, when I reconnected, I recovered my changes and reopened the file. Everything looks fine except that there is no longer any syntax highlighting. Using ':syntax on' does not work. Other bash scripts in vim do have proper highlighting. I copied ma_report.sh to another file and opened that file. It has highlighting. I deleted ma_report.sh and copied that new file back to it. It has no highlighting. I deleted and moved the new file to ma_billing_report.sh. Again, no highlighting. I made a backup, deleted ma_billing_report.sh, and then made a new one and filled in some new content. Still no highlighting.

So, in short, anything with the name ma_billing_report.sh gets no highlighting. It appears that vim remembers the file and for some reason has marked it as having no highlighting. What gives? How can I get vim to forget what it thinks it knows about this file's highlighting properties and do what it's supposed to? Thanks.
 

8 More Discussions You Might Find Interesting

1. OS X (Apple)

vim and syntax max os

Hi how to color syntax in terminal in OS X ? I wrote in .vimrc: if &t_Co > 2 || has("gui_running") syntax on set hlsearch endif syntax on and no results. Best regards (1 Reply)
Discussion started by: kezzol
1 Replies

2. UNIX for Dummies Questions & Answers

Emacs color syntax highlighting

So... i cant get it to work. I had already posted this but it got deleted. Details: Im running SSH shell on Windows XP, connecting to a server whose term is vt100 (someone asked me that last time) Im trying to get the syntax highlighting in cc mode to work in color, but its black and... (0 Replies)
Discussion started by: viejid
0 Replies

3. Programming

Vim highlighting annoyance

I was using vim about an hour ago doing abit of python (i only just started using vim). And I think i typed something wrong, and all of a sudden the letter i is always highlighted. Turning syntax off and on didn't work. and i couldent find the solution online. Thanks in advanced. (1 Reply)
Discussion started by: vimhelp
1 Replies

4. UNIX and Linux Applications

gedit/gtksourceview: Updating types for syntax highlighting?

I wrote a new .lang file for syntax highlighting a language I use frequently. It works fine, except that it doesn't glob onto the files automatically. Is there a utility I need to run to update a gtksourceview database? Here's the relevant portion of the code. <language id="pari"... (0 Replies)
Discussion started by: CRGreathouse
0 Replies

5. Shell Programming and Scripting

How to stop Vim from highlighting lines 73+

I am slowly developing my .vimrc and would like to know how to turn off the highlighting (black text on orange background) which starts at line 73. This doesn't seem to be controlled by any selected/customized colorscheme. I do CFD, and some older codes I use are written in F77, for which this... (2 Replies)
Discussion started by: drbones
2 Replies

6. Shell Programming and Scripting

Help with update vim file-syntax relationship?

There are some ksh files named as "*.lib" in my system. When I open them in VIM, vim syntax can't parse it correctly. Is there a way that I can relate the *.lib with KSH syntax in VIM? Due to access limitation, i can only update the files under my home directory and can't modify the VIM... (6 Replies)
Discussion started by: sleepy_11
6 Replies

7. AIX

[Vim] Question about syntax highlighting

Hi all, my sysadmin installed Vim packages (vim-enhanced-6.3-1 & vim-common-6.3-1) on an Aix system (7.1.0.0). I log in using Putty (vs 0.54) and got an annoying underline issue. All strings and var names are underlined as you can see on the attached file Is it possible to get rid of that... (4 Replies)
Discussion started by: Fundix
4 Replies

8. What is on Your Mind?

New Code Tags (Syntax Highlighting)

Hey, Just added a new UserCP option so you can change the code tags to look like the code tags in this example (turn this on and off): Note: I set the default to "SyntaxHighlighting" for debugging purposes. We can change the default back to the original code tags later. ... (36 Replies)
Discussion started by: Neo
36 Replies
attroff(3cur)															     attroff(3cur)

Name
       attroff, attron, attrset, standend, standout, wstandend, wstandout, wattroff, wattron, wattrset - attribute manipulation

Syntax
       #include <cursesX.h>

       int attroff(attrs)
       int attrs;

       int wattroff(win, attrs)
       WINDOW *win;
       int attrs;

       int attron(attrs)
       int attrs;

       int wattron(win, attrs)
       WINDOW *win;
       int attrs;

       int attrset(attrs)
       int attrs;

       int wattrset(win, attrs)
       WINDOW *win;
       int attrs;

       int standend()

       wstandend(win)
       WINDOW *win;

       int standout()

       int wstandout(win)
       WINDOW *win;

Description
       These routines manipulate the current attributes of a window.

       The routine turns off the named attributes (of the default window without turning any other attributes on or off.

       The routine turns on the named attributes of the default window without affecting any other attributes.

       The  routine  sets  the	current attributes of the default window to the named attributes which is of the type and is defined in the header
       file.

       The routine switches on the best highlighting mode available on the terminal for the default window and it is functionally the same as

       The routine switches off all highlighting associated with the default window.  It is functionally the same as in  that  it  turns  off  all
       attributes.

       The routine switches off the named attributes, for the specified window.  Other attributes are not changed.

       The routine turns on the named attributes of the specified window without affecting any others.

       The routine sets the current attributes of the specified window to

       The routine switches on the best highlighting mode available on the terminal for the specified window.  Functionally it is the same as

       The  routine  switches off all highlighting associated with the specified window.  Functionally it is the same as that is, it turns off all
       attributes.

Attributes
       Attributes can be any combination of A_STANDOUT, A_REVERSE, A_BOLD, A_DIM, A_BLINK and A_UNDERLINE.  These constants  are  defined  in  the
       header  file.   They are also described in the Guide to X/Open Curses Screen-Handling.  (R)Attributes can be combined with the C language |
       operator.

       The current attributes of a window are applied to all characters that are written into the window with or Attributes are properties of  the
       character,  and	move with the character through any scrolling and insert/delete line/character operations.  Within the restrictions set by
       the terminal hardware they will be displayed as the graphic rendition of characters put on the screen.

       The routines and are macros.

Return Values
       The and functions return OK on success and ERR on error.

See Also
       addch(3cur)
       Guide to X/Open Curses Screen-Handling

																     attroff(3cur)
All times are GMT -4. The time now is 07:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy