0

Experiencing some annoying scrolling when I open a new set of brackets / braces as I'm typing in vim and not too sure about the source of my problem? Not too sure how to describe so here's a gfycat showing the jumping. Super annoying if I'm trying to write some code while looking at something above it...

For reference here are the settings I have in my .vimrc:

set smartindent
set tabstop=2
set shiftwidth=2
set expandtab
set number
set encoding=utf-8
set laststatus=2
set noshowmode
set term=screen-256color
set nocompatible
set backspace=2
set foldmethod=indent
set nofoldenable
set foldlevel=20
set foldnestmax=10
set background=dark
syntax on

I use this packages:

'scrooloose/nerdtree'
'vim-airline/vim-airline'
'vim-airline/vim-airline-themes'
'mutewinter/swap-parameters'
'kien/ctrlp.vim'
'scrooloose/nerdcommenter'
'tpope/vim-sleuth'
'ekalinin/dockerfile.vim'
'google/vim-jsonnet'
'jiangmiao/auto-pairs'
'SirVer/ultisnips'
'honza/vim-snippets'
aspin
  • 309
  • 2
  • 12
  • 1
    It's your auto-pairs plugin which is creating the closing bracket, and may well also be causing the jumping behaviour. Try to disable/remove that plugin and see if it helps. – nickspoon May 02 '17 at 07:37
  • That did the trick, thanks! – aspin May 03 '17 at 15:34

2 Answers2

0

I think it's generally good practice to have a close bracket when you open one, so that you might not forget about it later, but if you really want to get rid of it, I think this thread does a pretty good idea of explaining how to rebind it: Automatically insert a matching brace in Vim

Community
  • 1
  • 1
Erin B
  • 103
  • 2
  • 10
  • Hmm so I suppose I see how turning that off might fix my problem, but vim by default in my setup already creates the close bracket right after I open the bracket and it's the that's the problem right? – aspin May 01 '17 at 21:14
0

As nickspoon said, auto-pairs plugin was the culprit.

aspin
  • 309
  • 2
  • 12