Code Monkey home page Code Monkey logo

Comments (2)

kovisoft avatar kovisoft commented on August 21, 2024

You can define g:slimv_unmap_tab in your .vimrc to a nonzero value, this prevents slimv from mapping <Tab>.

You cannot however simply remap SlimvHandleTab() on another key, because this function returns "\<Tab>" when there's nothing to complete. But maybe you can create your own copy of function SlimvHandleTab() by replacing "<Tab>" with "" in the last line, and create your own mapping similar to this one below:

inoremap <your-own-key> <C-R>=YourCopyOfSlimvHandleTab()<CR>

Or you can just create a function which calls SlimvHandleTab() and if the return value is "\<Tab>" then it returns "", otherwise it just does not change the return value.

If all you want is just the omnicompletion, then you don't need the above fancy mapping, you can just use <C-X><C-O>.

Please let me know if something above is not clear, then I'll try to explain the idea more thoroughly.

from slimv.

siphiuel avatar siphiuel commented on August 21, 2024

Thank you for quick reply!

I followed your advice and added the following to my .vimrc:

let slimv_unmap_tab=1

function CustomSlimvHandleTab()
  let result = SlimvHandleTab()
  if result == "\<Tab>"
    return ""
  else
    return result
  endif
endfunction

autocmd FileType lisp inoremap <Leader><Tab> <C-R>=CustomSlimvHandleTab()<CR>

Now the autocomplete works for leader followed by Tab (in my case ,<Tab>).

Thanks again,
Vitaliy.

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.