lervag / vimtex

VimTeX: A modern Vim and neovim filetype plugin for LaTeX files.
MIT License
5.53k stars 390 forks source link

Problems to configure FZF #1715

Closed Marco-Israel closed 4 years ago

Marco-Israel commented 4 years ago

Hello

congratulation, very good plugin which is really easy to setup in basics. It does a lot of magic for me :)

Also you documentation is pretty good!

But I have some trouble to configure FZF + vimtex:

I get an error when I simple copy past to my ~/.vimrc (fzf and fzf-vim plugin are up to date in this moment):

nnoremap <localleader>lt :call vimtex#fzf#run()<cr>

after running \lt I get the error:

Error when calling [translation from german] "function vimtex#fzf#run[17]..<SNR>146_parse_toc":
Line   56:
  File "<string>", line 27
    return f"{color}{e['title']:65}{Style.RESET_ALL}"
                                                    ^
SyntaxError: invalid syntax

Is this an error comming from fzf, from vimtex or I'm again to stupid to read the documentation ;)

My best to you all! :)

lervag commented 4 years ago

congratulation, very good plugin which is really easy to setup in basics. It does a lot of magic for me :)

Also you documentation is pretty good!

Thanks! Happy to hear it :)

after running \lt I get the error:

Error when calling [translation from german] "function vimtex#fzf#run[17]..<SNR>146_parse_toc":
Line   56:
  File "<string>", line 27
    return f"{color}{e['title']:65}{Style.RESET_ALL}"
                                                    ^
SyntaxError: invalid syntax

Which version of Vim or neovim are you on? Which OS/distribution?

Btw: Which autocompleation do you prefer?

Currently, I use coc.nvim. I think it is good, but I've also liked deoplete and ncm2. Still, I think autocompletion brings only a slightly improvement over Vim's built-in omnicomplete, usercomplete, and so on, based on the <c-x><c-{key}> mappings. See :help ins-completion for more info on built-in completion.

Marco-Israel commented 4 years ago

Currently I had set it up in an old Ubuntu 14.4 VM by running vim --version

VIM - Vi IMproved 8.2 (2019 Dec 12 kompiliert am May 21 2020 17:00:50)
Inklusive der Patches: 1-803
Verändert von jonathon.fernyhough@york.ac.uk
Übersetzt von jonathon.fernyhough@york.ac.uk
Riesige Version mit GTK3 GUI.
 Ein- (+) oder ausschließlich (-) der Eigenschaften:
+acl               -farsi             +mouse_sgr         +tag_binary
+arabic            +file_in_path      -mouse_sysmouse    -tag_old_static
+autocmd           +find_in_path      +mouse_urxvt       -tag_any_white
+autochdir         +float             +mouse_xterm       +tcl
-autoservername    +folding           +multi_byte        +termguicolors
+balloon_eval      -footer            +multi_lang        +terminal
+balloon_eval_term +fork()            -mzscheme          +terminfo
+browse            +gettext           +netbeans_intg     +termresponse
++builtin_terms    -hangul_input      +num64             +textobjects
+byte_offset       +iconv             +packages          +textprop
+channel           +insert_expand     +path_extra        +timers
+cindent           +ipv6              +perl              +title
+clientserver      +job               +persistent_undo   +toolbar
+clipboard         +jumplist          +popupwin          +user_commands
+cmdline_compl     +keymap            +postscript        +vartabs
+cmdline_hist      +lambda            +printer           +vertsplit
+cmdline_info      +langmap           +profile           +virtualedit
+comments          +libcall           -python            +visual
+conceal           +linebreak         +python3           +visualextra
+cryptv            +lispindent        +quickfix          +viminfo
+cscope            +listcmds          +reltime           +vreplace
+cursorbind        +localmap          +rightleft         +wildignore
+cursorshape       +lua               +ruby              +wildmenu
+dialog_con_gui    +menu              +scrollbind        +windows
+diff              +mksession         +signs             +writebackup
+digraphs          +modify_fname      +smartindent       +X11
+dnd               +mouse             +sound             -xfontset
-ebcdic            +mouseshape        +spell             +xim
+emacs_tags        +mouse_dec         +startuptime       +xpm
+eval              +mouse_gpm         +statusline        +xsmp_interact
+ex_extra          -mouse_jsbterm     -sun_workshop      +xterm_clipboard
+extra_search      +mouse_netterm     +syntax            -xterm_save
          System-vimrc-Datei: "$VIM/vimrc"
        Benutzer-vimrc-Datei: "$HOME/.vimrc"
 zweite Benutzer-vimrc-Datei: "~/.vim/vimrc"
         Benutzer-exrc-Datei: "$HOME/.exrc"
         System-gvimrc-Datei: "$VIM/gvimrc"
       Benutzer-gvimrc-Datei: "$HOME/.gvimrc"
zweite Benutzer-gvimrc-Datei: "~/.vim/gvimrc"
      defaults Datei: "$VIMRUNTIME/defaults.vim"
           System-Menü-Datei: "$VIMRUNTIME/menu.vim"
     Voreinstellung für $VIM: "/usr/share/vim"
Übersetzt: gcc -std=gnu99 -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread -I/usr/include/gtk-3.0 -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/pixman-1 -I/usr/include/libpng12     -g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_REENTRANT   -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       
Linken: gcc -std=gnu99   -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -L/build/ruby1.9.1-E8yHvR/ruby1.9.1-1.9.3.484/debian/lib -rdynamic -Wl,-export-dynamic -Wl,-E  -Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim   -lgtk-3 -lgdk-3 -latk-1.0 -lgio-2.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lcairo -lgobject-2.0 -lglib-2.0   -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo  -lselinux  -lcanberra   -lacl -lattr -lgpm -ldl  -L/usr/lib -llua5.2 -Wl,-E  -fstack-protector -L/usr/local/lib  -L/usr/lib/perl/5.18/CORE -lperl -ldl -lm -lpthread -lcrypt  -L/usr/lib/python3.4/config-3.4m-x86_64-linux-gnu -lpython3.4m -lpthread -ldl -lutil -lm -L/usr/lib/x86_64-linux-gnu -ltcl8.6 -ldl -lz -lpthread -lieee -lm -lruby-1.9.1 -lpthread -lrt -ldl -lcrypt -lm  -L/usr/lib
lervag commented 4 years ago

Hi again. First, I would be happy if you could read up on how to format issue comments. See the formatting guides, it's quite simple.

Next, I think the problem is that you're on a VERY old system. Ubuntu 14.04 was released in April 2014, more than 6 years ago. The Python version on this system is probably 3.4, perhaps 3.5. The f-string syntax that is used here and that is provoking the error message was introduced in Python 3.6, which was released in 2016 (I think). I would think it is possible to install an updated version of Python, so that might solve your issue.

In any case, I do not intend to make things work for old systems, so I'm going to close the issue as "won't fix".