Set the command in .vimrc.
Use the following commands:
- Open
~/.vimrc
file (or create it if it didn’t exist). - Add
set hlsearch
in the file. - Save the file.
Now your search will always be highlighted in vim.
For single time use, just use :set hlsearch
in vim, which will be in effect for that instance only.
Related Contents:
- How do I move to end of line in Vim?
- How to make vim paste from (and copy to) system’s clipboard?
- How to move screen without moving cursor in Vim?
- To switch from vertical split to horizontal split fast in Vim
- How do I run a terminal inside of Vim?
- vim line numbers – how to have them on by default?
- Autocompletion in Vim
- How do I make Vim do normal (Bash-like) tab completion for file names?
- vim – How to delete a large block of text without counting the lines?
- How to filter out files by extension in NERDTree?
- Display name of the current file in vim?
- How to prevent vim from creating (and leaving) temporary files?
- Favorite (G)Vim plugins/scripts? [closed]
- How to set default vim colorscheme
- Is there a “vim runtime log”?
- vim repeat find next character ‘x’
- How to delete multiple buffers in Vim?
- Vim users, where do you rest your right hand? [closed]
- In Vim, is there a way to paste text in the search line?
- Open URL under cursor in Vim with browser
- Becoming better at Vim [closed]
- Refactoring in Vim
- What is the difference between location list and quickfix list in vim
- Is there a command in Vim/Vi to move the cursor to the end of a search highlight?
- Vim: execute current file?
- vi/vim editor, copy a block (not usual action)
- Use sudo with .vimrc
- VS code VIM extension copy and paste
- How to set the default to unfolded when you open a file?
- easier way to navigate between vim split panes
- Execute commands in vim
- Is there vim plugin for notepad++? [closed]
- How to ‘tab backwards’ (remove a tab or tab spaces) in Vim?
- How to clear vim registers effectively?
- How does Vim’s autoread work?
- VimScript or VimL?
- How to get rid of search highlight in Vim
- Highlight variable under cursor in Vim like in NetBeans
- Delete n lines in the up direction in vim
- Vim: how do I clear all marks?
- In my .vimrc, how can I check for the existence of a color scheme?
- Vim with Powershell
- How can I view git diff for any commit using vim-fugitive?
- Get ctags in vim to go to definition, not declaration
- Good guide on VIM Scripting? [closed]
- Find character under cursor in vim
- Vim – delete up to searched string
- Shortcut to make all split screens have the same width?
- Pathogen does not load plugins
- Automatically scroll screen in vim when near top/bottom?