Giter Site home page Giter Site logo

File Engine Error about vim-ctrlspace HOT 4 CLOSED

erikc96 avatar erikc96 commented on June 9, 2024
File Engine Error

from vim-ctrlspace.

Comments (4)

crowdigit avatar crowdigit commented on June 9, 2024 3

I had similar issue and I can reproduce the error.

My error log:

Error detected while processing function ctrlspace#keys#Keypressed[14]..ctrlspace#keys#common#ToggleFileModeAndSearch[1]..<SNR>90_toggleListViewAndSearch[2]..ctrlspace#k
eys#common#ToggleFileMode[5]..<SNR>90_toggleListView[18]..ctrlspace#window#Toggle[57]..ctrlspace#engine#Content[2]..<SNR>128_contentFromFileEngine:                      
line    9:                                                                                                                                                               
E684: list index out of range: 0                                                                                                                                         
E116: Invalid arguments for function eval                                                                                                                                
E15: Invalid expression: eval(results[0])                                                                                                                                
Error detected while processing function ctrlspace#keys#Keypressed[14]..ctrlspace#keys#common#ToggleFileModeAndSearch[1]..<SNR>90_toggleListViewAndSearch[2]..ctrlspace#k
eys#common#ToggleFileMode[5]..<SNR>90_toggleListView[18]..ctrlspace#window#Toggle:                                                                                       
line   57:                                                                                                                                                               
E714: List required                                                                                                                                                      
1 line less; before #1  5 seconds ago                                                                                                                                    
                                                                                                                                                                         
Press ENTER or type command to continue 

I'm using M1, CtrlSpace 5.0.7 (engine: VIM)

Few things to note

  1. This error does not occur if I set g:CtrlSpaceFileEngine to anything other than VIM
  2. Setting let g:CtrlSpaceEnableFilesCache = 0 also prevents this error
  3. I tried this on linux desktop and I can reproduce it

So, to reproduce the error,

  1. Use the default file engine
  2. Use file caching (let g:CtrlSpaceEnableFilesCache = 1)
  3. Just cd to any directory and hit Ctrl-P (list all files in CtrlSpace buffer) and you get the error
  4. On directories that are not git repository, it may prompts to set root directory, hitting enter produces the error anyway

from vim-ctrlspace.

jyscao avatar jyscao commented on June 9, 2024 2

@crowdigit nice work on both reproducing the issue and figuring out the cause and fix. I compiled and added the binary for darwin_arm in the latest commit

from vim-ctrlspace.

crowdigit avatar crowdigit commented on June 9, 2024 1

I could fix this issue by compiling file engine by myself. To do that,

  1. clone this repository
  2. build file engine
  3. copy binary file
  4. edit init.nvim
# clone
git clone [email protected]:vim-ctrlspace/vim-ctrlspace.git

# build
cd vim-ctrlspace/go
go build ./file_engine.go

# copy
cp ./file_engine ~/.config/nvim/pack/minpac/start/vim-ctrlspace/bin/file_engine_darwin_arm
# I named new binary 'file_engine_darwin_arm'
# copy where your vim-ctrlspace is installed, I'm using minpac

Open vim config file and set g:CtrlSpaceFileEngine to binary name set above, in this example file_engine_darwin_arm

let g:CtrlSpaceFileEngine = 'file_engine_darwin_arm'

I think this issue occurs because binary for M1 does not included and vim implementation is not working well for M1.

Including binary for M1 and detecting environment feature may fix this issue I guess.

from vim-ctrlspace.

jyscao avatar jyscao commented on June 9, 2024

@erikc96 sorry for the late follow up, I finally got some free time to look into this now.

Can you elaborate a bit more on the problem you're running into, because I can't say I understand what you meant. The bookmark mode is activated with b, which I tested just now and was able to create fine. But you're saying that o, which is files list mode isn't working for you? Those 2 modes shouldn't be related.

from vim-ctrlspace.

Related Issues (20)

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.