yilin-yang / vim-markbar Goto Github PK
View Code? Open in Web Editor NEWDisplay all accessible marks and their surrounding lines in a collapsible sidebar.
License: MIT License
Display all accessible marks and their surrounding lines in a collapsible sidebar.
License: MIT License
With markbar plugin enabled, if I open vim, run several commands, close vim and then examine viminfo.vim, Command Line, Search and Expression History and Search History have been overwritten with the same timestamp.
Invariably, all command, search etc timestamps are overwritten with the same timestamp of the last command i.e. :q
et al. That is all history timestamps in viminfo files not just last session's history.
I have recently installed:
VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Jan 3 2024 00:15:11)
MS-Windows 32-bit GUI version with OLE support
Compiled by appveyor@APPVEYOR-VM
Tested with gvim running with Administrator and also no Admin privileges.
Testing with vimfiles including only:
├── autoload
│ └── pathogen.vim
├── bundle
│ └── vim-markbar-master
├── viminfo.vim
└── vimrc
Contents of vimrc
is:
execute pathogen#infect()
set viminfo=!,'5000,s100,h
set viminfo+=n~/vimfiles/viminfo.vim
Resulting viminfo
example when opening vim, running a couple of commands, and closing. Note that none of the commands, searches or expressions were run in previous session. The order of the history is all messed up as well. The timestamp is the time closed last session.
# Command Line History (newest to oldest):
:wqa
|2,0,1709946792,,"wqa"
:ChoresDateAdd
|2,0,1709946792,,"ChoresDateAdd"
:w
|2,0,1709946792,,"w"
:ChoresSort
|2,0,1709946792,,"ChoresSort"
:Ch
|2,0,1709946792,,"Ch"
:qa
|2,0,1709946792,,"qa"
:windo diffthis
|2,0,1709946792,,"windo diffthis"
:e c:\Users\tom\vimfiles\bundle_disabled\0_tmp\vim-markbar-master\plugin\vim-markbar.vim
|2,0,1709946792,,"e c:\\Users\\tom\\vimfiles\\bundle_disabled\\0_tmp\\vim-markbar-master\\plugin\\vim-markbar.vim"
# Search String History (newest to oldest):
? \s*$
|2,1,1709946792,,"\\s*$"
??^-
|2,1,1709946792,63,"^- "
?/^---
|2,1,1709946792,47,"^---"
?/on
|2,1,1709946792,47,"on"
# Expression History (newest to oldest):
=800-340.79
|2,2,1709946792,,"800-340.79"
=1000-340.79
|2,2,1709946792,,"1000-340.79"
=140+1+1
|2,2,1709946792,,"140+1+1"
=160+5+10
|2,2,1709946792,,"160+5+10"
# Input Line History (newest to oldest):
@em
|2,3,1709946792,,"em"
@w
|2,3,1709946792,,"w"
@XX
|2,3,1709946792,,"XX"
First of all, great work!
This is really a super intuitive thing that I'm surprised didn't already exist for Vim.
One little issue is that if I use :bd to kill the popup, subsequently opening the markbar causes the following exceptions:
Error detected while processing function markbar#ui#ToggleMarkbar[1]..markbar#MarkbarState#toggleMarkbar[3]..markbar#MarkbarState#openMarkbar[8]..markbar#ui#OpenMarkbarSplit[17].
.markbar#ui#SetMarkbarMappings[3]..markbar#ui#SetGoToMark[1]..<SNR>200_CheckBadBufferType:
line 2:
E605: Exception not caught: (vim-markbar) Cannot invoke this function outside of a markbar buffer/window!
Error detected while processing function markbar#ui#ToggleMarkbar[1]..markbar#MarkbarState#toggleMarkbar[3]..markbar#MarkbarState#openMarkbar:
line 8:
E171: Missing :endif
Travis CI is no longer automatically triggering new builds because I've run out of build credits.
I still want a way to easily test code changes against multiple different (neo)vim versions. Am writing a Dockerfile to loosely replicate the Travis build and testing environment that I can use for offline testing. If I decide to buy build credits again, I might be able to publish and reuse that Dockerfile.
Using 'q
:
Mark not set: q
Press any key to continue.
Press ENTER or type command to continue
The second prompt occurs after responding to the first.
I think it would be nice to not have any context for File marks but have some for local ones. The only important thing to me for file marks is the file name itself.
So there could be g:markbar_num_lines_context_local
and g:markbar_num_lines_context_global
or whatever you want to call it.
Hello!
Whenever I toggle the plugin with <leader>m
, I receive the following error:
"( Markbar )" --No lines in buffer--
Error detected while processing function markbar#PeekabooMarkbarController#backtick[4]..markbar#MarkbarController#openMarkbar[10]..markbar#MarkbarController#refreshContents[9]..markbar#MarkbarController#_populateWithMarkbar[7]..markbar#helpers#ReplaceBuffer[1]..markbar#helpers#SetBufferLineRange:
line 20:
E117: Unknown function: deletebufline
Once I press to continue out of the message, the Markbar does display, but it does not list any active marks.
And when I press the toggle it off, it goes away with any further error messages.
If it's of any use, I do have junegunn's vim-peekaboo installed and enabled.
Please let me know if there is any more information you need, I'm happy to help :)
Thank you!
I think a neat quick little view could be just a popup window at the cursor without the context for jumping to known targets. I use vim-ccls
which used a sidebar implementation for a long time before getting a new popup version and I'm finding it (along with a few other examples) are just much easier to use.
Hello,
When opening a vimspell file and the vim-markbar plugin is enabled, the following error message is displayed:
Error detected while processing function MarkbarVimEnter[13]..markbar#MarkbarModel#updateCurrentAndGlobal[26]..markbar#BufferCache#updateCache[14]..markbar#MarkData#New:
line 10:
E605: Exception not caught: markstring parsing failed for:
In order to reproduce the issue, open a VIMspell file (eg: /usr/share/nvim/runtime/spell/en.utf-8.spl
) with neovim and the vim-markbar plugin enabled (no other configuration needed).
This was tested with neovim 0.7.2. I realize that it's not particularly useful to open a VIMspell file with vim, but I would expect to be able to open this without any plugin errors.
Let me know if there is any additional info I can provide. Thanks for the work on this great plugin!
vim-markbar was my first real vim plugin and it has a lot of cruft and ugliness born out of my inexperience with vimscript and open source project management. I plan to fix these as a preliminary step to adding features like #17, #20, and #22. These include not using *anonymous-function*
when writing "class" member functions, and making an attempt to crudely emulate C++ classes and inheritance (with explicit functions for type checking, "pure virtual" functions, and so on).
I'm also unhappy with the current test suite; it duplicates a lot of code and its structure is probably unclear. I plan to rewrite the tests to be more behavior driven.
As above.
'Z
.'Z
in its markbar.'Z
in its markbar.'Z
the user-set name "foobar"
. This name is shown in (1)'s markbar, but not shown in (2)'s markbar."foobar"
will show up in its markbar.Hi, when deleting marks it stays hidden during the current neovim session. However, once I exit and return the deleted marks reappear, I imagine because we are not editing the shada file at all. It would be nice if vim-markbar did this as it would provide a very user friendly way to remove marks on the fly as we see them.
When displaying the context of special marks for previously edited files (`0
, `1
, etc.), non-existent files will show [buffer line read failed]
. This is also true of term://
buffers that have exited.
I've noticed while using this plug-in that the peekaboo window pops up in Vim's Select mode. IIRC you can't jump to another mark from Select mode because typing ` or ' would place you immediately into Insert mode and the characters are typed out. Because of this, I think the peekaboo window should not show from Select mode and be hidden like Insert mode. Please let me know if this can be done and if you agree.
I've been seeing random bugs related to Netrw and markbar for a few weeks. I think I've isolated the problem a bit...
To recreate:
nvim v0.3.1 on OS X (exact version/OS probably doesn't matter).
With a ~/.config/nvim/init.vim
of:
call plug#begin()
Plug 'tpope/vim-vinegar'
Plug 'kshenoy/vim-signature'
Plug 'Yilin-Yang/vim-markbar'
call plug#end()
(and vim-plug installed, i.e. https://github.com/junegunn/vim-plug/blob/master/plug.vim in ~/.config/nvim/autoload
- although I suspect the plugin manager doesn't matter).
I open nvim just by typing nvim
. I hit -
twice to navigate up to the parent directory, then again for its parent (this is a feature vim-vinegar
provides but I don't think it's directly related to the bug as I've seen it in other places, just not easily recreatable).
I now see an error that looks like this:
Error detected while processing function <SNR>9_opendir[7]..<SNR>48_NetrwBrowseUpDir[50]..<SNR>48_NetrwBrowseChgDir[282]..markbar#Pe
ekabooMarkbarController#backtick[3]..markbar#MarkbarController#openMarkbar[11]..markbar#MarkbarController#_populateWithMarkbar[3]..m
arkbar#PeekabooMarkbarController#_getMarkbarContents[2]..markbar#MarkbarController#_generateMarkbarContents:
line 6:
E716: Key not present in Dictionary: 1
E15: Invalid expression: l:buffer_caches[a:buffer_no]['_marks_dict']
Error detected while processing function <SNR>9_opendir[7]..<SNR>48_NetrwBrowseUpDir[50]..<SNR>48_NetrwBrowseChgDir[282]..markbar#Pe
ekabooMarkbarController#backtick[3]..markbar#MarkbarController#openMarkbar[11]..markbar#MarkbarController#_populateWithMarkbar:
line 3:
E734: Wrong variable type for +=
Judging by the error, it looks like some interaction error between vim-signature
and vim-markbar
, but I'm not sure which is at fault. Sorry I haven't dug any further.
Thanks again for all your work on vim-markbar
- great plugin!
It would be helpful to visually identify a mark in its context. Perhaps the mark's cursor location could be highlighted, reflecting apostrophe or backtick behavior.
I just installed, and set up <leader>m to
<Plug>ToggleMarkbar
. I got this error when I tried it:
Error detected while processing function markbar#ui#ToggleMarkbar[1]..markbar#MarkbarState#toggleMarkbar[3]..markbar#MarkbarState#openMarkbar[16]..markbar#MarkbarState#p
opulateWithMarkbar[5]..markbar#MarkbarState#getMarkbarContents:
line 19:
E716: Key not present in Dictionary: a
E15: Invalid expression: markbar#helpers#IsGlobalMark(l:mark_char) ? l:globals[l:mark_char] : l:marks[l:mark_char]
Error detected while processing function markbar#ui#ToggleMarkbar[1]..markbar#MarkbarState#toggleMarkbar[3]..markbar#MarkbarState#openMarkbar[16]..markbar#MarkbarState#p
opulateWithMarkbar:
line 5:
E734: Wrong variable type for +=
vim-markbar seems like a great idea (I regularly use vim-peekaboo, so understand the concept). However, there seems to be a delay of approx 500ms after hitting '
, which makes it fairly impractical in daily usage. If you don't know which mark you want, that's OK - but if you do, hitting 'a
(for example, to go to mark a) introduces a 500ms delay. I was expecting/hoping it would be instant, but the markbar is still opened after the delay, then immediately closed.
Perhaps I've missed a configuration option? It seems like strange behaviour. I was hoping for behaviour a bit like https://github.com/liuchengxu/vim-which-key, which shows the prompt window only if there is a delay after the first key is hit. vim-peekaboo doesn't have the issue either, because the peekaboo window is near instant.
Thanks - and hope this comes across as constructive! I think vim-markbar is a great idea and I wish it worked for me.
I'm using a german locale on my machine, which gives me:
Fehler beim Ausführen von "function markbar#MarkbarController#toggleMarkbar[3]..markbar#MarkbarController#openMarkbar[5]..markbar#MarkbarModel#updateCurrentAndGlobal[4]..markbar#BufferCache#updateCache[5]..markbar#textmanip#TrimMarksHeader
":
Zeile 13:
E605: Exception nicht gefangen: Failed to trim leading whitespace and/or column header from input string: ^@Mark Zeile Sp Datei/Text^@ ' 1 0
when toggling the markbar.
When starting LC_ALL=en LANG=en_US.UTF-8 vim
, everything works as expected.
The error above translates roughly to:
Error while executing "function...":
Line 13: E605: Exception not catched: ...
I am a bit lost here. For some reason, none of the default syntax highlighting worked out of the box. When I define the colors myself, I seem to only be able to update the colors for markbarContext
and markbarContextMarkHighlight
.
I have this pasted at the bottom of my .vimrc while I try and figure this thing out:
filetype plugin indent on
set t_Co=256
syntax enable
set autoread
set hidden
hi markbarContext ctermfg=green
hi markbarContextMarkHighlight cterm=bold ctermfg=magenta
hi markbarSectionLowercaseMark cterm=bold ctermfg=red
hi markbarSectionSpecialLocalMark cterm=bold ctermbg=57 ctermbg=57
hi markbarSectionName cterm=underline ctermfg=green ctermbg=green
hi markbarSectionNumberedMark cterm=bold ctermfg=yellow ctermbg=yellow
Other than this, I have no issues with colorscheme rendering in vim. I am currently running a variation of badwolf, and markbar syntax does change with my colorscheme, but displays the default color for all items.
Any ideas? Thanks.
Hi, nice plugin!
I have this in my init.vim
.
let g:markbar_marks_to_display = "'.[]<>^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
let g:markbar_peekaboo_marks_to_display = "'.[]<>^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
Is there a way to see special marks like .
, [
, etc...?
Thanks!
When vim-markbar is installed, jumping to a mark that lies in closed fold does not cause the fold to open. This behavior is controlled in vim via the foldopen
setting. Specifying mark
in the foldopen
does not solve the problem as vim-markbar
seems to neglect the setting.
I don't know if this is a bug or is it suppose to work this way but after pressing mo I need to press an extra (any) key to actually open the mark sidebar.
I had to set it like this in my .vimrc to actually open right away:
nmap < leader >mo OpenMarkbar ' (Although any random key is valid)
Latest Markbar plugin breaks badly when used with latest version of vim-markdown-folding plugin. Running Gvim 8.1.
Attached video capture shows effect of jumping to mark via 1) suggested mapping <Leader>m
, and 2) via peekaboo master '
in markdown file.
Plugin vim-markdown-folding plugin works OK.
NOTE: I uninstalled ALL plugins to isolate issue and can say that only when Markdown-folding plugin installed is there a problem.
If I type 'd
to select mark d
, vim keeps waiting for extra input before jumping to the mark. You can see the d
on the bottom right. It only jumps to the mark when you wait for a second without typing anything, as if you're in normal mode on an editable buffer.
Hello,
thanks a lot for the effort you put in writing this cool plugin.
I am installing vim-markbar on both vim v.8.2.5100 and neovim v.0.7.0 using vim-plug (https://github.com/junegunn/vim-plug), latest version.
After installation, on both editors in the command bar I see
Error detected while processing function MarkbarVimEnter[6]..markbar#settings#PersistMarkNames:
line 20:
(vim-markbar) WARNING: g:markbar_persist_mark_names is v:true, but won't work because viminfo-!/shada-! is not set! set viminfo+=!
in vim or set shada+=!
in neovim to fix this.
Press ENTER or type command to continue
Is it a bug?
thanks, best,
Franco Maria
When using select a mark functionality (as described here, I get a message saying Mark not in markbar: w
(in case I did <leader>w
). I can see the mark in the window and if just pressing the letter of the mark, vim takes me to that mark, so it's only the issue when wanting to show the mark in the peekabo window without actually going there.
Running ./run_tests.sh
from inside $PROJECT_ROOT/test
produces output like:
Starting Vader: /home/yiliny/plugins/vim-markbar/test/standalone-test-foldopen.vader
(1/8) [EXECUTE] Open Buffers
(2/8) [EXECUTE] Initialize, Declare Test Helpers
(3/8) [EXECUTE] Set Up Folds and Marks
(4/8) [ DO] jumping to a closed, level 1 fold opens that fold
(4/8) [ THEN]
(5/8) [ DO] jumping to a closed, level 2 fold in closed level 1 fold opens that fold
(5/8) [ THEN]
(6/8) [ DO] jumping to a closed, level 2 fold above that fold in closed level 1 fold opens ONLY that fold
(6/8) [ THEN]
(7/8) [ DO] jumping to a closed, level 3 fold in closed parent folds opens all three
(7/8) [ THEN]
(8/8) [ DO] jumping to any fold won't open it if 'foldopen' doesn't contain false
(8/8) [ THEN]
Success/Total: 8/8
Success/Total: 8/8 (assertions: 3/3)
Elapsed time: 0.18 sec.
I disabled peekaboo. But sometimes, I want to peek the marks, and just close markbar by 'q'
` nmap ToggleMarkbar
" the following are unneeded if ToggleMarkbar is mapped
" nmap <Leader>mo <Plug>OpenMarkbar
" nmap <Leader>mc <Plug>CloseMarkbar
" leave peekaboo markbar enabled, but don't set default mappings
let g:markbar_set_default_peekaboo_mappings = v:false
" nmap <leader>a <Plug>OpenMarkbarPeekabooApostrophe
" nmap <leader>b <Plug>OpenMarkbarPeekabooBacktick
" width of a vertical split markbar
let g:markbar_width = 30
let g:markbar_open_position = 'topleft'
`
let g:markbar_open_position = 'topleft'
It should close the bar, and open the marked file in the right pane.
I would like to have two different mapping which will only show me uppercase or lowercase marks in the markbar window. I've tried mapping them to a function that sets let g:markbar_marks_to_display = 'abcdefghi
before calling ToggleMarkbar
, but it seems that the g:markbar_marks_to_display
is only read once on startup. Is there a way to make this dynamically change?
Would you consider adding the same option that vim-signature added in kshenoy/vim-signature#72? Also thanks for all your work, this plugin is an essential part of my vim config.
On ToggleMarkbar:
Error detected while processing function markbar#ui#ToggleMarkbar[1]..markbar#MarkbarState#toggleMarkbar[3]..markbar#MarkbarState#openMarkbar[5]..markbar#MarkbarState#getMarkbarBuffer[10]..markbar#ui#SetMarkbarBufferSettings:
line 2:
E605: Exception not caught: (markbar#ui#SetMarkbarBufferSettings) Buffer does not exist: -1
With this .vimrc:
set nocompatible
call plug#begin('~/.vim/bundle/')
Plug 'Yilin-Yang/vim-markbar'
call plug#end()
map ,m <Plug>ToggleMarkbar
Both on vim & nvim:
VIM - Vi IMproved 8.1 (2018 May 18, compiled Aug 29 2018 20:42:12)
Included patches: 1-333
Compiled by Arch Linux
Huge version with GTK3 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/dyn
+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 +timers
+byte_offset -hangul_input +num64 +title
+channel +iconv +packages +toolbar
+cindent +insert_expand +path_extra +user_commands
+clientserver +job +perl/dyn +vartabs
+clipboard +jumplist +persistent_undo +vertsplit
+cmdline_compl +keymap +postscript +virtualedit
+cmdline_hist +lambda +printer +visual
+cmdline_info +langmap +profile +visualextra
+comments +libcall +python/dyn +viminfo
+conceal +linebreak +python3/dyn +vreplace
+cryptv +lispindent +quickfix +wildignore
+cscope +listcmds +reltime +wildmenu
+cursorbind +localmap +rightleft +windows
+cursorshape +lua/dyn +ruby/dyn +writebackup
+dialog_con_gui +menu +scrollbind +X11
+diff +mksession +signs -xfontset
+digraphs +modify_fname +smartindent +xim
+dnd +mouse +startuptime -xpm
-ebcdic +mouseshape +statusline +xsmp_interact
+emacs_tags +mouse_dec -sun_workshop +xterm_clipboard
+eval +mouse_gpm +syntax -xterm_save
+ex_extra -mouse_jsbterm +tag_binary
system vimrc file: "/etc/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
system gvimrc file: "/etc/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: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/uuid -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/libdrm -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -pthread -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -L. -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.28/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -L/usr/local/lib -Wl,--as-needed -o vim -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXt -lX11 -lXdmcp -lSM -lICE -lm -ltinfo -lelf -lnsl -lacl -lattr -lgpm -ldl -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.28/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fstack-protector-strong -L/usr/local/lib -L/usr/lib/perl5/5.28/core_perl/CORE -lperl -lpthread -ldl -lm -lcrypt -lutil -lc -L/usr/lib -ltclstub8.6 -ldl -lz -lpthread -lm
NVIM v0.3.1
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -Wconversion -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -Wno-array-bounds -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim/src/build/config -I/build/neovim/src/neovim-0.3.1/src -I/usr/include -I/build/neovim/src/build/src/nvim/auto -I/build/neovim/src/build/include
Compiled by builduser
Features: +acl +iconv +jemalloc +tui
💜
When working with window-local working directories (via :lcd
) I run into the following error.
Steps to reproduce:
cd ~
vim
:e .vimrc
:lcd . "Setting a window-local working directory in the initial tab is needed to reproduce the error
:tabe .vim/plugged/vim-markbar/plugin/vim-markbar.vim
" At this stage <Plug>OpenMarkbar, <Plug>CloseMarkbar works fine
lcd .vim/plugged/vim-markbar/
" Now <Plug>OpenMarkbar causes this error:
Error detected while processing function markbar#MarkbarController#toggleMarkbar[3]..markbar#MarkbarController#openMarkbar[6]..markbar#StandardMarkbarController#_openMarkbarSplit[3]..markbar#MarkbarView#openMarkbar[16]..markbar#MarkbarView#_setMarkbarWindowSettings:
line 7:
E605: Exception not caught: (MarkbarView#_setMarkbarWindowSettings) Window does not exist for: 3
I can reproduce this in current vim and neovim versions:
VIM - Vi IMproved 8.1 (2018 May 18, compiled Sep 16 2018 18:20:26)
macOS version
Included patches: 1-400
NVIM v0.3.1
Build type: Release
LuaJIT 2.0.5
I have had similar issues with nvim's tcd
/ tab-local working directories.
If I edit several files in one gvim window (8.1) and bunload
them, they appear in subsequent gvim windows via :ls!
command as unlisted buffers.
This is the case if I simply :e
the file, then :bunload
it. I don't do anything with marks.
If I disable the vim-markbar plugin (updated and tested today), the bunload
-ed buffer does not appear in :ls!
command in new gvim window.
Running vim-markbar's test suite keeps throwing error messages like:
"~/plugin/vim-markbar/plugin/vim-markbar.vim" line 1 of 332 --0%-- col 1
Error detected while processing function markbar#helpers#GetOpenBuffers:
line 2:
E121: Undefined variable: l:to_return
That don't seem to appear during normal use on my machine. This might be related to an issue mentioned by @mwgkgk in #3 (comment)
Relevant lines of code (that also don't reference a variable named l:to_return
):
" RETURNS: (v:t_list) A list populated with the numbers of every
" buffer, listed or unlisted.
function! markbar#helpers#GetOpenBuffers() abort
let l:buffers_str = ''
redir => l:buffers_str
silent ls!
redir end
Lower down in the same file:
" RETURNS: (v:t_string) All buffer-local marks active within the current
" file as a 'raw' string.
function! markbar#helpers#GetLocalMarks() abort
let l:to_return = ''
try
redir => l:to_return
silent marks abcdefghijklmnopqrstuvwxyz[]<>'`\"^.(){}
redir end
let l:to_return .= "\n"
When I change the above into:
" RETURNS: (v:t_string) All buffer-local marks active within the current
" file as a 'raw' string.
function! markbar#helpers#GetLocalMarks() abort
let l:FromGetLocalMarks = ''
try
redir => l:FromGetLocalMarks
silent marks abcdefghijklmnopqrstuvwxyz[]<>'`\"^.(){}
redir end
let l:FromGetLocalMarks .= "\n"
catch /E283/
let l:FromGetLocalMarks = 'mark line col file/text\n'
endtry
for l:mark in ['(',')','{','}']
try
let l:FromGetLocalMarks .= markbar#helpers#MakeMarkString(l:mark)."\n"
catch
endtry
endfor
return l:FromGetLocalMarks
endfunction
I see error messages like:
"10lines.txt" line 9 of 10 --90%-- col 1
Error detected while processing VimEnter Autocommands for "*"..function MarkbarVimEnter[12]..markbar#helpers#GetOpenBuffers:
line 2:
E121: Undefined variable: l:FromGetLocalMarks
And actual test failures like:
(4/8) [ DO] (X) Vim(redir):E121: Undefined variable: l:to_return
> command line..function <SNR>41_vader[5]..vader#run[63]..<SNR>43_run[46]..vader#window#replay[2]..<SNR>28_Apostrophe[1]..<SNR>28_OpenPeekaboo[13]..markbar#MarkbarController#openMarkbar[11]..markbar#MarkbarController#refreshContents[6]..markbar#MarkbarModel#updateCurrentAndGlobal[26]..markbar#helpers#GetLocalMarks, line 3
This occurs in both vim and neovim.
This may be an upstream issue in which the redir =>
command isn't properly remembering which variables were declared in which stack frames.
Okay, say for mark under mark 'a' the markbar is showing this entry: ['a]: Plugin Config
.
A couple of things:
Plugin Config
is wiped whenever I close the file. Can you tell me how to fix this?gg
to get the the top, but the default opening position is always G
. Is this normal behavior?Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.