Questions tagged [autocompletion]

For questions about the several commands to complete part of a keyword or line that has been typed.

Filter by
Sorted by
Tagged with
0
votes
0answers
17 views

navigating dictionary completion

In my vimrc I have the following mappings: set completeopt=longest,menuone,preview inoremap <C-h> <C-n> inoremap <C-k> <C-p> inoremap <Leader>k <C-x><C-k&...
1
vote
2answers
67 views

What is the difference between loaded and unloaded buffers?

I was looking at the documentation for the 'complete' option, and I found it a bit confusing: . scan the current buffer ('wrapscan' is ignored) w scan buffers from other windows b scan other ...
0
votes
2answers
34 views

How to remap Autocomplete on Control+N, to Control+Space?

I am trying to remap this functionality: to Ctrl+Space, by using this line in .vimrc inoremap <C-Space> <C-n> However, I can not seem to get it to work. If I press Ctrl+Space after ...
0
votes
0answers
26 views

How can I complete both words and WORDS? [duplicate]

I found this question, but mine is a bit different. When I write code dealing with arrays or classes like $myArray['myElement'] or document.getElementById("myElement"), I get annoyed because I have ...
1
vote
0answers
58 views

How to get YouCompleteme to work with kernel headers

I am taking an OS class and we have an upcoming assignment involving Kernel modules. I'm reading Wiley OS text to prepare and they have the below code. I keep on getting an error that the header files ...
1
vote
1answer
45 views

Sophisticated autocompletion in Vim in a VScode manner

I'm currently switching to Vim as my main text editing tool and I try to investigate if it is possible to make Vim behave like VScode when it comes to autocompletion. I got really used to the way ...
1
vote
1answer
28 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 ...
2
votes
1answer
26 views

How to show completion menu when typing EX-command?

When I use MS Windows version gvim, when typing EX-command, I can press TAB then there will show a completion candidates menu. For example, if I type :colorscheme then a space then press TAB, gvim ...
2
votes
0answers
29 views

How to get this tab/autocompletion setup?

Basically what I want is a PyCharm-like completion: If there is only whitespace, insert <TAB>. If pum is visible and nothing is selected, complete with first, otherwise choose the selected word/...
1
vote
1answer
32 views

getting vim to autocomplete python methods

I am coming from statically types languages, but I will have to be using python for the next few years and I want to get my setup as smooth as possible. Right now I am using vim-jedi, and deoplete-...
4
votes
2answers
79 views

How to enable “on-the-fly” autocompletion?

How can I make it so that no command or extra keystroke is required for the autocompletion menu to pop up? i.e. what I want is the menu to be always present while in insert mode and to be constantly ...
1
vote
1answer
127 views

Autocompletion plugin for c/c++ with specific header path?

Is there a plugin which autocompletes C/C++ code from specific headers given in a specific path (i.e. /path/)? If I include some headers from that path, I would get autocompletion from given header.
1
vote
1answer
32 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 ...
0
votes
0answers
38 views

Temporary normal mode doesn't wait for the command

When I press C-o in insert mode, the expected behaviour is that vim will wait for me to execute a single command and then returns to insert mode. Usually, after pressing C-o I have all the time in the ...
1
vote
0answers
27 views

Prevent “Pattern not found” error in autocompletition (i_Ctrl-N)

I use the following mapping for <Tab>: inoremap <expr> <Tab> getline('.')[col('.') - 2] =~ '\w' ? "<C-N>" : "<Tab>" It works well except that if I want to insert a tab ...
0
votes
1answer
22 views

Adding directory (header and source) to autocompletition search

I use Ctrl+P and Ctrl-N for autocompletition, and since I have library sources in another directory, like /opt/ST/STM32F4xx_DSP_StdPeriph_Lib_V1.8.0/Libraries/STM32F4xx_StdPeriph_Driver/inc /opt/ST/...
2
votes
0answers
45 views

Next tab completion item

I was seeing how the different default colorschemes look like in vim. To do that I typed :colo, then space and tab. But then when I want to set the next one, I have to press tab a lot of times to get ...
3
votes
1answer
48 views

