25
votes
Accepted
BufWinLeave * mkview with unnamed file: Error 32
Switching to ?* as the regex will no longer match empty file names. I actually recommend you switch to the following, which is a corresponding block of .vimrc that has been tweaked to suppress many of ...
8
votes
Accepted
In Linux, on an extremely long running vim session, calls to system() fail with E484 "can't open file /tmp/<tempfile>"
This happens when some system cron job cleans out "unused" files from /tmp. The solutions are:
Find that cron job and stop it from rm'ing your Vim /tmp files.
Recreate Vim's temporary directory.
...
8
votes
Accepted
When should a function *not* be defined with "abort"
Discl.: It's just guessing on my part.
abort didn't exist when function was introduced. I guess that in order to not break existing code it was decided to not change the current behaviour and to ...
7
votes
Accepted
Print an error message without "Error detected while processing function"
The solution is described in the manual:
If you just want a highlighted message use :echohl.
And to get a beep: :exe "normal \<Esc>"
Thus:
function! PrintError(msg) abort
execute '...
7
votes
Accepted
Why do I get an E488 error when printf .vimrc?
# is not a comment character, " is. So it should read:
" Funcionar como vim y no como vi
set nocompatible
" Colorear sintaxis
syntax on
colorscheme sienna
" Otros seteos
" Más info, desde vim poner:...
6
votes
How can I suppress startup error E575?
Check your init.vim. If there is any line concerning viminfo, temporarily remove/comment it, you can later discover the reason it messed up.
Then backup and remove ~/.local/share/nvim/shada folder. ...
5
votes
What does `<Bar>` mean?
I'd like to add that in normal mode, the | command (which has to be substituted with <bar>, \| or ^V| while remapping it, as mentioned in other answers) allows you to go to a specific screen ...
5
votes
Accepted
Copy vim messages into clipboard
You can typically see the error messages produced by plug-ins using the :messages command.
If you'd like to put those messages into a Vim buffer, so that you can copy them to the clipboard from there, ...
4
votes
Don't fail if pattern is not found
Here's a mapping that won't change the last search register or print errors:
nnoremap <expr> ]m filter([search('pattern', 'nW'), line('.')], 'v:val')[0].'G'
filter() takes a list of items and ...
4
votes
Accepted
Delay with remapped q
This happens because Vim waits to see if you want to do q<letter> to start recording a macro (there are a couple other things too like q:).
You can use the tm option to change the amount it ...
4
votes
Accepted
Why do I get "incompatible error" while opening .sh files using vi in cygwin?
The option name is nocompatible. Replace incompatible with nocompatible to solve your problem.
4
votes
Accepted
Difference between make and make!
This is happening because while :make! doesn't jump to the first error message, it actually sets the quickfix cursor at it. So when you use :cnext it will actually try to go to the second error, which ...
3
votes
Accepted
List files if there are too many of them
Completion
Use <tab> to complete a filename. If you know there are going to be many candidates then you can use <c-d> to list out the candidates. May want to look into 'wildmenu' & '...
3
votes
`E575: viminfo: Illegal starting char in line: ...` on startup
To solve this:
rm ~/.viminfo
vim ~/.viminfo # new file, leave it blank, then just wq.
source terminal et voila
3
votes
`E575: viminfo: Illegal starting char in line: ...` on startup
For me, this problem keeps showing up even if I delete the ~/.viminfo file - not right away, but a couple of days later.
I just noticed there's a way to skip using the viminfo file entirely, as ...
3
votes
Accepted
Why do mappings abort on errors?
This is documented under :help map-error:
Note that when an error is encountered (that causes an error message or beep)
the rest of the mapping is not executed. This is Vi-compatible.
Regarding ...
3
votes
Gvim throws the error 'E285: Failed to create input context'
I had the same problem when starting gvim from a shell script. Looking at the code vim ignores the fact that creating this context failed. It is just annoying the users with this message except when ...
3
votes
Accepted
Error in editing vimrc
Probably you don't have local user .vimrc.
$MYVIMRC is pointed to the one that was used to initialize your vim. If there is no user .vimrc it would be system-wide one and usually you would have to ...
3
votes
Accepted
Gvim E370: cannot load library python36.dll with installed Python 3.8
Is it possible to force Gvim to use python38.dll or it should be recompiled with python 3.8? Probably if I install the Python3.6 it will work. Is it necessary to recomile every time there is new ...
3
votes
gvim: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying
I found the answer starting here and ending here:
export NO_AT_BRIDGE=1
The latter linked page refers to this as a hack. Since it seems to be a Gnome thing, and I don't use Gnome on the system where ...
3
votes
Accepted
Neovim Lua: Error while calling lua chunk [...] '' expected near 'local'
In my case this was because I had this in my file,
return require('packer').startup(function()
-- stuff
end)
And then after that I had
let on_attach = function(client, bufnr)
...
end
And that ...
3
votes
Accepted
Neovim E276 - Command works in Vim but not in Neovim
In VimScript the function composition can be written in two ways, either "traditional" g(f(x)), or "method" notation f(x)->g().
However, the latter one must be defined by ...
3
votes
Accepted
Error when using vim-plug from git-bash
As pointed out by romainl in the comments, you have two versions of Vim installed:
Vim 9.0 with GUI for Windows you probably installed yourself
Vim 8.2 without GUI that came on top of git-bash (on a ...
2
votes
How to not display a certain error
you can use a custom command, if :sil norm! n is too much to type in interactive mode:
:com! :Nextmatch :sil :norm n
:nnoremap <silent> n :Nextmatch<cr>
2
votes
Accepted
Find file for given line number when given an error
Is the error in Searching for
"/Users/thermatix/.vim/after/syntax/syncolor.vim"?
Can't be because there is no after folder.
Actually the problem may be that some plugin expects the folder to ...
2
votes
Accepted
Vim Latex Suite, suppress viewer errors
This is a shell command run with :silent! !okular [..] in the Tex_ForwardSearchLaTeX() function (ftplugin/latex-suite/compiler.vim).
It looks like okular is printing some text to stdout or stderr – ...
2
votes
Accepted
Error detected while processing grammarous.vim: E117: Unknown function
The .vim/plugin directory is not where you want to unpack your plug-ins! (Yes, I known the name would suggest so...)
If you want to use Vim 8 packages (which I believe you do), then you should unpack ...
2
votes
Accepted
Can't exit buffer using leader mapping - 'cannot make changes'
The problem is with the = in your command. It's being taken as part of the expansion for the mapping.
That's triggering the = command, which typically reformats a block of code. Since you have a ...
2
votes
Accepted
How to ignore or silence errors in operator-pending mappings?
One option would be not to include the h in the mapping if you're on the first column:
onoremap <expr> a$ col('.') == 1 ? "f$" : ":<C-U>normal! hEF$v,<CR>"
N.B. I'm not 100% clear ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
error × 110vimrc × 16
neovim × 14
vimscript × 11
microsoft-windows × 7
gvim × 6
autocmd × 6
functions × 6
key-bindings × 5
buffers × 4
quickfix × 4
plugin-system × 3
help-system × 3
message × 3
search × 2
substitute × 2
highlight × 2
external-command × 2
macro × 2
statusline × 2
linux × 2
save × 2
vimscript-python × 2
line-numbers × 2
shell × 2