A super simple function navigator for ctrlp.vim.
This is an extension of ctrlp.vim. It simply navigates to a function definition from the current file without ctags. It just searches for function definitions or equivalent lines using regular expressions, therefore some languages' abstractions aren't accurate because of them being hard to parse.
One of advantages of this plugin is that no configuration is required in most cases, so it starts working right after installation with no ctags required. If you want to have a more accurate list of function definitions, you should use other ctags-based tools, etc.
Supported file types:
- cf (ColdFusion)
- cmm (TRACE32)
- cpp (C++)
- cs (C#)
- css (css, scss)
- go (Golang)
- Jenkinsfile (Jenkins pipeline script)
- jinja (template engine for Python)
- make (Makefile)
- moon (MoonScript)
- objc (Objective-C)
- plsql (PL/SQL)
- proto (Protocol Buffers)
- rmd (rmarkdown)
- ruby (ruby, rake, rspec and chef recipe)
- sh (bash, dash and zsh)
- tex (LaTeX)
- tf (terraform)
- vb (Visual Basic)
- vue (Vue.js)
First of all, I believe you have already installed a great Vim plugin, ctrlp.vim. Otherwise, you need to install ctrlp.vim before you start using this plugin.
It is recommended to install the plugin using your favourite plugin manager or use Vim's built-in package manager if you use Vim 8+.
Vim 8+ built-in package manager
mkdir -p ~/.vim/pack/plugins/start git clone --depth=1 https://github.com/tacahiroy/ctrlp-funky.git ~/.vim/pack/plugins/start/ctrlp-funky
If you do not use any plugin management system, simply copy autoload and plugin directories to the .vim directory. On Windows, basically, vimfiles directory is used instead of the .vim directory.
It is useful to define key mappings for the funky commands as below:
nnoremap <Leader>fu :CtrlPFunky<Cr> " narrow the list down with a word under cursor nnoremap <Leader>uu :execute 'CtrlPFunky ' . expand('<cword>')<Cr>
MATCHED CHARACTER HIGHLIGHTINGS
If you want to have this highlight feature, you need to have a configuration below in your .vimrc:
let g:ctrlp_funky_matchtype = 'path'
:h g:ctrlp_funky_matchtype for more details and notes.
Do you want to make ctrlp-funky funkier? Okay - you can do it with just a single line of config:
let g:ctrlp_funky_syntax_highlight = 1
Note that this feature doesn't work perfectly, because ctrlp-funky just sets
the filetype to the funky buffer.
> which appears at the begining of each line in the funky
buffer has special meaning for some filetypes such as HTML, XML, etc., so it
breaks syntax highlighting.
Copyright (C) 2012-2020 Takahiro Yoshihara. Distributed under the MIT License.