Neovim t and f have the same exclusive behavior in operator mode - neovim

I am migrating slowly from Vim to Neovim, and there is one habit that I have of using t or f in operator pending mode in vim that does not work the same way in Neovim.
When used after d, v, y, or c in operator pending mode in Neovim, f behaves exactly like t in an exclusive fashion whereas in Vim, f has an inclusive effect.
I tried in Neovim with empty config and no plugins to make sure there are no conflicts, and I read some help sections about selection, select-mode but I cannot figure out the cause of the problem.
I am using Neovim 0.8.0 on Ubuntu 18.04, and I tried in both kitty and konsole for the same results.
Thanks for your help.

It was indeed a plugin conflict, even though I still do not know why I was able to reproduce the issue starting neovim with --noplugin, the --clean flag made it clear that it was a problem on my side, and I was finally able to isolate the plugin responsible.
Thank you for your help.

Related

Elixir: VS Code ExUnit cannot find Mix

I cannot load or run my tests, from within VS Code.
I'm a new user to Elixir, and to VS Code. I'm running Lubuntu 21.10 (Impish). I've downloaded Erlang/OTP 25 (.deb), and Elixir 1.14 (precompiled binary in /usr/share/elixir), and can get anything I need running in a Bash terminal. Again, in a standard QTerminal window,
erl, iex, mix, elixir, etc. all work fine.
In VS Code, however, I get some errors. I feel stupid, but I'm coming from Sublime Text, so please forgive me.
In the left pane of VS Code, ExUnit shows an error (red):
Clicking on this error gives me this, on the bottom right pane. The command line options, passed to mix test, seem to be the default configuration:
This result is bizarre to me, because I can open the integrated terminal, execute /bin/sh, and then run the exact mix test line that's displayed:
/usr/share/elixir/bin has been added to my PATH variable, in ~/.bashrc, ~/.profile, and /etc/environment.
However, I am further confused by all tests being excluded, and wonder if there's some connection to the core issue:
Note that I can run my tests just fine, using different command line options. I've tried adding tags, but that didn't fix the problem.
I tried Google'ing this, and played around with my settings. Here is what I have configured in the "User" settings.json, and I made sure nothing overrides this in "Workspace" settings:
Changing the useNativeTesting setting doesn't solve the problem.
On another (?) note, I get a "failed to run elixir" upon VS Code startup:
Again, I have no problem running commands from a Linux terminal, or from a terminal within VS Code.
Plot twist: If I remove the precompiled Elixir 1.14, and downgrade to an older version, via apt, the problem goes away. But Lubuntu 21.10 doesn't offer Elixir 1.14, and I'm really into using the new dbg() feature.
But for now, I cannot load or run my tests, from within VS Code, apparently because Mix cannot be found.
Thanks to Daniel Imms, from the VS Code team, for answering my question on Twitter:
"Try moving where ever you init mix and elixir (.bashrc?) into your .bash_profile and then logging out and in again or restarting. I'm guessing it's in your bashrc which doesn't run in non-interactive sessions like in tasks."

vscode with neovim doesn't save file on :w command

I'm using Ubuntu Xenial (yes I know it's out of date, I'm going to upgrade it soon), neovim 0.6.0 (which apt tells me is the latest version), and vscode 1.60.1. Until recently could save files with the :w command, but all of a sudden when I use that command nothing happens. It probably happened when my version of vscode was updated, but I'm not sure. Is there a setting somewhere that controls this, or could something have overridden it? Googling it shows fairly old results, and since it was working a few weeks ago I'm not sure how helpful those ones are.
Ctrl + s works but I'm so used to using :w that I do it automatically and it takes me time to remember to do it the other way. Also, since :w works in all other vims that I use, I'd like to get vscode working the same way again.
I was running into this problem too and I found that the solution is to use neovim stable, not the prerelease 0.6.x version. Now all the editor commands work fine.
I found this solution via this GitHub issues link: https://github.com/asvetliakov/vscode-neovim/issues/736

How to disassociate anaconda from VScode?

