请问vim中用"/"查找后,如何把棕色高亮背景去掉?
2012-02-03 16:00
281 查看
http://www.linuxsir.org/bbs/thread298607.html
在vim中用"/"查找后,如何把棕色高亮背景去掉?
比如我查找"printf",使用"/printf", 然后文件中的"printf"都以棕色背景高亮显示出来, 但下次打开该文件, 发现"printf"仍被高亮显示, 这样很不舒服.
请问如何将高亮背景去掉?
回答:
1.
VimTip 93: if
you use 'highlight search' feature, map a key to :nohhttp://vim.sourceforge.net/tip_view.php?tip_id=It is very convenient to use 'hlsearch' option. However it can be annoying to have the highlight stick longer than you want it. In order to run it off you have
to type at least 4 keystrokes, ":noh". So, it's a good idea to map this to a key. I like to map it to control-n. This is the line I use in my .vimrc file to do it:nmap <silent> <C-N> :silent noh<CR>
2.
:nohlsearch
在vim中用"/"查找后,如何把棕色高亮背景去掉?
比如我查找"printf",使用"/printf", 然后文件中的"printf"都以棕色背景高亮显示出来, 但下次打开该文件, 发现"printf"仍被高亮显示, 这样很不舒服.
请问如何将高亮背景去掉?
回答:
1.
VimTip 93: if
you use 'highlight search' feature, map a key to :nohhttp://vim.sourceforge.net/tip_view.php?tip_id=It is very convenient to use 'hlsearch' option. However it can be annoying to have the highlight stick longer than you want it. In order to run it off you have
to type at least 4 keystrokes, ":noh". So, it's a good idea to map this to a key. I like to map it to control-n. This is the line I use in my .vimrc file to do it:nmap <silent> <C-N> :silent noh<CR>
2.
:nohlsearch
相关文章推荐
- 界面上始终有一个浮动的小图标“C",请问如何去掉?
- vb中如何去掉TextBox回车时"滴"的声音~~
- 如何使用vim查找字符,及设置查找字符高亮和取消查找字符高亮
- 用SQLServer2005还原数据库的时候出错,提示错误信息"C:/Program Files/Microsoft SQL Server/MSSQL.1/MSSQL/Data/db.mdf的目录查找失败..."。这样的错误偶尔会遇到,请问是怎么回事,该怎
- C#中如何去掉字符串结束符"\0"
- python按行读取文件,如何去掉换行符"\n"
- 如何去掉PPT中“无忧PPT整理发布"的文字
- 如何去掉IE7启动时的"自定义您的设置"
- 第一次XP 共享访问,我点了"记住密码",请问如何取消?
- C#中如何去掉字符串结束符"/0"
- IE10打开网页后,自动设置浏览器模式为“IE10兼容性视图”,我添加了 <meta http-equiv="X-UA-Compatible" content="IE=8">只修改了文档模式,请问如何
- 如何查找带母版页的控件 Master.Master.FindControl("")
- python按行读取文件,如何去掉换行符"\n"
- VIM笔记--搜索文本时忽略大小写&高亮显示查找文本
- GB/T 10361-1989 如何取去掉中间的"/T",即得到 GB 10361-1989
- VIM笔记--搜索文本时忽略大小写&高亮显示查找文本
- android 跳转Intent (第三方应用) & 去掉标题栏 &可见性&透明背景
- fatal error C1010: 在查找预编译头时遇到意外的文件结尾。是否忘记了向源中添加“#include "stdafx.h
- Shell 输出字体颜色与背景颜色格式: echo -e "\033[字背景颜色;字体颜色m字符串\033[0m"
- C++程序员如何向一个java工程师解释extern "C"的作用