kikito / ansicolors.lua Goto Github PK
View Code? Open in Web Editor NEWThis project forked from hoelzro/ansicolors
ANSI terminal color manipulation for Lua.
License: MIT License
This project forked from hoelzro/ansicolors
ANSI terminal color manipulation for Lua.
License: MIT License
It's something very minor, in the usage section the third print raises an error because of "underlined" instead of "underline".
I agree completely that LuaRocks releases should be automated; mine are! See for example luaposix/luaposix's Makefile.am, and note that because you use LuaRocks's built-in build system you don't need the "foo-release" branch bit, so the code will be that bit simpler. Do ask if I can help.
hey, very nice lua file.
im trying to use this in neovim lua configuration.
but when trying to print this:
local colored = require("ansi-colors")
function copy_current_line_to_clipboard()
vim.cmd("execute 'normal \"+yy'")
print(colored("%{red}line copied to clipboard%{reset}"))
end
nnoremap("<C-c>", "<cmd> lua copy_current_line_to_clipboard()<CR>")
inoremap("<C-c>", "<C-o><cmd> lua copy_current_line_to_clipboard()<CR>")
i've tested the file in my terminal:
with this:
local colored = require("ansi-colors")
print(colored("%{red}line copied to clipboard%{reset}"))
so the plugin works.
apparently, vim cannot display ansi codes.
how do i make neovim display ansi codes in command-line area?
Windows has gained suppprt for ANSI sequences (since 2019, a specific release of 2010 added it).
setconsolemode()
can be used to enable itos.execute
as a workaroundSo imho the behaviour of this library should be adjusted. But it is slightly problematic I think;
isapty
function to detect a pty)So I see 2 options:
setconsolemode
or use the os.execute
workaround.
wdyt?
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.