I'm new to vim and MacVim, and there is some setting that I can't figure out how to turn off. What happens is I will click on a line and the screen will shift to make it be the line in the middle of my screen. I know I shouldn't be clicking in vim, but this is really annoying.
I installed MacVim via brew install macvim.
Is there a command like :set norefocus or a plugin that might be doing this?
The offending line, set scrolloff=10000 was buried in my .vimrc which centers the cursor in the screen vertically. Removing it resolved my problem.
The post #statox was very helpful for figuring out where the problem was coming from.
Related
I'm a Neovim user
and I want to move by page for fast movement.
I found these commands, but for me only ctrl-u(half-page up) is working
I reference this page
Ctrl-D move half-page down
Ctrl-U move half-page up
Ctrl-B page up
Ctrl-F page down
How can I figure out the problem?
The problem is except ctrl-U, nothing works
where can I check these default key map in my setting?
I suggest starting your vim with no configuration to know if the problem is on vim or in your config files:
nvim -u NONE -U NONE -N -i NONE
Now test your shortcuts, if everything goes well try analyzing your settings
I also suggest a second test, try opening your vim in another terminal emulator, this issue can also be caused by your terminal. (These final paragraph was also in the comments and helped figuring out the problem)
The cursor blinking is off by default in Neovim and I want it back. I have tried to apply different arguments to guicursor, but didn't succeed. Since I want it to blink the same way in every mode, I think, I need something with the letter 'a' in it.
Here's what I have tried so far:
:set guicursor=a:blinkwait700-blinkon400-blinkoff250 (I also tried with 'i')
:set guicursor=a:blinkon100 (as the opposite of a:blinkon0 which switches it off)
I've already looked into the help but it didn't help me unfortunately.
Update:
What is peculiar is that :set guicursor=a:blinkon100 enables the blinking in gVim, but not in Neovim.
From neovim 0.2 onwards, setting guicursor does achieve the desired effect:
" Enable blinking together with different cursor shapes for insert/command mode, and cursor highlighting:
set guicursor=n-v-c:block,i-ci-ve:ver25,r-cr:hor20,o:hor50
\,a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor
\,sm:block-blinkwait175-blinkoff150-blinkon175
Find more by typing :help 'guicursor' from inside nvim.
For more info, see the official wiki
Finally, if you use st, you can patch it to get this working:
https://st.suckless.org/patches/blinking_cursor/
EDIT: I noticed from the comments of the first answer that OP was talking about nvim-qt, for those interested in that, a fix for it has been merged at the beginning of this year.
If you are using the st terminal by Suckless then that does not support cursor blinking I belive, otherwise if your terminal does support it try setting the option let $NVIM_TUI_ENABLE_CURSOR_SHAPE=1 in your init.vim file. You could also pass that on the command line such as NVIM_TUI_ENABLE_CURSOR_SHAPE=1 nvim.
I have Vim 7.4 and it has a strange issue in a quickfix window when using Vim in Cygwin.
When moving downwards, everything if fine. When moving upwards, however, once my cursor is on the top of the window (not the top row), from then on every movement upward only updates the row one row below my cursor gets updated; the rest don't.
By pressing Ctrl+L and refreshing, the rest of the file gets updated properly. But the fix doesn't stay.
What is causing this and how could I fix it?
Facts:
TERM is xterm-256color
Mouse support works. This isn't quite relevant except it should demonstrate that vim, tmux and my terminal emulator are all configured fairly well in general.
This happens even with an empty .vimrc
The terminal emulator I am using is MinTTY
Trying to reproduce it doesn't work. It happens in my Tmux session with 10 tabs open. But when I try to open another MinTTY with Tmux, the issue doesn't happen
When trying to record the issue with Asciinema, the issue still comes up, but when looking at the recording, the issue is not seen there.
One of the symtoms are that while using Vim, sometimes the contents of the lowest row (tmux tabs) are copied to vim's lower statusline row until the next full redraw of the screen.
I have recently noticed a side bar at vim terminal that scrolls all they way to the first command I ran to get vim started. Every time I open an file using NERDTree or close a file I am still working on the same terminal, but the previous snapshots of vim are saved in terminal history. I can scroll all they way to the top and look at every vim command I ran and what file was open during that command.
I have never seen this happen before? Can I turn it off? If I press :q the file that was currently in the terminal shifts up and the new files shows up at the bottom.
Thanks to FDinoff I found the problem. The "term" variable was set incorrectly. I went to my vimrc file and commented out the exact line with "term" and vim now works perfectly fine.
I have installed Janus to improve my vim. All works fine, except for the Ri documentation, that opens on hovering a keyword. On my installation it shows the output of "ri --help" instead of the documentation of the keyword.
I have found a way to disable it, but I'd rather just fix it. I am using gvim on Ubuntu 11.10.
What is the name of the plugin or script that offers these tooltips?
Could it have anything to do with RVM being active?
The problem is a bug in the ruby.vim plugin. That triggers ri with a wrong argument.
There is a bug report for this.
Solving is easy: edit file .../ftplugin/ruby.vim and change line 194: the -f argument should not be simple, but either bs or ansi. I had success with bs.
Does any of these shortcuts (from ri's homepage) work, especially the last two?
,r opens the search/autocomplete window, and will use a horizontal split to display matching documentation
,R opens the search/autocomplete window, and will use a vertical split to display matching documentatoin
,K opens the search/autocomplete window and prefills it with the keyword under the cursor
K is automatically remapped to use ri.vim if the current buffer is a *.rb file