Special character bindings stopped working after some update - neovim

I was trying to add a pluggin to my nvim when I strarted fixing my :checkhealth
I ran few commands:
pip3 install pynvim
yarn global add neovim
npm install -g neovim
gem install neovim
gem environment
Then, I noticed few binding were not working anymore:
nnoremap _ V
nnoremap \| <C-r>
(and probably few others)
In the my (dvorak) keyboard, those bindings are shifted binding of special keys and for some reasons when I press them, I get a result like if I was pressing <HOME>.
I tried to check the :map _ and :verbose map _ and it is binded correctly.
Furthermore, I had another nvim openned before I made the modifications and the bindings were still working.
I cannot figue out why its not working. Any idea? thanks
EDIT: even with the command nvim --noplugin -u /dev/null and then manually setting up the binding, it still does not work

Confirmed to be a bugged.
Workaround: nnoremap <S-_> V

Related

Is there an neovim version of vimdiff

I've started using nvim (neovim) recently. It generally works well, but when I run vimdiff, I noticed that I got the startup errors I got when I ran regular vim. I've fixed those so that both vim and nvim run without errors on my system, so vimdiff works fine now. But it makes me wonder: is there a neovim version of vimdiff? Or should I just maintain both vim and neovim so that regular vim works fine for vimdiff?
Yeah, you can use the -d option to open nvim in diff mode.
I noticed a question about this was posted on redit: https://www.reddit.com/r/neovim/comments/6rvsa2/nvimdiff/
The dialog there confirms that there is no corresponding nvimdiff that is shipped. The solution suggested there is to add an alias in your bashrc file:
alias vimdiff='nvim -d'
I'll do this.

Neovim error: E492: Not an editor command: PlugInstall

