Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
A weird problem here.
I think I've caused it myself by incorrectly forming a regular expression when I was searching for a string in a script file using VIM (although I can't recall at what occassion and what exactly I wrote). However, what I basically have here now is that all 'l' letters (NOT capital L though!) are marked / highlighted with yellow background. This occurs in every new VIM session as well, like I "told" VIM to do this as default. As soon as I type 'l' in VIM - it's highligted, simple as that! Any easy way to remove this? Perhaps a command that resets all VIM stuff to default?
didn't remove highligted 'l's. They are still highlighted when entered in insert mode (or already present in an old file).
I'm not finding anything that logically could be causing my problem in synload.vim either. Also, I'm pretty sure I was using my own account, not root, when this occured. Here's the listing of synload.vim.
" let others know that syntax has been switched on
let syntax_on = 1
" Set the default highlighting colors. Use a color scheme if specified.
exe "colors " . colors_name
" Line continuation is used here, remove 'C' from 'cpoptions'
let s:cpo_save = &cpo
" First remove all old syntax autocommands.
au Syntax * call s:SynSet()
" clear syntax for :set syntax=OFF and any syntax name that doesn't exist
let s = expand("<amatch>")
if s == "ON"
" :set syntax=ON
if &filetype == ""
echo "filetype unknown"
let s = &filetype
if s != ""
" Load the syntax file(s). When there are several, separated by dots,
" load each in sequence.
for name in split(s, '\.')
exe "runtime! syntax/" . name . ".vim syntax/" . name . "/*.vim"
" Handle adding doxygen to other languages (C, C++, IDL)
au Syntax cpp,c,idl
\ if (exists('b:load_doxygen_syntax') && b:load_doxygen_syntax)
\ || (exists('g:load_doxygen_syntax') && g:load_doxygen_syntax)
\ | runtime! syntax/doxygen.vim
\ | endif
" Source the user-specified syntax highlighting file
if exists("mysyntaxfile") && filereadable(expand(mysyntaxfile))
execute "source " . mysyntaxfile
" Restore 'cpoptions'
let &cpo = s:cpo_save
...but apparently, this command only works in a current session. As soon as I close VIM and start a new one, the 'l' highlight is again activated. Any way to place this permanently (I'm really getting frustrated!)?
Tinkster....or turn off syntax search colour searching in vimrc
" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
set hlsearch>>>>>>>>>>>>>>>>>>>>remove line
again assuming OP only using vimrc from /usr/share area
Try a search within vim for a character that doesn't exist in
the file edited. ;}
My recollection is that vim remembers the last thing searched
for and will highlight it in a new file. And no, I don't know how
to change that default behaviour - it never bothered me.
Thanks this solved it for me
As a vim noob I starting typing text while not in insert mode. It was highlighting every lowercase "p" in the file. I just typed /blahblahblah[ENTER] and now the highlighting is gone.