Comments (5)
I get "We donβt support that file type." messages, so I'm not sure how to attach the minimal example files. I'll do so in comments.
Yes, I much prefer that you include the files verbatim; preferably as part of the main post.
In your "step 2", the sentence ends after "and press"... so, press what?
from vimtex.
Sorry @lervag, I updated the post to say <tab>
.
from vimtex.
Ok, I tried to reproduce this. I did:
mkdir test
cd test
git clone https://github.com/ervandew/supertab
vim test.vim
vim test.tex
The contents of test.tex
is the same as what you provided, whereas I simplified the test.vim
file to this:
set nocompatible
set runtimepath^=~/.local/plugged/vimtex
set runtimepath^=supertab
set runtimepath+=~/.local/plugged/vimtex/after
filetype plugin indent on
syntax enable
nnoremap q :qall!<cr>
silent edit test.tex
Now, finally, I run vim --clean -u test.vim
, which will open the test.tex
file with VimTeX and supertab enabled. I start typing a word (in the document) and complete with <tab>
, and I can see the delay you mention.
The delay is caused by VimTeX indirectly, because VimTeX will set the 'include'
option. You can inspect its value with :set include
after opening a LaTeX file. Now, what is happening is that keyword completion (CTRL-N
), which is executed by supertab with <tab>
, will scan for keywords from included files. This is the default behaviour in Vim. Notice that Neovim has changed this default. It is controlled by the 'complete'
option:
*'complete'* *'cpt'* *E535*
'complete' 'cpt' string (default: ".,w,b,u,t,i")
local to buffer
This option specifies how keyword completion |ins-completion| works
when CTRL-P or CTRL-N are used. It is also used for whole-line
completion |i_CTRL-X_CTRL-L|. It indicates the type of completion
and the places to scan. It is a comma-separated list of flags:
. scan the current buffer ('wrapscan' is ignored)
w scan buffers from other windows
b scan other loaded buffers that are in the buffer list
u scan the unloaded buffers that are in the buffer list
U scan the buffers that are not in the buffer list
k scan the files given with the 'dictionary' option
kspell use the currently active spell checking |spell|
k{dict} scan the file {dict}. Several "k" flags can be given,
patterns are valid too. For example: >
:set cpt=k/usr/dict/*,k~/spanish
< s scan the files given with the 'thesaurus' option
s{tsr} scan the file {tsr}. Several "s" flags can be given, patterns
are valid too.
i scan current and included files
So, I think you can remove the lag if you remove i
from the complete option, i.e. add this to your vimrc:
set complete-=i
from vimtex.
Thanks a ton for the very clear explanation of the problem, and the fix!
from vimtex.
No problem π
from vimtex.
Related Issues (20)
- Error detected while processing function callback HOT 1
- ClassWarning is not detected HOT 1
- Lag, (probably not related with known matchparen issue HOT 4
- Add conceal for corners HOT 1
- Poor error output in bibliography issue HOT 3
- Autocompletion using '\' instead of '/' in paths (Windows 10) HOT 7
- Cannot call zathura from vimtex HOT 4
- vimtex doesn't seem to recognise latexmkrc requesting lualatex HOT 4
- An option to deal with dot when toggling inline and displaymath with `ts$` HOT 1
- Real-time scrolling output of latexmk (or compiler) HOT 4
- Runtime compiler not using xelatex using `vimtex_compiler_latexmk`? HOT 2
- Highlight illegal characters HOT 10
- Implement a .lua configuration HOT 3
- how do I unmap just some mappings? HOT 4
- Inconsistent syntax highlighting in subscript and superscript HOT 1
- Help Add custom concealing rule for VimTeX on neovim HOT 3
- How do I get rid of a "latexmk is not executable" error? HOT 4
- Inverse search does not work with sioyek HOT 10
- Magic comment for compiler fails if there are trailing spaces HOT 3
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 vimtex.