Comments (15)
It should be possible with a new completer.
A quick and dirty solution: make a copy of the suffix-complete
completer (these lines), rename it and set $char_class_before
to \s
instead of \S
. Then use your new completer. You might want to experiment with various sets of options but I've tested this one just now and it worked.
Tell me if you need further assistance or if I may close the issue (or close it yourself).
from autocomplete-all-the-things.
Thanks! Um but it doesn't work if there are spaces between completion candidates. Can I make fuzzy-complete to have such eager behavior?
from autocomplete-all-the-things.
Yes, it should work with fuzzy-complete
too but I didn't check it. It might be tricky to find the right combination of regexps that won't be too greedy.
What I usually do is abort the completion and add another occurrence of the last part I typed, i.e. /po
becomes /popo
.
from autocomplete-all-the-things.
ah, good point. I'll use that trick 😄 . Thanks! BTW, can I have empty string trigger completions for every space separated items? Use case pdfcrop /path/to/file /path/to/file
. After typing the first path entry, I'd like to auto complete the second one using just one call of fuzzy-complete without any inputs.
from autocomplete-all-the-things.
You would need some special character to mark where to stop searching for the text supplied by the user. The completion needs to know what to consider an input. 'fuzzy-complete'
takes all characters before the cursor matching \S
(all non-whitespace characters), fuzzy-word-complete
uses [-\w]
(every "word character" and additionally a hyphen). In your case we would need to also read the whitespace characters but then we have no character to stop at unless we add one artificially, for example you could add a dollar sign before your input and then probably remove it manually. In general, $char_class_to_complete
is the variable you'd need to tinker with.
I hope to rewrite this plugin at some point to make such modifications easier but it's tough to estimate when I'll have the time to do so.
from autocomplete-all-the-things.
'fuzzy-complete' takes all characters before the cursor matching \S (all non-whitespace characters)
Can we just have a special case for empty inputs?
from autocomplete-all-the-things.
@amosbird
btw: you can also use pdfcrop /path/to/file{,.new}
directly.
from autocomplete-all-the-things.
@blueyed thanks. Um i meant to do in place cropping.
from autocomplete-all-the-things.
Then pdfcrop /path/to/file{,}
, or pdfcrop /path/to/file !#$
.. ;) - but enough for the offtopic.
from autocomplete-all-the-things.
@amosbird What do you mean by empty inputs?
from autocomplete-all-the-things.
I mean that all characters before the cursor matching \S is empty
from autocomplete-all-the-things.
It's like if I input nothing and start triggering completion, it should match something like ".*"
from autocomplete-all-the-things.
What should it complete in such case? Every single whole line?
from autocomplete-all-the-things.
no, every single items separated by spaces
from autocomplete-all-the-things.
Hm, I like this idea. I'll keep it in mind when rewriting the plugin.
from autocomplete-all-the-things.
Related Issues (17)
- Not getting any completions. HOT 4
- Unable to map `undo` to `C-S-BackSpace` HOT 1
- 2nd call to WORD-completion eats command line HOT 11
- Only map aAtt:undo when in completion mode HOT 2
- Broken completion cycling
- What is the font used in the demo gif? HOT 3
- What is a word?
- Feature: complete also from scrollback buffer HOT 9
- Only completes words from above
- Could do with a release HOT 1
- Missing license HOT 2
- What is a WORD? HOT 1
- font in readme gif example? HOT 1
- Previews in overlay HOT 8
- Not completing file paths with slashes HOT 3
- Disappearing highlights HOT 2
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 autocomplete-all-the-things.