Giter Site home page Giter Site logo

vim-ctrlp-switcher's People

Contributors

ivan-cukic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vim-ctrlp-switcher's Issues

Uncaught Errors On Use

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'))

Traceback error under windows

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.

working?

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.

ctrlp-switch based on CWD

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

Would it be possible to use python instead of py3?

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.

doesn't work on windows

第 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

CtrlPSwitch error preventing plugin operation

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.