Comments (12)
I think it's viable to do a first pass in Nu and then convert the slow parts to Objective-C as needed. Since you can see the Objective-C source, you can access anything that's in Vico's runtime from Nu, as long as you're not dealing in const char *s and such.
from vico.
@Shadowfiend I am not sure where do I start with Nu approach though, where do I put my code? Any suggestions on where to start or maybe I need to RTFM?
from vico.
I mean, you've already outlined what looks like a pretty solid approach. You can take that approach in Nu just as well as anywhere else. You can access any Vico class by name from Nu, though you may have to (load "Cocoa")
to access Cocoa classes. current-text
, current-view
, and current-window
are all shortcuts to various parts of the running application.
The only part you'd have trouble with is adding complete_omni, but you don't need to. You can map <c-x><c-o>
directly to a Nu block, and then call into your ViOmniCompletion class (which you can also write in Nu) from there.
from vico.
Oh, and sorry, as to where to put your code, I would start off by just putting it in a bundle and evaling it as you go. There are a couple of caveats (like you can't eval an ival block more than once in Nu; but they're also optional), but that's how I've developed my plugins to date.
from vico.
@Shadowfiend would you consider "completion as you type" within the scope of your improvements?
from vico.
I think @vgrichina was talking about implementing this, not me. At least not yet. I may get around to this if no one else has sometime soonish as I continue work on vico-ensime
. At that point, I may also look into as-you-type completion.
from vico.
@jordow I think its a topic for separate plugin, as I don't like such functionality :) I think once I'm done with my stuff, you can hack something together based on it too.
from vico.
@vgrichina: Have you had time to explore this? I'd like to take a stab at adding the auto-ness to whatever you end up with.
from vico.
@jordow no, haven't come to it yet
from vico.
@vgrichina: I was taking a look at the autocomplete code last night. To make auto-complete-as-you-type possible, it seems I had to make ViCompletionWindow
return NO
from canBecomeKeyWindow
. Then I started by making input_character
not only insert the character, but also trigger the completion results by invoking [self presentCompletionsOf.. ]
. Does this sound like the right direction in order to achieve AutoComplPop style completions (where the text you type is still inserted into the view, while the completions are automatically shown)?
from vico.
This sounds good to me.
from vico.
As a side note, #15 implements completion as you type. It'll probably get merged in in the next week or so, as I've been using it and it's generally been performing pretty well.
I'm thinking about implementing some improvements/pluggable completion, omni-completion style.
from vico.
Related Issues (20)
- Autocomplete doesn't correct camel casing mid-word. HOT 1
- Snippets ruin autocomplete selection. HOT 1
- Ability to theme Flat. HOT 8
- Inline error highlighting hook HOT 8
- Fast Full Screen Mode. HOT 2
- Entering a command in fullscreen mode then moving to another space makes the vico space inaccessible HOT 1
- Tab to complete interferes with snippet expansion. HOT 2
- Project Bookmarks HOT 4
- Store "File Explorer" and "Symbol List" size and state per "project" HOT 3
- Crashes when creating new file from file explorer HOT 3
- Retina images for tabs and symbols. HOT 1
- python through :setfiletype HOT 3
- EXC_BAD_ACCESS / KERN_INVALID_ADDRESS at 0x0000000100001180 HOT 1
- Enter causes app to crash at specific line in ruby HOT 4
- File browser icons are broken when compiling on Yosemite. HOT 1
- R (replace mode) not supported HOT 1
- Problems compiling `swiftly-forward` branch. HOT 4
- Can't load Bundles in Preferences
- Backup .dmg, help docs & APIs from the way back machine. HOT 6
- Revive Vico Editor HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vico.