Skip to content

Neocomplete source that allow to complete multi-dimensional PHP arrays from a variable name.

License

Notifications You must be signed in to change notification settings

citlacom/neocomplete-multi-array

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

neocomplete-multi-array

Neocomplete filters that allow to complete multi-dimensional PHP arrays from a variable name.

E.x:

$checkout_pages['shipping']['weight'] = -9;
$checkout_pages['shipping']['prev_page'] = 'checkout';
$checkout_pages['shipping']['next_page'] = 'addons';

When the variable name is typed $checkout_pages will suggest for autocompletion the associative keys of the array on the autocomplete popup.

Note that in order to properly work you will need to tweak the neocomplete keywork patterns to:

let g:neocomplete#keyword_patterns['php'] = '\h[0-9A-Za-z_\-]*\%\([\[\{][0-9A-Za-z_''"\-\$/% ]*[\]\}]\)*'

You also need to configure the filter for buffer candidates source on your vimrc:

call neocomplete#custom#source('buffer', 'converters', ['converter_multi_array_parts', 'converter_remove_lead_trail_quotes', 'converter_remove_last_paren', 'converter_remove_overlap'])

Screen Shot

Array Complete Screenshoot

About

Neocomplete source that allow to complete multi-dimensional PHP arrays from a variable name.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published