OS: Ubuntu 18.04.3 LTS
I just installed neovim using sudo apt-get install neovim and added the folder and file ~/.config/nvim/vim.init. At this moment the file has no content, but when I open up nvim and type :PlugInstall I get error: E492: Not an editor command: PlugInstall. I am clueless, what is going wrong?
I think you are trying to use vim-plug without previously installing it.
I changed my plug#begin to
call plug#begin('~/.local/share/nvim/site/autoload/plug.vim')
and it worked for me now
I followed this and it worked: https://github.com/junegunn/vim-plug/wiki/tutorial
I also wrote call plug#begin('~/.config/nvim/plugged) and made a directory at that location. Then the reload command is also source ~/.config/nvim/init.vim where init.vim is the configuration file. And then I just ran :PlugInstall and it worked :D
I got this error too, but in my case I was typing :pluginstall instead of the case-sensitive :PlugInstall and you have to use the correct case or it won't work. Oddly, :PlugUpdate was able to work before :PlugInstall but that was just because I typed the case correctly.
I see I have the vim.plug correctly installed here
~/.vim/autoload/plug.vim
I also created a "plugged" folder here and I see this is where vim-plug put the downloaded files from running :PlugInstall
.vim/plugged
To be overly pedantic, I typed 'cd' to get to the user directory, then cd .vim to go into my dotted .vim folder, then "mkdir plugged" to create the plugged directory. Not sure if this was 100% necessary or if :PlugInstall would have created it by itself.
I also needed to :source ~/.vimrc between adding addition plug line items and typing :PlugInstall, so make sure you "source" or you can also completely quit and restart your Vim so it will reload your .vimrc file, otherwise it won't know anything about your file edits.
I'm on a Mac. I installed vim-plug for standard vim and this gave me this file
~/.vim/autoload/plug.vim
My .vimrc is this:
" add line numbers
set number
call plug#begin()
" The default plugin directory will be as follows:
" - Vim (Linux/macOS): '~/.vim/plugged'
" Make sure you use single quotes
Plug 'tomasiser/vim-code-dark'
Plug 'tpope/vim-sensible'
call plug#end()
I had the same problem and come here for leave my contribution ( I hadn't find this solution in anywhere ). In my case, it's caused by permissions in my linux. I always start my vim for ocults archives with:
sudo vim .vimrc
In this case, the Vim just use the default commands ( I don't know why but I think this is by the security ). If you just run:
vim .vimrc
All the user commands will be able.
In my case, I had multiple terminal windows open. I still had the Vim window open after installing vim-plug in another window. Solution was to close and re-open Vim.
Instead of
call plug#begin()
I did
call plug#begin(has('nvim') ? stdpath('data') . '/plugged' : '~/.vim/plugged')
Worked 100%
If you have followed the steps in https://github.com/junegunn/vim-plug, but still didn't work.
Try run ':source ~/.config/nvim/vim.init' in vim (not source ~/.config/nvim/vim.init in shell).
Make sure git is installed.
In my case, I was trying to do :PlugInstall in a docker container and did not have git installed. I installed git, and it worked.

Ctrl+Shift+E inserts special characters into file instead of showing Explorer Pane in VS Code

In Visual Studio Code, I prefer having the "Activity Bar" hidden and use the key combinations Ctrl+Shift and E, F, G or X to reach the individual panes.
When I am in the Search pane (revealed with Ctrl+Shift+F) with focus on the editor, I hit Ctrl+Shift+E with the intention of reaching the Explorer pane; instead of exposing the Explorer pane, code inserts the character e with a black underline.
Now, I suppose this is some feature to insert special characters into editors but, Ctrl+Shift+E as a shortcut for this seems little too conspicuous don't you think? Especially when it is already being used for something else?
I'm not sure when this behavior was changed but I remember that it used to work earlier. Is there a way by which I can disable this special character insertion feature and restore order?
Okay, it took some time to narrow down this issue. It appears, GTK3 reserves the key combination Ctrl+Shift+E to insert Emoji.
Good news is, this feature has been removed in GTK version 3.24. You can update your GTK version to fix this issue.
This is a very good workaround.
Run ibus-setup in the terminal. A GUI dialog will open.
Go to the 'Emoji' tab --> Ellipsis(...) buttton --> Delete --> OK.
That's it. Works for me on Ubuntu 20.04. You can still access emojis using Ctrl + .(period).
As HolyBlackCats and Pida stated in comments, the best way is to install Visual Studio Code by "sudo apt install" on your Ubuntu, as the problem still exists (even after 2 years).
sudo apt update
sudo apt install software-properties-common apt-transport-https wget
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
sudo apt install code
Instead of snap installation, go with the apt one.
First of all remove your vscode snap package
sudo snap remove code
And then, follow the instructions on the official page
https://code.visualstudio.com/docs/setup/linux
Or if youre lazy like me, paste this lines into your terminal
sudo apt update
sudo apt install software-properties-common apt-transport-https wget
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
sudo apt install code
Uninstalling vscode is a huge pain in the ass. The way I found less annoying was to switch shortcuts. Instead of Ctrl + shift + e, I now use Ctrl + e, the previous shortcut ( Ctrl + e ) can still be accessed through Ctrl + shift + p.
Go to your Shortcuts ( Ctrl + K, Ctrl + S )
Type "ctrl + shift + e"
On "View: Show explorer" double click on keybinding, and press the new keybinding ( in my case was Ctrl + E )
Then type "ctrl + e" on the search bar again
Remove the other binds with Ctrl + E, except the "View: Show explorer" one
It seems to be an issue with the snap version of VS Code. Using the apt version instead solves the issue.
sudo snap remove code
sudo apt install code
Just summarizing the answers so far because currently the fix is in a comment from HolyBlackCat rather than in an answer.

Emacs on Ubuntu. DIsplay issues: text displayed over other text

I'm a newbie to emacs, just starting to like it - but today upon start up the following issue has rendered it unusable.
Problem:
When I move the cursor forward some, but not all, characters are rendered unreadable. The next letter on the line is displayed over the previous character, not replacing it but displaying both in the same place at the same time. Obviously i can't show this as then text editor on this site is functioning correctly.
A few of examples of what I've tried so far, with no effect..
1- restarting gdm
2- apt-get install rxvt-unicode - to check if it was a problem with xterm
3. dpkg-reconfigure emacs
4. completely removing and reinstalling emacs23 along with .emacs config file.
Converting Ben's comment to an answer to get it from the unanswered questions list:
It appears to have been an issue with the font. If I do the following it works:
type- xlsfonts -into the terminal and get a list of the fonts available.
choose one of the mono-space fonts (e.g. r14) and check by running: emacs -fn r14 myfileName
To make this default go to options menu within emacs then -> Customise Emacs -> Specific Face -> and type: 'default' and click 'set for future sessions'.
Today I faced the same issue. Installing the latest snapshot instead of stable branch solves it:
sudo add-apt-repository ppa:cassou/emacs
sudo apt-get update
sudo apt-get install emacs-snapshot

Make emacs run in console mode (-nw) by default

How can I make Emacs run in terminal (or console) mode by default, as if I'd used -nw? And once that's done, how do I force it to run in GUI mode (once) if I need to?
On my Debian testing, alias emacs='emacs -nw' followed by emacs opens Emacs in the terminal. And, in the same session, emacs23-x opens Emacs with the GUI.
In case you decide to use emacs in terminal mode always, install emacs-nox (emacs with no X support).
After installationis still ran by $ emacs so you no need to create aliases again!:)
Its there in repos of Debian Squeeze so must be in Ubuntu also.
This answer suggests the method I found works best for me (was having problems with aliases). Essentially, create an executable script
#!/bin/sh
emacs -nw "$#"
and point $EDITOR to it in your shell rc file.
I ran into this problem and didn't want to set an alias (because I also wanted "emacs -nw" to be my default shell EDITOR but it wouldn't work) so I started grepping around and saw this line in configure
If you are sure you want Emacs compiled without X window support, pass
--without-x to configure.
So, if you want to download and build from source, you can just do
curl http://gnu.mirrors.hoobly.com/emacs/emacs-25.3.tar.xz
tar -xvzf emacs-25.3.tar.xz && cd emacs-25.3
./configure --without-x
make && sudo make install
alias emacs='emacs -nw'
Or
unset DISPLAY