Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LeaderfFunction raises ctags error #147

Closed
2 of 6 tasks
fountainer opened this issue May 2, 2018 · 4 comments
Closed
2 of 6 tasks

LeaderfFunction raises ctags error #147

fountainer opened this issue May 2, 2018 · 4 comments
Labels

Comments

@fountainer
Copy link

  • vim or neovim?
    • vim
    • neovim
  • vim --version or nvim --version:
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Mar 29 2018 22:47:34)
MS-Windows 64-bit GUI version with OLE support
Included patches: 1-1655
Compiled by appveyor@APPVYR-WIN
Huge version with GUI.  Features included (+) or not (-):
+acl                +emacs_tags         +mouse              +tag_binary
+arabic             +eval               +mouseshape         +tag_old_static
+autocmd            +ex_extra           +multi_byte_ime/dyn -tag_any_white
+autoservername     +extra_search       +multi_lang         +tcl/dyn
+balloon_eval       +farsi              +mzscheme/dyn       -termguicolors
-balloon_eval_term  +file_in_path       +netbeans_intg      +terminal
+browse             +find_in_path       +num64              -tgetent
++builtin_terms     +float              +ole                -termresponse
+byte_offset        +folding            +packages           +textobjects
+channel            -footer             +path_extra         +timers
+cindent            +gettext/dyn        +perl/dyn           +title
+clientserver       -hangul_input       +persistent_undo    +toolbar
+clipboard          +iconv/dyn          -postscript         +user_commands
+cmdline_compl      +insert_expand      +printer            +vertsplit
+cmdline_hist       +job                +profile            +virtualedit
+cmdline_info       +jumplist           +python/dyn         +visual
+comments           +keymap             +python3/dyn        +visualextra
+conceal            +lambda             +quickfix           +viminfo
+cryptv             +langmap            +reltime            +vreplace
+cscope             +libcall            +rightleft          -vtp
+cursorbind         +linebreak          +ruby/dyn           +wildignore
+cursorshape        +lispindent         +scrollbind         +wildmenu
+dialog_con_gui     +listcmds           +signs              +windows
+diff               +localmap           +smartindent        +writebackup
+digraphs           +lua/dyn            +startuptime        -xfontset
+directx            +menu               +statusline         -xim
-dnd                +mksession          -sun_workshop       +xpm_w32
-ebcdic             +modify_fname       +syntax             -xterm_save
   system vimrc file: "$VIM\vimrc"
  • Output of :echo has("python"): 0
  • Output of :echo has("python3"): 1
  • Output of :echo &pythondll(only vim, not neovim): python27.dll
  • Output of :echo &pythonthreedll(only vim, not neovim): python36.dll
  • Output of :py print(sys.version): E370: Could not load library python27.dll E263: Sorry, this command is disabled, the Python library could not be loaded
  • Output of :py3 print(sys.version): 3.6.3 (v3.6.3:2c5fed8)
  • Operating system:
    • Linux
    • Mac OS X
    • Windows
    • Etc.
  • Configurations related to LeaderF in vimrc:
let g:Lf_StlSeparator = { 'left': "\ue0b0", 'right': "\ue0b2" }
nmap <leader>n :LeaderfFile D:\Dropbox\MWeb <CR>
nmap <leader>h :LeaderfMru <CR>
noremap <F2> :LeaderfFunction<cr>

Describe your question, feature request, or bug.

LeaderfFunction does not work.

Steps to reproduce

Open manager.py in Leaderf folder and Type command :LeaderfFunction<cr> or press F2.

Actual behaviour

It gives the following error.

Error detected while processing function leaderf#Function#startExpl[2]..leaderf#LfPy:
line    1:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\sfq\vimfiles\plugged\LeaderF\autoload\leaderf\python\leaderf\manager.
py", line 721, in startExplorer
    content = self._getExplorer().getContent(*args, **kwargs)
  File "C:\Users\sfq\vimfiles\plugged\LeaderF\autoload\leaderf\python\leaderf\function
Expl.py", line 77, in getContent
    return self._formatResult(*result)
  File "C:\Users\sfq\vimfiles\plugged\LeaderF\autoload\leaderf\python\leaderf\function
Expl.py", line 137, in _formatResult
    output = [line.split('\t') for line in result if line is not None]
  File "C:\Users\sfq\vimfiles\plugged\LeaderF\autoload\leaderf\python\leaderf\function
Expl.py", line 137, in <listcomp>
    output = [line.split('\t') for line in result if line is not None]
  File "C:\Users\sfq\vimfiles\plugged\LeaderF\autoload\leaderf\python\leaderf\asyncExe
cutor.py", line 80, in read
    raise Exception(lfEncode(lfBytes2Str(err)))
Exception: 'ctags' 不是内部或外部命令,也不是可运行的程序^M
或批处理文件。^M  

Press F2 again. The error message becomes No content!.

Expected behaviour

@Yggdroot
Copy link
Owner

Yggdroot commented May 2, 2018

You should install ctags first, ctags is an external tool, you can download from here, do not forget to add path to environment variable.

@Yggdroot Yggdroot added the FAQ label May 2, 2018
@fountainer
Copy link
Author

It works now. I did not know Leaderf depends on ctags. Thanks.

@fountainer
Copy link
Author

The generated list of LeaderfFunction is like as follows:

c class FunctionExplorer(Explorer): [C:\Users\sfq\vimfiles\plugged\LeaderF\autoload\leaderf\python\leaderf\functionExpl.py:21 1]

Since LeaderfFunction navigates functions in current buffer only, can I make the result look like as follows?

c class FunctionExplorer(Explorer): [21 1]

It looks much neet especially when the window is small.

@Yggdroot
Copy link
Owner

Yggdroot commented May 2, 2018

Good idea, I have to modify many codes then.

Yggdroot added a commit that referenced this issue May 2, 2018
don't show file name for current buffer
@Yggdroot Yggdroot closed this as completed May 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants