yggdroot / leaderf Goto Github PK
View Code? Open in Web Editor NEWAn efficient fuzzy finder that helps to locate files, buffers, mrus, gtags, etc. on the fly for both vim and neovim.
License: Apache License 2.0
An efficient fuzzy finder that helps to locate files, buffers, mrus, gtags, etc. on the fly for both vim and neovim.
License: Apache License 2.0
I try to test following setting, doesn't work.
let g:Lf_CommandMap = {'<C-C>': ['<Esc>'],'<Esc>': ['<C-I>'],'<q>': ['<Esc>']}
or
nnoremap <esc> q
The most recently usage panel is already great, but still lacks a little behind CtrlP.
請問有類似CtrlP的g:ctrlp_working_path_mode選項可以設定嗎?這還滿方便的.
Platform: Ubuntu 14.04.5
Vim version:
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Feb 27 2016 23:15:46)
Included patches: 1-1425
Action:
d : remove from mru list
Erros:
Traceback (most recent call last):
File "", line 1, in
File "/home/hanson/.vim/bundle/LeaderF/autoload/leaderf/mruExpl.py", line 85, in deleteMru
self._explorer.delFromCache(line)
File "/home/hanson/.vim/bundle/LeaderF/autoload/leaderf/mruExpl.py", line 48, in delFromCache
lines.remove(name + '\n')
ValueError: list.remove(x): x not in list
I switched from CtrlP over to LeaderF. It's been great so far, I've only noticed one minor possibility to improve.
If I invoked CtrlP to list my buffers, it listed them by most recent usage, making it very easy to switch to recently used buffers.
Would be great if there was a possibility to do this with LeaderF.
It would be amazing if it was possible to use LeaderF as a fuzzy finder for CTags files, which would make jumping to specific functions a lot easier.
Taglist.vim is an example of a viewer supporting ctag files: https://github.com/vim-scripts/taglist.vim
fi
Error detected while processing function leaderf#startFileExpl..leaderf#LfPy:
line 2:
Traceback (most recent call last):
File "", line 1, in
File "/home/fps/exvim/vimfiles/plugged/LeaderF/autoload/leaderf/manager.py", line 450, in startExplorer
self.input(False)
File "/home/fps/exvim/vimfiles/plugged/LeaderF/autoload/leaderf/manager.py", line 463, in input
self._search(self._content)
File "/home/fps/exvim/vimfiles/plugged/LeaderF/autoload/leaderf/manager.py", line 198, in _search
self._fuzzySearch(content)
File "/home/fps/exvim/vimfiles/plugged/LeaderF/autoload/leaderf/manager.py", line 276, in _fuzzySearch
pairs = self._filter(30000, filter_method, content)
File "/home/fps/exvim/vimfiles/plugged/LeaderF/autoload/leaderf/manager.py", line 221, in _filter
result.extend(filter_method(cb[:]))
File "/home/fps/exvim/vimfiles/plugged/LeaderF/autoload/leaderf/manager.py", line 243, in
return (p for p in pairs if p[0])
File "/home/fps/exvim/vimfiles/plugged/LeaderF/autoload/leaderf/manager.py", line 242, in
for line in iterable)
File "/home/fps/exvim/vimfiles/plugged/LeaderF/autoload/leaderf/fuzzyMatch.py", line 308, in getWeight
val)
File "/home/fps/exvim/vimfiles/plugged/LeaderF/autoload/leaderf/fuzzyMatch.py", line 41, in evaluate
i = ((x & -x) - 1).bit_length()
AttributeError: 'int' object has no attribute 'bit_length'
+cryptv +linebreak +python/dyn +viminfo
+cscope +lispindent -python3 +vreplace
i also tried to install python 3.4.3, but the errors still exist.
my os is cenos 6.5.
fix.txt is a file in my project.
I just updated the plugin and now vim doesn't start and completely mess up the shell (I can't even use the mouse to select the output.
Here are the steps I've done to determine that LeaderF was the source of the problem. At that point, LeaderF is already at it latest revision, vim crash as soon as I run it:
it's better to sort buffer like unite.vim when open the buffer list.
unite.vim let the buffer list to view more humanized, it's very convenient to hit the 'enter' key to go prev buffer when open the buffer list.
I'd like to exchange two keys <Esc>
and <C-C>
. So I write this following in my _vimrc.
let g:Lf_CommandMap = {'<C-C>': ['<Esc>'], '<Esc>': ['<C-C>']}
However, pressing will quit from LeaderF, but pressing doesn't switch to normal mode. It becomes that <C-C>
equals <Esc>
.
Another question is that when I switch from LeaderF to normal mode, the label ">>>"(at the bottom of window) doesn't disappear soon.
So what I shoud do? Thanks a lot!
g:Lf_CommandMap g:Lf_CommandMap
Use this option to customize the mappings inside LeaderF's
prompt(|leaderf-prompt|).
for example, if you want to change the default command<C-F>
to<C-D>
and
change the default command<C-Q>
to<Esc>
: >
let g:Lf_CommandMap = {'<C-F>': ['<C-D>'], '<C-Q>': ['<Esc>']}
In the documentation, pressing switches between Regex and Fuzzy mode.
https://github.com/Yggdroot/LeaderF/blob/master/doc/leaderf.txt#L469
On my end, it's switching between Fullpath (I guess it's still fuzzy) and regex mode.
I've tried adding this in my vimrc
let g:Lf_DefaultMode="Fuzzy"
to switch to Fuzzy mode, and I'm getting mixed results:
When searching this file, view-page-desktop.js for example, if I search "view " with a space, it returns zero results. Is that an intended behaviour?
Any option to make it more fuzzy? Or do I need to switch to regex?
RT, it works fine on other directory, but when I'm trying to search a file in the source of newest YouCompleteMe, it will crash after I press any key.
Currently, the quickfix window is quite big, and, unfortunately, often messing with my split heights in Vim.
Is there a possibility to reduce the height of the quickfix window? (and, as a bonus, not change the height of my Vim splits?)
I find CtrlP doesn't support Chinese. But LeaderF works well with files named by Chinese.
Now I have turned to LeaderF.
At last I find CtrlP supports Chinese. I got confused when I wrote
let g:ctrlp_user_command = 'dir %s /-n /b /s /a-d' " Windows
im my _vimrc.
I should remove it.
比如,在Leaderf窗口中显示为:
book.css "mydata/vim/chrome_extentions/imdb/css/"
打开之后显示空白新文件,文件路径提示为:
"mydata/vim/chrome_extentions/imdb/css/book.css" [New DIRECTORY]
:LeaderMruCwd
也是一样的情况
Hi, I enjoy LeaderF very much and it is one of my basic plugins. However, sometimes I need to run Vim in environments without python support, such as Git Bash on Windows. In this case, LeaderF keep complaining when I start Vim, which is really annoying:
Error detected while processing /c/Users/tanle/vimfiles/bundle/LeaderF/plugin/leaderf.vim:
line 24:
Error: LeaderF requires vim compiled with +python or +python3
Press ENTER or type command to continue
Any suggestions for this?
Thanks very much!
here is the message:
searching ...
Error detected while processing function leaderf#Colors#startExpl[1]..leaderf#LfPy:
line 1:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\tracyone\vimfiles\bundle\LeaderF\autoload\leaderf\python\leaderf\manager.py", line 643, in startExplorer
content = self._getExplorer().getContent(*args, **kwargs)
File "C:\Users\tracyone\vimfiles\bundle\LeaderF\autoload\leaderf\python\leaderf\colorschemeExpl.py", line 25, in getContent
except FileNotFoundError:
NameError: global name 'FileNotFoundError' is not defined
vim version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Aug 2 2017 22:09:43)
MS-Windows 64-bit GUI version with OLE support
Included patches: 1-844
Compiled by appveyor@APPVYR-WIN
Huge version with GUI. Features included (+) or not (-):
+acl +cmdline_info +emacs_tags +insert_expand +mksession +persistent_undo +startuptime +timers +writebackup
+arabic +comments +eval +job +modify_fname -postscript +statusline +title -xfontset
+autocmd +conceal +ex_extra +jumplist +mouse +printer -sun_workshop +toolbar -xim
+balloon_eval +cryptv +extra_search +keymap +mouseshape +profile +syntax +user_commands +xpm_w32
+browse +cscope +farsi +lambda +multi_byte_ime/dyn +python/dyn +tag_binary +vertsplit -xterm_save
++builtin_terms +cursorbind +file_in_path +langmap +multi_lang +python3/dyn +tag_old_static +virtualedit
+byte_offset +cursorshape +find_in_path +libcall +mzscheme/dyn +quickfix -tag_any_white +visual
+channel +dialog_con_gui +float +linebreak +netbeans_intg +reltime +tcl/dyn +visualextra
+cindent +diff +folding +lispindent +num64 +rightleft -termguicolors +viminfo
+clientserver +digraphs -footer +listcmds +ole +ruby/dyn -terminal +vreplace
+clipboard +directx +gettext/dyn +localmap +packages +scrollbind -tgetent +wildignore
+cmdline_compl -dnd -hangul_input +lua/dyn +path_extra +signs -termresponse +wildmenu
+cmdline_hist -ebcdic +iconv/dyn +menu +perl/dyn +smartindent +textobjects +windows
system vimrc file: "$VIM\vimrc"
user vimrc file: "$HOME_vimrc"
2nd user vimrc file: "$HOME\vimfiles\vimrc"
3rd user vimrc file: "$VIM_vimrc"
user exrc file: "$HOME_exrc"
2nd user exrc file: "$VIM_exrc"
system gvimrc file: "$VIM\gvimrc"
user gvimrc file: "$HOME_gvimrc"
2nd user gvimrc file: "$HOME\vimfiles\gvimrc"
3rd user gvimrc file: "$VIM_gvimrc"
defaults file: "$VIMRUNTIME\defaults.vim"
system menu file: "$VIMRUNTIME\menu.vim"
Compilation: cl -c /W3 /nologo -I. -Iproto -DHAVE_PATHDEF -DWIN32 -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_JOB_CHANNEL -DFEAT_XPM_W32 -DWINVER=0x500 -D_WIN32_WINNT=0x500 /MP -DHAVE_STDINT_H /Ox /GL -DNDEBUG /Zl /MT -DFEAT_OLE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_MBYTE -DFEAT_GUI_W32 -DFEAT_DIRECTX -DDYNAMIC_DIRECTX -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_TCL -DDYNAMIC_TCL -DDYNAMIC_TCL_DLL="tcl86.dll" -DDYNAMIC_TCL_VER="8.6" -DFEAT_LUA -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL="lua53.dll" -DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL="python27.dll" -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL="python35.dll" -DFEAT_MZSCHEME -I "C:\Program Files\Racket\include" -DMZ_PRECISE_GC -DDYNAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL="libracket3m_a0solc.dll" -DDYNAMIC_MZGC_DLL="libracket3m_a0solc.dll" -DFEAT_PERL -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL="perl524.dll" -DFEAT_RUBY -DDYNAMIC_RUBY -DDYNAMIC_RUBY_VER=22 -DDYNAMIC_RUBY_DLL="x64-msvcrt-ruby220.dll" -DFEAT_HUGE /Fd.\ObjGXOULYHTRZAMD64/ /Zi
Linking: link /RELEASE /nologo /subsystem:windows /LTCG:STATUS oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib comdlg32.lib ole32.lib uuid.lib /machine:AMD64 gdi32.lib version.lib winspool.lib comctl32.lib advapi32.lib shell32.lib /machine:AMD64 /nodefaultlib libcmt.lib oleaut32.lib user32.lib /nodefaultlib:lua53.lib /STACK:8388608 /nodefaultlib:python27.lib /nodefaultlib:python35.lib "C:\Tcl\lib\tclstub86.lib" WSock32.lib xpm\x64\lib\libXpm.lib /PDB:gvim.pdb -debug
執行:LeaderfFile會出現如下錯誤.
處理 /home/dhu/.vim/plugged/LeaderF/autoload/leaderf.vim 時發生錯誤:
行 13:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/dhu/.vim/plugged/LeaderF/autoload/leaderf/bufExpl.py", line 26
buffers = {b.number: b for b in vim.buffers
^
SyntaxError: invalid syntax
處理 function leaderf#startFileExpl..leaderf#LfPy 時發生錯誤:
行 1:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/dhu/.vim/plugged/LeaderF/autoload/leaderf/manager.py", line 549, in startExplorer
self._getInstance().enterBuffer(win_pos)
File "/home/dhu/.vim/plugged/LeaderF/autoload/leaderf/manager.py", line 141, in _getInstance
self._afterExit)
File "/home/dhu/.vim/plugged/LeaderF/autoload/leaderf/instance.py", line 36, in __init__
self._initStlVar()
File "/home/dhu/.vim/plugged/LeaderF/autoload/leaderf/instance.py", line 40, in _initStlVar
lfCmd("let g:Lf_{}_StlCategory = '-'".format(self._category))
ValueError: zero length field name in format
I understand that you are developing some awesome feature on a high version of vim. But I don't wanna compile a high version vim on my ubuntu 12.04 server, I can only get a version of 7.4.5
from apt-get
, which is not enough to run LeaderF before. Could you make a tag for the latest version before v1.01
? Like v1.00
? Before the commit that will require 7.4.33
?
Tried to install it but got this error...
Error detected while processing ~/.vim/bundle/LeaderF/plugin/leaderf.vim:
line 82:
E806: using Float as a String
E116: Invalid arguments for function <SNR>62_InitVar
line 88:
E806: using Float as a String
E116: Invalid arguments for function <SNR>62_InitVar```
Nice plugin!
Ctrlp also supports navigating tags. Would you consider adding this to LeaderF?
如题。
As title.
Instead of vimgrep
Is that possible for LeaderF to ignore certain path?
for example, 'node_modules' which contains a lot of files and require quite a bit time to cache and refresh but are rarely useful.
nice plugin, faster than ctrlp. But, there is an issue like ctrlp.
when I'm working in a large project, thousands of dir and subdirs may add into leaderf. For my expect, some assigned directorys can add, donot use Lf_WildIgnore option, how can I fix it, man?
I open Vim in the root directory in the Linux kernel source tree. In Leaderf name-only mode, I entered mmu.c
. However, I couldn't find arch/x86/kvm/mmu.c
in the list. In Leaderf full-path mode, x86/mmu.c
could list arch/x86/kvm/mmu.c
.
So is there something wrong with LeadF? Thanks very much!
I may work on multiple projects in one day, I wanna use the mru feature but the cache is saved for all projects, is is possible to save the cache according to the current path?
Like, I have three projects under:
~/projA
~/projB
~/projC
I may save three cache file naming:
~/projA/.leaderf
~/projB/.leaderf
~/projC/.leaderf
Is it possible?
When I use :tabedit
to open a file in a new tab, the new tab would be next to my current window. I expect LeaderF
would do the same, but I found it opened the new tab appending the last one.
Could it possible to open a new tab just next to my current window? I think it is useful especially when I'm working on tens of source files :)
Error detected while processing function leaderf#startFileExpl..leaderf#LfPy:
line 5:
Traceback (most recent call last):
File "", line 1, in
File "/Users/6a209/.vim/bundle/LeaderF/autoload/leaderf/manager.py", line 416, in startExplorer
self._gotoBuffer()
File "/Users/6a209/.vim/bundle/LeaderF/autoload/leaderf/manager.py", line 108, in _gotoBuffer
nr = self._bufwinnr(self._bufName)
File "/Users/6a209/.vim/bundle/LeaderF/autoload/leaderf/manager.py", line 100, in _bufwinnr
if os.path.abspath(w.buffer.name) == os.path.abspath(name):
File "/usr/lib/python2.7/posixpath.py", line 352, in abspath
if not isabs(path):
File "/usr/lib/python2.7/posixpath.py", line 61, in isabs
return s.startswith('/')
AttributeError: 'NoneType' object has no attribute 'startswith'
Error detected while processing function leaderf#startFileExpl:
line 2:
E171: Missing :endif
使用过程中发现,这个插件不同与ctrlp,和denite相似,监控用户输入字符,分析,作出响应,不同点,denite的normal模式,不是真正的normal模式,他还在不停监控输入,而leaderf 直接关闭的监控循环,切换到了真正的vim normal模式,虽然关闭了buffer 的 编辑权限,但是感觉这样不是非常的好, 容易出问题, 很简单一个,模式变更,触发autocmd, airline 刷新了状态栏,当再次进入insert模式时,状态栏没有得到恢复。 这里就要提到,前面我说的,不停止监控的好处了,基本上不会触发模式变更autocmd 状态栏也不会被刷新。 可以看我的 vim-chat 的实现。 纯 viml实现的。
建议即便是按esc
切换到 normal模式,也不要停止监控输入,而是换成另外一套分析法则,
我是习惯于 tab 和 shift-tab键上下选择选项,目前似乎只能是上下键。
@chunmingli commented on commit Yggdroot/LeaderF@8e5c6db83a
Hi, thanks for the great plugin. I wanted to report an issue. I came across a case where end == beg and LeaderF produced a "divide by 0" error.
Although it's a good place for a Leader key, ,
is not the default one (at least not on MacVim or gVim). But a lot of places in the documentation says to use ,f
or ,b
, but it could lead to incomprehension I think.
hi. bother you again.
when i open a large project,then i open leaderF,it will take a long time to search files.and i have to wait it until finish finding all.
can it do some changes?
thx!
thanks, it suit me.
but how can i customizing the shortcut keys
I used g:Lf_WildIgnore
in my .vimrc to filter out some unwanted binary files. But until recently, it doesn't seem to filter anything anymore, the default filters works (e.g. '*.o'
), but not my filters (e.g. '*.a'
).
I tested with that and I still see the *.a files:
\ 'dir': ['.svn','.git','.hg'],
\ 'file': ['*.sw?','~$*','*.bak','*.exe','*.o','*.a','*.so','*.py[co]']
\}```
请问,在写go程序时,可以用gotags代替ctags吗?
On windows the default dir seperator is "", but the "/" is closer and easy to click, it would be nice if it's configurable for using "/" or "".
Thanks for the great plugin. Can you add a function like the LUWalk function in LookupFile plugin, which is also a quick file locating plugin.
Thanks very much!
the error message is
Error:LeaderF requires vim compiled with +python or +python3
I've maintaining my macvim via homebrew, so when I trigger leaderF the current search directory is: /usr/local/Cellar/macvim/7.4-72/MaVim.app/Contents/Resources/vim/runtime/
but still, I don't think it's working either
PS: I'm currently calling :Leaderf
.
The MRU and Buffer are ok 👍
I have 22000 files in my project (don't know if it has an impact or not for this issue) and typing in the prompt is pretty slow, like 0.5~1s slow, each time you hit a key.
I can understand that it's slow when it's filtering, but it's also slow when using the arrow keys, which gives a poor user experience in the end.
If I hit ESC then it's quick as in a regular vim buffer.
Hi!
I just updated my plugins and now LeaderF only finds 1 file in my folder where before it was finding 20K files.
I'm useing esc
to quit leaderf, <c-i>
to switch normal mode, sometimes <c-i>
did not take effect.
If I use esc
to switch mode work right always.
let g:Lf_CommandMap = {'<C-C>': ['<Esc>'],'<Esc>':['<C-I>']}
let g:Lf_ShortcutF = 'ff'
os: ubuntu16.04
commit 3e7dc26
test way:
open vim
ff
<c-i>
:qa
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.