Permalink
Browse files

renamed extension name

  • Loading branch information...
1 parent 02c6744 commit 948907d4b74b035ad9ff313c39385abef7cd2268 @tacahiroy committed Apr 7, 2012
Showing with 25 additions and 25 deletions.
  1. +21 −21 autoload/ctrlp/funks.vim
  2. +2 −2 autoload/ctrlp/funks/ruby.vim
  3. +2 −2 autoload/ctrlp/funks/vim.vim
View
@@ -1,15 +1,15 @@
-" File: autoload/ctrlp/thefunks.vim
+" File: autoload/ctrlp/funks.vim
" Description: a ctrlp.vim extension provides jumping to function
" Author: Takahiro YOSHIHARA <tacahiroy```AT```gmail.com>
-if exists('g:loaded_ctrlp_thefunks') || v:version < 700 || &cp
+if exists('g:loaded_ctrlp_funks') || v:version < 700 || &cp
finish
endif
-let g:loaded_ctrlp_thefunks = 1
+let g:loaded_ctrlp_funks = 1
-let s:ctrlp_thefunks_all_buffers = get(g:, 'ctrlp_thefunks_all_buffers', 0)
-let s:ctrlp_thefunks_report_filter_error =
- \ get(g:, 'ctrlp_thefunks_report_filter_error', 0)
+let s:ctrlp_funks_all_buffers = get(g:, 'ctrlp_funks_all_buffers', 0)
+let s:ctrlp_funks_report_filter_error =
+ \ get(g:, 'ctrlp_funks_report_filter_error', 0)
" The main variable for this extension.
"
@@ -23,28 +23,28 @@ let s:ctrlp_thefunks_report_filter_error =
" | | `- match first tab delimited str
" | `- match full line like file/dir path
" `- match full line
-let s:thefunks_var = {
- \ 'init': 'ctrlp#thefunks#init(s:crbufnr)',
- \ 'accept': 'ctrlp#thefunks#accept',
+let s:funks_var = {
+ \ 'init': 'ctrlp#funks#init(s:crbufnr)',
+ \ 'accept': 'ctrlp#funks#accept',
\ 'lname': 'Dory & Terry',
\ 'sname': 'funks',
\ 'type': 'line',
\ }
-" Append s:thefunks_var to g:ctrlp_ext_vars
+" Append s:funks_var to g:ctrlp_ext_vars
if exists('g:ctrlp_ext_vars')
- let g:ctrlp_ext_vars = add(g:ctrlp_ext_vars, s:thefunks_var)
+ let g:ctrlp_ext_vars = add(g:ctrlp_ext_vars, s:funks_var)
else
- let g:ctrlp_ext_vars = [s:thefunks_var]
+ let g:ctrlp_ext_vars = [s:funks_var]
endif
" Provide a list of strings to search in
"
" Return: a Vim's List
-function! ctrlp#thefunks#init(bufnr)
+function! ctrlp#funks#init(bufnr)
let bufs = []
- if s:ctrlp_thefunks_all_buffers
+ if s:ctrlp_funks_all_buffers
for bn in ctrlp#allbufs()
call add(bufs, bufnr(bn))
endfor
@@ -56,13 +56,13 @@ function! ctrlp#thefunks#init(bufnr)
for bufnr in bufs
let ft = getbufvar(bufnr, '&l:filetype')
if !s:has_filter(ft)
- if s:ctrlp_thefunks_report_filter_error
+ if s:ctrlp_funks_report_filter_error
echoerr ft.': filter does not exist'
endif
continue
endif
- let lines = ctrlp#thefunks#{ft}#filter(bufnr)
+ let lines = ctrlp#funks#{ft}#filter(bufnr)
for l in lines
call add(candidates, l)
endfor
@@ -72,7 +72,7 @@ function! ctrlp#thefunks#init(bufnr)
endfunction
function! s:has_filter(ft)
- let func = 'autoload/ctrlp/thefunks/'.a:ft.'.vim'
+ let func = 'autoload/ctrlp/funks/'.a:ft.'.vim'
return !empty(globpath(&runtimepath, func))
endfunction
@@ -83,7 +83,7 @@ endfunction
" a:mode the mode that has been chosen by pressing <cr> <c-v> <c-t> or <c-x>
" the values are 'e', 'v', 't' and 'h', respectively
" a:str the selected string
-function! ctrlp#thefunks#accept(mode, str)
+function! ctrlp#funks#accept(mode, str)
let [bufnr, lnum] = matchlist(a:str, '\m\C#.*:\(\d\+\):\(\d\+\)$')[1:2]
let fpath = fnamemodify(bufname(str2nr(bufnr, 10)), ':p')
call ctrlp#acceptfile(a:mode, fpath, lnum)
@@ -93,14 +93,14 @@ endfunction
" Give the extension an ID
let s:id = g:ctrlp_builtins + len(g:ctrlp_ext_vars)
" Allow it to be called later
-function! ctrlp#thefunks#id()
+function! ctrlp#funks#id()
return s:id
endfunction
" Create a command to directly call the new search type.
"
-" Put something like this in vimrc or plugin/thefunks.vim
-" com! CtrlPTheFunks cal ctrlp#init(ctrlp#thefunks#id())
+" Put something like this in vimrc or plugin/funks.vim
+" com! CtrlPFunks cal ctrlp#init(ctrlp#funks#id())
" vim:fen:fdl=0:ts=2:sw=2:sts=2
@@ -1,4 +1,4 @@
-" File: autoload/ctrlp/thefunks/ruby.vim
+" File: autoload/ctrlp/funks/ruby.vim
" Description: a ctrlp.vim extension thenfunks's filter definition (ruby)
" Author: Takahiro YOSHIHARA <tacahiroy```AT```gmail.com>
" License: the MIT License
@@ -22,7 +22,7 @@
" out of or in connection with the software or the use or other dealings in the
" software."}}}
-function! ctrlp#thefunks#ruby#filter(bufnr)
+function! ctrlp#funks#ruby#filter(bufnr)
let lines = getbufline(a:bufnr, 1, '$')
let filtered = []
let i = 1
@@ -1,4 +1,4 @@
-" File: autoload/ctrlp/thefunks/vim.vim
+" File: autoload/ctrlp/funks/vim.vim
" Description: a ctrlp.vim extension thenfunks's filter definition (vim)
" Author: Takahiro YOSHIHARA <tacahiroy```AT```gmail.com>
" License: the MIT License
@@ -22,7 +22,7 @@
" out of or in connection with the software or the use or other dealings in the
" software."}}}
-function! ctrlp#thefunks#vim#filter(bufnr)
+function! ctrlp#funks#vim#filter(bufnr)
let lines = getbufline(a:bufnr, 1, '$')
let filtered = []
let i = 1

0 comments on commit 948907d

Please sign in to comment.