Git Product home page Git Product logo

vim-selector's Introduction

selector is a utility to help plugin authors launch a window to choose one of several options.

For details, see the executable documentation in the vroom/ directory or the helpfiles in the doc/ directory. The helpfiles are also available via :help selector if selector is installed (and helptags have been generated).

Installation

This example uses Vundle, whose plugin-adding command is Plugin.

" Add maktaba and selector to the runtimepath.
" (The latter must be installed before it can be used.)
Plugin 'google/maktaba'
Plugin 'google/vim-selector'

Disclaimer

This is not an official Google product.

vim-selector's People

Contributors

dbarnett avatar malcolmr avatar pavoljuhas avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vim-selector's Issues

Remove legacy global var based configuration API

We added a new selector#Create() API in #4 that configures the selector via builder calls like .WithMappings({mappings}) instead of watching variables like g:sw_key_mappings for config. We should delete the legacy API soonish. We can disable selector#OpenWindow with a deprecation error.

Add standard mechanism for opening splits from selector

Lots of selectors open buffers when you interact with items and it would be nice to have broad support for opening those files in current window vs. horiz/vert split vs. new tab. Maybe some kind of modal mappings to say "next operation is :vert", "next operation launches in new tab", etc.?

Stop using global variables for config

Selector uses a lot of global variables for configuration and state:

  • g:Sw_SetExtraOptions
  • g:Sw_SetSyntax
  • g:Sw_SetSyntax_func
  • g:sw_key_mappings
  • g:sw_max_win_height

We should clean it up to use maktaba flags and/or explicit function arguments from callers.

Delegate to the maktaba#selector API

My understanding of google/vim-maktaba#208 is that we forked most of the guts of this project into Maktaba, as maktaba#selector#Create.

David's comment in google/vim-maktaba#209 finished:

Next step will be to gut the vim-selector implementation once users have had some time to update maktaba and make it delegate to maktaba for all the non-legacy implementation, and then to mark the whole vim-selector plugin deprecated.

I think we still have that to do, here.

Support highlighting via text properties instead of syntax definitions (vim 8.1.0579 or newer)

Instead of highlighting selector window entries in the fairly awkward form of coming up with syntax highlighting rules, there should be some way to just define the styling you want on the lines you render using vim's "text properties" feature.

For older versions of vim without support for text properties, it could just just silently skip syntax highlighting, or have a built-in fallback to some basic coloring with some predefined syntax highlighting rules.

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.