dhruvasagar / vim-table-mode

VIM Table Mode for instant table creation.
2.11k stars 96 forks source link

Cursor is jumping back to | #115

Closed emprovements closed 7 years ago

emprovements commented 7 years ago

Hi, When I write "|" and space, cursor immediately jumps back to "|" and if I start write |first than "first" is indented but cursor stays between "s" and "t" like "| start" ( is cursor). I tried to remove all my plugins and settings to run vim-table-mode only and it keeps doing it.

My vim environment is:

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 24 2016 16:44:48)
Included patches: 1-1689
Extra patches: 8.0.0056
Modified by pkg-vim-maintainers@lists.alioth.debian.org
Compiled by pkg-vim-maintainers@lists.alioth.debian.org
Huge version with GTK2 GUI.  Features included (+) or not (-):
+acl             +farsi           +mouse_netterm   +tag_binary
+arabic          +file_in_path    +mouse_sgr       +tag_old_static
+autocmd         +find_in_path    -mouse_sysmouse  -tag_any_white
+balloon_eval    +float           +mouse_urxvt     +tcl
+browse          +folding         +mouse_xterm     +terminfo
++builtin_terms  -footer          +multi_byte      +termresponse
+byte_offset     +fork()          +multi_lang      +textobjects
+channel         +gettext         -mzscheme        +timers
+cindent         -hangul_input    +netbeans_intg   +title
+clientserver    +iconv           +packages        +toolbar
+clipboard       +insert_expand   +path_extra      +user_commands
+cmdline_compl   +job             +perl            +vertsplit
+cmdline_hist    +jumplist        +persistent_undo +virtualedit
+cmdline_info    +keymap          +postscript      +visual
+comments        +langmap         +printer         +visualextra
+conceal         +libcall         +profile         +viminfo
+cryptv          +linebreak       -python          +vreplace
+cscope          +lispindent      +python3         +wildignore
+cursorbind      +listcmds        +quickfix        +wildmenu
+cursorshape     +localmap        +reltime         +windows
+dialog_con_gui  +lua             +rightleft       +writebackup
+diff            +menu            +ruby            +X11
+digraphs        +mksession       +scrollbind      -xfontset
+dnd             +modify_fname    +signs           +xim
-ebcdic          +mouse           +smartindent     +xsmp_interact
+emacs_tags      +mouseshape      +startuptime     +xterm_clipboard
+eval            +mouse_dec       +statusline      -xterm_save
+ex_extra        +mouse_gpm       -sun_workshop    +xpm
+extra_search    -mouse_jsbterm   +syntax          
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/freetype2 -Wdate-time  -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      
Linking: gcc   -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E  -Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim   -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo -lnsl  -lselinux  -lacl -lattr -lgpm -ldl  -L/usr/lib -llua5.2 -Wl,-E  -fstack-protector-strong -L/usr/local/lib  -L/usr/lib/x86_64-linux-gnu/perl/5.22/CORE -lperl -ldl -lm -lpthread -lcrypt  -L/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu -lpython3.5m -lpthread -ldl -lutil -lm -L/usr/lib/x86_64-linux-gnu -ltcl8.6 -ldl -lz -lpthread -lieee -lm -lruby-2.3 -lpthread -lgmp -ldl -lcrypt -lm
dhruvasagar commented 7 years ago

Hi,

I believe this has crept in due to a recent feature addition involving auto formatting based on cursorhold. I guess it needs more tweaking, i'll have a look and fix this on priority. Thanks for reporting this issue.

jujae commented 7 years ago

I am having the same issue where cursor constantly jump back one character while writing the table "sequentially" (| foo ba_r). When I type the word fast enough, it won't happen, seems this only happens when there is a pause.

davidsu commented 7 years ago

same issue here

dhruvasagar commented 7 years ago

For the time being you should disable the setting g:table_mode_auto_align abd that should fix the problem. I will try fixing the auto align feature in the meanwhile.

On Apr 13, 2017 11:05 PM, "David Susskind" notifications@github.com wrote:

same issue here

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dhruvasagar/vim-table-mode/issues/115#issuecomment-293969690, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFYwkTDU_N8PAwvqZ2jFdKGxeZaQFRqks5rvlzYgaJpZM4M4sNl .

ARandomOWL commented 7 years ago

The table auto-align feature also seems to constantly mark the file as changed, which is rather irritating. I've disabled it and haven't seen a decline in usability of vim-table-mode.

dhruvasagar commented 7 years ago

Will close this issue since now I have removed auto align for insert mode.

@ARandomOWL If auto align is enabled, it will realign the table when table mode is enabled and you are within the table. This will cause it to be marked as changed from time to time. I don't particularly see that as an issue since if you are moving around within the table with table mode being enabled it's fair to assume you're editing the table and hence the auto align comes into picture if it is enabled.

ARandomOWL commented 7 years ago

@dhruvasagar: My annoyance was that the file was marked changed even if the table was not altered or auto-aligned. I will try out the new version, thanks.

dhruvasagar commented 7 years ago

I understand, that can sometimes be annoying. I will add optimisations to realignment to skip changing the buffer if there are no changes applicable.