/ctrlp-funky

a ctrlp.vim extension - Navigate and jump to function defs

Primary LanguageVim Script

ctrlp-funky

Very simple function nativator for ctrlp.vim.

SYNOPSIS

This is a ctrlp.vim extension. It simply navigates and jumps to function definitions from the current file without ctags. It just searches function definitions or equivalent lines using regular expressions, therefore some languages' abstraction aren't accurate because of hard to parse.

One of the advantages of this plugin is you needn't to generate tags file to jump to something definition line.

ctrlp-funky

Currently, following filetypes are supported:

  • c/cpp (C/C++)
  • chef
  • coffee-script
  • go
  • html/xhtml
  • java
  • javascript
  • jinja (template engine for Python)
  • lua
  • markdown
  • nerdtree
  • objc (Objective-C)
  • perl
  • php
  • python
  • ruby
  • sh (bash, dash and zsh)
  • yaml
  • vb (Visual Basic)
  • vim

PREMISE

First of all, I believe you're a user of a great Vim plugin called ctrlp.vim. Otherwise, you need to install it before start installing this plugin.

INSTALLATION

:BundleInstall tacahiroy/ctrlp-funky

In addition, don't forget put a line below into your .vimrc.

Bundle 'tacahiroy/ctrlp-funky'
$ cd ~/.vim/bundle
$ git clone git://github.com/tacahiroy/ctrlp-funky.git

Manually

If you don't use either plugin management systems, copy autoload and plugin directories to your .vim directory. On Windows, basically, vimfiles directory is used instead of .vim directory.

CONFIGURATION

You need to make the plugin available as a ctrlp.vim extension. Please add funky to a variable g:ctrlp_extensions.

let g:ctrlp_extensions = ['funky']

Reboot Vim and then you can use :CtrlPFunky command.

It might be useful key mappings like:

nnoremap <Leader>fu :CtrlPFunky<Cr>
" narrow the list down with a word under cursor
nnoremap <Leader>fU :execute 'CtrlPFunky ' . expand('<cword>')<Cr>

SYNTAX HIGHLIGHTING (experimental)

I'd like to introduce one of ctrlp-funky options. Do you want to make ctrlp-funky funkier? Okay - you can do it just 1 line config.

let g:ctrlp_funky_syntax_highlight = 1

funky-syntax

Note that this feature doesn't work perfectly, because ctrlp-funky just sets filetype to the funky buffer and the buffer contains '>' in the first column. In some filetypes, this sign has special meaning such as HTML tag, so it breaks syntax highlighting.

LINK

LICENSE

Copyright (C) 2012-2014 Takahiro Yoshihara. Distributed under the MIT License.