Questions tagged [performance]

The tag has no usage guidance.

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

Delay When Closing `:terminal` Window

Long story, short.... Everything's fine on my MacBook, but I have an issue in Neovim 0.9.1 on Windows 10. I see this behavior when starting nvim from the usual shells - Command Prompt (cmd.exe), ...
Phil R's user avatar
  • 471
0 votes
1 answer
1k views

How to improve CMP performance?

nvim-cmp + Tailwind LSP lags the crap out of the editor when typing HTML class names. I understand this must be because Tailwind's suggestions come in large quantities. But is there a way to improve ...
Bruno Braga's user avatar
0 votes
0 answers
60 views

a `nnoremap <buffer><silent>` on .vimrc make the curssor very slow on normal mode

To automate a bit the title creation for rst text I added this to my .vimrc: au FileType rst nnoremap <buffer><silent>h1 yypVr=o au ...
user3313834's user avatar
1 vote
0 answers
316 views

neovim: breakindent results in slow insert mode

I had the feeling that neovim was being sluggish in insert mode so I started bisecting my init.vim. Contrary to my expectations it looks like dozens autotrigger snippets were not the culprit but rater ...
0x539's user avatar
  • 179
1 vote
1 answer
4k views

is neovim faster than vim? [closed]

I've read it in some places that neovim is faster than vim, but many of these are a few year old blog posts and I haven't seen any actual comparisons (I'm not even sure how one could be reliable done ...
fbence's user avatar
  • 603
0 votes
0 answers
463 views

Neovim freezes when opening a folder in WSL2

When I open neovim with to show a folder it completely freezes. When opening a folder from the command line: nvim . I see a completely black screen When having a file open, navigating to parent ...
Pete's user avatar
  • 113
2 votes
2 answers
866 views

Fastest way to compare string with pattern

As far as I know I have these two options to compare a string with a pattern: Using the =~ comparison. Using the matchstr() function. So it looks like this: " with =~ if string =~ "pattern&...
TornaxO7's user avatar
  • 561
4 votes
1 answer
441 views

Delete and change key sequences are slow

When I use mapped key sequences which cause an immediate change in the file (e.g. cw, dw, D, C), i have a wait time of roughly 1 second. Other mappings which are just movement (e.g. 3w) or movement ...
Exnur's user avatar
  • 51
4 votes
0 answers
75 views

Can using too many abbreviations slow down vim?

Recently I started using the iabbr to the best of my abilities. While editing a file I may have sourced as many as 500 abbreviations. I have also noticed that my vim is slowing down recently. The ...
caffeinemachine's user avatar
1 vote
1 answer
812 views

Vim takes a long time to close over SSH?

While ssh'd into my server, vim hangs for a variable amount of time (about 2 seconds, but can be longer or shorter) when opening and closing. It's worth noting that (to my eyes) the delay is the ...
Brandon Sturgeon's user avatar
2 votes
0 answers
228 views

How to make code-folding more efficient

I have a ruby file while is about 5K+ lines long. My current setup uses the vim-ruby plugin. With this, I enable code folding with let ruby_fold = 1 This opens my ruby files pre-folded. I can open ...
Igbanam's user avatar
  • 121
2 votes
0 answers
59 views

Is it more efficient to use one function instead of multiple autocommands?

I have a lot of lines with with filetype-specific autocommands defining mappings and abbreviations, which looks like this: augroup vimrc au! ... au FileType blah nnoremap <buffer> aa bb au ...
Thunderbeef's user avatar
5 votes
0 answers
310 views

MacOS Terminal CPU spike after exiting Vim

I'm using Vim 8.1 from homebrew on MacOs 10.14.6. Whenever I exit vim back to the terminal, the first keypress in the terminal afterward results in a beachball and CPU spike to 100%, with terminal ...
Andrew Barnett's user avatar
1 vote
0 answers
251 views

Simple .vimrc takes a very long time to save

Saving a file with :w takes several seconds for me, and I can't figure out the culprit. This is my .vimrc " Specify a directory for plugins " - For Neovim: ~/.local/share/nvim/plugged " - Avoid using ...
Julie Qiu's user avatar
1 vote
0 answers
505 views

Why is network latency becomes too long when edit in the sshfs mounted files

I mounted the remote server directory to my local machine mount point with sshfs. Thus I could use my local vim to edit my code, it is much faster than editing with the vim installed to the remote ...
coin cheung's user avatar
0 votes
1 answer
61 views

Are there any performance difference between :edit and :buffer on existing unchanged buffer?

I used to believe that :buffer file is faster than :edit file if file is an existing unchanged buffer. I even created a tiny function for this: function! myvim#open(file) abort let nr = bufnr(a:...
dedowsdi's user avatar
  • 6,198
0 votes
1 answer
111 views

Are there any built-in functions to search sorted list?

Are there any built-in functions to search sorted list? Such as binary_search, lower_bound, upper_bound, etc.
dedowsdi's user avatar
  • 6,198
0 votes
1 answer
327 views

Vim syntax line matching mechanism

Can someone explain or link to valid explanation information on the syntax highlighting mechanism. In particular I am having having a hard time understanding how rules are applied. Imagine the ...
JM. Marcastel's user avatar
1 vote
1 answer
1k views

Vim slow to open buffers, but not specifically in any sourcing plugin step

I'm using Vim primarily for rails projects, and have found a fairly significant difference in the start up time between a couple of my projects. Here's one project's startuptime log, while opening a ...
ttrmw's user avatar
  • 21
0 votes
1 answer
755 views

sheerun/vim-polyglot ruby seems cause enormous slow down, how to fix or better plugin to use?

When I open a ruby based file (.rb,.erb) in nvim, it causes my whole laptop to slow down! This seems to be caused by sheerun/vim-polyglot that I use for syntax highlighting, specifically the ruby ...
Thermatix's user avatar
  • 239
1 vote
2 answers
2k views

Analyze NeoVim Performance Bottlenecks

My Vim is kinda slow for nearly everything. Opening a file takes five seconds, it flickers when I move up and down NerdTree and sometimes when I switch windows or tabs, it freezes for dozens of ...
Alex Alonso's user avatar
0 votes
1 answer
104 views

Vim Slowing down when creating .vimrc in $HOME

It's a couple of month that I'm using Vim and I'm happy with it. But working on big files (About 2000 lines) is really annoying. I have some plugins and today I wanted to fix this problem. So I ...
Shantia's user avatar
1 vote
1 answer
189 views

Switching between tabs takes a few seconds

Using gt and :tabnext I need to wait some time and I experience the same lag when I use :split myfile.txt. However vim myfile.txt from bash opens much faster. My Mac is pretty fast, and I don't have ...
Vitaly Zdanevich's user avatar
0 votes
2 answers
538 views

Strangely slow key bindings

I defined these maps, to yank into system clipboard. noremap <leader>y "*y noremap <leader>Y "*Y noremap <leader>yy "*yy But when I use the first one (<leader>y), I find it ...
Violapterin's user avatar
2 votes
1 answer
358 views

How to track time-expenditure for Vim operations?

Is there a syntime equivalent global command that can track the overall Vim performance? I am having trouble debugging the cause for a set of very-slow file-operations on a Windows machine. Since ...
llinfeng's user avatar
  • 352
3 votes
1 answer
755 views

neovim takes a long time to open files

On profiling, I found that <SNR>101_parse_screen() is taking above 6 seconds. This problem goes away when I comment out the plugin vim-polyglot. This is most evident for vue files. Not sure if ...
nabn's user avatar
  • 143
3 votes
2 answers
722 views

Lag from filetype plugin indent on

I'm getting lag in vim when navigating relatively small text files if filetype plugin indent on is uncommented in my vimrc file. My full vimrc file is pasted below. Any help on how I can get it ...
user1071182's user avatar
0 votes
1 answer
278 views

How to execute multiple command on file open?

Syntax highlighting slowing my vim down. I set syntax sync maxlines=100 syntax sync minlines=100 Now i need to execute :syntax off :syntax on After every new file getting opened to save ...
IC_'s user avatar
  • 141
12 votes
1 answer
6k views

Why is vim save so slow?

When I save a file in Vim using :update or :w, Vim's entire UI blocks for about a second while it does something mysterious that (as a side effect) writes the buffer being edited to disk. This takes ...
Steven Lu's user avatar
  • 2,231
3 votes
2 answers
2k views

Vim slows down with multiple buffers etc

I think noticing a slow redrawing and slow cursor movement on a fastest PC, is one of the popular frustrations with Vim. Here I am as a yet another instance. I have a fresh installation of VIM, with ...
Loves Probability's user avatar
10 votes
1 answer
7k views

Most annoying slow-down of a plain-text editor! [closed]

I am a happy user of VIM, except for some bits which I really want vim to improve on. One main issue is frequent slowdown of VIM spoiling the amazingly productive text-editing experience on a fastest ...
Loves Probability's user avatar
0 votes
1 answer
98 views

How do I "draw" a buffer from scratch in an efficient manner?

I am writing a small plugin to manage my address book (the actual plugin interfaces with the abook program). I use a special buffer (nofile) and I redraw the entire buffer each time something changes....
grochmal's user avatar
  • 1,656
3 votes
1 answer
577 views

Is there an autocmd event while triggering the insert mode completion popup menu?

There is a CompleteDone and MenuPopup event. However, I can't find an event for the triggering of the insert mode completion popup menu. So if I want to do something when triggering the completion ...
tamlok's user avatar
  • 831
5 votes
1 answer
2k views

Folding slow with vimtex

Automatic folding with the vimtex plugin is unbearably slow. Is there anything I can do to speed this up? I tried installing the fastfold plugin but that did nothing I could notice.
Toothrot's user avatar
  • 3,119
3 votes
1 answer
393 views

Slow startup time unrelated to plugins

When I open vim (or gvim) on MacOS X, the window opens immediately, but there is a pause of about a second before the cursor appears. I've profiled my plugins, but their startup times don't account ...
Jonah's user avatar
  • 743
4 votes
1 answer
610 views

How can I make a slow-ish `system` call in a statusline without corrupting the display?

I wrote a quick snippet of VimL to display, in my statusline, the type of the currently focused Haskell expression It looks like this (click for better quality (as gfy)): I've included the code below,...
wchargin's user avatar
  • 2,707
2 votes
1 answer
162 views

What is the fastest way to perform this change?

In my codes, I often have to do this kind of text editing: u(:,:,:) = 0._dp v(:,:,:) = 0._dp temp(:,:,:) = 0._dp To: grid%u(0:nx,0:ny,0:nz) = 0._dp grid%v(0:nx,0:ny,0:nz) = 0._dp grid%temp(0:nx,0:...
solalito's user avatar
  • 363
5 votes
1 answer
110 views

What are the methods of speeding up parsing of a big file using Ex?

I did recently some performance test where I've created artificially 1GB of random text file by: $ hexdump -C /dev/urandom | rev | head -c1G | pv > file which has around 13mln of lines starting ...
kenorb's user avatar
  • 18.2k
8 votes
3 answers
3k views

matchpairs makes vim slow

I use set matchpairs+=<:> in my config (to help when editing HTML, for instance), but I just noticed it made vim very slow when editing emails. Is there a way to have this setting without ...
a3nm's user avatar
  • 425
2 votes
0 answers
50 views

Vim slowdown when browsing with netrw [duplicate]

Sometimes there are several second long slowdowns when browsing Clojure source code in a Git repo via Vim's netrw. My Vim version is 7.4.865. I do have a couple of plugins that must have caused this. ...
vitvly's user avatar
  • 215
1 vote
1 answer
488 views

matchadd makes vim slow with large files

In my vimrc I have this line : call matchadd('ColorColumn', '\%81v', 100) It colors the 81th column in a subtle grey background so I can track my line length : (see the l and the f) I found out ...
nobe4's user avatar
  • 15.9k
15 votes
2 answers
2k views

Detect most resource hungry plugin

I have some plugins installed for vim, I would like to know how can I find out what plugin uses most resources (CPU, RAM) ?
JaDogg's user avatar
  • 407
5 votes
3 answers
1k views

Improve performance of syntax highlighting in Vim

I have some C++ sources files which are in a few mega-bytes (a few tens thousands lines) to view and edit. The performance looks really bad in Vim. Refersh (<C-l>) or input single char in insert ...
Thomson's user avatar
  • 842
9 votes
2 answers
366 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 ...
artfulrobot's user avatar
13 votes
3 answers
6k views

Vim slows down over time with syntax on

Is there anything I can do to keep syntax on when using Vim? As soon as I open anything substantial it becomes nearly impossible to edit after a while. Every keypress causes a delay. If I turn syntax ...
firedev's user avatar
  • 2,362
19 votes
1 answer
1k views

Do large numbers make Vim run slowly?

This seems like a really daft question, but I have a Python file that has a number in it that's a thousand digits long and that file seems to be running very slowly, I'm not sure if there's some kind ...
baxx's user avatar
  • 995
26 votes
1 answer
17k views

How to find what slows down Vim? [duplicate]

In some occasions, Vim respond is very slow. Is there a procedure to easily identify what causes the problem?
Demetris's user avatar
  • 465
12 votes
2 answers
3k views

Cut vim load time

I'm using https://github.com/carlhuda/janus vim distribution and clearly not satisfied with load time. What would be the best way to profile and speed-up vim load time? Also would be interesting to ...
A B's user avatar
  • 387