2022 Developer Survey is open! Take survey.

New answers tagged

0 votes

Plugin conflicts over BufWinEnter Autocommands

I met the same problem. but for me, commenting the line blow works. " Open the existing NERDTree on each new tab. autocmd BufWinEnter * if getcmdwintype() == '' | silent NERDTreeMirror | endif ...
user avatar
  • 1
1 vote

Check if VimPlug is installed in .vimrc

If you know a file is precisely installed in a specific place, you can use filereadable(). if filereadable($HOME.'/.vim/autoload/plug.vim') call plug#Begin(..... However, plugins should not be ...
user avatar
1 vote

What's the configuration used to make vim remember modifications after closing the file?

Not a direct question to "how can I disable this feature", but my little undofile_warn.vim plugin will show a warning before undoing changing from previous Vim instances, which should also ...
user avatar
2 votes
Accepted

What's the configuration used to make vim remember modifications after closing the file?

The setting to use to preserve the undo is: set undofile To disable undo file: set noundofile
user avatar
1 vote

How to get total width of Vim with vertical splits?

The solution is the use &columns instead of winwidth(0) to get the width of the terminal window.
user avatar
  • 23
1 vote
Accepted

Why is my colorscheme showing weird colors?

All built-in colorschemes were remade to have mostly uniform look on all platforms (including windows). In case of pablo, where highlighting was based on first 16 colors, that depend on "terminal ...
user avatar
  • 9,763
1 vote

Why is my colorscheme showing weird colors?

Type :e $VIMRUNTIME/colors/pablo.vim At top of the file " Name: pablo " Author: Ron Aaron <ron@ronware.org> " Maintainer: Original maintainerRon Aaron <ron@...
user avatar
  • 15.5k
1 vote

Check if VimPlug is installed in .vimrc

You are almost there! The problem here is, that you need to re-source your config because the change in ~/.vim/autoload/plug.vim won't be recognised by vim since it's loading the files in the runtime ...
user avatar
  • 388
0 votes
Accepted

How to map a sequence of vim commands to a shortcut?

The command would be: nmap <F1> va{Vy You can store this command in your ~/.vimrc file. This will make it persistent. If it does not exist simply create it. More infos about this you can find ...
user avatar
  • 38
1 vote
Accepted

Configure the statusbar to show rows

See :help statusline where you can find many forms of embedding expressions, including %!, %{, and %{%. In this case, I might use %{% with an expression that calculates the length of %L (via line('$')-...
user avatar
  • 20.6k
1 vote
Accepted

How to jump to the first error when using ALE?

You can use the :ALENext command to jump to the next error found by ALE. See :help ale-navigation-commands for the list of navigation commands provided by ALE itself. If you'd like to create mappings ...
user avatar
  • 25.5k
0 votes

Error detected while processing BufRead Autocommands

The mailing list discussion confirmed a bug in the abaqus.vim ftplugin, which has since been patched. Options for the current user are (according to lacygoill on the mailing list): Wait for the next ...
4 votes
Accepted

Is it possible to execute Ex Commands (colon commands) in VimScript (vimrc/init.vim)?

I believe @VivianDeSmedt's comment refers to :help startup (notice that the vimrc is executed after files like plugin/*.vim and others have loaded). In general you cannot use a command until it has ...
user avatar
  • 20.6k
0 votes

What's going on with displaying tabs as 4 vs 8 in Vim vs other display clients (like a web server and firefox for example)

Problem Solved. Seems that the action of posting a stack exchange article was all I needed! The answer is to use set expandtab so that tabs are ALWAYS spaces. I hope somebody somewhere finds this ...
user avatar
0 votes

Lazy loading only the lines can be seen from the current window?

No. From the readfile function in fileio.c: /* * We allocate as much space for the file as we can get, plus * space for the old line plus room for one terminating NUL. * The amount is limited by ...
user avatar
  • 2,143

Top 50 recent answers are included