Autocompletion filenames with prefix in variable

In Vim I make auto-completion of the filesystem paths just by the shortcut Ctrl + x, Ctrl + f, in insert mode. In a Makefile I sometimes put a path's prefix in a variable. For instance STYLEDIR=/home/...
-1
votes
1answer
40 views

ctrl-n - should not insert text

When I am using the ctrl-n functionality (autocomplete word), it just inserts the text. I do not want to do that, instead, I would want to choose a word from the dropdown list, which I may then want ...
2
votes
0answers
26 views

Make <Esc> close completion menu and cancel selection, without side effects

I would like to make my Vim completion menu a little more IDE-like, and I was able to achieve this using the bindings suggested here. However, the <Esc> binding causes a bit of a problem: ...
2
votes
0answers
22 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?
2
votes
1answer
143 views

Cycle through autocomplete menu using tab

I am activating my autocomplete menu in vim using: inoremap <C-@> <C-n> and after it opened and only when it opened I would like to use the "tab" key to cycle through the menu. But when ...
0
votes
1answer
476 views

Integrating autocomplete and snippets

I'm trying to set up an autocompletion/snippet workflow that's a bit complicated. This is stemming from needing a better workflow for latex. Right now I'm using coc.nvim and UltiSnippets but I am ...
2
votes
0answers
107 views

Omni completion Pattern not found - Error loading rails environment

I'm trying to make Omni completion work with my Ruby files, but it only works with Ruby's core libraries; for instance, after typing String.<C-X><C-O> i get all Ruby's String methods, ...
0
votes
0answers
35 views

How can I get the autocompletion databases on VIM using YouCompleteMe?

I just wanted to add the completion functionality on vim. For that reason, I went for YouCompleteMe plugin. It worked well with the following configuration on my .vimrc file: execute pathogen#infect()...
1
vote
0answers
24 views

Is it possible to have auto suggestion of schema names?

(tag suggestions welcome) I've just started learning Vim. My other text editor, which I use for writing Hive queries is a browser based editor which has this very useful feature of auto suggesting ...
0
votes
0answers
42 views

Fuzzy / smart / intellisense completion in input mode

Standard Vim completion supposes that you type in the beginning of the word, then press CTRL-N, and get all the words that begin with the prefix you typed in. In my situation, prefixes are mostly the ...
2
votes
1answer
54 views

file name completion in .gitignore

