2

One of the files I have has "wrapped" text : enter image description here Any idea how to unravel it? I am not sure if this is feature of any of my plugins. List of my plugins:

Plugin 'VundleVim/Vundle.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'git://git.wincent.com/command-t.git'
Plugin 'file:///home/gmarik/path/to/plugin'
Plugin 'rstacruz/sparkup'
Plug 'pandoc-preview.vim'
Plug 'vimtex'
Plug 'vim-auto-save'

My vim version : VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Feb 22 2019 18:22:38)

  • Not related to your question, which I've answered in the answers section. What is that list of plugins? Is it directly copied from vimrc? If yes, then why are there some lines containing Plugin 'name' and some just name? It's confusing. – klaus Mar 28 '19 at 16:07
  • 1
    I am using both Vundle and vim-plug. and I didn't copy them from .vimrc instead I copied output of commands :PlugStatus and :PluginList, however now that I think about it I should've just copied them from .vimrc, sorry for the confusion. I have now edited them as they are in my .vimrc. – Victor Mar 28 '19 at 16:12
  • Off the top of my head, it's probably vimtex that is setting up folds for you. You might want to take a gander at :help vimtex-folding. – Rich Mar 28 '19 at 17:22
2

First of all the "wrapped" text is actually a folded text (see :h folds)

To open the closed folds, you can

  • Place your cursor on the folded texts and do zo to open it (see :h zo)
  • Place your cursor on the folded text and do za to toggle fold under cursor, i.e. open the fold if the fold is closed and vice versa (see :h za)
  • Do zR to open all the folds (see :h zR)
  • Do zi to toggle the the display of folds, i.e. toggle 'foldenable' (see :h zi and :h foldenable)

For more info and keybinding to create/delete/open/close/interact with folds, see :h folds

| improve this answer | |
  • Glad it worked. On an unrelated note, you should read :h intro to make sure you know what features are there in vim, so that you can identify whether what you are encountering is a bug/problem or a feature, even if you don't actually need or have any interest in that feature. It'll be useful. Cheers! – klaus Mar 28 '19 at 16:09
  • 1
    Or zi to toggle whether folds are displayed at all. – Rich Mar 28 '19 at 17:20
  • 1
    My favorite is za—I dont have to think about open or close. – D. Ben Knoble Mar 28 '19 at 22:33
  • Added zi and za to the answer. – klaus Mar 29 '19 at 3:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.