I used to use VScode in conjunction with anaconda, but later I started to appreciate the light weight stuff. So, I would like to uninstall anaconda. I have tried to do so using all the methods suggested in the forum, including using the designated anaconda-clean. None of them really works. This helped a little bit to the point I could successfully install the cleaner. But as I proceed to actually remove anaconda, nothing really happened.
Please see the thread attached as below.
Conda is surprisingly still there. So I figured an alternative would be to just disassociate anaconda or conda from VScode? How would you do so? Thank you!
Trying to use conda install to get anaconda-clean but environment fails to solve and a very slow analysis of conflicts starts
I butchered the anaconda in my mac. Very unelegant. I manually deleted as much of it as possible. That way VScode is freed from anaconda. I would still appreciate an elegant other than just manually removing which is a pain in the rear.

I am trying to use :g in Vim doesn't work "Command :g[lobal] is not yet implemented" i get in the status line

I wanted to try vim for a bit, and get used to it... i got stuck with trying to replicate Ctrl+D functionality of VScode... so I've tried couple Google solutions.
This is What I've tried when I got that error:
:g/oldword/norm newword
I see lots of people do search patterns like this, but it's annoying I get this message, without being able to find solution on google :D
I know I can solve this issue with /word then cgn newword and then just repeat with . operator, BUT, I want to be able to use the global command for searching patterns and stuff, for other purposes too, and it stresses me out that I can't make it work!
Here is the error I am getting.
Any help is extremely appreciated / welcome! Thanks.
Edit: Forgot to mention: We are talking about Vim for VScode, not the gvim installation stuff. Will try to install that too, and update the question.
Edit2: Okay so apparently, after instalilng gvim (from official site) and ran it through vim command in cmd prompt, the official vim can run the :g commands.
Like (for example) if you want to search for <a> and replace it with <router-link> you can do so by: :g/<a>/norm ciw<router-link>
Which means:
:g/<a>/norm run a global (file) search for pattern <a>
ciw - change in word
<router-link> the replacement pattern for <a>
Note: The same should be done for </a> after that :D
The problem still exists tho.
While the native vim exe (outside of vscode) works and can run these stuffs, I still need to fix the vscode one (the extension that is). It is defo nice to have syntax highlighting and correction.
What you are using is not Vim. It is a Vim emulator which, like all Vim emulators, can't be expected to be either complete or accurate. Its only relationship with Vim is that it tries and fails to imitate it.
Some of the Vim stuff you will find on the internet will work in that VSCode extension exactly as it does in Vim, some of it will work but partially or differently, and most of it, like :g, will simply not work.
There is nothing you can do about that except, maybe, contributing to the project.
If you want support for the global command in VSCode, install Neovim and the VSCode extension for it:
for those who expected this to work but it doesn't, it's possibly because you need to have installed neovim (firstly) and then vscode-neovim extension (secondly) https://marketplace.visualstudio.com/items?itemName=asvetliakov.vscode-neovim
Source: https://github.com/VSCodeVim/Vim/issues/2346
The easiest way to get this working is to enable neovim in the VS Code Vim extension you're using.
Once you have installed Neovim on your operating system, you can enable it within VSCode inside the Preferences: User Settings window:
Enable the Vim: Enable Neovim option (vim.enableNeovim)
Set the path to Neovim inside the Vim: Neovim Path setting (vim.neovimPath)
Restart VSCode
Source: https://www.barbarianmeetscoding.com/boost-your-coding-fu-with-vscode-and-vim/integrating-vscode-with-neovim/#enabling-neovim-inside-vscode

Is there a VSCODE equivalent for the Vi 'z' command?

In the Vi editor, one can issue a 'z' command to relocate the current line at the top of the page. I cannot yet see a similar option available in VSCODE.
Does anyone know if such an option is available in VSCODE, please?
NOTE: I have taken note of the Vim extensions, but I am not looking for a solution based upon installing an extension. Thanks.
Take a look at this VIM extension for Vscode which may contain what you are looking for