Vim autoformat error - vim

After I updated my vim plugins, I am having trouble with the vim autoformat plugin (https://github.com/Chiel92/vim-autoformat).
When I run :Autoformat, I get an error:
For html:
Definition in 'g:formatdef_htmlbeautify' was unsuccessful.
Definition in 'g:formatdef_tidy_html' was unsuccessful.
No format definitions were successful.
Press ENTER or type command to continue
For C/c++:
Definition in 'g:formatdef_clangformat' was unsuccessful.
Definition in 'g:formatdef_astyle_c' was unsuccessful.
No format definitions were successful.
Press ENTER or type command to continue
I have the formatters installed through the apt package manager, which means that according to the autoformat documentation, should mean that the plugin detects them automatically.
I have tried reinstalling the plugin, it did not help.

vim-autoformat detects plugins automatically if they are installed properly.
In the case where you don't want to get errors on display and 'Press ENTER or type command to continue' just type :silent Autoformat.

I had the same problem this week on a Debian machine.
After deleting the vim-autoformat folder from ~/.vim/bundles (installed with Vundle) and installing it again (:PluginInstall) everything worked as expected again.

Related

NeoVim configuratoin, VIMINIT MacOs question

I just started using neovim on macos, I have created a init.vim file under ~/.config/nvim with my specified configurations however they are not applied everytime I launch nvim from the terminal. I thought that by making VIMINIT="~/.config/nvim/init.vim" a global variable it would fix the problem but every-time I launch nvim I get the error message saying.
Error detected while processing VIMINIT:
E33: No previous substitute regular expression
Press ENTER or type command to continue
If i press enter it resorts to the default nvim. Any ideas?
BTW if I type "$VIMINIT" in the terminal it does say permission denied. I dont know if this is helpful information. Thanks.

disable "Press ENTER or type command to continue" in terminal

I know how to disable this inside Vim, I am curious is it possible to disable this at all when running vim in terminal.
e.g.
tdi#piesek:~$ vim
ycm_client_support.[so|pyd|dll] and ycm_core.[so|pyd|dll] not detected; you need to compile YCM before using it. Read the docs!
Press ENTER or type command to continue
My scenario is that I install vim and Vundle plugins automatically via saltstack for all users (vim +PluginInstall +qall). Some plugins, however need more love, e.g. YouCompleteMe, which gives this message.
I would like to force vim to 'go on' even when there are some things that keep on wanting ENTER pressed.
If you know the commands (in your ~/.vimrc) who trigger the message, you can prepend :silent! in front of it. This will suppress any output and errors.
For general messages, you can try :set nomore.
cd ~/.vim/bundle/YouCompleteMe
./install.py
Fixed this problem for me, I have Ubuntu 14 as OS and CMake installed, previously..
I tried it by deleting one by one.And I find that set syntax cause the problem..not sure if is the culprit.
So you can delete it to solve the problem.

YCM does not work with eclim

I have eclim setup and working. I know this because
:PingEclim
shows
eclim 2.3.4
eclipse 4.3.2
Press ENTER or type command to continue
in appropriate colors and Ctrl-X, Ctrl-U show correct completions after a partial method name in insert mode.
However, YouCompleteMe does not work. To install YouCompleteMe, I added the following lines.
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'Valloric/YouCompleteMe'
let g:EclimCompletionMethod = 'omnifunc'
When I type the partial method name, I expect to see the same completions as when I typed Ctrl-X Ctrl-u above. Instead what I see is
-- User defined completion (^U^N^P) Pattern not found
The "Pattern not found" part is in red color.
How do I verify YCM is installed correctly? What does the error message mean?
YCM triggers Eclim automatically. So you don't need to press C-xC-u to invoke completion.
And the configuration let g:EclimCompletionMethod = 'omnifunc' disabled the key combination and remap it to C-xC-o.
So, as long as you have installed YCM correctly and configured eclim correctly, you don't even bother to press control key to invoke eclim. And if you do want to complete manually, you can press C-xC-o.
The installation of YCM requires you to build a native C++ component. Please refer to the official manual. It has quick guide for both OSX and Linux. (and YCM isn't available on windows, sigh).
You don't need to verify the installation of YCM purposely. If YCM is in your runtimepath but not installed correctly, it will warn you at the startup of vim. If YCM works correctly, it will just popup when you are typing in insert mode.
OP probably forgot to create a .project file and to generate a project structure with :ProjectCreate . -n java (inside vim, when in the project root directory).
YMC uses a built component, you need to compile that component, it's all in the YMC github page

Vim74: E149 Sorry no help for help.txt

I just downloaded and installed vim74 on to my linux box. I'm only installing locally, for the user. When I go into vim, and do :help, I get the error.
I tried adding:
let $VIM='home/myuser/vim74'
let $VIMRUNTIME='home/myuser/vim74/runtime'
to my .vimrc but it didn't help. How can I fix this?
When building vim yourself and installing locally it seems that you need to generate the helptags manually from within vim since the build process doesn't seem to do it. I ran into this very same issue when building the latest vim version 8.0.311. I followed the link in Ben Klein's comment above, but both my &helpfile and &runtimepath were correct, yet I still received the E149 error when doing :help which I assume is your situation as well postelrich.
I found the helptags solution here:
https://github.com/Homebrew/homebrew-core/issues/1087
Even though I was installing vim locally on a centos system and not a mac, the issue seems to be universal. I just replaced $VIMRUNTIME with the path to the local vim runtime installed from make install, which in your case may be something like /home/myuser/vim74/runtime
Specifically I ran this from within vim:
:helptags ~/share/vim/vim80/doc
In your case you will probably run something like:
:helptags ~/vim74/runtime/doc
Once done, :help should immediately start working again without having to restart vim.
You can get the same “E149 Sorry no help for help.txt” error if you have a long-running Vim session and the Vim program files were upgraded in the meantime.
This happened to me: I had started an editing session in a GNU screen window on my Debian testing system using Vim 8.1. Some time later, unattenttended-upgrades upgraded Vim 8.1 to 8.2 with the result that the run-time paths were now no longer valid. I could have saved the session and restarted Vim, but it was simpler/easier to run the following command (specific to 8.2):
:set helpfile=/usr/share/vim/vim82/doc/help.txt

vim and latex-box

I installed the vim plugin latex-box but I am having trouble getting it to compile my Latex file. The docs say it uses latexmk to do the compiling, and I have that installed and it works when called by itself.
But when I use the plugin's \ll command to compile I get an error that says 'cannot run latexmk in background without a VIM server'. I cannot find an explanation of why this error would occur in the plugin documentation.
EDIT:
I found a solution to this issue, but ran into others.
To fix this, you need to install the full version of vim (which is different depending on your OS) which will include things like server support. I suggest doing this even if you don't use this plugin because it will fix not been able to copy/paste from/to vim. In (K)ubuntu, install the package vim-gtk.
Start vim like this vim --servername SOMETHING file.tex
After doing this, the servername error went away and the compilation went through but the output from latexmk shows up on top of the file I'm editing. It doesn't overwrite it, it's just displayed on top of the text. When I move the cursor and vim highlights a word or bracket, that appears back on the screen. The only quick way I found to get rid of the compiler output is to scroll the file up and back down, that makes the text appear again.
You can ask vim to redraw the screen like this:
:redraw!
Append that command after running your latex command.

Resources