GithubHelp home page GithubHelp logo

Comments (9)

Shougo avatar Shougo commented on August 18, 2024

Generally I want to filter by candidate but maybe I want to filter by kind. So: is it possible to switch the converter within the unite buffer? i.e pressing something like and switch from the default converter to abbr_word?

:help unite#mappings#set_current_matchers()

from unite-tag.

Shougo avatar Shougo commented on August 18, 2024

Instead of showing k:f and k:v is possible to directly display function and variable (i think that a) it is better to show the full kind instead of the abbreviation and b) there is no need to show k: since it is clear that this third column of the unite buffer displays the tag kind).

I don't think so. Tag information has just the abbr.
You should read the real tag file.
And I think it is better to filter by kind.

from unite-tag.

Shougo avatar Shougo commented on August 18, 2024

Can the syntax highlighting and the spacing between columns be improved?

Fixed.

from unite-tag.

petobens avatar petobens commented on August 18, 2024

Thanks @Shougo for your replies. Two nits:

i) If I set

    inoremap <silent><buffer><expr> <C-c> unite#mappings#set_current_converters(
            \ empty(unite#mappings#get_current_converters()) ?
            \ ['converter_abbr_word'] : [])

and press <C-c> in the unite-tag buffer I can filter by kind. However when I press <C-c> again I cannot use the default converter. Isn't the mapping suppose to toggle between the default converter and converter_abbr_word?

ii) With the following minimal vimrc:

set nocompatible

let $ONEDRIVE_HOME = expand('C:/OD/Users/Pedro')
let $DOTVIM = expand('$ONEDRIVE_HOME/vimfiles')

set runtimepath+=$DOTVIM/bundle/unite
set runtimepath+=$DOTVIM/bundle/neoinclude
set runtimepath+=$DOTVIM/bundle/unite-tag
set runtimepath+=$DOTVIM/bundle/vimproc
filetype plugin indent on

nnoremap <silent> ,te :NeoIncludeMakeCache<CR>:Unite
            \ tag/include<CR>

If I open the vimrc_min file I press ,te I see the word pat: in the unite-tag buffer. Is it possible to suppress this? (and only show the actual matched pattern).

screenshot-06-09-2015_01-36-54

from unite-tag.

Shougo avatar Shougo commented on August 18, 2024

If I open the vimrc_min file I press ,te I see the word pat: in the unite-tag buffer. Is it possible to suppress this? (and only show the actual matched pattern).

You should execute syntax enable.
It is concealed by syntax.

And, you should change g:unite_source_tag_max_fname_length or g:unite_source_tag_max_name_length.
If you can disable show location feature by g:unite_source_tag_show_location.

Important: Please read the documentation.

from unite-tag.

Shougo avatar Shougo commented on August 18, 2024

and press <C-c> in the unite-tag buffer I can filter by kind. However when I press <C-c> again I cannot use the default converter. Isn't the mapping suppose to toggle between the default converter and converter_abbr_word?

Because, you are wrong. You must change default matcher behavior.

inoremap <silent><buffer><expr> <C-c> unite#mappings#set_current_matchers(
            \ empty(unite#mappings#get_current_matchers()) ?
            \ ['converter_abbr_word', 'matcher_default'] : [])

from unite-tag.

petobens avatar petobens commented on August 18, 2024

I'm sorry @Shougo but I'm afraid I don't quite understand. Consider the following minimal vimrc:

set nocompatible

let $ONEDRIVE_HOME = expand('C:/OD/Users/Pedro')
let $DOTVIM = expand('$ONEDRIVE_HOME/vimfiles')

set runtimepath+=$DOTVIM/bundle/unite
set runtimepath+=$DOTVIM/bundle/neoinclude
set runtimepath+=$DOTVIM/bundle/unite-tag
set runtimepath+=$DOTVIM/bundle/vimproc

filetype plugin indent on
syntax enable

nnoremap <silent> ,te :NeoIncludeMakeCache<CR>:Unite
            \ tag/include<CR>
au FileType unite
    \ inoremap <silent><buffer><expr> <C-c> unite#mappings#set_current_matchers(
    \ empty(unite#mappings#get_current_matchers()) ?
    \ ['converter_abbr_word', 'matcher_default'] : [])

Now as in the GIF, open Gvim, edit the vimrc_min file and press ,te. You will see that

i) even though syntax is enable the ,te candidate show the word pat:.

ii) If I now switch to insert mode and start searching for var then there are no candidates (which is correct since I'm using the default matcher). Now if I press <C-c> the matcher switches and I can filter by kind (therefore when I search for var the Unite buffer correctly displays candidates). However if in the same Unite buffer I now erase the prompt and press <C-c> one last tim then the matcher is not toggled: I'm still filtering by kind (searching for var return candidates filterd by kind when and I expect no candidates to be shown since I should be using the default matcher). So the problem is that the second time I press <C-c> the default matcher is not restored.

Sorry for being such a nuisance and thanks in advance for the help.

blahh

from unite-tag.

Shougo avatar Shougo commented on August 18, 2024

@petobens Confirmed. Fixed the problems. Please update unite-tag and unite.vim.

from unite-tag.

petobens avatar petobens commented on August 18, 2024

@Shougo it is working perfectly now. Thank you for the fix! :)

from unite-tag.

Related Issues (20)

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.