Commit Graph

939 Commits (e863e3b62d232d650468cb5d1f9da925fb460f5e)

Author SHA1 Message Date
Gokul Soumya e863e3b62d
Ensure that identical keymaps stay in sync (#1056)
Space mode and view mode are duplicated on two different
keybinds, and they tend to get out of sync by contributers
forgetting to update both of them. This commit adds a test
that explicitly checks that they are identical. Prevents
issues like #1050.
3 years ago
Gokul Soumya f9e9efb3ec Check for duplicate keys in default keymap 3 years ago
Gokul Soumya 80036b8bd3 Change page keybinds in view mode
b which was assigned to page_up conflicts with
align to bottom, so this commit replaces page up,
down, etc keybinds to use normal mode keybinds
(C-f, C-b, etc) in view mode too.
3 years ago
Omnikar 5654909135
Update `space w` window mode (#1050) 3 years ago
Jason Hansen cf831b1a65
Allow piping from stdin into a buffer on startup (#996)
* Allow piping from stdin into a buffer on startup

* Refactor

* Don't allow piping into new buffer on macOS

* Update helix-term/src/application.rs

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>

* Update helix-term/src/application.rs

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>

* Fix

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
3 years ago
CossonLeo 68224232af
buffer picker add is_modifier flag (#1020) 3 years ago
Ivan Tham 97893cca64
Restore screen position when abort search (#1047) 3 years ago
Bob 7c9f620236
add <C-h>, <C-u>, <C-d>, Delete in prompt mode (#1034) 3 years ago
CossonLeo a69caff450
search_impl will only align cursor center when it isn't in view (#959) 3 years ago
Omnikar a424ef4e20
Use default `languages.toml` if user's is invalid (#994) 3 years ago
CossonLeo 29e6849413
Add LSP rename_symbol (space-r) (#1011)
improve apply_workspace_edit
3 years ago
Omnikar a252ecd8c8
Add WORD textobject (#991)
* Add WORD textobject

* Document WORD textobject
3 years ago
Omnikar ed23057ff8
Launch with defaults upon invalid config/theme (#982)
* Launch with defaults upon invalid config/theme

* Startup message if there is a problematic config
* Statusline error if trying to switch to an invalid theme

* Use serde `deny_unknown_fields` for config
3 years ago
Blaž Hrastnik 2c1313c064 Specify vector capacity on surround_add 3 years ago
Blaž Hrastnik 1a1685acf7 Simplify current!(..).1 into doc!() 3 years ago
Blaž Hrastnik 0f4cd73000 Simplify goto_*_diagnostic commands 3 years ago
Blaž Hrastnik f659e1178a minor: view!(..).doc is slightly more efficient than current!(..).1.id() 3 years ago
Blaž Hrastnik 4c1321b3b6 minor: Extend search was decclared twice in the keymap 3 years ago
Blaž Hrastnik b81a554424 Retain range direction on search
Co-authored-by: CossonLeo <20379044+cossonleo@users.noreply.github.com>
3 years ago
Blaž Hrastnik 6431b26a6a Implement Selection::replace to replace a single range
Fixes #985

Co-authored-by: Daniel S Poulin <crimsonmage+github@gmail.com>
3 years ago
Gygaxis Vainhardt 911b9b3276
Add reverse search functionality (#958)
* Add reverse search functionality

* Change keybindings for extend to be in select mode, incorporate Movement and Direction enums

* Fix accidental revert of #948 in rebase

* Add reverse search to docs, clean up mismatched whitespace

* Reverse search optimization

* More optimization via github feedback
3 years ago
Omnikar cfc8285867
Allow infoboxes to be disabled (#972)
* Allow infoboxes to be disabled

* Document `infoboxes` default value

* Rename `infoboxes` to `auto_info`

* Document `auto-info`

* Fix incomplete rename
3 years ago
Omnikar 51b4d35dce
Inform when reaching undo/redo bounds (#981)
* Inform when reaching undo/redo bounds

* `Already at oldest change` when undo fails
* `Already at newest change` when redo fails

* Add missing `the`
3 years ago
Blaž Hrastnik 7b65a6d687 Rewrite goto_buffer 3 years ago
ath3 78c68fae91 Implement "Goto next buffer / Goto previous buffer" commands 3 years ago
Blaž Hrastnik e2560f427e Replace documents SlotMap with BTreeMap 3 years ago
CossonLeo 39584cbccd
Add c-s to pick word under doc cursor to prompt line & search completion (#831)
* Add prompt shourtcut to book
Add completions to search
Add c-s to pick word under doc cursor to prompt line

* limit 20 last items of search completion, update book

* Update book/src/keymap.md

Co-authored-by: Ivan Tham <pickfire@riseup.net>

* limit search completions 200

Co-authored-by: Ivan Tham <pickfire@riseup.net>
3 years ago
diegodox 70d21a903f
Prevent preview binary or large file (#939)
* Prevent preview binary or large file (#847)

* fix wrong method name

* fix add use trait

* update lock file

* rename MAX_PREVIEW_SIZE from MAX_BYTE_PREVIEW

* read small bytes to determine cotent type

* [WIP] add preview struct to represent calcurated preveiw

* Refactor content type detection

- Remove unwraps
- Reuse a single read buffer to avoid 1kb reallocations between previews

* Refactor preview rendering so we don't construct docs when not necessary

* Replace unwarap whit Preview::NotFound

* Use index access to hide unwrap

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>

* fix Get and unwarp equivalent to referce of Index acess

* better preview implementation

* Rename Preview enum and vairant

Co-authored-by: Gokul Soumya <gokulps15@gmail.com>

* fixup! Rename Preview enum and vairant

* simplify long match

* Center text, add docs, fix formatting, refactor

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
3 years ago
Omnikar 5b5d1b9dff
Truncate the starts of file paths instead of the ends in picker (#951)
* Truncate the starts of file paths in picker

* Simplify the truncate implementation

* Break loop at appropriate point

* Fix alignment and ellipsis presence

* Remove extraneous usage of `x_offset`

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
3 years ago
Omnikar e39cfa40df
Hide keys bound to `no_op` from infobox (#971) 3 years ago
Ivan Tham 3eb829e233
Ensure coords in screen depends on char width (#885)
The issue affected files with lots of tabs at the start as well.

Fix #840
3 years ago
Triton171 7a0c4322ea Simplify BTreeSet construction
Co-authored-by: Ivan Tham <pickfire@riseup.net>
3 years ago
Daniel Ebert eb8745db09 Implement key ordering for info box 3 years ago
CossonLeo 1720b98760
only remove primary index when search next without extend (#948) 3 years ago
dependabot[bot] 44ff597841
build(deps): bump tokio-stream from 0.1.7 to 0.1.8 (#953)
Bumps [tokio-stream](https://github.com/tokio-rs/tokio) from 0.1.7 to 0.1.8.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-stream-0.1.7...tokio-stream-0.1.8)

---
updated-dependencies:
- dependency-name: tokio-stream
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 years ago
Gygaxis Vainhardt f140a2a00e
Add arrow-key bindings for window switching (#933) 3 years ago
Blaž Hrastnik e5de103728 Extract a clear_completion method 3 years ago
Ivan Tham 49f6c2623f
Bump lsp-types to 0.91.0 (#932) 3 years ago
Ivan Tham bc6a34d97e
Make match work with extend and multi cursors (#920) 3 years ago
Ivan Tham 21d535565b
Support extend for multiple goto (#909)
gg, ge, [n]gg
3 years ago
cossonleo f1d339919f add expand_selection to last_motion 3 years ago
Blaž Hrastnik f3c7f20dbc Release v0.5.0 3 years ago
Omnikar db56de589a
Add `--tutor` option to `hx --help` output (#924)
* Add `--tutor` option to `hx --help` output

* Adjust `--tutor` location in help output
3 years ago
Omnikar e2ed691537
Implement `hx --tutor` and `:tutor` to load `tutor.txt` (#898)
* Implement `hx --tutor` and `:tutor` to load `tutor.txt`

* Document `hx --tutor` and `:tutor`

* Change `Document::set_path` to take an `Option`

* `Document::set_path` accepts an `Option<&Path>` instead of `&Path`.
* Remove `Editor::open_tutor` and make tutor-open functionality use
  `Editor::open` and `Document::set_path`.

* Use `PathBuf::join`

Co-authored-by: Ivan Tham <pickfire@riseup.net>

* Add comments explaining unsetting tutor path

Co-authored-by: Ivan Tham <pickfire@riseup.net>
3 years ago
Nehliin 3b0c5e993a Use deserialization fix instead 3 years ago
Oskar Nehlin 6e455fd3fb Apply suggestions from code review
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
3 years ago
Nehliin da4d9340ba Make key macro more portable 3 years ago
Nehliin a4c5f46739 Fix order being empty and add test 3 years ago
Nehliin f133d80e70 Move test to test module 3 years ago
Nehliin fbba47fbc0 Fix panic when using multi-level key mapping 3 years ago