* collisions, vim person opinion wanted
@ 2017-08-24 7:03 ng0
2017-08-24 15:06 ` Ricardo Wurmus
0 siblings, 1 reply; 2+ messages in thread
From: ng0 @ 2017-08-24 7:03 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1: Type: text/plain, Size: 1323 bytes --]
106 packages in profile
user@abyayala ~$ diff /gnu/store/fsskp9hp6mdw5lymd3bl886ixagf7bqc-vim-neosnippet-4.2-1.1bd7e23/share/vim/vimfiles/autoload/vital.vim /gnu/store/36hqzfgzqss4ly8i7hkavlcfr327g4l5-vim-neocomplete-2.1/share/vim/vimfiles/autoload/vital.vim
2c2
< let files = globpath(&runtimepath, 'autoload/vital/' . a:name . '.vital', 1)
---
> let files = globpath(&runtimepath, 'autoload/vital/' . a:name . '.vital')
So what does it mean in vimscript when there's just 3 more characters?
Anyone with some knowledge in vimscript or at least vim internals
got an idea?
The whole thing is inserted below.
cat /gnu/store/fsskp9hp6mdw5lymd3bl886ixagf7bqc-vim-neosnippet-4.2-1.1bd7e23/share/vim/vimfiles/autoload/vital.vim
function! vital#of(name) abort
let files = globpath(&runtimepath, 'autoload/vital/' . a:name . '.vital', 1)
let file = split(files, "\n")
if empty(file)
throw 'vital: version file not found: ' . a:name
endif
let ver = readfile(file[0], 'b')
if empty(ver)
throw 'vital: invalid version file: ' . a:name
endif
return vital#_{substitute(ver[0], '\W', '', 'g')}#new()
endfunction
--
ng0
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
GnuPG: https://n0is.noblogs.org/my-keys
https://www.infotropique.org https://krosos.org
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: collisions, vim person opinion wanted
2017-08-24 7:03 collisions, vim person opinion wanted ng0
@ 2017-08-24 15:06 ` Ricardo Wurmus
0 siblings, 0 replies; 2+ messages in thread
From: Ricardo Wurmus @ 2017-08-24 15:06 UTC (permalink / raw)
To: ng0; +Cc: guix-devel
ng0 <ng0@infotropique.org> writes:
> 106 packages in profile
> user@abyayala ~$ diff /gnu/store/fsskp9hp6mdw5lymd3bl886ixagf7bqc-vim-neosnippet-4.2-1.1bd7e23/share/vim/vimfiles/autoload/vital.vim /gnu/store/36hqzfgzqss4ly8i7hkavlcfr327g4l5-vim-neocomplete-2.1/share/vim/vimfiles/autoload/vital.vim
> 2c2
> < let files = globpath(&runtimepath, 'autoload/vital/' . a:name . '.vital', 1)
> ---
>> let files = globpath(&runtimepath, 'autoload/vital/' . a:name . '.vital')
>
>
> So what does it mean in vimscript when there's just 3 more characters?
> Anyone with some knowledge in vimscript or at least vim internals
> got an idea?
Here’s what I did to read the documentation:
--8<---------------cut here---------------start------------->8---
guix environment --ad-hoc vim
vim
:help globpath
--8<---------------cut here---------------end--------------->8---
This is part of the output:
--8<---------------cut here---------------start------------->8---
globpath({path}, {expr} [, {nosuf} [, {list} [, {alllinks}]]])
Perform glob() on all directories in {path} and concatenate
the results. Example: >
:echo globpath(&rtp, "syntax/c.vim")
<
{path} is a comma-separated list of directory names. Each
directory name is prepended to {expr} and expanded like with
|glob()|. A path separator is inserted when needed.
To add a comma inside a directory name escape it with a
backslash. Note that on MS-Windows a directory may have a
trailing backslash, remove it if you put a comma after it.
If the expansion fails for one of the directories, there is no
error message.
Unless the optional {nosuf} argument is given and is |TRUE|,
the 'suffixes' and 'wildignore' options apply: Names matching
one of the patterns in 'wildignore' will be skipped and
'suffixes' affect the ordering of matches.
--8<---------------cut here---------------end--------------->8---
The last paragraph says what the difference in this case is.
--
Ricardo
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
https://elephly.net
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-24 15:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-24 7:03 collisions, vim person opinion wanted ng0
2017-08-24 15:06 ` Ricardo Wurmus
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.