NeoVim configuratoin, VIMINIT MacOs question - vim

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.

Related

How to use Neovim as External editor for Godot (Godot executable permissions)

I am trying to configure Godot to use launch Neovim in iTerm2 when I double click on a file containing code in the editor, however, a terminal window pops up instead with the following error:
/Users/myusername/.../Scripts/Player.gd; exit
zsh: permission denied: /Users/.../Scripts/Player.gd
This error message quickly goes away before I can read it and I am presented with an empty neovim window but it hasn't opened the file I clicked on. Additionally, the current working directory for the neovim window is my home directory (not the directory the project is based in)
I am running macOS Catalina with iTerm2 and Godot 3.2.2. My settings to open neovim in
Editor->Editor Preferences->Text Editor->External:
"exec path":iTerm2 executable (I tried pointing to the actual nvim executable, but that didn't seem to work).
exec flags: "nvim {file}".
My understanding is that this should open iTerm and execute the command "nvim [insert filename here]", opening Neovim.
I tried some solutions, including creating a neovim.desktop file, however, nothing seems to work. If anyone has any suggestions as to how I can give Godot the correct permissions I'd love to hear it. Please let me know if you need anything else.
Thank you!

gvim8.1 :term CreateProcess failed

Recently I run into a problem with my gVim's 8.1 :terminal command that I can't figure out.
When I type :term or :terminal in gVim 8.1 I keep getting this message saying
CreateProcess failed
I looked it up on the internet but I couldn't find anything specific. Also, FZF stopped opening the files on pressing Enter, and I was thinking that these things may be related.
I should mention that prior to this errors happening I was trying to install ZSH and OH-MY-ZSH, without any success though :), I was trying to make them work with CygWin and then I deleted everything(CygWin, ZSH, OH-MY-ZSH) since I wasn't getting anywhere.
Anywho, I just mentioned this cause maybe they're related.
https://i.stack.imgur.com/dbZNG.png
Thank you.
I have just found the answer to the question I posted about 20 min ago. :)).
I just had to remove SHELL - /bin/zsh environment variable from the System Environment.

Vim autoformat error

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.

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.

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