Linked Questions

-2
votes
1answer
2k views

Why vim highlight some specific words? [duplicate]

Why my vim highlight some specific words? As showing in the following screenshot picture. How can I locate my problem? There is my .vimrc file. set nocompatible " be iMproved, required filetype ...
1
vote
1answer
212 views

Some “local to window” settings are being reset in Vim [duplicate]

I added :set numberwidth=2 in my vimrc, but this value is always returned to 4 inside my windows. It seems I need to use some autocommand to always force this value back to 2. In fact, even more ...
0
votes
0answers
220 views

Vim still create backup/swap/undo folder under .cache when set nobackup/noswapfile/noundofile [duplicate]

I got a strange behavior of vim 8.1 1-279 / archlinux 4.17.14 This is vim under console but I believe there's no different. Vim force create ~/.cache/vim/{backup,swap,undo} folders even I set ...
1
vote
0answers
102 views

Vim: error opening files <SNR>62_InitializePythonBuiltin the Python's site module could not be loaded [duplicate]

I have set up vim on a new machine according to Vimlander-2-The-Quickening, but I keep running into the following errors when I open a file in command mode: :e /path/to/file, :vs /path/to/file, or :sp ...
0
votes
0answers
64 views

My cursor is changed after “df” [duplicate]

I have the following to change my cursor from a block into an underline: set guicursor=a:hor20-Cursor Whenever I run df to delete a range, my cursor is changed back to a block. I have to source my ...
2
votes
0answers
51 views

Vim has started adding commas unnecessary places [duplicate]

When I use :w to save my JSON file, vim automatically adds some commas at syntactically significant (?) places.  It does not happen when I use :x or ZZ.  This started today.  I did not change anything ...
0
votes
0answers
15 views

How to diagnose configuration---:w doesn't always work [duplicate]

I've somehow introduced a problem in my Vim configuration and I don't know how to track down where the problem is. Sometimes (most times) when I do :w then the buffer is not actually written; ...
17
votes
3answers
10k views

No syntax highlighting in tmux

I installed tmux in iTerm 2.(Build 3.0.13) When I execute vim in tmux, syntax highlighting looks like this. But outside tmux, syntax highlighting looks fine. My $TERM inside and outside tmux is ...
11
votes
3answers
5k views

Vim slows down over time with syntax on

Is there anything I can do to keep syntax on when using Vim? As soon as I open anything substantial it becomes nearly impossible to edit after a while. Every keypress causes a delay. If I turn syntax ...
4
votes
1answer
4k views

Most annoying slow-down of a plain-text editor! [closed]

I am a happy user of VIM, except for some bits which I really want vim to improve on. One main issue is frequent slowdown of VIM spoiling the amazingly productive text-editing experience on a fastest ...
9
votes
3answers
1k views

Automatically close oldest buffers?

I needed to edit a lot of files recently for a small change in each file. To get to each file, I browsed through NERDtree and opened one file after another. As I opened more and more files, I ...
2
votes
2answers
6k views

How do I restore visual mode selection highlighting?

Somehow, over the last few days, the visual mode in Vim no longer flips the background highlight, as it used to. Now, if the file is recognized by something it can syntax highlight, it seems to ...
1
vote
2answers
8k views

Access a file under subdirectories of a path through gf command

I am using perl. When I press gf while having the cursor on Testcase, it shows E447: Can't find file "Testcase.pm" in path. So I added that path. It works for files under particular path which ...
6
votes
2answers
2k views

Start Vim in insert mode for new files

I mostly use Vim to edit configuration files so I understand why it starts in normal mode. But I also use vi mode for the REPL (bash, zsh, ipython, etc.) and the shell always starts in insert mode (...
11
votes
1answer
1k views

How to change undo granularity in Vim?

At some point my Vim would undo an entire word when I hit u. [i]typing some words[C-c][u] Would result in typing some However, the undo granularity seems to have changed to deleting one letter at ...
4
votes
2answers
3k views

Neovim Gray Background

Problem Anytime I switch to a colorscheme the background turns this ugly gray that gives everything a washed out look. Why does this happen, and how can I prevent it? Example screenshot— More ...
6
votes
3answers
5k views

Why does .vimrc not set colorscheme properly?

So I have downloaded proton.vim (a colorscheme) and placed it inside my .vim/colors folder. In .vimrc, right at the bottom I have colorscheme proton but when Vim loads, it is set to the default ...
3
votes
1answer
3k views

Vim does not redraw screen and cursorlines remain drawn

I think this question of mine should be closed, since I do not have access to that computer anymore, so I can't check wheter the answers are effective solutions or not. I never had this problem, but ...
-2
votes
1answer
2k views

Vim Powerline is at top of window instead of bottom

I just installed Powerline for the first time and the Powerline bar shows up at the top of my Vim window instead of at the bottom. This is both on MacVim and on terminal Vim. Running OS X 10.10 ...
6
votes
1answer
814 views

How do I turn off the “feature” where the pound sign “#” is forced to 0 position?

When writing C/C++ code, vim defaults to forcing any pound sign ("#") to the zero position column. This is fine for for C/C++, but it is very annoying for shell scripting and perl scripting, since the ...
4
votes
1answer
362 views

Why does Vim say “Already at newest change” despite a full “changes” history list?

I seem to be unable to undo something in a file I saved, despite that the history of changes shows up with I press :changes. So the change history is known to vim but I cannot access it? I thought it ...
6
votes
2answers
1k views

If I split the screen and open a Netrw dir listing in one window, Vim won't let me focus that window

I'm using Vim 7.4. I have a buffer open and I type :vsplit. Vim splits the screen and I see my buffer in both windows. That's great. Just what I want. And at this point ctrl+W W switches the focus ...
4
votes
1answer
761 views

How to make a newline without autoindent

Is there a command to make a newline without the autoindent? In other words, I want o and O to normally autoindent, but is there another command that will not autoindent for just the duration of that ...
3
votes
2answers
755 views

Stop Vim from deleting trailing whitespace [closed]

Vim automatically strips trailing whitespace from my files on save, which is extremely annoying in various contexts. How do I disable this behaviour? This question is not a duplicate of this one, ...
8
votes
2answers
250 views

Is there a way to disable the foldexpr during autocomplete?

I've noticed that vim's fold method affects the efficiency of autocomplete, e.g. C-N is slow, and C-X L is hideously slow in medium sized files with relatively expensive foldexprs. I can't see the ...
4
votes
2answers
529 views

Breaks line without leaving insert mode

With the textwidth option set the text written can be wrapped when we leave insert mode. If I type a line longer than my textwidth value then it will go on a new line. e.g. with set textwidth=5 and ...
3
votes
1answer
524 views

How to go to the end of the line even in on a wrapped line?

I would like to map <End> and <Home> to go to the end or beginning of the current line (not the screen), even if the cursor is on a wrapped line: |1 First line. | |2 This is some ...
7
votes
1answer
1k views

How can I change the highlighting of python class name?

How can I define a syntax to highlight the python class name MyClass in vim? class MyClass(object): ...... Vim has already highlighted the class name. However, it seemingly highlights it with ...
2
votes
1answer
1k views

Vim slows down with multiple buffers etc

I think noticing a slow redrawing and slow cursor movement on a fastest PC, is one of the popular frustrations with Vim. Here I am as a yet another instance. I have a fresh installation of VIM, with ...
2
votes
1answer
1k views

nnoremap is not working with `[v`]

I'm trying to add a simple mapping to visually select recently pasted text. However, even though `[v`] is working correctly in a vim session, when I try to use it in my .vimrc file, it doesn't work. ...

15 30 50 per page
1
2 3 4 5 6