Amp: A text editor for your terminal.

Overview

Build Status

Amp: A text editor for your terminal.

Heavily inspired by Vi/Vim. Amp aims to take the core interaction model of Vim, simplify it, and bundle in the essential features required for a modern text editor.

Written with ❤️ in Rust.

Amp's internals (data structures, syntax highlighting, workspace management, etc.) have been built as a separate crate: scribe.

For a full overview, along with documentation and installation instructions, visit amp.rs.

Amp screenshot

Installation

Cargo

If you have Rust >= 1.38.0 installed:

cargo install amp

Homebrew

You can install Amp using Homebrew:

brew install amp
Comments
  • Termbox broken in Mac

    Termbox broken in Mac

    error: failed to run custom build command for termbox-sys v0.2.11 process didn't exit successfully: /var/folders/9n/hm_m4l7s6m56j8vr8lscty240000gn/T/cargo-installhWL7KA/release/build/termbox-sys-6bc601969fa0e77e/build-script-build (exit code: 101) --- stdout running: "rm" "-rf" ".termbox" running: "git" "clone" "https://github.com/nsf/termbox" ".termbox" waf configure: setting CFLAGS to: -m64 -fPIC running: "./waf" "configure" "--prefix=/" Traceback (most recent call last): File "/Users/alt/.cargo/registry/src/github.com-1ecc6299db9ec823/termbox-sys-0.2.11/.termbox/.waf3-1.8.0-5c05be2d0e42d5c2c81403948a2d295b/waflib/Node.py", line 285, in ant_iter raise StopIteration StopIteration

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last): File "/Users/alt/.cargo/registry/src/github.com-1ecc6299db9ec823/termbox-sys-0.2.11/.termbox/.waf3-1.8.0-5c05be2d0e42d5c2c81403948a2d295b/waflib/Scripting.py", line 98, in waf_entry_point run_commands() File "/Users/alt/.cargo/registry/src/github.com-1ecc6299db9ec823/termbox-sys-0.2.11/.termbox/.waf3-1.8.0-5c05be2d0e42d5c2c81403948a2d295b/waflib/Scripting.py", line 155, in run_commands parse_options() File "/Users/alt/.cargo/registry/src/github.com-1ecc6299db9ec823/termbox-sys-0.2.11/.termbox/.waf3-1.8.0-5c05be2d0e42d5c2c81403948a2d295b/waflib/Scripting.py", line 128, in parse_options Context.create_context('options').execute() File "/Users/alt/.cargo/registry/src/github.com-1ecc6299db9ec823/termbox-sys-0.2.11/.termbox/.waf3-1.8.0-5c05be2d0e42d5c2c81403948a2d295b/waflib/Options.py", line 138, in execute super(OptionsContext,self).execute() File "/Users/hmohammed.alt/.cargo/registry/src/github.com-1ecc6299db9ec823/termbox-sys-0.2.11/.termbox/.waf3-1.8.0-5c05be2d0e42d5c2c81403948a2d295b/waflib/Context.py", line 92, in execute self.recurse([os.path.dirname(g_module.root_path)]) File "/Users/alt/.cargo/registry/src/github.com-1ecc6299db9ec823/termbox-sys-0.2.11/.termbox/.waf3-1.8.0-5c05be2d0e42d5c2c81403948a2d295b/waflib/Context.py", line 133, in recurse user_function(self) File "/Users/alt/.cargo/registry/src/github.com-1ecc6299db9ec823/termbox-sys-0.2.11/.termbox/wscript", line 11, in options opt.load('compiler_c') File "/Users/alt/.cargo/registry/src/github.com-1ecc6299db9ec823/termbox-sys-0.2.11/.termbox/.waf3-1.8.0-5c05be2d0e42d5c2c81403948a2d295b/waflib/Context.py", line 89, in load fun(self) File "/Users/alt/.cargo/registry/src/github.com-1ecc6299db9ec823/termbox-sys-0.2.11/.termbox/.waf3-1.8.0-5c05be2d0e42d5c2c81403948a2d295b/waflib/Tools/compiler_c.py", line 36, in options opt.load_special_tools('c_*.py',ban=['c_dumbpreproc.py']) File "/Users/alt/.cargo/registry/src/github.com-1ecc6299db9ec823/termbox-sys-0.2.11/.termbox/.waf3-1.8.0-5c05be2d0e42d5c2c81403948a2d295b/waflib/Context.py", line 296, in load_special_tools lst=self.root.find_node(waf_dir).find_node('waflib/extras').ant_glob(var) File "/Users/alt/.cargo/registry/src/github.com-1ecc6299db9ec823/termbox-sys-0.2.11/.termbox/.waf3-1.8.0-5c05be2d0e42d5c2c81403948a2d295b/waflib/Node.py", line 334, in ant_glob ret=[x for x in self.ant_iter(accept=accept,pats=[to_pat(incl),to_pat(excl)],maxdepth=kw.get('maxdepth',25),dir=dir,src=src,remove=kw.get('remove',True))] File "/Users/alt/.cargo/registry/src/github.com-1ecc6299db9ec823/termbox-sys-0.2.11/.termbox/.waf3-1.8.0-5c05be2d0e42d5c2c81403948a2d295b/waflib/Node.py", line 334, in ret=[x for x in self.ant_iter(accept=accept,pats=[to_pat(incl),to_pat(excl)],maxdepth=kw.get('maxdepth',25),dir=dir,src=src,remove=kw.get('remove',True))] RuntimeError: generator raised StopIteration

    --- stderr Cloning into '.termbox'... thread 'main' panicked at 'assertion failed: cmd.stdout(Stdio::inherit()).stderr(Stdio::inherit()).status().unwrap().success()', /Users/alt/.cargo/registry/src/github.com-1ecc6299db9ec823/termbox-sys-0.2.11/build.rs:88:5 note: Run with RUST_BACKTRACE=1 for a backtrace.

    warning: build failed, waiting for other jobs to finish... error: failed to compile amp v0.5.1, intermediate artifacts can be found at /var/folders/9n/hm_m4l7s6m56j8vr8lscty240000gn/T/cargo-installhWL7KA

    Caused by: build failed

    opened by hmohammadalt 25
  • error: Could not compile `amp`.

    error: Could not compile `amp`.

    System details

    macOS version: 10.13.2 brew --version: 1.5.2

    Relevant console output

    brew tap jmacdonald/amp && brew install amp

    ==> cargo build --release
    Last 15 lines from /Users/mjswensen/Library/Logs/Homebrew/amp/01.cargo:
    error: linking with `cc` failed: exit code: 1
      |
      = note: "cc" "-m64" "-L" "/usr/local/Cellar/rust/1.23.0/lib/rustlib/x86_64-apple-darwin/lib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/amp-5684d04b7fc51d18.amp0.rcgu.o" "-o" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/amp-5684d04b7fc51d18" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/amp-5684d04b7fc51d18.crate.allocator.rcgu.o" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps" "-L" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/build/libgit2-sys-098b69243984559f/out/lib" "-L" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/build/libssh2-sys-98303c5bba578b78/out/lib" "-L" "/usr/local/opt/[email protected]/lib" "-L" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/build/termbox-sys-5ebfe27f44b739b6/out/lib" "-L" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/build/miniz-sys-5f639cdb47593da9/out" "-L" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/build/onig_sys-592e34a394c11b60/out/build" "-L" "/usr/local/Cellar/rust/1.23.0/lib/rustlib/x86_64-apple-darwin/lib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libamp-7432a0e02b68ac48.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libtermion-e66342982eee5946.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libscribe-b44ea9dbe935b3a9.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/liberror_chain-225ec74a61477073.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libgit2-e806379ea48de4e1.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libapp_dirs-b4875c00acf3bf7f.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libunicode_segmentation-7fb605f832b80451.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/liberror_chain-065b0874ae3caa9b.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libregex-86df2a7120745290.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libaho_corasick-7d7441f3cb157eac.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libutf8_ranges-042776cb20b1a62f.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libclipboard-132e5874f63c62e5.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libsmallvec-88250473b26dac28.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libregex_syntax-f8ef34fc8d2d89e1.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libpad-af40836f5eaf8ddb.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libunicode_width-7b0c84f52388a24c.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/liburl-2a3990a068032482.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libidna-59724bb287671349.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libunicode_normalization-01398635c2560b4f.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libunicode_bidi-af83364affc0aad8.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libmatches-b6e54ecbffce67f9.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libobjc_foundation-a22831537a649bcc.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libblock-19e62031ef3f1e48.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/liblibgit2_sys-044b05748c92d252.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libcurl_sys-87c3162b3db93a2a.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/liblibssh2_sys-c9c25b68c0e31c1d.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libopenssl_sys-eb3619330759a60e.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/liblibz_sys-48ec0f882056f2ce.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libluthor-d6675f0d534f4cc8.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libthread_local-648620192c2d125b.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libthread_id-19797651374cf87b.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libbloodhound-f5941a1ad09c0c4e.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libwalkdir-ff2555de033c09b7.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libsame_file-8e6b939923e1fb95.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libglob-6fb1885ffa3defb5.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libfragment-1d65161d5f462746.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libbacktrace-3570945de16fa196.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/librustc_demangle-0ed373e48e5e3deb.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libcfg_if-d8eba8e635f4be3d.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libobjc_id-2415fcab6f5e9cab.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libobjc-21f00305b3ffb90d.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libmalloc_buf-9246794bd36eb191.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libpercent_encoding-932723c0adffc35b.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/librustbox-ee6c2b81ef82355f.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libbitflags-9a937c48e125844f.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libtermbox_sys-f7025138e5b01205.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libgag-dbebac7fac1a4dea.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libtempfile-fc9cced3a12b7f56.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libbitflags-4310ca2a84378df5.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libmemchr-a2856ec26b17be6f.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libsyntect-74223406047b74d1.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libserde_json-e6077b509e6c59e2.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libdtoa-6c1094f9d3d4440c.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libitoa-4c01e9ea70b8a7c6.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libfnv-286308532cdbca70.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libflate2-1e11f7b74e22a1fd.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libminiz_sys-6d16296bbf0b06d8.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libbitflags-1e9d572282c5a94a.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libbincode-c9566417e132eaf5.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libplist-89cf05399e9527fb.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libserde-8d1ba06d8375e362.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libxml-eda2410d6ae7dc74.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libbitflags-ef1b1baab8156dde.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libchrono-57822d6f738fdba9.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libnum-d891251d7fa3f919.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libnum_rational-4304f8d6ff6439bf.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libnum_bigint-e8529184897aec18.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/librand-ee817cc143ee39ae.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libnum_complex-64b83890e93f9c67.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/librustc_serialize-940c200299c36a78.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libtime-1958e4cbfc30c043.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libbase64-d482b5d783df9630.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libbyteorder-c446b2ff9b4b168a.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libregex_syntax-46a9ba67f277fd26.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libonig-ab40b979b6814a22.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libonig_sys-4fb6d4e47266fa62.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/liblibc-f71a304c9897aecb.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/liblazy_static-8e83c3903dca9b04.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libbitflags-2ebb9d5cc71e63bc.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libyaml_rust-faebe390f78fceba.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libwalkdir-97a598e206931474.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libsame_file-88db3cc98d177498.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libsafemem-5c35b304236da68d.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libnum_iter-fcd5accb61e45f82.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libnum_integer-3ff2825516f38b16.rlib" "/private/tmp/amp-20180126-92710-153fq2v/amp-0.3.2/target/release/deps/libnum_traits-7f37b0f3da3c490c.rlib" "/usr/local/Cellar/rust/1.23.0/lib/rustlib/x86_64-apple-darwin/lib/libstd-1066840d7e6956ae.rlib" "/usr/local/Cellar/rust/1.23.0/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-21f981c647b7bf0e.rlib" "/usr/local/Cellar/rust/1.23.0/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-bf83ac3154b02140.rlib" "/usr/local/Cellar/rust/1.23.0/lib/rustlib/x86_64-apple-darwin/lib/libunwind-48dcdd790a8dd163.rlib" "/usr/local/Cellar/rust/1.23.0/lib/rustlib/x86_64-apple-darwin/lib/liballoc_system-1071ae993f37c69b.rlib" "/usr/local/Cellar/rust/1.23.0/lib/rustlib/x86_64-apple-darwin/lib/liblibc-ecd13f184f8fe531.rlib" "/usr/local/Cellar/rust/1.23.0/lib/rustlib/x86_64-apple-darwin/lib/liballoc-52ac869ede6a8471.rlib" "/usr/local/Cellar/rust/1.23.0/lib/rustlib/x86_64-apple-darwin/lib/libstd_unicode-295411b4a3449f1c.rlib" "/usr/local/Cellar/rust/1.23.0/lib/rustlib/x86_64-apple-darwin/lib/libcore-f9d635782e34e49d.rlib" "/usr/local/Cellar/rust/1.23.0/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-17b814a5b2f07f8f.rlib" "-framework" "AppKit" "-framework" "Foundation" "-l" "System" "-l" "iconv" "-framework" "Security" "-framework" "CoreFoundation" "-l" "curl" "-l" "ssl" "-l" "crypto" "-l" "z" "-l" "objc" "-l" "objc" "-l" "objc" "-l" "System" "-l" "resolv" "-l" "pthread" "-l" "c" "-l" "m"
      = note: Undefined symbols for architecture x86_64:
                "_OPENSSL_add_all_algorithms_noconf", referenced from:
                    _libssh2_init in liblibssh2_sys-c9c25b68c0e31c1d.rlib(global.c.o)
              ld: symbol(s) not found for architecture x86_64
              clang: error: linker command failed with exit code 1 (use -v to see invocation)
    
    
    error: aborting due to previous error
    
    error: Could not compile `amp`.
    

    Let me know if you need any additional information!

    opened by mjswensen 14
  • compilation error on Fedora - termbox library issue

    compilation error on Fedora - termbox library issue

    On Fedora 29 running cargo install amp with the latest stable Rust and Cargo gives:

    could not find native static library termbox, perhaps an -L flag is missing?

    I initially thought this is related #95, but on Fedora python still points to Python2, so this is something else. On Ubuntu 18.04 cargo install amp works.

    opened by ibukanov 8
  • Add .editorconfig support

    Add .editorconfig support

    First off I just want to say that I really like amp! It already has replaced vim for me!

    Anyway, this addresses #18.

    Currently, only indent_style, indent_size, tab_width, trim_trailing_whitespace and insert_final_newline are supported. I also added an .editorconfig file for this repo.

    ~~(tab_width needs still some work, this setting is not yet respected in the renderer.)~~

    I'm sending this now to get some comments on the current implementation (if it is ok), and further to discuss how to handle the end_of_line and charset properties. From what I saw, there is currently no real handling for different file-encodings (everyone should be using UTF-8 anyway but it is part of .editorconfig spec). Same goes for line-endings handling.

    ~~Also some tests still need to be written to test the .editorconfig functionality.~~

    opened by christoph-heiss 8
  • Indent a selection

    Indent a selection

    Hi,

    I'm using amp on a daily basis for my programming tasks and one of the things I really miss is a way to indent and unident blocks of selected text. This is planned for a future version or there is some way to do it that I cannot figure out?

    Thanks in advance and thanks for your great work in amp !

    Pedro Costa

    opened by pbgc 8
  • added a mechanism for showing folders if search results are too many

    added a mechanism for showing folders if search results are too many

    So, I think this is the easiest way to let you see the work,

    This is not tab completed as I suggested in my original email, it just behaves slightly differently on the results.

    If the results are more than the config it looks for the highest common folder of the results, and returns the first N direct children of that.

    This has some advantages in that it shows you a shortlist of folders in a directory, but sometimes this is less effective than I had hoped.

    For example in the amp folder "src" folder and a "target/.../.../.../src" folder, so typing src only shows

    src
    target
    

    even so "src .rs" shows:

      src/errors.rs                                                                 
      src/lib.rs                                                                    
    > src/main.rs                                                                   
      src/util                                                                      
      src/view
    

    the last 2 are folders

    Hope this is of interest, let me know what you think.

    There are improvements I'd like to work on, possibly some mechanism for forcing a search at the current PWD.

    maybe using "/" or ">" so

    >src
    

    would not include the target results.

    This would be a lot of work though as it depends on really hacking around the bloodhound system somehow.

    Anyway, I hope this is of interest to you, If you like the direction let me know and I'll ponder how to get the ">" idea working

    opened by storyfeet 7
  • Fix syntax highlighting.

    Fix syntax highlighting.

    This is a fairly naive attempt to solve #22. It forces a style recomputation for every Lexeme.

    The current method is trying to just apply it based on the most recent style in the stack. But from my understanding this basically won't apply any changes if scope[..len-1] -> scope doesn't require any style changes. Which is frequently the case. Basically, get_style doesn't seem to be the right thing to use. See comment:

    I have a good argument nobody will ever need to use the method.

    style_for_stack instead just recomputes the style for whatever given scope you are looking at, but the method says:

    This operation is convenient but expensive. For reasonable performance, the caller should be caching results.

    So there may be better options. E.g., doing something like HighlightIterator (source). But that seems to require larger changes further down the stack, i.e. in scribe.

    opened by samscott89 7
  • Compilation failure in macOS

    Compilation failure in macOS

    => git clone https://github.com/jmacdonald/amp.git => cd amp => cargo build --release

    Compiling same-file v1.0.0 Compiling percent-encoding v1.0.0 Compiling itoa v0.3.4 Compiling yaml-rust v0.3.5 Compiling log v0.3.8 Compiling utf8-ranges v0.1.3 Compiling cc v1.0.1 Compiling rustc-serialize v0.3.24 Compiling app_dirs v1.1.1 Compiling regex-syntax v0.4.1 Compiling libc v0.2.32 Compiling unicode-xid v0.0.4 Compiling block v0.1.6 error[E0619]: the type of this value must be known in this context --> /Users/venkat/.cargo/registry/src/github.com-1ecc6299db9ec823/app_dirs-1.1.1/src/imp/platform/macos.rs:10:40 | 10 | Ok(Component::RootDir.as_ref().into()) | ^^^^

    error: aborting due to previous error

    error: Could not compile app_dirs. warning: build failed, waiting for other jobs to finish... error: build failed

    Pls let me know if you want me to try anything and provide more info.

    More Info:

    macOs High Sierra version 10.13.2

    opened by svraghavan 7
  • Building master gives me ` uninitialized, which is invalid'" If I have any syntax definition file on syntaxes folder">

    Building master gives me "thread 'main' panicked at 'attempted to leave type `linked_hash_map::Node` uninitialized, which is invalid'" If I have any syntax definition file on syntaxes folder

    I just tried to build the current master version and unless I delete all syntax files (that work great with 0.6.2) on ~/Library/Application Support/amp/syntaxes folder I get:

    thread 'main' panicked at 'attempted to leave type linked_hash_map::Node<yaml::Yaml, yaml::Yaml> uninitialized, which is invalid', /Users/pbeck/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/mem/mod.rs:658:9 stack backtrace: 0: 0x1051336d4 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hcfc48256a5ab8835 1: 0x1051517d0 - core::fmt::write::haf3903118f694c48 2: 0x10512ffb6 - std::io::Write::write_fmt::h7385463ac87804ed 3: 0x1051353ef - std::panicking::default_hook::{{closure}}::h91bd4c58cf71392b 4: 0x1051350bd - std::panicking::default_hook::h7bd29c87df967048 5: 0x1051359bb - std::panicking::rust_panic_with_hook::hae2b05f08a320721 6: 0x10513553b - std::panicking::begin_panic_handler::{{closure}}::h72d68d3a77e0b718 7: 0x105133b48 - std::sys_common::backtrace::__rust_end_short_backtrace::h7c5e286792f94edb 8: 0x1051354fa - _rust_begin_unwind 9: 0x10516303f - core::panicking::panic_fmt::h1b194bb80d76fb10 10: 0x105162f97 - core::panicking::panic::hdb9dddaff64fd68b 11: 0x105057c0e - linked_hash_map::LinkedHashMap<K,V,S>::insert::h9c35a7140c8307a8 12: 0x105055de0 - yaml_rust::yaml::YamlLoader::insert_new_node::h4430aa226acfa521 13: 0x1050557dd - <yaml_rust::yaml::YamlLoader as yaml_rust::parser::MarkedEventReceiver>::on_event::h531a9baef346c4ca 14: 0x10504ae5f - yaml_rust::parser::Parser::load_node::h9aad82c72af03881 15: 0x10504b39e - yaml_rust::parser::Parser::load_mapping::hab4900669fbd6767 16: 0x10504a8fb - yaml_rust::parser::Parser::load::h48b3e155124689af 17: 0x105055f88 - yaml_rust::yaml::YamlLoader::load_from_str::h131fea149d119bed 18: 0x1050003ba - syntect::parsing::yaml_load::::load_from_str::h63dc492d841c75ea 19: 0x104ff1e84 - syntect::parsing::syntax_set::load_syntax_file::hca31e8702393465c 20: 0x104f84118 - syntect::parsing::syntax_set::SyntaxSet::load_syntaxes::hd3d8827f3b310f19 21: 0x104f367e3 - amp::models::application::Application::new::h0ed9f6f35cda2602 22: 0x104f174d0 - amp::main::h0e68d5cbc22626e7 23: 0x104f14fea - std::sys_common::backtrace::__rust_begin_short_backtrace::hdb57f6c8cc0d9e33 24: 0x104f1c3dc - std::rt::lang_start::{{closure}}::h0eee3c05a96f9999 25: 0x105135d34 - std::rt::lang_start_internal::hd38bb63f9540b327 26: 0x104f17879 - _main

    bug accepted 
    opened by pbgc 6
  • problems with version from master branch

    problems with version from master branch

    Hi,

    Out of curiosity I built the version from master branch and tried to use it. I got some problems ... with some actions giving me [A or [B characters inserted and ESC key not functioning (hence could not leave edit mode).

    This, for example, happens doing this:

    • Open a file
    • Press i
    • Press ESC and UP key right after

    I'm on macOS 10.14.4

    I filed this issue to try to help! I apologize if this is a known issue and WIP ... and in that case please close the issue.

    Thanks! Pedro Costa

    opened by pbgc 6
  • How to add new syntax aliases?

    How to add new syntax aliases?

    For example, .sh highlights fine, but if I wanted ~/.zshrc to use that highlight, I'm not sure how. Especially since I can't find a sublime text syntax definition for zsh. It looks like the default syntax set is created by https://github.com/trishume/syntect

    accepted 
    opened by jedahan 6
  • faster way to navigate lines

    faster way to navigate lines

    Is your feature request related to a problem? Please describe. After opening a file, I tend to move the cursor to the part of the file I'm interested in, which may well be down a bit. I'd expect for e.g. PageDown to move the cursor down by a screen, but instead find it to not move the cursor at all.

    Describe the solution you'd like Have PageDown move the cursor, or have some other alternative to move the cursor by more than a line.

    Describe alternatives you've considered jjjjjjjjjjjjjjjjjjjjjjjjjjjjj

    Additional context n/a

    opened by KiaraGrouwstra 0
  • FR  code completion from crates used

    FR code completion from crates used

    Hey,

    Thanks for AMP, it works well and removes the hassle of geting code completion to work with vim.

    Are there plans to enable for AMP to complete code based on the Items in the crates used ?

    That would make it an awesome editor, i'm pressing ctrl-space out of habit so i'm ready :-D

    opened by commandline-be 0
  • Bump net2 from 0.2.33 to 0.2.37

    Bump net2 from 0.2.33 to 0.2.37

    Bumps net2 from 0.2.33 to 0.2.37.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump miow from 0.2.1 to 0.2.2

    Bump miow from 0.2.1 to 0.2.2

    Bumps miow from 0.2.1 to 0.2.2.

    Commits
    • 6fd7b9c Bump version to 0.2.2
    • 550efc2 Merge branch 'fix-sockaddr-convertion-v0.2.x' into 0.2.x
    • ca8db53 Stop using from_ne_bytes to be compatible with Rust < 1.32.0
    • 3e217e3 Bump net2 dep to 0.2.36 without invalid SocketAddr convertion
    • 27b77cc Adapt to winapi 0.2
    • 2783715 Safely convert SocketAddr into raw SOCKADDR
    • f6662ef Clarify wording of license information in README.
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Provide binary releases (with musl)

    Provide binary releases (with musl)

    Can you please provide binary releases? I saw that there's already a GitHub workflow that builds via cargo, if we could also upload the build artifacts with the releases, that would be great.

    Having a library linked with musl would be great as I'd be able to run it on systems with older GLIBC.

    opened by dufferzafar 5
Owner
Jordan MacDonald
Rust, Ruby, Linux/BSD
Jordan MacDonald
Ox is a code editor that runs in your terminal

Ox editor Ox is a code editor that runs in your terminal. About The Project Ox is a code editor. It was written in Rust using ANSI escape sequences. I

null 0 Feb 3, 2022
A basic text editor, written in Rust (hence the name).

rut A basic text editor, written in Rust (hence the name). Why, though? I just wanted a basic TUI text editor (like Nano) that could: Be used with all

Lowell Thoerner 4 Feb 3, 2023
Simple yet powerful multi-line text editor widget for tui-rs and ratatui

tui-textarea tui-textarea is a simple yet powerful text editor widget like <textarea> in HTML for tui-rs and ratatui. Multi-line text editor can be ea

Linda_pp 126 Jul 12, 2023
nvim-oxi provides safe and idiomatic Rust bindings to the rich API exposed by the Neovim text editor.

?? nvim-oxi nvim-oxi provides safe and idiomatic Rust bindings to the rich API exposed by the Neovim text editor. The project is mostly intended for p

Riccardo Mazzarini 655 Jul 13, 2023
create and test the style and formatting of text in your terminal applications

description: create and test the style and formatting of text in your terminal applications docs: https://docs.rs/termstyle termstyle is a library tha

Rett Berg 18 Jul 3, 2021
Native cross-platform full feature terminal-based sequence editor for git interactive rebase.

Native cross-platform full feature terminal-based sequence editor for git interactive rebase.

Tim Oram 1.2k Jan 2, 2023
A performant terminal-based project editor with extensive shortcuts

omega A performant and extensive terminal-based project editor with a wide variety of modern shortcuts. How to use omega [path] This section will guid

Nils Wrenger 3 Mar 31, 2024
An implementation of Piet's text interface using cosmic-text

piet-cosmic-text Implements piet's Text interface using the cosmic-text crate. License piet-cosmic-text is free software: you can redistribute it and/

John Nunley 7 Mar 12, 2023
ask.sh: AI terminal assistant that can read and write your terminal directly!

ask.sh: AI terminal assistant that read from & write to your terminal ask.sh is an AI terminal assistant based on OpenAI APIs such as GPT-3.5/4! What'

hmirin 5 Jun 20, 2023
Move multiple files, with the power of your editor

NOTE FOR USERS THAT WANT TO TRY THIS OUT! The current code on the master branch doesn’t work as documented, as a newer more powerful interface is bein

Thomas Voss 3 Dec 22, 2022
A library that creates a terminal-like window with feature-packed drawing of text and easy input handling. MIRROR.

BearLibTerminal provides a pseudoterminal window with a grid of character cells and a simple yet powerful API for flexible textual output and uncompli

Tommy Ettinger 43 Oct 31, 2022
Terminal text styling via ANSI escape sequences.

Iridescent Features iridescent is a library for styling terminal text easily. It supports basic ANSI sequences, Xterm-256 colors, and RGB. You can ope

Rob 2 Oct 20, 2022
Simple macros to write colored and formatted text to a terminal. Based on `termcolor`, thus also cross-platform.

Bunt: simple macro-based terminal colors and styles bunt offers macros to easily print colored and formatted text to a terminal. It is just a convenie

Lukas Kalbertodt 202 Dec 22, 2022
A little program written in Rust that prints random PNG images to the terminal in text grabbed from an image repo.

Cermic A little program written in Rust that prints random PNG images to the terminal in text grabbed from an image repo. NOTE: As of right now, Cermi

Jackson Novak 7 Oct 1, 2022
A tiny library and application for animating text in the terminal.

?? snailshell A tiny library and application for animating text in the terminal. ?? It's so easy to add some flair to your text RPGs or console progra

null 45 Mar 5, 2023
A command-line utility which aligns a block of text within the terminal (or a specified number of columns), written in Rust.

align: a command line utility for aligning text. ⭐ Overview Aligns text within the terminal (or a specified number of columns). The text is treated as

Khalil Ouali 6 Aug 11, 2023
A rust crate for rendering large text to the terminal using font8x8 and ratatui.

tui-big-text tui-big-text is a rust crate that renders large pixel text as a ratatui widget using the glyphs from the font8x8 crate. Installation carg

Josh McKinney 7 Sep 7, 2023
Print your git contributions in your terminal, blazingly fast

Takoyaki Blazingly fast git contribution graph in your terminal Features ✔️ Customizable ✔️ Plugins to support a bunch of cloud based git repositories

kyeboard 13 Feb 6, 2023
Get your github contributions right in your terminal, blazingly fast!

GitColorScripts Get your github contributions right in your terminal! Installation Install via yay yay -S gitcolorscripts Install manually Download t

VoidCupboard 56 Jul 12, 2023