ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Alternative Autocompletion

by atombender ALL

Adds TextMate-like autocompletion to Sublime Text 2 and 3.

Details

  • 2013.11.18.07.07.32
  • github.​com
  • github.​com
  • 10 years ago
  • 2 hours ago
  • 12 years ago

Installs

  • Total 27K
  • Win 11K
  • Mac 10K
  • Linux 6K
May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27
Windows 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
Mac 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Alternative autocompletion for Sublime Text

This plugin adds an autocompletion command to Sublime Text 2 and 3 that acts similarly to TextMate:

  • Hitting the autocomplete key will attempt to complete the current word by looking at similar words in the current document.

  • Hitting the autocomplete key multiple times will cycle through the available words.

  • The last autocomplete position is remembered, so you can perform an autocompletion, move the cursor around, move back to where you were, and continue cycling through the completions.

  • Candidate completions are selected prioritized by distance to the cursor.

The plugin improves on TextMate in one respect: If no candidates are found, the plugin reverts to using a simple fuzzy, case-insensitive matching algorithm that is similar to Sublime's file/class matching algorithm. For example, typing appc might match ApplicationController.

Installation using Package Control (simplest)

  1. Install the Package Control plugin unless you don't have it already.

  2. Open Package Controll and choose “Install Package”.

  3. Select alternative_autocompletion.

Manual installation

Drop the entire folder in Sublime's Packages folder. You can do this using git clone thus:

$ cd .../Packages  # Whatever the location is

$ git clone git://github.com/alexstaubo/sublime_text_alternative_autocompletion.git

To map to the tab key it gets a bit more complex to preserve indentation behaviour:

Keyboard mappings

The default keyboard settings use the Escape key for autocompletion. To use the tab key instead you will need to add some complex custom keyboard mappings (Preferences -> “Key Bindings - User”). Copy the bindings found in Tabs.sublime-keymap.

Limitations

Currently does not work with multiple selections.

License

Copyright 2011 Alexander Staubo. MIT license. See LICENSE file for license.