1

I am wondering why vim highlights "man" pattern.

When I do a word search with /, it disapears.

Here is my vimrc file:

" Disable default bottomline
set noruler
set noshowcmd
set noshowmode

" no swp file
set noswapfile

" Plugins
call plug#begin('~/.vim/plugged')

Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-vinegar'
Plug 'itchyny/lightline.vim'
Plug 'sainnhe/sonokai'
Plug 'tpope/vim-dispatch'

call plug#end()
" Turn on syntax highlighting
" syntax on

" Show line numbers
set number

" Encoding
set encoding=utf-8

" Setup lightline
set laststatus=2
set statusline=helloworld
let g:lightline = {
      \ 'colorscheme': 'wombat',
      \ 'active': {
      \   'left': [ [ 'mode', 'paste' ],
      \             [ 'gitbranch', 'readonly', 'filename', 'modified' ] ]
      \ },
      \ 'component_function': {
      \   'gitbranch': 'FugitiveHead'
      \ },
      \ }

" Color sheme setup
if has('termguicolors')
  set termguicolors
endif
" The configuration options should be placed before `colorscheme sonokai`.
let g:sonokai_style = 'andromeda'
let g:sonokai_enable_italic = 1
let g:sonokai_disable_italic_comment = 1
colorscheme sonokai

" python syntax setup
au BufNewFile,BufRead *.py
    \ set tabstop=4 |
    \ set softtabstop=4 |
    \ set shiftwidth=4 |
    \ set textwidth=79 |
    \ set expandtab |
    \ set autoindent |
    \ set fileformat=unix |
0
0

After investigation, my misatke was to type "#" in normal mode. I wanted to comment a row but I started a word search instead (with # or *)

running :noh just stop highlighting the searched word.

2
  • 1
    Welcome on the vim se! It might be a solution, but such short answers are often deleted. I suggest to write (or, at least try to explain) the reasons, why would it work and how. – peterh Oct 4 '20 at 20:41
  • 1
    Thanks, please see my update – blondelg Oct 5 '20 at 16:22

Not the answer you're looking for? Browse other questions tagged or ask your own question.