vim-markdown icon indicating copy to clipboard operation
vim-markdown copied to clipboard

Folding and Unfolding when typing in insert mode

Open Migacz85 opened this issue 5 years ago • 16 comments

markdown-vim-error

Like in title, when entering the insert and typing a text I experience an issue with folding and unfolding the text. Is that normal ? Or I have not setup something properly ?

Migacz85 avatar Feb 12 '19 22:02 Migacz85

How did you get it to fold? I can't seem to get it to work.

redapemusic35 avatar Feb 12 '19 22:02 redapemusic35

I just installed the plugin using vundle, but the issue is that when I'm typing in Insert mode is switching between fold and unfold mode - super annoying.

Migacz85 avatar Feb 12 '19 23:02 Migacz85

Seems I have the same issue here, which not only happens in insert mode, but also appears when I deleted something. BTW I'm using gVim under Windows 10. Both 32-bit version and 64-version have the problem.

blue-cloak avatar Mar 21 '19 15:03 blue-cloak

I have a similar problem using vim with OSX in iTerm2

lame avatar Mar 25 '19 20:03 lame

Just recorded this.

Some info

vim --version
VIM - Vi IMproved 8.1 (2018 May 18, compiled Feb 22 2019 12:55:04)
Included patches: 1-875, 878, 884, 948
Modified by [email protected]
Compiled by [email protected]
Huge version without GUI.  Features included (+) or not (-):
+acl               +extra_search      +mouse_netterm     +tag_old_static
+arabic            +farsi             +mouse_sgr         -tag_any_white
+autocmd           +file_in_path      -mouse_sysmouse    -tcl
+autochdir         +find_in_path      +mouse_urxvt       +termguicolors
-autoservername    +float             +mouse_xterm       +terminal
-balloon_eval      +folding           +multi_byte        +terminfo
+balloon_eval_term -footer            +multi_lang        +termresponse
-browse            +fork()            -mzscheme          +textobjects
++builtin_terms    +gettext           +netbeans_intg     +textprop
+byte_offset       -hangul_input      +num64             +timers
+channel           +iconv             +packages          +title
+cindent           +insert_expand     +path_extra        -toolbar
-clientserver      +job               -perl              +user_commands
-clipboard         +jumplist          +persistent_undo   +vartabs
+cmdline_compl     +keymap            +postscript        +vertsplit
+cmdline_hist      +lambda            +printer           +virtualedit
+cmdline_info      +langmap           +profile           +visual
+comments          +libcall           -python            +visualextra
+conceal           +linebreak         -python3           +viminfo
+cryptv            +lispindent        +quickfix          +vreplace
+cscope            +listcmds          +reltime           +wildignore
+cursorbind        +localmap          +rightleft         +wildmenu
+cursorshape       -lua               -ruby              +windows
+dialog_con        +menu              +scrollbind        +writebackup
+diff              +mksession         +signs             -X11
+digraphs          +modify_fname      +smartindent       -xfontset
-dnd               +mouse             +startuptime       -xim
-ebcdic            -mouseshape        +statusline        -xpm
+emacs_tags        +mouse_dec         -sun_workshop      -xsmp
+eval              +mouse_gpm         +syntax            -xterm_clipboard
+ex_extra          -mouse_jsbterm     +tag_binary        -xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H   -Wdate-time  -g -O2 -fdebug-prefix-map=/build/vim-nWVbVg/vim-8.1.0875=. -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       
Linking: gcc   -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim        -lm -ltinfo -lnsl  -lselinux -lacl -lattr -lgpm -ldl

I used this together with https://github.com/amix/vimrc

I solved it for me by disabling folding:

echo "let vim_markdown_folding_disabled = 1" >> ~/.vim_runtime/my_configs.vim

cmhe avatar Apr 08 '19 14:04 cmhe

I am also experiencing this, as describe and visually shown by @cmhe. On a fresh install of Neovim on the last macOS and iterm2.

Off course disabling the fold "fix" the issue, but that means that one can not use fold anymore then...

✦ ➜ nvim --version
NVIM v0.3.4
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/tmp/neovim-20190113-94620-d8vv4n/neovim-0.3.4/build/config -I/tmp/neovim-20190113-94620-d8vv4n/neovim-0.3.4/src -I/usr/local/include -I/usr/local/opt/gettext/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/tmp/neovim-20190113-94620-d8vv4n/neovim-0.3.4/build/src/nvim/auto -I/tmp/neovim-20190113-94620-d8vv4n/neovim-0.3.4/build/include
Compiled by [email protected]

Features: +acl +iconv +jemalloc +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/0.3.4/share/nvim"

Run :checkhealth for more info

Mayeu avatar Apr 15 '19 11:04 Mayeu

:-D I can say that I solved the issue uninstalling this plugin then lol

Migacz85 avatar Apr 16 '19 11:04 Migacz85

Hi,

I've been having the same issue. It seems to be fixed after updating vim to the latest version:

VIM - Vi IMproved 8.1 (2018 May 18, compiled May  8 2019 21:19:47)
macOS version
Included patches: 1-1300
Compiled by Homebrew

--- Edit So it appears it's not solved however the problem only occurs when editing a fenced code block or right before/after one, hope it could help someone in finding the solution.

lewis-fidlers avatar May 17 '19 09:05 lewis-fidlers

I'm having this issue as well with Vim 8.1/MacOS 10.14.3/iTerm2 3.2.9. Just moving around with hjkl causes the folds to constantly open and close. Had to uninstall the plug-in so I can edit markdown files again.

mikowl avatar May 24 '19 17:05 mikowl

Happens to me too. Not in every file though. Supper annoying. zi helps to disable per buffer

ngortheone avatar Aug 07 '19 00:08 ngortheone

It looks like with pythonic folding style this issue is not happening. At least stopped for me let g:vim_markdown_folding_style_pythonic = 1

ngortheone avatar Aug 07 '19 11:08 ngortheone

It looks like with pythonic folding style this issue is not happening. At least stopped for me let g:vim_markdown_folding_style_pythonic = 1

this worked for me. Can anyone tell me what pythonic folding style is, I can't tell the difference.

alechstong avatar Aug 15 '19 04:08 alechstong

Happens to me as well, just randomly folds and unfolds, but thanks to @alechstong, setting pythonic solved the problem.

talkingtab avatar Oct 19 '19 14:10 talkingtab

Solved

It looks like with pythonic folding style this issue is not happening. At least stopped for me let g:vim_markdown_folding_style_pythonic = 1

Solved it also for me! Thanks

mpas avatar Feb 19 '20 08:02 mpas

This was also occurring for me, but in normal mode. Every cursor movement would open and close the fold.

jrwrigh avatar Jun 19 '20 15:06 jrwrigh

It looks like with pythonic folding style this issue is not happening. At least stopped for me let g:vim_markdown_folding_style_pythonic = 1

That solved the issue for me. Thanks!

ricardobossan avatar Nov 30 '21 20:11 ricardobossan