ivan-cukic / vim-ctrlp-switcher Goto Github PK
View Code? Open in Web Editor NEWSwitching between similar files for Vim+CtrlP
Switching between similar files for Vim+CtrlP
To reproduce, use the minimal 3 line example and don't define these 3 globals. Always happen.
I get the following errors on calling CtrlPSwitch command.
Error detected while processing function ctrlp#init..ctrlp#setlines..ctrlp#switcher#init:
line 93:
E121: Undefined variable: g:ctrlpswitcher_mode
E15: Invalid expression: g:ctrlpswitcher_mode
E121: Undefined variable: g:ctrlpswitcher_mode_override
E15: Invalid expression: g:ctrlpswitcher_mode_override
E121: Undefined variable: g:ctrlpswitcher_project_sources
E15: Invalid expression: g:ctrlpswitcher_project_sources
I looked at the code in the autoload file and it seems to be caused because of lines like below. Your trying to access undefined variables, the errors don't get caught by the python catch block because they occur in the vimscript evaluation.
work_mode = 2
try:
work_mode = int(vim.eval('g:ctrlpswitcher_mode'))
except:
pass
Can be fixed multiple ways, I may make a PR soon to fix this and other lines. For this simple case, the block could be replaced by something simple like:
work_mode = int(vim.eval('exists(\'g:ctrlpswitcher_mode\') ? g:ctrlpswitcher_mode : 2'))
Sorry for my poor english. I'm a chinese.
It's a great plugin for CtrlP.
But i occur a error while running :CtrlPSwitchFull command :
ctrlp#switcher#init, line 88, i found 'find' command don't exist under windows.
eg. if I only have test.cpp and test.h and no other test* files. Then I'd like to switch directly between the two without having to select it manually (default behavior of a.vim and fswitch).
Hello,
I tried to install this plugin and it errored out. Just wanted to ping you to see if there was a an easy fix to the readme.
could this be changed to search based on current file's dir ?
not based on pwd ,
so that i don't need switch to current edit file's dir to use ctrlp-switcher
see autoload/ctrlp/switcher.vim
ln:80
the short and long statusline names seem to be placeholders.
I see that py3 is called here and here. Is there a specific reason for using py3
instead of python
?
I'm asking because I don't have access to vim compiled with python3 at work. I replaced py3 and python and it seems to work fine. Is there a way to make it work with just python?
I opened up two test files - test.h and test.cpp. If I open CtrlPSwitcherBasic
from test.h, it shows test.cpp and I'm able to switch to it. However, if I open it from test.cpp then test.h is not shown.
第 7 行:
E706: 变量类型不匹配: g:ctrlp_lines
"F:/volatile-jb-mr2-blue-bu/kernel/crypto/authenc.c" [unix] 711L, 20057C
处理 function ctrlp#init..ctrlp#setlines..ctrlp#switcher#init 时发生错误:
第 88 行:
Traceback (most recent call last):
File "", line 65, in
File "C:\Python27\Lib\subprocess.py", line 537, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['find', 'F:\volatile-jb-mr2-blue-bu\kernel/', '-type', 'f', '(', '-iname', 'authenc', ')', '!', '-name', '.*']' returned non-zero exit status 2
处理 function ctrlp#init..ctrlp#setlines 时发生错误:
第 7 行:
E706: 变量类型不匹配: g:ctrlp_lines
seems find command return error ..on windows OS
Hey Ivan,
Using VIM on Fedora Core 25:
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jul 31 2017 08:46:24)
Included patches: 1-823
This used to work in my .vimrc:
map <F4> :CtrlPSwitch<CR>
When I'm in some C/C++ source file, I hit F4 to go to the respective .h or .cpp counterpart and instead get this:
Error detected while processing function ctrlp#init[22]..ctrlp#setlines[8]..ctrlp#switcher#init:
line 88:
Traceback (most recent call last):
File "", line 65, in
TypeError: a bytes-like object is required, not 'str'
I'm not sure since when it stopped working as I regularly update my plugins.
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.