【发布时间】:2013-05-16 02:51:57
【问题描述】:
通常,当使用 vim 和 cscope 时,它会在底部的 quickfix 窗口中显示搜索结果。 在命令行输入 :cn 时,会跳转到包含关键字的行首。
有没有办法高亮关键词,同时把光标放在关键词下面会更好。
感谢您的帮助..
PS:在我看来,是否可以先跳转到该行,然后使用函数搜索关键字并突出显示,但是如何保留这些动作之间的关键字信息?
追加:现在,跟随功能
第一:全局保存关键字
第二:在quickfix窗口中显示cscope结果。
第 258 行总是失败。有没有人知道如何在 Cppsearch 函数中执行命令“cs find s”
252 "nmap <C-_>s :cs find s <C-R>=expand("<cword>")<CR><CR>
253 let g:winword = "hello"
254 map ch :call Cppsearch()<cr>
255 function! Cppsearch()
256 let wincursor = line(".")
257 let g:winword=expand("<cword>")
258 normal cs find s g:winword<cr>
259 "call setline(wincursor, "")
260 "call append(wincursor+1, g:winword)
261 endfunction
【问题讨论】:
标签: vim vim-plugin