Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [ins-completion]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
0 answers
101 views

Complete text with one tap

I use a plugin called supertab( ervandew/supertab) that provide completion options. A menu automatically appears after I type 2 characters. What I want to do, is to have a mapping that completes the ...
user avatar
  • 1,124
3 votes
1 answer
38 views

Word completion ^P / ^N is very slow because of scanning a :term buffer

I open a terminal window inside of a vim session and leave it there for weeks, use it for compilation, running and debugging my code. After couple of days the length of the terminal buffer grows over ...
user avatar
  • 133
3 votes
1 answer
143 views

How does ft-c-omni work and how can I make it faster?

As I was studying the various ways of doing completion in Vim 8.0, I came across the very interesting "omni-completion" feature and its 'omnifunc' option, which is specialized as ccomplete#...
user avatar
  • 349
3 votes
2 answers
258 views

Keep <C-X> <C-F> filename completion menu alive between directories

I'd like to use <C-X> <C-F> to autocomplete a long filename in insert mode, say /foo/bar/baz.txt. When I type in /f, I can press <C-X> <C-F> to complete to /foo/. However, ...
user avatar
  • 133
1 vote
1 answer
432 views

Unmap <c-n> / <c-p> in completion menu to use as previous / next snippet placeholder with Coc

My completion mappings scheme with coc is the following: <c-@> (ctrl-space): trigger the menu / use the selected item (or the first one) <c-j> and <c-k>: navigate the list (or also ...
user avatar
  • 2,400
1 vote
0 answers
3k views

Stuck on X mode (INSERT COMPL), how do I quit?

I've been using vim for 3 years and this is the first time I hear about this mode. This is also quite embarrassing. I have no idea what did I type, I didn't intend to enter this mode. Vim will write ...
user avatar
1 vote
0 answers
35 views

Ins-completion C-X C-F and the path variable [duplicate]

Can the insert-completion of file names CTRL+XCTRL+F can be used to complete filenames that are not in the current working directory ? But rather in any in the path variable ? Can we, for example, ...
user avatar
  • 401
2 votes
1 answer
59 views

Ignore a filetype when opening but not when using insert-mode popup-menu

Using :h wildignore, I can ignore certain types of files or certain folders when searching through them to open one of them. But that also means those files and directories will be ignored when I try ...
user avatar
  • 2,830
1 vote
1 answer
35 views

Recognizing the right expression to complete in insert mode

When one triggers a completion, vim guesses what was the expression (behind the cursor) that you want to complete. I don't fully understand the logic, but it seems that it assumes that the expression ...
user avatar
  • 1,124
4 votes
0 answers
123 views

switching `<Down>` and `<C-n>` in popup menu

I'd like to switch the behaviour of the <Down> and <C-n> keys when the popup menu (like from omnicompletion) is visible (and <Up>/<C-p> respectively). The following two ...
user avatar
  • 545
2 votes
1 answer
181 views

Filter file completion list

When I write markdown and want to insert an image, i_CTRL-X_CTRL-F comes in handy. I know that I can filter by typing a few characters that precede the filename, but actually what I want is either ...
user avatar
  • 353
1 vote
1 answer
250 views

Can I disable insert-mode completion (ins-completion) key mapping (CTRL-X)?

Because the keys d and xare used in normal mode to delete letters, I map <ctrl-d> and <ctrl-x> in insert mode to delete and backspace. However, when I started to use completion plugin (I ...
user avatar
3 votes
1 answer
512 views

Cancel command line completion insert

I notice a different behavior in command line completion from the regular completion in a buffer. Usually even if I select and item from the completion menu, CTRL-E cancels the completion and reverts ...
user avatar
  • 63
0 votes
0 answers
114 views

How to start insert-mode completion from select mode using Vimscript?

I have some text selected in select mode. I want to delete it and start insert-mode completion. When I type these keystrokes into Vim it works perfectly: gvc<C-X><C-U> gv switches to ...
user avatar
  • 1,013
2 votes
1 answer
116 views

How to get insert mode map to work regardless of completion popup?

I have an insert mode mapping which calls a function to select some text and leave vim in select mode. inoremap <silent> <C-J> <C-\><C-O>:call MyFunction()<CR> This ...
user avatar
  • 1,013
0 votes
0 answers
178 views

Mapping to have completion attempt one mode and fall back to another if no completions found

I am attempting to map ,<tab> in insert mode to first attempt omnicompletion then fall back to <c-p> or <c-x><c-p> completion. I have used this reference to successfully send ...
user avatar
1 vote
0 answers
117 views

Change the behavior of CTRL-X submode key bindings

I wanted to change the behavior of some keys in the :h i_CTRL-X submode. For example, I wanted to use the following: inoremap <expr> <C-f> pumvisible() ? "\<C-x>\<C-f>" : "<...
user avatar
  • 2,830
2 votes
0 answers
44 views

How to omit dictionary source file in dictionary completion

<C-X><C-K> complete words with long dictionary file name, such as /home/xxx/.vim/mydict. I'd like to omit or shorten the descriptive info. I have googled but got no hints. Any advice?
user avatar
0 votes
1 answer
201 views

Explain `infercase` option

I don't understand what :h infercase is supposed to do. I tried out some scenarios, but still can't figure out the differences between when it is turned off and on. Can someone explain it to me, ...
user avatar
  • 2,830