codesearch_selector.vim


Ⅰ. 插件描述

Ⅱ. 基本信息

创建日期:  2017-03-26
使用用户:  1
Github星:  1
插件作者:  Mitchell Gouzenko

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'mgouzenko/codesearch-selector-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'mgouzenko/codesearch-selector-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'mgouzenko/codesearch-selector-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/mgouzenko/codesearch_selector.vim

Ⅳ. 文档说明

# The Problem
A common problem I have stems from the fact that I use YCM and cscope. YCM
tends to work well, but not on the Linux source tree, which uses gcc. The gnu
language extensions appear to mess up libclang when it comes to figuring out
the type that a macro will expand to, and YCM uses libclang to analyze c-family

  1. Long story short, YCM's GoTo doesn't always work, so sometimes I'm
  2. to use cscope for code search instead.

The Solution

Most of the time, my ENTER key is bound to invoke YcmCompleter GoTo. But when I
have built a cscope database named 'cscope.out', it's because I want to use
cscope for the project instead. This plugin searches upwards from the currently
open file's cwd, looking for a file by the name of 'cscope.out'. If it finds
such a file, it will map the ENTER key (locally) to perform a cscope lookup. If
a cscope database is NOT found, the plugin maps the enter key to YcmCompleter
Goto.

Prerequisites

  • valloric/YouCompleteMe
  • vim-scripts/cscope.vim

添加新评论