Logo

dev-resources.site

for different kinds of informations.

AutoCompletion in Native Open-Source MacOS Nimble Editor

Published at
9/27/2022
Categories
editors
swift
macos
ides
Author
cdfcreator
Categories
4 categories in total
editors
open
swift
open
macos
open
ides
open
Author
10 person written this
cdfcreator
open
AutoCompletion in Native Open-Source MacOS Nimble Editor

Autocomplete is a workspace feature normally used to suggest code snippets as developers type in their IDEs and Code Editors. Software developers no longer have to keep track of programming syntax, API method names and details, and other essential information because of this fantastic code editing feature.

This article aims to provide a better understanding of how the Nimble editor autocompletes codes by displaying a completion pop-up as you type to reduce the amount of time you spend typing and allowing you to view and insert potential completions from a list of suggestions to the statement that is currently under your cursor in the code editor.

Understanding the Concept of AutoCompletion

Nimble's AutoCompletion feature is tasked with the responsibility of assisting you finish off the names of classes, methods, fields, and keywords within the visibility scope. Nimble analyses the context in question when invoking Autocompletion and make suggestions that are reachable from the current cursor position (suggestions also include Live templates).

For instance, If AutoCompletion is applied to a part of a named method in a given class, Nimble help display a list of possible results based on the item type:

Image description

The Two Methods for Maximizing Nimble's AutoCompletion Feature

  1. This is the default way in which the AutoCompletion system is invoked in the Nimble editor. As you type, Nimble automatically shows suggestions if a language service is aware of possible code completions.

    And if you continue typing characters, the list of members (such as variables, classes, constants, methods, and so forth) that is displayed is filtered to only include members containing your typed characters. The selected member will be inserted where your cursor is by pressing the Enter key on your keyboard:

    Image description

    Note: The suggestions widget shown in the editor has support for CamelCase filtering. In other words, you can type the uppercase letters in a constant or method name to limit the suggestions. For example, "myp" will quickly bring up "myPost" as shown in the illustration above.

  2. You can manually trigger the AutoCompletion feature in the Nimble editor by clicking together the Control key and SpaceBar (⌃Space) on your keyboard.

    Alternatively, you can choose the "Show Completion" option from the Editor drop-down menu on the Nimble menubar in the top-left corner of the screen:

    Image description

    A crucial benefit of this method is that it helps in displaying inaccessible static fields, keywords, methods, classes, and members.

AutoCompleting Type Names

Possible type names (and classes) are listed in the completion list as user types after placing a full colon in front of a declared variable name, parameters in parenthesises, etc... Importantly, only useful types are suggested, and the names listed are filtered according to the current namespace context:

Image description

AutoCompleting Variable Names

Since Swift has a variable declaration statement, the Nimble editor completes variables automatically as the user types. For instance, If a user inputs a word that matches a variable name, the completion list pre-selects the variable:

AutoCompleting Object Members

The Autocompletion feature automatically suggests available object members as soon as a user types ->:

Image description

Conclusion

Nimble has many strong features, including AutoCompletion. For more information about the Nimble code editor, continue reading.

editors Article's
30 articles in total
Favicon
What do you think of the Cursor editor?
Favicon
What I've Learned About My Editing Skills
Favicon
Better autosave and autoformat in Visual Studio Code
Favicon
Helix Editor: a matter of questionable existence
Favicon
Pastes.io - DDOS attacks
Favicon
Emacs is More Like a Terminal Than an Editor
Favicon
In-context AI chat with GitHub Copilot
Favicon
Most important commands in Helix
Favicon
The Helix way
Favicon
Why use Neovim
Favicon
Getting Sublime Text modal
Favicon
I moved to Neovim and love it, but is it right for you?
Favicon
How to Build and Run a Vapor Project on Native Open-Source MacOS Nimble Editor
Favicon
AutoCompletion in Native Open-Source MacOS Nimble Editor
Favicon
Create and Link Swift Packages from Nimble to Cross-Platform Native App Projects
Favicon
Nimble - native, open-source, extendable MacOS Code Editor
Favicon
Developer Diaries: How We Built a Better Browser-Based IDE with Monaco
Favicon
My Developer Setup in 2022!
Favicon
The Must-Have Neovim Plugins for Julia
Favicon
Visual Studio Code Must Use Extensions
Favicon
Top 15 free online code editors
Favicon
Use Tools that Suit You and the Problem
Favicon
Locking editor panes in Visual Studio Code prevents unwanted multi-tab experiences
Favicon
Stop using IDEs and instead use these editors in 2021
Favicon
Never use TABS for code indentation
Favicon
Do you use a vim-like editor?
Favicon
Using the `ed` editor
Favicon
Online Code Editors
Favicon
9 React Native IDEs and Editors for React Native App Development
Favicon
Spacemacs and My Exit From VSCode

Featured ones: