Giter Club home page Giter Club logo

listtoggle's Introduction

ListToggle

A simple vim plugin for toggling the display of the quickfix list and the location-list. Install it with Vundle or Pathogen (I recommend Vundle).

You can set the key mappings for toggling Vim's locationlist and quickfix windows in your vimrc file:

let g:lt_location_list_toggle_map = '<leader>l'
let g:lt_quickfix_list_toggle_map = '<leader>q'

By default, they are set to <leader>l and <leader>q, respectively.

Here's how you can set the height (in number of lines) of the spawned window:

let g:lt_height = 10

listtoggle's People

Contributors

danielwe avatar decayofmind avatar fszymanski avatar valloric avatar wfxr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

listtoggle's Issues

Toggling no longer works

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.

Warn on empty location list

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?

QToggle won't close QF if more than one quickfix exists

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.

Don't use key maps

Is there a way to prevent the plugin from mapping the keys for location and quickfix? Or perhaps changing them to something else?

Cheers

Location list closes and doesn't reopen after clicking item

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.