Git Product home page Git Product logo

kibi's People

Contributors

allcontributors[bot] avatar arkaeriit avatar auzkok avatar bogdanpaul15 avatar cosminggeorgescu avatar dependabot-preview[bot] avatar dependabot[bot] avatar eusuntcarol avatar gvirtu avatar hezhizhen avatar ilai-deutel avatar ilmanzo avatar imreyesjorge avatar john-sharratt avatar ldang0 avatar loannaflip avatar malbarbo avatar no-one-important avatar quadroli avatar razvanrus2003 avatar robertgrancsa avatar tim77 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  avatar  avatar

kibi's Issues

Fix tests on WASI platform

Currently, tests fail on WASI, likely due to WebAssembly/WASI#306:

$ cargo wasi test
running 9 tests
test config::tests::ini_processing_error_propagation ... Error: failed to run main module `.../target/wasm32-wasi/debug/deps/kibi-0e014d2d22062c7e.wasm`

Caused by:
    0: failed to invoke command default
    1: wasm trap: wasm `unreachable` instruction executed
       wasm backtrace:
           0: 0xaf1d7 - <unknown>!__rust_start_panic
           1: 0x8a2d3 - <unknown>!rust_panic
           2: 0x410bc - <unknown>!std::panicking::rust_panic_with_hook::h5cd357190ec2dc27
           3: 0xace7d - <unknown>!std::panicking::begin_panic::{{closure}}::h2b921c6015217a8c
           4: 0xaea75 - <unknown>!std::sys_common::backtrace::__rust_end_short_backtrace::h7804c064a89e5468
           5: 0xad127 - <unknown>!std::panicking::begin_panic::h74bbbdc216a2be15
           6: 0xaed39 - <unknown>!std::sys::wasi::os::temp_dir::h7c1705b1d80bf88f
           7: 0xaf0c4 - <unknown>!std::env::temp_dir::h8de49376550872b5
           8: 0xa3189 - <unknown>!tempfile::Builder::tempdir::he99c51adad158d09
           9: 0xa0aa1 - <unknown>!tempfile::dir::TempDir::new::h467eed705bdbfad5
          10: 0x64c6b - <unknown>!kibi::config::tests::ini_processing_helper::h04a043013200609f
          11: 0x43ad2 - <unknown>!kibi::config::tests::ini_processing_error_propagation::hd9e29b0360fe1c0e
          12: 0xaa1be - <unknown>!kibi::config::tests::ini_processing_error_propagation::{{closure}}::hd20dc0108869c254
          13: 0xab2e1 - <unknown>!core::ops::function::FnOnce::call_once::h470aa8b99eb85c41
          14: 0xaf0b7 - <unknown>!test::__rust_begin_short_backtrace::hdb236f9e8ab372e2
          15: 0xaf032 - <unknown>!core::ops::function::FnOnce::call_once{{vtable.shim}}::h46e94de7b5f8562e
          16: 0x20873 - <unknown>!test::run_test::run_test_inner::hb0fda869795a04b5
          17: 0x1f050 - <unknown>!test::run_test::h5e16ffceb7355d13
          18: 0x4765 - <unknown>!test::console::run_tests_console::hbd9d6e4ac7994c7e
          19: 0x21c76 - <unknown>!test::test_main::ha1139bbdf0c18c77
          20: 0x7fb9b - <unknown>!test::test_main_static::h88b81b227e6e27db
          21: 0xae6bf - <unknown>!kibi::main::hcb06a8996b2c438e
          22: 0xaa3cc - <unknown>!core::ops::function::FnOnce::call_once::hb9394b846f8ebed8
          23: 0xa9ac3 - <unknown>!std::sys_common::backtrace::__rust_begin_short_backtrace::ha02a7b57bbe40130
          24: 0xa6e84 - <unknown>!std::rt::lang_start::{{closure}}::h3ed9764642bc7713
          25: 0x728f3 - <unknown>!std::rt::lang_start_internal::h114e06638993fc12
          26: 0x92ab7 - <unknown>!std::rt::lang_start::hefbdca51d9ded6ce
          27: 0xae610 - <unknown>!__original_main
          28: 0xae96a - <unknown>!_start
          29: 0xaf0a3 - <unknown>!_start.command_export
       note: using the `WASMTIME_BACKTRACE_DETAILS=1` environment variable to may show more debugging information

Windows 10 powershell or cmd Could not obtain cursor position

Since update #9 and #26 were resolved, I wanted to test with the lastest version.

I did cargo install --git https://github.com/ilai-deutel/kibi.git

Doing the command kibi in both cmd or powershell results in the same error.
It freezes on this.

