atom-archive / autocomplete Goto Github PK
View Code? Open in Web Editor NEWSee https://github.com/atom/autocomplete-plus for the package currently bundled with Atom
License: MIT License
See https://github.com/atom/autocomplete-plus for the package currently bundled with Atom
License: MIT License
I'm not sure if this is a bug with atom core or this package, basically when I undo in the editor, if the undo activates the autocomplete, e.g.
div
undo
di
It triggers autocomplete for div, which is fine, but then it causes the cursor to disappear / the editor window to become inactive, and you have to click inside the editor again to be able to carry on undoing.
The language-gfm packages now includes emoji in the completion list: atom/language-gfm#18
They aren't being inserted correctly since they start with a :
and so the :
prefix isn't being replaced.
I am having this issue when running autocomplete
and vim-mode
together. It autocompletes but also joins the next line and removes a few characters.
Steps to reproduce:
vim-mode
installedautocomplete/spec/fixtures/sample.js
The issue is happening because autocomplete
is not committing the current transaction in AutocompleteView.attach
so when it runs editor.abortTransaction
in AutocompleteView.cancel
, it aborts autocomplete
's transaction + the previous vim-mode
transaction.
A way to take care of this is to commit any existing transaction in AutocompleteView.attach
:
attach: ->
@editor.commitTransaction() if @editor.getBuffer().history.isTransacting()
@editor.beginTransaction()
This issue affects vim-mode
and any package that could potentially have an unfinished transaction before AutocompleteView.attach
is executed.
From @GameplayJDK on January 16, 2015 19:54
The autocomplete feature allows CTRL-Z (undo) shortcut in it's textbox.. I don't know if that's how it's supposed to be...
Example (html): When I typed body
once and pressed enter, the next time I enter something, I can use CTRL-Z to revert the content of the little textbox to body
again.
Copied from original issue: atom/atom#5115
The first time autocomplete is used, it focuses the filter editor properly. After that, the filter editor isn't focused, so typing characters to refine the autocomplete search doesn't work.
This happens in safe mode, and regardless of the shadow DOM setting.
/cc @nathansobo
when I bring up the code completion box and start typing , it feels like I have loosed focus from the code at which I am editing. It could jut be a perception thing, but it is distracting. hopefully this makes sense.
[Enter steps to reproduce below:]
Atom Version: 0.176.0
System: Mac OS X 10.10.1
Thrown From: autocomplete package, v0.43.0
Uncaught Error: Cannot create a checkpoint inside of a transaction
At /Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/history.js:174
Error: Cannot create a checkpoint inside of a transaction
at History.module.exports.History.createCheckpoint (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/history.js:174:15)
at TextBuffer.module.exports.TextBuffer.createCheckpoint (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:710:27)
at TextEditor.module.exports.TextEditor.createCheckpoint (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1197:26)
at AutocompleteView.module.exports.AutocompleteView.attach (/Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete/lib/autocomplete-view.js:182:37)
at AutocompleteView.module.exports.AutocompleteView.toggle (/Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete/lib/autocomplete-view.js:215:21)
at atom-text-editor.deactivationDisposables.add.atom.commands.add.autocomplete:toggle (/Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete/lib/autocomplete.js:48:70)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243:29)
at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:558:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:396:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:170:20)
-0:22.0 core:backspace (atom-text-editor.editor.vim-mode.insert-mode)
-0:20.4 core:move-down (input.hidden-input)
-0:19.8 core:move-up (atom-text-editor.editor.vim-mode.insert-mode)
-0:19.3 editor:select-to-first-character-of-line (atom-text-editor.editor.vim-mode.insert-mode)
-0:18.9 core:delete (atom-text-editor.editor.vim-mode.insert-mode)
-0:17.4 core:close (atom-text-editor.editor.vim-mode.insert-mode)
-0:16.6 fuzzy-finder:toggle-file-finder (atom-workspace.workspace.scrollbars-visible-always.theme-atom-dark-syntax.theme-atom-dark-ui)
-0:15.7 core:confirm (atom-text-editor.editor.mini)
-0:12.3 vim-mode:reset-command-mode (atom-text-editor.editor.vim-mode.is-focused.insert-mode)
12x -0:11.1 vim-mode:move-down (atom-text-editor.editor.vim-mode.is-focused.insert-mode)
-0:09.3 vim-mode:move-up (atom-text-editor.editor.vim-mode.is-focused.insert-mode)
-0:08.6 vim-mode:activate-insert-mode (atom-text-editor.editor.vim-mode.is-focused.insert-mode)
5x -0:06.6 core:backspace (atom-text-editor.editor.vim-mode.is-focused.insert-mode)
2x -0:03.3 core:move-down (atom-text-editor.editor.vim-mode.is-focused.insert-mode)
-0:01.8 core:backspace (atom-text-editor.editor.vim-mode.is-focused.insert-mode)
-0:00.7 autocomplete:toggle (atom-text-editor.editor.vim-mode.is-focused.insert-mode)
{
"core": {
"themes": [
"atom-dark-ui",
"atom-dark-syntax"
]
}
}
# User
atom-grails, v0.1.0
autocomplete-plus, v2.0.1
file-icons, v1.4.8
language-groovy, v0.3.0
travis-ci-status, v0.11.2
vim-mode, v0.30.0
# Dev
No dev packages
/cc @atom/core
In Sublime Text, you can autocomplete by an in-order pneumonic or any sequence of characters. For example, I can type gln<tab>
and have getLastName
as a possible completion. I am addicted to this and consider it a killer feature of ST. Would love to see it available in this package for atom.
Atom was getting slow and I found what seemed like too many editors that I traced back to autocomplete code. I'm not sure I totally trust heap profiler anymore so I'm going to investigate further.
Is that possible with the current architecture?
Would it be possible to get a less intrusive autocomplete, something more like TextMate's where you press escape to cycle through alternatives.
When I code I almost always know what I want to autocomplete to, I just don't want to type it. Having to select from a list makes me slower, not faster.
At the same time, I know that many like autocomplete with a list and are used to that from other editors, so I'm just asking for a way to run the autocomplete in a less UI-driven manner. If there were actions for autocomplete with next suggestion I could hook up the keymappings myself, but as far as I can tell it's not currently possible, at least I didn't manage to autocomplete without showing the alternatives panel.
As of now, brackets has (in my opinion) better autocomplete than atom. It's fast, unobtrusive, lightweight, and it seems to be using the syntax file for the language being edited to compile the list of completions which to me is as important as including symbols from the file being edited.
Here is a screenshot of brackets editing in a less file (would be the same in a comparable css file):
In use, it feels right and like it is helping me. Autocomplete in atom so far feels clumsy and like it is getting in my way.
atom 0.94.0
the literal null
is entered. Pressing the key combo again brings up the autocomplete box saying no matches as expected. The initial null entering is not expected.
I don't want to discuss, whether unicode characters in varnames are good or bad. They work. And they should be respected by autocomplete.
Currently this doesn't work:
var gründe = 'foo';
alert(g// if I press ctrl+space here, if suggests only "gr", not "gründe"
Platform: Ubuntu GNOME 14.04, 64-bit
All insertion points will autocomplete with the word, as would normally happen with a single insertion point. Different words aren't necessecarily expected to autocomplete.
(vertical bar == insertion point)
Known word: MyClass
MyC|
MyC|
MyC|
Expands to:
MyC
MyC
MyCMyClass|
I don't expect this specific case to work:
Known words: foobar
, barfoo
foo|
bar|
Expands to:
foobar|
barfoo|
I use the multiple insertion point feature somewhat extensively, given it's very high usefulness when refactoring masses of code quickly.
Some have mapped autocomplete to escape
to match TextMate. But this interferes with their ability to close mini editors. We may want to call abortKeyBinding
in the event the autocompleter has no suggestions.
I write a lot of js code with require statements in them. We have files all over the place, and it's hard to remember where everything is. It would be great if I could autocomplete file paths (relative to the current file). What would it take to implement something like this?
For reference, neocomplete in vim does a great job of this: https://github.com/Shougo/neocomplete.vim
Make it so that when you open a comment, e.g /**
make it auto-complete it.
e.g
/**
*
*
*
*/
This type of stuff is very useful in IDE's like Eclipse, Netbeans, etc.
Another suggest would be once this feature is implement allow the user to choose to add stuff like,
@author
@Date <date this file was commented/made
@Version
@see
etc.
For me is very common to need words from other opened files not only from the current one, as autocomplete is right now, it only displays suggestions from the current file.
Autocomplete is not reliable for me. Tried it on a fresh install but it sometimes does not give me any suggestions at all. I posted it on the forums too:
https://discuss.atom.io/t/autocomplete-doesnt-work-everytime/11962
[Enter steps to reproduce below:]
Atom Version: 0.176.0
System: Mac OS X 10.10.1
Thrown From: autocomplete package, v0.43.0
Uncaught TypeError: undefined is not a function
At /Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete/lib/autocomplete.js:42
TypeError: undefined is not a function
at /Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete/lib/autocomplete.js:42:68
at atom-text-editor.deactivationDisposables.add.atom.commands.add.autocomplete:next (/Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete/lib/autocomplete.js:53:29)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243:29)
at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
at CommandPaletteView.module.exports.CommandPaletteView.confirmed (/Applications/Atom.app/Contents/Resources/app/node_modules/command-palette/lib/command-palette-view.js:120:32)
at CommandPaletteView.module.exports.SelectListView.confirmSelection (/Applications/Atom.app/Contents/Resources/app/node_modules/archive-view/node_modules/atom-space-pen-views/lib/select-list-view.js:335:21)
at space-pen-div.atom.commands.add.core:confirm (/Applications/Atom.app/Contents/Resources/app/node_modules/archive-view/node_modules/atom-space-pen-views/lib/select-list-view.js:109:19)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243:29)
at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:558:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:396:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:170:20)
-2:56.2 editor:consolidate-selections (atom-text-editor.editor.mini)
-2:56.2 core:cancel (atom-text-editor.editor.mini)
-2:38.7 command-palette:toggle (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
-2:36.4 core:confirm (atom-text-editor.editor.mini)
-2:36.4 window:install-shell-commands (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
-0:50.4 command-palette:toggle (atom-text-editor.editor.is-focused)
-0:46.6 core:confirm (atom-text-editor.editor.mini)
-0:46.6 autocomplete:toggle (atom-text-editor.editor.is-focused)
2x -0:44.9 editor:consolidate-selections (atom-text-editor.editor.mini)
-0:44.9 core:cancel (atom-text-editor.editor.mini)
19x -0:39.7 core:backspace (atom-text-editor.editor.is-focused)
-0:08.7 editor:consolidate-selections (atom-text-editor.editor.is-focused)
-0:08.7 core:cancel (atom-text-editor.editor.is-focused)
-0:07.3 command-palette:toggle (atom-text-editor.editor.is-focused)
-0:00.6 core:confirm (atom-text-editor.editor.mini)
-0:00.6 autocomplete:next (atom-text-editor.editor.is-focused)
{
"core": {
"themes": [
"atom-dark-ui",
"base16-tomorrow-dark-theme"
]
}
}
# User
linter-python-pep8, v0.2.0
linter-python-pyflakes, v0.1.0
# Dev
No dev packages
/cc @atom/core
Can we make it keep vim insert mode on when autocomplete overlay is cancelled with ESC?
Uncaught Error: Can't undo with an open transaction
Atom Version: 0.158.0
System: Mac OS X 10.10.1
Thrown From: autocomplete package, v0.34.0
At /Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/history.js:73
Error: Can't undo with an open transaction
at History.module.exports.History.undo (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/history.js:73:15)
at History.module.exports.History.revertToCheckpoint (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/history.js:185:16)
at TextBuffer.module.exports.TextBuffer.revertToCheckpoint (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:710:27)
at TextEditor.module.exports.TextEditor.revertToCheckpoint (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1166:26)
at AutocompleteView.module.exports.AutocompleteView.cancelled (/Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete/lib/autocomplete-view.js:172:21)
at AutocompleteView.module.exports.SelectListView.cancel (/Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete/node_modules/atom-space-pen-views/lib/select-list-view.js:260:14)
at atom-text-editor.<anonymous> (/Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete/node_modules/atom-space-pen-views/lib/select-list-view.js:76:26)
at atom-text-editor.jQuery.event.dispatch (/Users/ricardopinto/.atom/packages/build/node_modules/space-pen/vendor/jquery.js:4676:9)
at atom-text-editor.elemData.handle (/Users/ricardopinto/.atom/packages/build/node_modules/space-pen/vendor/jquery.js:4360:46)
at atom-text-editor.jQuery.event.special.focus.trigger (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4842:11)
at Object.jQuery.event.trigger (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4565:60)
at atom-text-editor.<anonymous> (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:5124:17)
at Function.jQuery.extend.each (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:590:23)
at TextEditorView.jQuery.fn.jQuery.each (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:237:17)
at TextEditorView.jQuery.fn.extend.trigger (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:5123:15)
at TextEditorView.jQuery.fn.trigger (/Applications/Atom.app/Contents/Resources/app/src/space-pen-extensions.js:56:28)
at TextEditorView.jQuery.fn.(anonymous function) [as focus] (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:6733:9)
at AutocompleteView.module.exports.AutocompleteView.cancel (/Users/ricardopinto/.atom/packages/autocomplete-plus-async/lib/autocomplete-view.coffee:143:19)
at AutocompleteView.cancel (/Users/ricardopinto/.atom/packages/autocomplete-plus-async/lib/autocomplete-view.coffee:1:1)
at AutocompleteView.module.exports.AutocompleteView.onChanged (/Users/ricardopinto/.atom/packages/autocomplete-plus-async/lib/autocomplete-view.coffee:226:8)
at /Users/ricardopinto/.atom/packages/autocomplete-plus-async/lib/autocomplete-view.coffee:1:1
at TextBuffer.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:118:15)
at TextBuffer.module.exports.TextBuffer.applyPatch (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:591:12)
at TextBuffer.module.exports.TextBuffer.setTextInRange (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:503:12)
at TextBuffer.module.exports.TextBuffer.delete (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:600:19)
at Selection.module.exports.Selection.deleteSelectedText (/Applications/Atom.app/Contents/Resources/app/src/selection.js:556:37)
at /Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete/lib/autocomplete-view.js:258:23
at Array.forEach (native)
at /Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete/lib/autocomplete-view.js:254:22
at History.module.exports.History.transact (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/history.js:112:18)
at TextBuffer.module.exports.TextBuffer.transact (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:683:27)
at TextEditor.module.exports.TextEditor.transact (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1146:26)
at AutocompleteView.module.exports.AutocompleteView.replaceSelectedTextWithMatch (/Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete/lib/autocomplete-view.js:250:26)
at AutocompleteView.module.exports.AutocompleteView.selectItemView (/Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete/lib/autocomplete-view.js:93:21)
at AutocompleteView.module.exports.SelectListView.populateList (/Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete/node_modules/atom-space-pen-views/lib/select-list-view.js:207:21)
at AutocompleteView.module.exports.AutocompleteView.populateList (/Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete/lib/autocomplete-view.js:329:54)
at /Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete/node_modules/atom-space-pen-views/lib/select-list-view.js:347:26
/cc @atom/core
Started with v0.101.0, whenever I close a tab, the autosave package raise an exception. The autosave option is disabled.
Uncaught TypeError: Object #<PaneView> has no method 'getModel' autosave.coffee:9
(anonymous function) autosave.coffee:9
jQuery.event.dispatch /Users/cedric/github/atom/node_modules/space-pen/vendor/jquery.js:4676
elemData.handle /Users/cedric/github/atom/node_modules/space-pen/vendor/jquery.js:4360
jQuery.event.trigger /Users/cedric/github/atom/node_modules/space-pen/vendor/jquery.js:4594
jQuery.event.simulate /Users/cedric/github/atom/node_modules/space-pen/vendor/jquery.js:4893
handler /Users/cedric/github/atom/node_modules/space-pen/vendor/jquery.js:5009
jQuery.fn.extend.remove /Users/cedric/github/atom/node_modules/space-pen/vendor/jquery.js:5501
module.exports.EditorView.remove editor-view.coffee:805
module.exports.PaneView.onItemRemoved pane-view.coffee:170
(anonymous function) pane-view.coffee:1
(anonymous function) /Users/cedric/github/atom/node_modules/emissary/lib/emitter.js:133
module.exports.Emitter.emit /Users/cedric/github/atom/node_modules/emissary/lib/emitter.js:132
module.exports.Pane.removeItem pane.coffee:173
module.exports.Pane.destroyItem pane.coffee:200
module.exports.Pane.destroyActiveItem pane.coffee:191
module.exports.Workspace.destroyActivePaneItem workspace.coffee:268
_results.push._this.(anonymous function) /Users/cedric/github/atom/node_modules/delegato/lib/delegator.js:67
(anonymous function) workspace-view.coffee:157
jQuery.event.dispatch /Users/cedric/github/atom/node_modules/space-pen/vendor/jquery.js:4676
elemData.handle /Users/cedric/github/atom/node_modules/space-pen/vendor/jquery.js:4360
module.exports.KeymapManager.dispatchCommandEvent /Users/cedric/github/atom/node_modules/atom-keymap/lib/keymap-manager.js:395
module.exports.KeymapManager.handleKeyboardEvent /Users/cedric/github/atom/node_modules/atom-keymap/lib/keymap-manager.js:176
(anonymous function) window-event-handler.coffee:61
jQuery.event.dispatch /Users/cedric/github/atom/node_modules/space-pen/vendor/jquery.js:4676
elemData.handle /Users/cedric/github/atom/node_modules/space-pen/vendor/jquery.js:4360
It does not prevent the tab from being closed but just pop the console out.
It would be great if there was an API on this package that would allow me to spin up an instance of the AutoComplete whenever / wherever I wanted.
If you type something in, and there are no autocomplete matches, pressing enter makes what you've typed in disappear. It might be quite nice if what you've typed gets put in even if there are no matches.
For instance, sometimes I use autocomplete just to see if a variable name exists already, and if it doesn't then I use that name, but pressing enter makes what I've typed vanish, and then I have to type the name in again, which is a waste of time.
Whenever I use autocomplete in CSS mode, any time I type the hyphen in a CSS property name, the whole dialog disappears. So if I type in font
, it shows all of the CSS properties starting with font but as soon as I type the -
after font
to find things like font-family
, font-size
, etc., the dialog disappears. I checked the developer tools and there were no errors.
This is my first bug/feature request for Atom.io so if I missed something in the guidelines, let me know. I did search to see if anyone had reported this and didn't see anything. Also, if I can provide more details or help with the fix, let me know.
Autocomplete words that are previously typed in comments it's not very useful :)
e.g.
/**
* this is a comment
*/
if I type "co" and autocomplete, it should no propose "comment" (make this configurable would be great!)
I love this! Amazing! Whats stopping me from switching from sublime is I've alway's loved sublime's proactive autocomplete ( I don't have to press anything and it shows me my autocomplete options) I press enter and it picks the top autocomplete option. If atom/autocomplete could do that... I'm a switching!
Would love to have something similar to Sublime, where the autocomplete would be automatically shown while typing. Theres a plugin that does that but sadly it completely breaks the snippets and emmet features.
I believe the "official" plugin should have something like this built-in.
strings, comments
bros, i got an error
Uncaught Error: Could not resolve 'autocomplete-plus' to a package path
/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:349
is anyone exp with same?
It would be great if we could set the autocompleter to make suggestions only after you type n-th letters of a word. E.g. from 3rd character, fu
wouldn't trigger autocomplete, while fun
would.
This is useful when you have 1-2 letter snippets, and both autocomplete and snippets are triggered/ confirmed via tab
key (I know you can map custom keys, but it's useful to use just one).
The 'tab' key should confirm a selection in the autocomplete view.
The 'tab' key does not confirm a selection and instead inserts a tab in the text while the autocomplete view is open.
IntelliJ, Eclipse, probably others? I don't usually use autocomplete in vim, so I can't say for sure if it's valid there.
I was going to make a pull request for this, but since it's just a single line I decided it wasn't worth the trouble of forking. However, I modified my local Atom and it works as it should.
Is it possible to show autocomplete options without pressing a keybind? I would like the autocomplete menu to automatically show up as I type. Is there any way to do this currently?
/cc @mcolyer
In my country , the Keystroke of "ctrl-space" is always regarded as the operation of switchover input method. So I think that using "ctrl-alt" or "alt-enter" as default just like the eclipse ,will be better. Thanks.
Perhaps this feature request already exists, but I can't find it.
I'd love if it possible to change my autocomplete to become case sensitive. Probably something that's pref'ed off by default.
When I type "Fo" and there is "foobar" and "Foodmixer" in the buffer I only want it to autocomplete suggest "Foodmixer".
In waiting for #7 i'm trying to bind the autocomplete popup to escape for easier access, it works but when pressing escape again the console pops up with this error
Uncaught NotFoundError: An attempt was made to reference a Node in a context where it does not exist. /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:5825
jQuery.extend.buildFragment /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:5825
jQuery.fn.extend.domManip /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:5631
jQuery.fn.extend.append /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:5453
jQuery.fn.(anonymous function) /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/lib/space-pen.js:336
module.exports.EditorView.appendToLinesView /Applications/Atom.app/Contents/Resources/app/src/editor-view.js:1455
module.exports.AutocompleteView.attach /Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete/lib/autocomplete-view.js:187
(anonymous function) /Applications/Atom.app/Contents/Resources/app/node_modules/autocomplete/lib/autocomplete-view.js:65
jQuery.event.dispatch /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4676
elemData.handle /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4360
jQuery.event.trigger /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4594
(anonymous function) /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:5119
jQuery.extend.each /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:590
jQuery.fn.jQuery.each /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:237
jQuery.fn.extend.trigger /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:5118
module.exports.Keymap.triggerCommandEvent /Applications/Atom.app/Contents/Resources/app/src/keymap.js:267
module.exports.Keymap.handleKeyEvent /Applications/Atom.app/Contents/Resources/app/src/keymap.js:249
(anonymous function) /Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:93
jQuery.event.dispatch /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4676
elemData.handle /Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4360
Atom on Windows 8.1
Simply open a new C++ file and start typing #include <iostream
and when you'll write the >
character, Atom will autocomplete this.
I think this absolutely isn't feature, it's a bug.
Pressing control+space
brings popup with substitution options with following focus lost in current tab. This triggers autosave plugin which is unwanted in most situations.
It would be great to configure somehow communication between plugins and prevent this.
Atom 0.125.0
Autocomplete 0.31.0
Autosave 0.15.0
If the package is still so much in flux that it doesn't make sense to document the API right now, then just say so. It's understandable and unambiguous.
Currently, I'm looking at https://github.com/yasuyuky/autocomplete-clang/blob/master/lib/autocomplete-clang-view.coffee as an example of how to subclass AutocompleteView
, and it seems like that subclass is doing a lot more than it should (e.g., adding all sorts of listeners to @editorView
that I would expect to come "for free"). It would be helpful to see what a "proper" use of this package is. Ideally, a minimal one.
Similarly, there is no inline documentation in the code about which methods are designed to be overridden and which should be treated as final.
piggy backing off of #11, basically lets just simplify autocomplete. So lets say you have the suggestions: "a", "ab", and "abc"
. If you type abcd
it should auto close the suggestions box and keep going. Additionally lets get rid of the extra input box. Like this:
your input box would just be the regular buffer.
Or do you guys think that this behavior is too different and should be some kind of sub class of autocomplete?
To reproduce:
sandw
)ctrl-space
, select completion (e.g. sandwich
)cmd-z
, see entire word removedcmd-z
again, see the original prefix reappear (sandw
)cmd-z
a third time, see nothing changecmd-z
a fourth time, see prefix disappearThe behavior is the same whether there is only one completion or there are multiple completions and the select list appears.
This is somewhat of a tangent to #10, which requests an API to trigger autocomplete functionality.
The language-go package could potentially integrate with gocode to provide autocomplete suggestions (feature request here: atom/language-go#2).
It would be nice if the following were true:
autocomplete = require('atom').autocomplete
?)autocomplete.on 'trigger', => @askGocodeForSuggestions
?)autocomplete.on 'display', (suggestions) => @injectSuggestions suggestions
?)i need to pas flags to the package build system for the package to build corectly on my system. how do i do that?
One of my favourite features in all IDE's from JetBrains is it's hinting and auto-completion. I call it context-aware hinting.
When you're writing HTML and you're about to add a class to an element, it lists all known classnames defined anywhere else in your project. In PHP, when you've created an instance of class X and want to call a function, it lists all known methods of just that class. It looks at where your cursor is, identifies the syntax before it and lists only relevant information.
PHP classes seem to work OK, could be improved a little. However, I'd like to see this extended over other languages as well like the HTML-CSS example I mentioned.
So, can we have this?
Ubuntu 12.04
All works correctly on right-click->Autocomplete, but hotkey doesnt work - nothing happened when I press ctrl-space
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.