eth-p / vim-it2-touchbar

A Vim and Neovim plugin that adds Apple Touch Bar support when using iTerm2.
MIT License
2 stars 1 forks source link

Installed and setup as described, but nothing happens #1

Closed thomasmerz closed 1 year ago

thomasmerz commented 2 years ago

I have installed and setup your very interesting vim-plugin as desribed, but nothing happens 🤷🏻‍♂️

I'm using:

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Sep 24 2021 06:02:32)
macOS version - x86_64
Included patches: 1-3455
Compiled by Homebrew
Huge version with MacVim GUI.  Features included (+) or not (-):
+acl               +file_in_path      -mouse_sysmouse    +tag_binary
+arabic            +find_in_path      +mouse_urxvt       -tag_old_static
+autocmd           +float             +mouse_xterm       -tag_any_white
+autochdir         +folding           +multi_byte        +tcl
-autoservername    -footer            +multi_lang        +termguicolors
+balloon_eval      +fork()            -mzscheme          +terminal
+balloon_eval_term +fullscreen        +netbeans_intg     +terminfo
+browse            +gettext           +num64             +termresponse
++builtin_terms    -hangul_input      +odbeditor         +textobjects
+byte_offset       +iconv             +packages          +textprop
+channel           +insert_expand     +path_extra        +timers
+cindent           +ipv6              +perl              +title
+clientserver      +job               +persistent_undo   +toolbar
+clipboard         +jumplist          +popupwin          +transparency
+cmdline_compl     +keymap            +postscript        +user_commands
+cmdline_hist      +lambda            +printer           +vartabs
+cmdline_info      +langmap           +profile           +vertsplit
+comments          +libcall           -python            +virtualedit
+conceal           +linebreak         +python3           +visual
+cryptv            +lispindent        +quickfix          +visualextra
+cscope            +listcmds          +reltime           +viminfo
+cursorbind        +localmap          +rightleft         +vreplace
+cursorshape       +lua               +ruby              +wildignore
+dialog_con_gui    +menu              +scrollbind        +wildmenu
+diff              +mksession         +signs             +windows
+digraphs          +modify_fname      +smartindent       +writebackup
+dnd               +mouse             -sodium            -X11
-ebcdic            +mouseshape        -sound             -xfontset
+emacs_tags        +mouse_dec         +spell             +xim
+eval              -mouse_gpm         +startuptime       -xpm
+ex_extra          -mouse_jsbterm     +statusline        -xsmp
+extra_search      +mouse_netterm     -sun_workshop      -xterm_clipboard
-farsi             +mouse_sgr         +syntax            -xterm_save
   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"
       defaults file: "$VIMRUNTIME/defaults.vim"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/Applications/MacVim.app/Contents/Resources/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe -DMACOS_X -DMACOS_X_DARWIN -g -O2 -arch x86_64 -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: clang -L. -fstack-protector-strong -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/readline/lib -L. -fstack-protector-strong -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/readline/lib -arch x86_64 -L/usr/local/lib -o Vim -lm -lncurses -liconv /usr/local/lib/libintl.a -framework AppKit -L/usr/local/opt/lua/lib -llua5.4 -fstack-protector-strong -L/System/Library/Perl/5.30/darwin-thread-multi-2level/CORE -lperl -L/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/config-3.9-darwin -lpython3.9 -framework CoreFoundation -F/System/Library/Frameworks -framework Tcl -framework CoreFoundation -lruby.3.1 -L/usr/local/Cellar/ruby/3.1.0/lib
iTerm2 Build 3.4.15
  System Version:   macOS 12.2.1 (21D62)
  Kernel Version:   Darwin 21.3.0

Can you please help and advice what to do? Thanks a lot.

speelbarrow commented 1 year ago

@thomasmerz If you're still interested, please show the code you are using to configure the plugin

thomasmerz commented 1 year ago

I added these lines to my ~/.vimrc

 function TouchBar()
   TouchBarLabel F2 "desert"
   colorscheme desert
 endfunction

And have your repo cloned into ~/.vim/bundle/vim-it2-touchbar - but my touchbar shows nothing different than usual and pressing F2 doesn't change my colorscheme.

speelbarrow commented 1 year ago

Can you try moving the plugin folder to ~/.vim/pack/vendor/start/vim-it2-touchbar?

Also, this plugin doesn't actually assign mappings to the keys. See :help map for information on how to map the key to desired command(s).

thomasmerz commented 1 year ago

I tried these symlinks in ~/.vim/pack/vendor/start:

vim-it2-touchbar ⇒ /Users/Thomas.Merz/dev/github.com/vim-bundle/vim-it2-touchbar vim-it2-touchbar ⇒ /Users/Thomas.Merz/dev/github.com/vim-bundle/vim-it2-touchbar/plugin

None changed anything, my touchbar looked the same 🤷🏼‍♂️ (all my other vim-plugins are symlinked in my ~/.vim/bundle directory and they work fine)

thomasmerz commented 1 year ago

After adding key-mapping F2 did what it was expected to do. But still no text in touchbar.

speelbarrow commented 1 year ago

Can you share a screenshot of your Touch Bar while in Vim (Cmd-Shift-6)?

thomasmerz commented 1 year ago
grafik
speelbarrow commented 1 year ago

Okay, I see what's causing the issue. This plugin takes advantage of iTerm2's feature to rename function keys, but you need to use iTerm2's "function keys" Touch Bar widget. This requires that:

thomasmerz commented 1 year ago

Bingo! My bad… Somewhere back in time I didn't want touchbar so much fancy stuff doing. With your help it works now (changed F2 to show colorscheme koehler instead of my example above)! Thank you ❤️

grafik
thomasmerz commented 1 year ago

Too bad that I will "soon" get a new Macbook without touch bar… 😱

speelbarrow commented 1 year ago

Glad I could help!