I often "unignore" files in .gitignore, like this: * !.gitignore !file.txt !dir !dir/* Can I modify the pattern for which insert mode file name completion would work? In this case, instead of ./ I'd ...
0
votes
1answer
62 views

How to navigate in auto completion menu, when arrows are disabled in .vimrc

Reason for my question: It's not the first time I have cancelled my arrow keys in vim, and the improvments in my typing is again tremendous. I wish to keep arrow keys non effective inside vim. ...
2
votes
1answer
181 views

autocompletion - How to add phrases as thesaurus synonyms

I have a thesaurus file which contains synonyms for the word iterate. I would like to add an alternative phrase for iterate like loop over so I added it to the thesaurus. Unfortunately, this doesn't ...
1
vote
1answer
117 views

`q` does not record tab completion correctly

Whenever I want to record complex macro between qa and q, I have to remember that, for instance, I can't use Tab-completion while type some ex command, otherwise the macro will not work. Have I ...
1
vote
1answer
80 views

Supertab inserts tabulation instead of autocompleting

I have supertab installed alongside with vim-go. Next, I'd like to have autocomplete when writing in Go, but when I press tab its literally inserts a tab character instead of showing the autocomplete ...
0
votes
1answer
29 views

non-word characters in tags

I have tags (generated with ctag) of the form eq:local-canonical-form Now: because of the : I cannot use eq:loc<c-x><c-]> to expand the tag. because of the : and the - I cannot use <...
2
votes
0answers
58 views

vim recorded session like doitlive

I have a presentation to make for a conference and I'm not allowed to use slides, only live coding. Is there a tool in vim which will help me avoid typos ? :) Something like doitlive which you can ...
1
vote
0answers
63 views

How to get html tag auto completion?

I can't seem to figure out how to implement auto tag completion for html. Is there a plug-in or something else you guys use that works? Is there just one thing I can download that will handle ...
3
votes
2answers
314 views

Easiest way to insert LaTeX matrix?

Recently I found myself in a situation that need to type in quite a number of matrices to LaTeX by hand, so I was wondering if there are some tools that can help me to save some keystrokes. The ...
1
vote
1answer
92 views

customize Ex command completion

vim provides a nice way to complete the Ex commands, which uses the -complete=custom,Func or complete=customlist,Func. It also provides many predefined completion methods such as -complete=dir. Is is ...
2
votes
1answer
67 views

Unable to repeat comment string for new line

Vim has the option to automatically continue comments when a new line is entered as described here. This currently works perfectly for // and # in .cpp and .python files respectively. I tried to add ...
0
votes
1answer
94 views

Is it possible to type “return + shift” to insert a new line in deoplete?

Here is a situation. I use deoplete but since the pop-up menu when I type in something already puts the cursor at the first item on the list, when I type in return, it inserts a new line. So I want ...
1
vote
0answers
76 views

remap keybinding for vim gocode autocomplete feature? (remap keybinding in insert mode) [duplicate]

So I installed vim-go and gocode and Blackrush/vim-gocode.git (the latter because I use pathogen). So far so good! I am fine, I can type <C-x><C-o> in insert mode and I get completion ...
1
vote
1answer
244 views

Question about autocompletion in Vim editor and html document

Why does one of Vim's autocomplete functions (ctrl+n) not work in html documents, while the other (ctrl+p) still does?
1
vote
0answers
371 views

How to automate Vim's native auto-completion with a drop-down menu?

I know there is a ton of plugins and topics that discussing about auto-completion things in Vim! I just need the Vim's native auto-completion to be automated! auto-suggestion words, etc from ...
7
votes
3answers
188 views

Return from command autocomplete

If I type :e foo/**/foo*.js and hit tab then vim replaces the *s with all possible suggestions in the filepath. What if I realized that I wasn't specific enough (there are too many results in ...
0
votes
2answers
384 views

How to enable dictionary autocompletion without spell option set

I noticed, that in any source code file, regardless of the programming language, I can use the dictionary autocompletion (Ctrl + x Ctrl+k) if the spell option is set, if it's not, then the editor ...
2
votes
1answer
53 views

Close particular buffer immediately upon leaving it

I have a really large file with many paths in it. I don't want it to participate in any of the completion mechanisms. Is there a way to mark a particular buffer as "not a candidate for keyword ...
0
votes
1answer
33 views

Why can't complete month in txt file?

Part of setting in my .vimrc. cat .vimrc autocmd FileType txt setlocal omnifunc=CompleteMonths fun! CompleteMonths(findstart, base) if a:findstart " locate the start of the word let line = ...
1
vote
1answer
244 views

pythoncomplete can't complete python's build-in functions?

filetype plugin on autocmd FileType python set omnifunc=pythoncomplete#Complete I found that pythoncomplete can't complete python's build-in functions. vim test.py import os os. #Now the complete ...
0
votes
1answer
120 views

Auto activate autocompletion

I would like to have autocompletion active on its own like on sublime text without doing Ctrl+n. I would like to have this without any none native plugins as the already existing autocompletion in ...
0
votes
2answers
220 views

How to call both javascript and php complete in editing html file with vim?

I have installed tern_for_vim and setted complete in .vimrc. autocmd FileType javascript setlocal omnifunc=tern#Complete autocmd FileType php set omnifunc=phpcomplete#CompletePHP Now i can call ...
2
votes
0answers
558 views

Why — ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) Pattern not found?

vim --version VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Sep 30 2017 18:21:38) Included patches: 1-197, 322, 377-378, 550, 703, 706-707 Modified by pkg-vim-maintainers@lists.alioth.debian.org ...