All Projects → brookhong → Cscope.vim

brookhong / Cscope.vim

A vim plugin to help you to create/update cscope database and connect to existing proper database automatically.

Labels

Projects that are alternatives of or similar to Cscope.vim

Argtextobj.vim
Text-object like motion for arguments
Stars: ✭ 103 (-10.43%)
Mutual labels:  viml
Vim G
Quick Google lookup directly from Vim
Stars: ✭ 107 (-6.96%)
Mutual labels:  viml
Vim Plug
我的vim插件, 基于vim-plug安装
Stars: ✭ 113 (-1.74%)
Mutual labels:  viml
Securemodelines
A secure alternative to Vim modelines
Stars: ✭ 104 (-9.57%)
Mutual labels:  viml
Seti.vim
Stars: ✭ 107 (-6.96%)
Mutual labels:  viml
Vim Redl
A better Vim integration story for Clojure
Stars: ✭ 108 (-6.09%)
Mutual labels:  viml
Vim Luna
Touchdown on Lunar Surface ! :)
Stars: ✭ 102 (-11.3%)
Mutual labels:  viml
Vim Multicursor
Allows Vim to use multiple cursors simultaneously
Stars: ✭ 114 (-0.87%)
Mutual labels:  viml
Vim Colorscheme Switcher
Makes it easy to quickly switch between color schemes in Vim
Stars: ✭ 107 (-6.96%)
Mutual labels:  viml
Vim Notes
Easy note taking in Vim
Stars: ✭ 1,518 (+1220%)
Mutual labels:  viml
Hermes
An environment for Ruby and JS developers in Darwin
Stars: ✭ 105 (-8.7%)
Mutual labels:  viml
Bufexplorer.zip
Buffer Explorer / Browser
Stars: ✭ 106 (-7.83%)
Mutual labels:  viml
Vim Pydjango
Ultimate VIM for Python & Django development.
Stars: ✭ 109 (-5.22%)
Mutual labels:  viml
Vim Slack
Slack for Vim client
Stars: ✭ 104 (-9.57%)
Mutual labels:  viml
Vim Swift
Swift filetype plugin for Vim
Stars: ✭ 113 (-1.74%)
Mutual labels:  viml
Tasklist.vim
Eclipse like task list
Stars: ✭ 102 (-11.3%)
Mutual labels:  viml
Vim Visualstar
star for Visual-mode.
Stars: ✭ 106 (-7.83%)
Mutual labels:  viml
Ember.vim
Vim plugin for the Emberjs frontend framework
Stars: ✭ 115 (+0%)
Mutual labels:  viml
Flatlandia
Vim colorscheme based on flatland with Airline integration.
Stars: ✭ 113 (-1.74%)
Mutual labels:  viml
Apiblueprint.vim
This vim plugin brings syntax highlighting and linting for API Blueprint.
Stars: ✭ 112 (-2.61%)
Mutual labels:  viml

Introduction

Cscove(new name for this plugin, since cscope.vim is used too widely.) is a smart cscope helper for vim.

It will try to find a proper cscope database for current file, then connect to it. If there is no proper cscope database for current file, you are prompted to specify a folder with a string like --

Can not find proper cscope db, please input a path to create cscope db for.

Then the plugin will create cscope database for you, connect to it, and find what you want. The found result will be listed in a location list window. Next time when you open the same file or other file that the cscope database can be used for, the plugin will connect to the cscope database automatically. You need not take care of anything about cscope database.

When you have a file edited/added in those folders for which cscope databases have been created, cscove will automatically update the corresponding database.

Cscove frees you from creating/connecting/updating cscope database, let you focus on code browsing.

Example settings

The default key mappings has been removed from the plugin itself, since users may prefer different choices. So to use the plugin, you must define your own key mappings first.

Below is the minimum key mappings.

nnoremap <leader>fa :call CscopeFindInteractive(expand('<cword>'))<CR>
nnoremap <leader>l :call ToggleLocationList()<CR>

Some optional key mappings to search directly.

" s: Find this C symbol
nnoremap  <leader>fs :call CscopeFind('s', expand('<cword>'))<CR>
" g: Find this definition
nnoremap  <leader>fg :call CscopeFind('g', expand('<cword>'))<CR>
" d: Find functions called by this function
nnoremap  <leader>fd :call CscopeFind('d', expand('<cword>'))<CR>
" c: Find functions calling this function
nnoremap  <leader>fc :call CscopeFind('c', expand('<cword>'))<CR>
" t: Find this text string
nnoremap  <leader>ft :call CscopeFind('t', expand('<cword>'))<CR>
" e: Find this egrep pattern
nnoremap  <leader>fe :call CscopeFind('e', expand('<cword>'))<CR>
" f: Find this file
nnoremap  <leader>ff :call CscopeFind('f', expand('<cword>'))<CR>
" i: Find files #including this file
nnoremap  <leader>fi :call CscopeFind('i', expand('<cword>'))<CR>

Screencast

Please note that line number changes in location list after file saved. cscove.vim

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].