luchermitte / lh-vim-lib Goto Github PK
View Code? Open in Web Editor NEWLibrary of Vim functions
License: Other
Library of Vim functions
License: Other
I'm running on Windows 10 and bash
is available on my system.
When the library is running on my system any call to translate launch a process of the kind:
C:\Windows\system32\cmd.exe /c (^(C:\Windows\system32\cmd.exe C:\Users\vds\AppData\Local\Temp\VWS6C41.tmp^) ^>C:\Users\vds\AppData\Local\Temp\V3F6C42.tmp 2^>^&1)
That doesn't return.
To solve the problem I have disabled the translation for win32
systems:
function! s:translate(id) dict abort
let cache = lh#dict#let(s:k_cached_translations, self._env.LANG .'.'. self._env.TEXTDOMAIN, {})
if !has_key(cache, a:id)
if executable('bash') && !has('win32')
let cache[a:id] = lh#os#system('bash -c '.shellescape('echo $"'.a:id.'"'), self._env)
else
" TODO: support windows
let cache[a:id] = a:id
endif
endif
return cache[a:id]
endfunction
Let me know if you would be interested by a Pull Request.
Hi,
would it be possible to remove the huge screencast GIFs (in particular, doc/screencast-dbc.gif
)? That way this plugin (the largest by far in my vim pack
) would come down to a more reasonable size, at least with git pull --depth 1
.
I am trying to use lh-cpp
but when I open Vim, an error is displayed:
Error detected while processing /Users/SirMike/.vim/bundle/lh-vim-lib/autoload/lh/ft/option.vim:
line 138:
E492: Not an editor command: LetIfUndef g:cpp_inherits 'c'
Vim: 8.0.91
lh-vim, lh-brackets, lh-cpp, lh-dev, lh-tags are all from master for today
I reverted 8f0ce91#diff-fc57e49cf28b941e6b291a4dfcb67499L127 and it started working again without errors. Is this a right solution or am I missing something important?
This error occured when using your plugin alternate-lite, but I assume it's caused by this library.
Silently cancel the operation
An error message. The operation is still cancelled though
something.c
where the .h
file doesn't existThis will cause an out of range exception, because vim returns -1 when you cancel the operation.
This is the error message
Cancel surface.h surface.inc
Error detected while processing function lh#alternate#_jump[27]..lh#path#select_one:
line 13:
E684: list index out of range: -3
And in neovim this is the message
Error detected while processing function lh#alternate#_jump[27]..lh#path#select_one:
line 13:
E684: list index out of range: -1
E15: Invalid expression: (selection == 1) ? '' : a:pathnames[selection-2]
In doc/lh-vim-lib.txt file get is documented twice (incorrectly, due to a typo). Therefore helptags command fails on this plugin. Attached the proposed fix:
As per the documentation:
https://github.com/luchermitte/lh-vim-lib/blob/0c4d272a49f374723dd08c1e23570285b3146158/doc/lh-vim-lib.txt#L4798
the API user would expect to call lh#assert#mode("abort")
and go on without the interactive assert stuff.
This fails with an exception (one that fails to be traced with lh#exception#say_what(), which makes it worse xD)
Grepping around, I found the correct value to set: "stop". Or is it the correct value?
Which should be the correct one in the end, the documented one conforming to the dbc stuff, or "stop"?
Please update doc & that line.
https://github.com/luchermitte/lh-vim-lib/blob/0c4d272a49f374723dd08c1e23570285b3146158/plugin/lhvl.vim#L63
While I'm here, I just have got to sing some praise.
Terrific library my man! It made vim script bearable for me and you explained OO really nicely! AND provided a way to use it without ending up in lambda debugging hell! And all those other features! e.g. the stacktrace decoder! Thanks so much! Vim really is a better tool with your library!
Hi,
I'm seeing the following error while updated my vim plugins with plugged:
E154: Duplicate tag "lh#window#gotoid()" in file /Users/pbor/.vim/plugged/lh-vim-lib//doc/lh-vim-lib.txt
Looks like the same tag is listed twice for
lh#window#getid([{win}])~
and
lh#window#gotoid({id})~
I'm not really familiar with vim doc file format, so it would better if someone with more knowledge fixes this.
Thanks.
Provide a hook for editorconfig in order to be able to:
p:options
It may be interesting to propose a syntax to declare naming style and other stylistic options
Hi, I use your local vimrc plugin. And it's good. But I found it cannot work recently.
Maybe after I upgrade to Vim 8.0, I'm not sure.
I only wrote 2 commands in _vimrc_local.vim
this command works well.
but the 2nd command cannot work:
And then I updated the plugins by Vundle.
After that, when I open vim, it says:
Error detected while processing function lh#menu#def_toggle_item[47]..52_Set:
line 33:
E605: Exception not caught: Cannot set: lh#project.auto_discover_root=in_doubt_ask: Vim(let):E121: Undefined variable: g:lh#project in function lh#menu#def_toggle_item[47]..52_Set, line 13
Press ENTER or type command to continue
BTW, I use Vim in MSYS environment.
matchstr returns nothing because of swapped arguments.
Hello, I store all of my vim plugins in a Git repository along with all dot files, including this one. Lately when I am pushing my personal config, GitHub complains there is a security vulnerability. Could you please upgrade this if it is not too much trouble.
1 rake vulnerability found in …/lh-vim-lib/Gemfile 2 days ago
Remediation
Upgrade rake to version 12.3.3 or later. For example:
gem "rake", ">= 12.3.3"
Always verify the validity and compatibility of suggestions with your codebase.
Details
CVE-2020-8130
moderate severity
Vulnerable versions: <= 12.3.2
Patched version: 12.3.3
There is an OS command injection vulnerability in Ruby Rake before 12.3.3 in Rake::FileList when supplying a filename that begins with the pipe character |.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.