gelguy / cmd2.vim Goto Github PK
View Code? Open in Web Editor NEWcmdline-mode enhancement for Vim
License: MIT License
cmdline-mode enhancement for Vim
License: MIT License
Some cmap
s cause recursive mapping in Cmd2Suggest.
To fix in later version.
When the plugin Cmd2 is active and I type :messages
, the messages aren't shown.
Here's the error:
Error detected while processing function Cmd2#main#Run..122..278..112..124..142..Cmd2#ext#suggest#GetCandidates:
line 23:
E684: list index out of range: -1
E116: Invalid arguments for function len(tokens[-1]) < g:Cmd2__suggest_min_length) && !a:force_menu
E15: Invalid expression: (len(tokens[-1]) < g:Cmd2__suggest_min_length) && !a:force_menu
let g:Cmd2_cmd_mappings = {
\ 'iw': {'command': 'iw', 'type': 'text', 'flags': 'Cpv'},
\ 'ap': {'command': 'ap', 'type': 'line', 'flags': 'pv'},
\ '^': {'command': '^', 'type': 'normal!', 'flags': 'r'},
\ 'w': {'command': 'Cmd2#functions#Cword',
\ 'type': 'function', 'flags': 'Cr'},
\ }
let g:Cmd2_options = {
\ '_complete_ignorecase': 1,
\ '_complete_uniq_ignorecase': 0,
\ '_quicksearch_ignorecase': 1,
\ '_complete_start_pattern': '\<\(\k\+\(_\|\#\)\)\?',
\ '_complete_fuzzy': 1,
\ }
cmap <leader><leader> <Plug>Cmd2
nmap : :<F12>
cmap <F12> <Plug>(Cmd2Suggest)
cmap <expr> <Tab> Cmd2#ext#complete#InContext() ? "\<Plug>(Cmd2Complete)" : "\<Tab>"
set wildcharm=<Tab>
To reproduce error: :<tab>
I'm also using neovim if it matters.
To fix in later version.
Using the suggested mappings, when I type '/', it opens search and puts '' as search input. Have you seen this before? If I actually type / then it works - but the mapping doesn't. Spent a while trying to run it down and wasn't able to figure it out.
Thanks for your work on this plugin!
Cmd2Suggest does not support visual mode i.e. v/
.
To fix in later version.
Special characters which have the no_reenter flag will cause Cmd2Suggest to exit from the cmdline.
Examples of these are <C-V>
, <C-K>
, <C-D>
etc. These cause exit from the cmdline as Cmd2Suggest is unable to decide if it should return back to the cmdline.
The best way to handle this would be to create a special module to handle each of these cases.
To be fixed in later version (maybe).
I have the following hotkeys configuration:
" : or /: Enable Cmd2 automatically.
nmap : :<F11>
nmap / /<F11>
" <F11>: Enable Cmd2 manually.
cmap <F11> <Plug>(Cmd2Suggest)
" <Tab>: Perform completion using Cmd2.
cmap <expr> <Tab> Cmd2#ext#complete#InContext() ?
\ '\<Plug>(Cmd2Complete)' :
\ '\<Tab>'
It normally works.
However, in Paste Mode when pressing :
I get :<F11>
in the commandline (without cmd2) instead of having an empty commandline with cmd2 active.
Hi
If i enable it with
cmap <expr> <Tab> Cmd2#ext#complete#InContext() ? "\<Plug>(Cmd2Complete)" : "\<Tab>"
And then try
:e <TAB>
it just prints ^I
https://github.com/haya14busa/incsearch.vim/blob/master/doc/incsearch.txt#L73
incsearch.vim highlights matches immediately as characters are typed in /
mode
Is there a way to use both <Plug>(Cmd2Suggest)
AND <Plug>(incsearch-forward)
e.g.
map / <Plug>(incsearch-forward)<Plug>(Cmd2Suggest)
+@haya14busa maybe need to implement (incsearch-forward-nohl)
Does Cmd2
support neovim async functionality?
It would be very useful for completing long lists, like help (:he ..
).
I've installed both Cmd2
and airline
plugins.
The problem here is that Cmd2 replaces airline as statusbar when autocompleting.
I'd like instead that Cmd2 displays autocomplete results inside the airline.
Is that possible?
Thanks,
Alessandro
He
I just stumbled upon your plug-in and really like it. By now I was always using ''vim-scripts/CmdlineComplete.git' to allow for a completion on command line. The problem with that one however is that the completion in a search and replace is only working before the /
not in the second part. This seems to be the same for your plug-in? Or can I achieve that with the right options set? Any help with that would be appreciated.
My setup now is:
let g:Cmd2_options = {
\ '_complete_ignorecase': 1,
\ '_complete_uniq_ignorecase': 0,
\ '_complete_fuzzy': 1,
\ }
cmap <expr> <Tab> Cmd2#ext#complete#InContext() ? "\<Plug>(Cmd2Complete)" : "\<Tab>"
set wildcharm=<Tab>
With the release of patch 1206 we now have an autocmd
for entering the command line, which until now the suggestion for an auto-typed <F12>
has been used to simulate. Is it possible to invoke Cmd2 using these new events, and if so, what steps are necessary to do it?
For example, :echo input(":")
will ask for input in command mode. This plugins doesn't seem to work in such situations. I have mapped <C-R>
using your method: junegunn/vim-peekaboo#23 (comment) , and I'd like to have this feature for inputs also.
I start cmd2, type something and try to press Backspace, however the characters are not deleted.
Vim seems to ignore that hotkey.
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.