Code Monkey home page Code Monkey logo

Comments (19)

kovisoft avatar kovisoft commented on August 21, 2024

I suppose some of the plugin files are not installed in the proper directory under vimfiles. If SlimvInitBuffer is not found than ftplugin/slimv.vim is probably not loaded. But then I think you must have had some other error messages before that. You can check what scripts are actually loaded via :scriptnames.
A typical problem is when the whole slimv directory structure is unpacked in ~/.vim/plugin/ instead of just ~/.vim/ . If you are unsure, please paste your slimv directory structure here, and I try to find out what the problem may be.

from slimv.

benbot avatar benbot commented on August 21, 2024

I installed it via Vundle. I'm not really how it could be wrong.

from slimv.

benbot avatar benbot commented on August 21, 2024

Only paredit.vim is loaded. mabey slimv doesn't work with vundle. I'll try setting my rtp to slimv and see what happens

from slimv.

benbot avatar benbot commented on August 21, 2024

That didn't work either. Only paredit is being loaded.

from slimv.

benbot avatar benbot commented on August 21, 2024

I took a screen shot of the exact errors I get when opening a lisp file... Probably better than me just saying the error.
screenshot from 2014-05-03 10 51 17

from slimv.

kovisoft avatar kovisoft commented on August 21, 2024

The very first error message says that function name b:SlimvAutodetect is invalid. I don't really understand why, because b: is (or at least it was) a valid function scope prefix. What vim version are you using? Maybe there was a change in vim which now prohibits using the b: prefix for function name(?)

from slimv.

benbot avatar benbot commented on August 21, 2024

I'm using the latest version. I just compiled it last night. I'll try changing all those b's to s's and give it a shot

from slimv.

benbot avatar benbot commented on August 21, 2024

after messing with that it says slimv.vim can't find any of the s:Slimv functions. I changed the function calls in slimv.vim too...

from slimv.

kovisoft avatar kovisoft commented on August 21, 2024

I've just checked the latest vim version in the repo, and it seems that they disallowed using prefix b: for function names. I don't think that replacing b: with s: will work, because you cannot call script local functions from outside of that script. A possible workaround can be to just remove the b: prefix from function name (also in slimv.vim), but then you cannot mix lisp and clojure files in one vim session. I'll try to find a fix for the problem.

from slimv.

kovisoft avatar kovisoft commented on August 21, 2024

I guess you didn't remove all b: prefixes. The error message says it still finds those b: prefixes in slimv.vim when calling b:SlimvAutodetect and b:SlimvImplementation.

from slimv.

benbot avatar benbot commented on August 21, 2024

I thought I did. I'll double check. Removing all of the function scopes seemed to work though.

from slimv.

benbot avatar benbot commented on August 21, 2024

I did change all of the definitions to s:Slimv. I think you were right when you said the 's' scope is only alive for that file.

from slimv.

benbot avatar benbot commented on August 21, 2024

I just made a fork with the fix. The issue should probably stay open unless you just want to merge with my fork...

from slimv.

kovisoft avatar kovisoft commented on August 21, 2024

Removing b: is not a fix, it's just a temporary workaround. I think I'll use "funcref"-s for defining buffer specific function names, but the fix is not yet ready. The idea is like this:

function! SlimvAutodetectLisp()
    ...
endfunction
let b:SlimvAutodetect = function("SlimvAutodetectLisp")

This way b:SlimvAutodetect is defined as a funcref and not a function name, but it can be called just as if it was a function. And we can define different functions for different filetypes, but refer them using the same buffer specific funcref.

from slimv.

benbot avatar benbot commented on August 21, 2024

Yeah I thought as much. That sounds like it would work. I don't know much about vimscript though...

If it's anything like functors in C++ it should work.

from slimv.

kovisoft avatar kovisoft commented on August 21, 2024

It turned out that the "b:" prefix did not actually do anything in the previous vim versions (it did not define buffer specific functions), so removing them seems to be a reasonable solution, not just a temporary one. Slimv currently does not support having multiple REPLs anyway, so I consider this as a "permanent" fix until multiple REPL support is added.

from slimv.

benbot avatar benbot commented on August 21, 2024

Okay glad to hear. I guess that means this issue is solved... Thanks so much.

BTW, the plugin is amazing

from slimv.

laixintao avatar laixintao commented on August 21, 2024

Hi, I follow the discussion, so now the good way to fix this is removing all "B:" prefix ? why don't you do this in master branch? @thecodethinker @kovisoft

thanks!

from slimv.

kovisoft avatar kovisoft commented on August 21, 2024

All b: prefixes were removed in the master repo, see commit b7cbaf2 .

from slimv.

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.