Every time I switch back to vim window, it shows the list, if current cursor on an empty line, it shows error: E349: No identifier Under Cursor.
The only workaround for this problem that I've discovered so far was to run tmux and then run vim inside one of tmux's panes.
According to https://unix.stackexchange.com/a/480138 ,
it is the FocusIn/FocusOut mode that can be disabled with:
echo -ne '\e[?1004l'
I encountered this problem when I would lose an ssh connection, so tmux on the remote server that enabled FocusIn/FocusOut mode would not be able to disable it. If I opened a vim on my local machine, vim would receive those events. If the FocusIn/FocusOut mode is not the default for your terminal, you can also disable it with:
reset
That list looks a lot like the output of :ilist! Plugin or [I with the cursor on Plugin or ]I with the cursor on the first Plugin. See if you don't have that somewhere in your vimrc (that you should append to your question, by the way).
The error message is likely caused by :help gd or :help gD.
It caused by the wincent/terminus plugin.
Fixed
Append let g:TerminusFocusReporting=0 to .vimrc
Alt-tabbing into Terminal sends a ^] command to VIM. To ignore that command, put
nnoremap ^] <Nop>
in your .vimrc file
I had to fix by removing the line set ttymouse= from my .vimrc.
You may need to set ttymouse to an appropriate value, see :h ttymouse.
I appeared in the 3.12 version of iterm2, and now it disappears after upgrading to 3.15
Related
How do I force open my .vimrc?
I recently made a modification, not certain exactly what I did, but I think I accidentally typed an "x" in my plugins when trying to close. Suddenly neither vim or .vimrc will open.
I get a pause, several blank lines, and then terminal just returns to default command line.
Use vim -u NONE .vimrc to skip reading all startup files and edit .vimrc.
In vim7, I can see a history of previous commands with q: and if I want to use any of those commands, I can navigate to the particular line and hit <CR>. In vim8, hitting <CR> does not do anything. Am I missing something?
If I start vim with vim -u NONE and try to view previous commands with q:, it doesn't list any commands even though I have just executed one.
Apparently, it was a bug in Vim which has been fixed with patch 8.0.0208
If I open a file in a current directory using netrw and then reopen the netrw using :Sexplore the netrw window opens below (I have splitbelow set), but the cursor remains in the file being edited and I cannot move to the netrw window using CTRL-W combinations.
Am I doing something wrong or is this a bug?
Steps to reproduce
run vim .
netrw opens, highlight a file in the current directory (let's say test.txt) and press Return, file test.txt opens
run :Sexplore cmd
netrw opens below but the cursor remains in the file opened previously.
My .vimrc
set nocompatible
set splitbelow
VIM version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Dec 8 2015 23:11:08)
MacOS X (unix) version
Included patches: 1-944
This is how it looks like:
I cannot reproduce with version 154a (use :echo g:loaded_netrwPlugin to check your netrw version).
Try with the latest version.
Edit:
It is possible that the problem is cause by some other plugin interference or settings. You could try following the approach described at Vim FAQ 2.5:
2.5. I have a "xyz" (some) problem with Vim. How do I determine it is a
problem with my setup or with Vim? / Have I found a bug in Vim?
First, you need to find out, whether the error is in the actual
runtime files or any plugin that is distributed with Vim or whether it
is a simple side effect of any configuration option from your .vimrc
or .gvimrc. So first, start vim like this:
vim -u NONE -U NONE -N -i NONE
This starts Vim in nocompatible mode (-N), without reading your
viminfo file (-i NONE), without reading any configuration file (-u
NONE for not reading .vimrc file and -U NONE for not reading a .gvimrc
file) or even plugin.
(...)
If the error does not occur when starting Vim this way, then the
problem is either related to some plugin of yours or some setting in
one of your local setup files. You need to find out, what triggers the
error, you try starting Vim this way:
vim -u NONE -U NONE -N
If the error occurs, the problem is your .viminfo file. Simply delete
the viminfo file then. If the error does not occur, try:
vim -u ~/.vimrc --noplugin -N -i NONE
This will simply use your .vimrc as configuration file, but not load
any plugins. If the error occurs this time, the error is possibly
caused by some configuration option inside your .vimrc file. Depending
on the length of your vimrc file, it can be quite hard to trace the
origin within that file.
The best way is to add :finish command in the middle of your .vimrc.
Then restart again using the same command line. If the error still
occurs, the bug must be caused because of a setting in the first half
of your .vimrc. If it doesn't happen, the problematic setting must be
in the second half of your .vimrc. So move the :finish command to the
middle of that half, of which you know that triggers the error and
move your way along, until you find the problematic option. If your
.vimrc is 350 lines long, you need at a maximum 9 tries to find the
offending line (in practise, this can often be further reduced, since
often lines depend on each other).
Obviously you will have to load netrw manually (which can be done by sourcing plugin/netrwPlugin.vim -- if you are using some plugin manager you will have to move the plugin to ~/.vim/ or change your runtime path due to the autoload functions) and set nocompatible and splitbelow.
Actually there is an adapted version of this procedure in :help netrw-debug:
Step 2: assuming that you've installed the latest version of netrw,
check that your problem is really due to netrw. Create a file called
netrw.vimrc with the following contents:
set nocp
so $HOME/.vim/plugin/netrwPlugin.vim
Then run netrw as follows:
vim -u netrw.vimrc --noplugins [some path here]
Perform whatever
netrw commands you need to, and check that the problem is still
present. This procedure sidesteps any issues due to personal .vimrc
settings and other plugins. If the problem does not appear, then you
need to determine what setting in your .vimrc is causing the conflict
with netrw or which plugin.
Step 3: If the problem still is present, then get a debugging trace
from netrw:
(...)
I installed ubuntu server on vmware player. I want to use vim, so I put .vimrc file under my home directory.
But when I open vim, vim is not using the configuration from the file ~/.vimrc.
If I do it the same way on a ubuntu desktop virtual machine, everything works fine.
What did I do wrong in the server environment? What else should I do?
In order to tell if your .vimrc is running at all, put
echom ".vimrc message 1"
On the first line of ~/.vimrc
Then launch vim and type
:messages
in regular mode. If you see ".vimrc message 1", you know that the .vimrc is at least being read ... it may be stopping before it does anything useful, but at least vim is picking it up.
I would also try which vim to see which program is being called when you type vim.
You can capture a full log of a Vim session with vim -V20vimlog. After quitting Vim, examine the vimlog log file. It will show where Vim searched.
Does Vim correctly detect your home directory? :echo $HOME will tell you.
Also, read :help .vimrc for details on the resolution and locations of .vimrc.
My arrow keys don't work in vi in insert mode at home, they just each insert a newline and a capital letter, like 'A'. Is there a way to fix that?
I presume you're using vim as this is tagged as Linux. Try:
:set nocompatible
(You may want to configure your .vimrc with this by adding this command to it. Create a new .vimrc file if not already present in your home directory, run echo $HOME to check home directory path.)
Ubuntu ships default with vim-tiny, which doesn't have all the bells and whistles that vim has.
Do a quick sudo apt-get install vim to get all the juicy features that everyone's talking about.
:set term=builtin_ansi
fixed it for me. You can either paste that into vim while in escape mode, (bleep mode) or add it to the end of ~/.vimrc without the leading ":"
vi does not support arrow keys in insert mode. Use vim. Although your vi may just be a link to vim, it may be configured to behave like the "original" vi and thus disables the arrow keys. Just invoke vim directly.
Yet another variation: this problem appeared for me after some .vimrc changes. A concerted search eventually revealed that my clever re-mapping of ESC in normal mode was not a good idea. Removing it solved the problem:
" this is NOT something you want in .vimrc:
" In normal mode, hitting Esc turns off search highlights:
nmap <ESC> :nohl<CR> " Do NOT add this to .vimrc
The only thing that worked for me was ":set term=ansi"
I had same issue with arrow keys, but when I used did that set nocp or nocompatible then my backspace didn't work correctly
for some reason when I installed vim with
sudo apt-get install vim, vi didn't had any issues with arrows or backspace anymore
In WSL integrated terminal on VS Code, update the package and install the full package of vim worked for me.
sudo apt-get update
sudo apt-get install vim
However, to make the arrow key works when I use conemu I have to add :set term=builtin_ansi on ~/.vimrc
echo ':set term=builtin_ansi' >> ~/.vimrc
I just had an issue with arrow keys after switching over to use git in .vim.
I have installed this repo - https://github.com/sunaku/.vim
and after digging around for an hour, I found that AutoClose plugin
(which didn't like anyway) broke the arrow keys.
The plugin docs suggest that one should set set ttimeoutlen=100, but
that didn't work for me! (using urxvt+screen or urxvt, and even xterm)
So I removed the plugin at the end.
You might also want to try 'noesckeys'
I had the same issue while using vim inside Windows 8.1 with Cygwin.
Solution worked for me is, just run the following command in your Cygwin terminal:
cp vimrc_example.vim ~/.vimrc
In the command line write this:
EXINIT="set nocompatible"; export EXINIT