Questions tagged [autocompletion]
For questions about the several commands to complete part of a keyword or line that has been typed.
33
questions
31
votes
3
answers
9k
views
How to create my own autocomplete function?
How do I create my own list of auto-completion for certain filetypes?
For example I would like css and html to autocomplete from the list of css classes in FontAwesome.
10
votes
4
answers
3k
views
Vertical WildMenu in Vim
One thing that really bothers me in vim (probably the only thing), is the wildmenu.
In neovim, the wildmenu is vertical and looks as following:
However, in vim, it is horizontal and looks like this:
...
13
votes
1
answer
977
views
Ins-completion of WORDs
<C-p> and <C-n> allow the completion of words found within the current document.
I am taking some notes and writing say {0,1}^n and (E,D) many times. These are WORDs constituted by ...
12
votes
1
answer
7k
views
Vim filename/path completion
I know I can complete filenames/paths from the current directory using ctrl+x, ctrl+f (compl-filename). That works great in combination with set autochdir, which changes updates the current directory ...
9
votes
3
answers
11k
views
Is there a version of Vim or plugin with a Command Mode auto completion?
I'm wanting to learn Vim, but think it's probably too daunting. I imagine learning enough to become powerful with it, then forgetting 99% after I'm on a computerless project for a while. I know just ...
6
votes
1
answer
3k
views
Completion suggestions while typing
I use Vim a lot for writing tasks and I used ^p for completions. However, is there a plugin that suggests you completions while typing like in Andriod-smartphones ?
Thanks.
5
votes
2
answers
1k
views
How to get auto completion provided by <C-N> without typing <C-N>?
I like the simple auto completion provided by Ctrl-N but not typing Ctrl-N everytime to get the completion.
I would like it to work similar to how YouCompleteMe works with automatic suggestions. If ...
5
votes
1
answer
274
views
How do I complete a WORD? [duplicate]
I use the complete function a lot. I have not found a solution to complete a WORD yet. For example, in LaTeX, I use the following expression:
T_{R_{delta}}
If I type T and then Ctrl+xCtrl+n, it ...
5
votes
2
answers
1k
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 ...
4
votes
1
answer
359
views
How to autocomplete tag names containing a colon?
Sometimes I want to autocomplete a tag name containing a colon, for example g:netrw_gx.
I've added to the 'tags' option the location of the tags file of the main documentation (which on my machine ...
1
vote
1
answer
776
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 ...
73
votes
7
answers
112k
views
Is it possible to have vim auto-complete function names, variables, etc. when using it to program?
Many IDEs automatically complete function names, variables, method names, etc. as the user types. The best ones complete the names based both on the language's built-in library as well as what has ...
18
votes
1
answer
2k
views
Bash-like partial tab-complete for filenames in Vim
In Bash, when there are several files with the same prefix and I type part of the prefix and hit Tab, it completes the common prefix and allows me to continue typing to differentiate among the ...
18
votes
1
answer
1k
views
Filename Completion for Remote Files
My friend showed me a cool trick on Emacs some days ago where he could just open a file on a remote server and I instantly thought "there should be a way to do that in vim too" and it was true.
I ...
14
votes
2
answers
3k
views
How can I lookup LaTeX symbols in Vim?
Can I integrate some form of symbol completion to Vim? Dedicated TeX editors like TeXMaker provide a list of symbols for completion (for example, \al shows a list with \alpha, \la shows \lambda and \...
9
votes
2
answers
355
views
Is there a way to disable the foldexpr during autocomplete?
I've noticed that vim's fold method affects the efficiency of autocomplete, e.g. C-N is slow, and C-X L is hideously slow in medium sized files with relatively expensive foldexprs.
I can't see the ...
9
votes
2
answers
317
views
How can I make vim stop splitting my words into chunks?
English language users probably don't have this trouble, but vim is pretty dumb when it comes to regular expressions. In my case most letters in the Turkish alphabet outside the EN alphabet don't seem ...
8
votes
1
answer
1k
views
Filename Completion with Spaces
I have a lot of files that have spaces in their names, and this is giving me problems. If I try to do command line completion for the find command, and one of these files come up, Vim will find it, ...
7
votes
3
answers
916
views
How to set up tags for Ruby, SASS, Slim and Coffescript?
I am developing main in Rails using SASS, Slim and Coffeescript. I have Exuberant Ctags installed and using tpope's setup
It kind of works so at least I can move around my ruby code.
But I would ...
6
votes
2
answers
165
views
How do I get filename completion to ignore a leading `=`?
Occasionally, when writing shell scripts and such, I have entries of the form:
foo=/bar/baz
To get filename completion (<C-x> <C-f>) to work, I have to put a space after the =, and then ...
6
votes
1
answer
2k
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 ...
5
votes
1
answer
1k
views
Including dictionary terms with spaces
We can use dictionaries to help us complete keywords. To set a new dictionary you can use set dictionary+=path/to/dict. This way you will be able to complete from a dictionary by typing <C-x><...
4
votes
2
answers
576
views
How to trigger <tab> auto completion in a key mapping?
I'd like to map Leader+e in normal mode to showing the auto completions of files to edit.
I tried nnoremap <leader>e :e<space><tab>, but it shows :e ^I, where the tab gets rendered ...
4
votes
1
answer
2k
views
When I press ctrl-p and autocomplete a word, is there a way to immediately jump into normal mode by pressing escape without canceling the selection?
I use ctrl-p (and SuperTab with it), quite often to do autocompletion. But what happens quite often is that I press tab to autocomplete, I get the match I want, and then I have to go into normal mode. ...
3
votes
1
answer
185
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#...
3
votes
1
answer
166
views
One pop up menu with keyword and user defined completion
Is there a way to mix user defined completion and keyword completion in one menu triggered by <c-n>?
Keyword completion is probably the most useful method, but syntax completion triggered by &...
2
votes
1
answer
91
views
Autocomplete LateX citations in chapters directory
Currently writing my thesis using LateX, I'm trying to obtain autocomplete on my citations when writing the chapters. The directory structure is that each chapter has its own main.tex files (template ...
2
votes
1
answer
750
views
Autocomplete after serveral chars
I want to use the auto complete feature from vim (ctrln).
How can I activate this feature automatically after I have entered e.g. 3 chars?
Thank You
2
votes
1
answer
6k
views
Neovim: Select an autocomplete option with <tab> instead of <return>
In the example below, how do I use <tab> to select HttpResponse the item instead of <enter>? I'd like to make this change permanent.
This is using Kite within vim in case it matters.
2
votes
0
answers
2k
views
How to (auto) complete filenames?
Developing in nodejs I have a lot of custom module require statements in my javascript source files, like this one:
//
// my nodejs program:
// path/to/projecthome/lib/someModule.js
//
const EMOJI = ...
1
vote
2
answers
503
views
User command with modified 'path' completion?
I'm trying to write a wrapper command around :edit or :find specifically to open either my vimrc or a subpath of ~/.vim/ (e.g. ~.vim/autoloads/foo.vim).
If I run the command with no arguments, it ...
0
votes
0
answers
398
views
vim-pandoc bibliography completion works only when writing a new file with GVim
I have installed vim-pandoc, as suggested here. When I open Vim in the terminal I get only 'Omni completion (^O^N^P) Pattern not found' errors. echo pandoc#bibliographies#Find_Bibliographies() returns ...
0
votes
1
answer
517
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 ...