GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — note/note/vim/27.md at master · trialbox/note

Expand file tree

/

27.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
16 lines (13 loc) · 764 Bytes
/

27.md

Copy path

File metadata and controls

16 lines (13 loc) · 764 Bytes
Raw
Copy raw file
Download raw file
Edit and raw actions

每日一Vim(27)高亮所有搜索模式匹配

* 向后搜索光标所在位置的单词
# 向前搜索光标所在位置的单词
n和N可以继续向后或向前搜索匹配的字符串

:set hlsearch 高亮所有匹配字符串
:nohlsearch 临时关闭,他的缩写形式是::noh
:set nohlsearch 彻底关闭,只有重新:set hlsearch才可以高亮搜索

:nnormap <silent> <Space> :nohlsearch<Bar>:echo<CR>按空格关闭高亮,清空所有已经显示的
如果你想在高亮与不高亮之间快速切换,可以做一个映射 : :noremap <F4> :set hlsearch! hlsearch?<CR>
按回车,临时返回高亮搜索
:nnoremap <CR> :nohlsearch<CR><CR>

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.