vim-jsx-typescript icon indicating copy to clipboard operation
vim-jsx-typescript copied to clipboard

File truncation after vim-prettier reformating when foldmethod=syntax

Open esanzgar opened this issue 5 years ago • 0 comments

I have three plugins installed using Vundle.

This is my .vimrc:

set nocompatible
filetype off
set shell=/bin/bash

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

Plugin 'gmarik/Vundle.vim'

Plugin 'leafgarland/typescript-vim'        " syntax, indenting and compiler for ts
Plugin 'peitalin/vim-jsx-typescript'       " syntax highlight for TSX files
Plugin 'prettier/vim-prettier'             " alternative to jsbeautify

call vundle#end()


filetype plugin indent on


" Make vim recognize syntax
syntax on
set foldmethod=syntax

noremap <C-f> :Prettier<CR>

When I format a .tsx file with vim-prettier the file gets truncated. This only happens if set foldmethod=syntax.

This is caused by a weird interaction between the three plugins.

Do you have any hints for me?

truncated_file

esanzgar avatar Dec 10 '19 12:12 esanzgar