Giter VIP home page Giter VIP logo

company-dwim's Introduction

company-dwim.el

screencast

Emulate ac-dwim behavior (of auto-complete.el) with company.el.


Comparisons with company-tng:

  • company-preview-* frontends are integrated to company-dwim-frontend

  • company-selection-default is not disabled, so that

    • RET can also perform completion
    • first tooltip item looks like selected by default
    • completion is automatically finished when pressing TAB with sole candidate
  • company-abort (C-g) does not undo completion (use the basic undo command to undo)

Usage

When you press TAB once, company-dwim completes the common part like company-complete-common.

When you press TAB again, company-dwim selects and completes the first candidate.

When you press TAB again, company-dwim undoes the first candidate, then selects and completes the second candidate instead.

You may press TAB again and again to cycle through the candidates.

Unlike the built-in command company-complete-common-or-cycle, company-dwim selects and complets a candidate, where company-complete-common-or-cycle just selects. So that you do not need to press RET explicitly after selecting a candidate.

Note: This behavior is NOT enabled for flex matches

Installation

Load this package, bind TAB to company-dwim, and put company-dwim-frontend to company-frontends.

(require 'company-dwim)
(define-key company-active-map (kbd "TAB") 'company-dwim)
(setq company-frontends
      '(company-pseudo-tooltip-unless-just-one-frontend
        company-dwim-frontend
        company-echo-metadata-frontend))

When setting company-frontends, you also need to remove company-preview-*-frontends since they are integrated to company-dwim-frontend.

company-dwim's People

Contributors

zk-phi avatar nobuyuki86 avatar

company-dwim's Issues

company-selection-defaultがnilの場合、うまく動作しない

company-selection-defaultがnilの場合、Company: frontend company-dwim-frontend error "Wrong type argument: numberp, nil" on command post-commandとなり、補完が表示されない。
補完が表示され、company-dwim-select-nextを使用して補完できるようにしたい。

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.