valloric / listtoggle Goto Github PK
View Code? Open in Web Editor NEWA vim plugin for toggling the display of the quickfix list and the location-list.
License: GNU General Public License v3.0
A vim plugin for toggling the display of the quickfix list and the location-list.
License: GNU General Public License v3.0
I'm starting to use tabs (yes, whether tabs are useful or not is debatable....). In any event, I if I have more than one QF open, e.g. one on each tab, the QToggle
does not seem to be able to close any of them. Calling :cclose
directly does seem to work, so I'm, perplexed. along this same line, I'd actually like :QToggle
to close all QF windows in all tabs, but that might be controversial, so I'd just be happy if it just succesfully closed the QF for the current tab.
Hi. I just set up your plugin and I've noticed that whenever I click on an error in the location list after bringing it up with the ListToggle key I've assigned, the location list closes after jumping to the position of the error. Afterwards, pressing the ListToggle key doesn't bring the list back up. The only way I seem to be able to get it to reappear is by manually running :lclose
, then striking the key again.
I was using this plug I found some time ago until finding your lovely alternative:
function! toggle#GetBufferList()
redir =>buflist
silent! ls
redir END
return buflist
endfunction
function! toggle#ToggleList(bufname, pfx)
let buflist = toggle#GetBufferList()
for bufnum in map(filter(split(buflist, '\n'), 'v:val =~ "'.a:bufname.'"'), 'str2nr(matchstr(v:val, "\\d\\+"))')
if bufwinnr(bufnum) != -1
exec(a:pfx.'close')
return
endif
endfor
if a:pfx == 'l' && len(getloclist(0)) == 0
echohl ErrorMsg
echo "Location List is Empty."
return
endif
let winnr = winnr()
exec(a:pfx.'open')
if winnr() != winnr
wincmd p
endif
endfunction
The thing I miss is the error message that alerts you that the list is empty.
Not sure if you'd be cool with adding something like that or not?
Toggling of both the quickfix and location list no longer works. The windows are opened properly, but are no longer closed. I bisected this down to Vim patch 8.1.0877.
Is there a way to prevent the plugin from mapping the keys for location and quickfix? Or perhaps changing them to something else?
Cheers
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.