D:\>kibi
�[999C�[999B�[6n

Then doing Ctrl+C

D:\>kibi
�[999C�[999B�[6n�[2J�[HError: Could not obtain cursor position

Find within row.chars, not row.render

Ctrl-F should search for a string in row.chars, not row.render.

For instance, a tab character should not be matched when a space is queried. Currently, a tab character is rendered as one or several spaces, so it will be matched.

New release

Hi! I'm looking into packaging kibi for Gentoo Linux, and I noticed v0.2.2 was released quite some time ago (2021) and many commits have been made since then

Could you consider tagging a new release? Thanks!

Here's a mock-up of what I have so far if you are interested:

# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

# Auto-Generated by cargo-ebuild 0.5.4-r1

EAPI=8

CRATES="
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
	[email protected]
"

inherit cargo

DESCRIPTION="A text editor in less than 1024 lines of code with syntax highlighting, search and more."
# Double check the homepage as the cargo_metadata crate
# does not provide this value so instead repository is used
HOMEPAGE="https://github.com/ilai-deutel/kibi"
SRC_URI="${CARGO_CRATE_URIS}"

# License set may be more restrictive as OR is not respected
# use cargo-license for a more accurate license picture
LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions MIT Unicode-DFS-2016 Unlicense"
SLOT="0"
KEYWORDS="~amd64"

DEPEND=""
RDEPEND="${DEPEND}"
BDEPEND=""

# rust does not use *FLAGS from make.conf, silence portage warning
# update with proper path to binaries this crate installs, omit leading /
QA_FLAGS_IGNORED="usr/bin/${PN}"

Quick remove a line

I f duplicated a line by accident or not wanting an entire line, there should be a feature for removing the unwanted line. #114

Kibi on Termux fails to start

Describe the bug
When I start kibi on termux, i returns a "Permission Denied" error (as you can see in the sreenshot )
Note: I have all permissions required to edit the file.

To Reproduce
Use pkg install kibi and try to open a file. Note: same error is given if kibi is installed with cargo install kibi

Expected behavior
Open editor and start editing the file

Screenshots

System information:

  • OS: Termux (nonroot)
  • Rust version: 1.49
  • Kibi version : V0.2.1

Thanks for this really good work, Woomy

Make kibi compatible with Windows 10

Hi,
I am trying to build kibi for Windows 10 but it fails with compilation errors.
Can you please help.

Rust Info

  • cargo 1.43.0-nightly (3c53211c3 2020-02-07)
  • rustc 1.43.0-nightly (e620d0f33 2020-02-18)

Windows Info

OS Name: Microsoft Windows 10 Enterprise
OS Version: 10.0.19041 N/A Build 19041
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation

Compiler output

$ cargo build --release --locked --all-features

   Compiling kibi v0.1.2 (C:\Users\vanand\kibi\kibi)
error[E0433]: failed to resolve: could not find `sys` in `nix`
 --> src\editor.rs:6:10
  |
6 | use nix::sys::termios::Termios;
  |          ^^^ could not find `sys` in `nix`

error[E0432]: unresolved imports `signal_hook::iterator`, `signal_hook::SIGWINCH`
 --> src\editor.rs:7:19
  |
7 | use signal_hook::{iterator::Signals, SIGWINCH};
  |                   ^^^^^^^^           ^^^^^^^^ no `SIGWINCH` in the root
  |                   |
  |                   could not find `iterator` in `signal_hook`

error[E0432]: unresolved imports `libc::STDIN_FILENO`, `libc::STDOUT_FILENO`, `libc::TIOCGWINSZ`, `libc::VMIN`, `libc::VTIME`
 --> src\terminal.rs:3:12
  |
3 | use libc::{STDIN_FILENO, STDOUT_FILENO, TIOCGWINSZ, VMIN, VTIME};
  |            ^^^^^^^^^^^^  ^^^^^^^^^^^^^  ^^^^^^^^^^  ^^^^  ^^^^^
  |            |             |              |           |     |
  |            |             |              |           |     no `VTIME` in the root
  |            |             |              |           |     help: a similar name exists in the module: `ETIME`
  |            |             |              |           no `VMIN` in the root
  |            |             |              no `TIOCGWINSZ` in the root
  |            |             no `STDOUT_FILENO` in the root
  |            no `STDIN_FILENO` in the root

error[E0432]: unresolved imports `nix::pty`, `nix::sys`
 --> src\terminal.rs:4:11
  |
4 | use nix::{pty::Winsize, sys::termios};
  |           ^^^           ^^^ could not find `sys` in `nix`
  |           |
  |           could not find `pty` in `nix`

error[E0433]: failed to resolve: could not find `ioctl_read_bad` in `nix`
  --> src\terminal.rs:35:10
   |
35 |     nix::ioctl_read_bad!(get_ws, TIOCGWINSZ, Winsize);
   |          ^^^^^^^^^^^^^^ could not find `ioctl_read_bad` in `nix`

error[E0412]: cannot find type `Termios` in this scope
   --> src\editor.rs:109:19
    |
109 |     orig_termios: Termios,
    |                   ^^^^^^^ not found in this scope

error[E0412]: cannot find type `Error` in crate `nix`
 --> src\error.rs:8:14
  |
8 |     Nix(nix::Error),
  |              ^^^^^ not found in `nix`
  |
help: possible candidates are found in other modules, you can import them into scope
  |
3 | use core::fmt::Error;
  |
3 | use crate::error::Error;
  |
3 | use std::error::Error;
  |
3 | use std::fmt::Error;
  |
    and 1 other candidate

error[E0412]: cannot find type `Error` in crate `nix`
  --> src\error.rs:33:16
   |
33 | impl From<nix::Error> for Error {
   |                ^^^^^ not found in `nix`
   |
help: possible candidates are found in other modules, you can import them into scope
   |
3  | use core::fmt::Error;
   |
3  | use crate::error::Error;
   |
3  | use std::error::Error;
   |
3  | use std::fmt::Error;
   |
     and 1 other candidate

error[E0412]: cannot find type `Error` in crate `nix`
  --> src\error.rs:35:23
   |
35 |     fn from(err: nix::Error) -> Self { Self::Nix(err) }
   |                       ^^^^^ not found in `nix`
   |
help: possible candidates are found in other modules, you can import them into scope
   |
3  | use core::fmt::Error;
   |
3  | use crate::error::Error;
   |
3  | use std::error::Error;
   |
3  | use std::fmt::Error;
   |
     and 1 other candidate

error[E0412]: cannot find type `Error` in crate `nix`
 --> src\terminal.rs:8:71
  |
8 | pub(crate) fn set_termios(term: &termios::Termios) -> Result<(), nix::Error> {
  |                                                                       ^^^^^ not found in `nix`
  |
help: possible candidates are found in other modules, you can import them into scope
  |
1 | use core::fmt::Error;
  |
1 | use crate::error::Error;
  |
1 | use std::error::Error;
  |
1 | use std::fmt::Error;
  |
    and 1 other candidate

error[E0425]: cannot find function `get_ws` in this scope
  --> src\terminal.rs:43:14
   |
43 |     unsafe { get_ws(STDOUT_FILENO, maybe_ws.as_mut_ptr()).ok().map(|_| maybe_ws.assume_init()) }
   |              ^^^^^^ not found in this scope

error: aborting due to 11 previous errors

Support UTF-8 display

UTF-8 characters are correctly loaded / saved, but not correctly displayed.

Expected:

🇬🇧 The quick brown fox jumps over the lazy dog 
🇫🇷 Voix ambiguë d'un cœur qui, au zéphyr, préfère les jattes de kiwis.

Actual:

ð¬ð§ The quick brown fox jumps over the lazy dog 
ð«ð· Voix ambiguë d'un cÃÂur qui, au zéphyr, préfère les jattes de kiwis.

win10,config.ini and Syntax highlighting do not take effect

Describe the bug

i install the kibi via command --cargo install kibi.

my os is win10,and i put config files at the location of "C:\Users\Administrator\AppData\Kibi\syntax.d" which is according to the guide(A configuration file can be located at %APPDATA%\Kibi\config.ini.).

but when i open the build.rs ,the Syntax highlighting does not take effect.

To Reproduce

222

Expected behavior

Screenshots

1

System information:

  • OS: win10
  • Rust version (output of rustc --version):rustc 1.68.2 (9eb3afe9e 2023-03-27)
  • Kibi version (output of kibi --version):v0.2.2

Additional context

Allow UTF-8 characters in FIND/SAVE prompt

The editor supports UTF-8 characters, but they are not accepted for prompts (search for a query that contains non-ASCII characters, enter a file name that contains non-ASCII characters).

CI: 'rustfmt' unavailable for download with latest nightly

See Job #92.8:

$ rustup component add rustfmt
error: component 'rustfmt' for target 'x86_64-unknown-linux-gnu' is unavailable for download for channel nightly
Sometimes not all components are available in any given nightly.
The command "rustup component add rustfmt" failed and exited with 1 during .

Setup a CI pipeline

  • Build (Linux, OSX; stable, beta, nightly)
  • Style checks
    • rustfmt
    • cargo-clippy
  • Dependency audit with cargo-audit

Tiling and Inbuilt Terminal

This seems like an awesome project, I might even switch from my current editor, Micro!
However these features are essential to my workflow :p

Consider implementing undo/redo

Maintaining a history of commands and being able to apply/revert them could be a substantial change. Investigate whether it is possible without going over the line constraint.

Keep shortcut help visible

Is your feature request related to a problem? Please describe.
Hi, after using a feature (like search) the bottom line with the shortcut hints goes away. I would find it useful if the shortcuts stayed visible, otherwise I have to keep closing/re-opening while I'm still learning the shortcuts.

I'm happy to submit a PR to add this if it's wanted.

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.