Coder Social home page Coder Social logo

lh-vim-lib's People

Contributors

adelarsq avatar khoyo avatar luchermitte avatar maxmellon avatar noscript avatar troycurtisjr avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

lh-vim-lib's Issues

Translate fails to run on Windows

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.

remove large GIFs

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.

Not an editor command: LetIfUndef g:cpp_inherits 'c'

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?

path#select_one out of range

This error occured when using your plugin alternate-lite, but I assume it's caused by this library.

Expected behaviour:

Silently cancel the operation

Actual behaviour:

An error message. The operation is still cancelled though

How to reproduce

  • Install alternate-lite (and this library).
  • Open some file, for example something.c where the .h file doesn't exist
  • Call alternate on this file. This will prompt for a filename
  • Press escape to cancel

This 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]

Version info

  • Arch linux
  • Vim 8.2
  • Nvim v0.4.4
  • Alternate-lite 0.1.3
  • lh-vim-lib ?

Neovim compatibility

Hi,

does lh-vim-lib aim to be Neovim compatible? Currently I get an error that there's an undefined variable v:none used in type.vim and it seems that it was removed from Neovim. What's your stance on this topic?

incorrect documentation

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:

lh-vim-lib.txt

lh#assert#mode documentation wrong

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!

Duplicate tag in documentation

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 hook for editorconfig

Provide a hook for editorconfig in order to be able to:

  • declare projects
  • define p:options

It may be interesting to propose a syntax to declare naming style and other stylistic options

Error detected while processing function lh#menu#def_toggle_item[47]..<SNR>52_Set

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

  • cd /XXXX/XXXX/XXXX/the/path/

this command works well.
but the 2nd command cannot work:

  • set tags=./tags,../../Common/tags,../../../../shared/inc/tags.

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.

Upgrade rake to version 12.3.3 or later.

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 |.

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.