Commit Graph

204 Commits (bdcd4d9411655ab69245d803e88f88cc278127da)

Author SHA1 Message Date
Dmitry Sharshakov 9e22842d51
move debug command to keybinding 3 years ago
Dmitry Sharshakov e2c74d26e0
Add command to run debug target 3 years ago
Blaž Hrastnik a54b09e3fe dap: Split out launch from init 3 years ago
Blaž Hrastnik 94a1951d40 Work towards a breakpoint UI 3 years ago
Gokul Soumya 14c08e855f
Refactor infobox rendering and parsing (#579) 3 years ago
Blaž Hrastnik f0eb6ed96a Resolve a couple TODOs 3 years ago
Blaž Hrastnik 02cba2a7f4 Implement alt-( and alt-) to rotate selection contents 3 years ago
Blaž Hrastnik 66a90130a5 Implement selection rotation with `(` and `)` 3 years ago
Blaž Hrastnik 0793841ac3 Refactor copy selection vertically 3 years ago
Cor f160008add Vertical Selection 3 years ago
Nathan Vegdahl 8c3a5b14de Add `goto_last_line` command, and bind it to `ge`.
Resolves #529.
3 years ago
Ivan Tham 821565e4ef Add ctrl-z to suspend 3 years ago
Nathan Vegdahl 3fda350494 Fixes for new clippy lints in Rust 1.54. 3 years ago
Gokul Soumya b90450b9e8 Fix goto line number
Regression from #454. Go to line 10 with `10gg` or `10G`.
3 years ago
Gokul Soumya 1493313750
Show pending keys in status line (#515)
* Show pending keys and counts in status line

* Refactor pending key display
3 years ago
Gokul Soumya 88d6f65239
Allow multi key remappings in config file (#454)
* Use tree like structure to store keymaps

* Allow multi key keymaps in config file

* Allow multi key keymaps in insert mode

* Make keymap state self contained

* Add keymap! macro for ergonomic declaration

* Add descriptions for editor commands

* Allow keymap! to take multiple keys

* Restore infobox display

* Fix keymap merging and add infobox titles

* Fix and add tests for keymaps

* Clean up comments and apply suggestions

* Allow trailing commas in keymap!

* Remove mode suffixes from keymaps

* Preserve order of keys when showing infobox

* Make command descriptions smaller

* Strip infobox title prefix from items

* Strip infobox title prefix from items
3 years ago
Cor Peters 722cfedb38
Added change_case command (#441)
* Added change_case command

* Added switch_to_uppercase and switch_to_lowercase

Renamed change_case to switch_case.

* Updated the Keymap section of the Book

* Use flat_map instead of map + flatten

* Fix switch_to_uppercase using to_lowercase

* Switched 'Alt-`' to uppercase and '`' to lowercase

Co-authored-by: Cor <prive@corpeters.nl>
3 years ago
Cor e2bcef718a Removed double entry of extend_line 3 years ago
Blaž Hrastnik cb4bab8903 Remove outdated comment 3 years ago
Blaž Hrastnik a4e28c6927 Implement `X` as extend selection to line bounds 3 years ago
Ivan Tham bbbbfa9bcf Goto mode use infobox
In the meantime, change gm to gc.
Remove extra space in mode title.
3 years ago
Ivan Tham 5977b07e19 Reduce calculation and improve pattern in infobox
- switch to use static OnceCell to calculate Info once
- pass Vec<(&[KeyEvent], &str)> rather than Vec<(Vec<KeyEvent>, &str)>
- expr -> tt to allow using | as separator, make it more like match
3 years ago
Ivan Tham 4c190ec9d9 Suggestions for infobox changes
Co-authored-by: Benoît Cortier <benoit.cortier@fried-world.eu>
3 years ago
Ivan Tham 8985c58fd3 Add infobox 3 years ago
Nathan Vegdahl 702a0491db Remove #[allow(unused)] from helix-term, and fix unused imports.
Lots of other warning still left.  Will address in subsequent commits.
3 years ago
PabloMansanet de8745aea7 Incorporate long word commands into keymap 3 years ago
Keith Simmons 4418e17547
reverse the dependency between helix-tui and helix-view (#366)
* reverse the dependency between helix-tui and helix-view by moving a fiew types to view

* fix tests

* clippy and format fixes

Co-authored-by: Keith Simmons <keithsim@microsoft.com>
3 years ago
Ivan Tham 10548bf0e3 Fix previous broken refactor key into helix-view
Need to be used for autoinfo

Revert "Revert "Refactor key into helix-view""

This reverts commit 10f9f72232.
3 years ago
Gokul Soumya e0fd08d6df Rename surround to match_mode 3 years ago
Gokul Soumya b00e9fc227 Handle line endings correctly in surround 3 years ago
Gokul Soumya 13648d28b9 Add surround keybinds 3 years ago
Blaž Hrastnik f41688d960 Merge `x` and `X` 3 years ago
Blaž Hrastnik 10f9f72232 Revert "Refactor key into helix-view"
Did not use defaults when custom keymap was used

This reverts commit ca806d4f85.
3 years ago
wojciechkepka 11f20af25f Make `home` and `end` work in insert mode 3 years ago
Ivan Tham ca806d4f85 Refactor key into helix-view
Now also make use of Deserialize for Config.
3 years ago
wojciechkepka 1c25852021 Make arrow keys and page up/down work in insert mode 3 years ago
PabloMansanet f7e00cf720
Configurable keys 2 (Mapping keys to commands) (#268)
* Add convenience/clarity wrapper for Range initialization

* Add keycode parse and display methods

* Add remapping functions and tests

* Implement key remapping

* Add remapping book entry

* Use raw string literal for toml

* Add command constants

* Make command functions private

* Map directly to commands

* Match key parsing/displaying to Kakoune

* Formatting pass

* Update documentation

* Formatting

* Fix example in the book

* Refactor into single config file

* Formatting

* Refactor configuration and add keymap newtype wrappers

* Address first batch of PR comments

* Replace FromStr with custom deserialize
3 years ago
Gokul Soumya 9cfa163370 Refactor keymap definitions using macros
Adds a macro rule to the `key!` macro so that keymaps using `Left`,
`Home`, `Esc`, etc. will also be accepted.
3 years ago
Ivan Tham 6b3c9d8ed3 Fix jump behavior, goto_implementation now jump
Better jump behavior since we override the first jump if it's on the
first document. At the same time, ctrl-i is now working with gd jumps.
3 years ago
Wojciech Kępka 4bec87ad18 Update keymap 3 years ago
Wojciech Kępka c65b4dea09 commands: Add replace with yanked as `R` 3 years ago
Benoît CORTIER 68affa3c59 Implement register selection
User can select register to yank into with the " command.
A new state is added to `Editor` and `commands::Context` structs.
This state is managed by leveraging a new struct `RegisterSelection`.
3 years ago
Wojciech Kępka 16b1cfa3be Add diagnostics keybindings 3 years ago
Ivan Tham 40744ce835 Add ctrl-w in insert mode
It seemed to panic when I pressed too many times, but that is from
lsp side.
3 years ago
Ivan Tham 8c2fa12ffc Add window mode
Fix #93
3 years ago
Antoni Stevenet a1f4b8f92b
Add home-end keymaps, (as kakoune/vim do) (#83)
* add home-end keymaps

* implement extend methods for extend_line_start, extend_line_end

* add home-end mappings to keymaps.md

* add ^-$ extend mappings for extend mode

* pass cargo linter
3 years ago
notoria adcfcf9044 Replace ^/$ with gh/gl 3 years ago
Antoni Stevent 27aee705e0 use correct _extend methods, also remove unnecessary casts 3 years ago
Antoni Stevent f0fe558f38 Add up/right/left/down arrow keymaps, similar to kakoune 3 years ago
Jan Hrastnik 712f25c2b9 removed shift matching 3 years ago
Blaž Hrastnik cbb3ebafdc Support ctrl-f and ctrl-b to page up/down, fixes #41 3 years ago
Blaž Hrastnik 9c24f1ec0e Drop selection_lines completely, change move_line_start binding 4 years ago
Blaž Hrastnik c64240b6ef Implement most of the view mode (z). 4 years ago
Blaž Hrastnik 392c4a9c02 Keep primary selection as space+space. 4 years ago
Blaž Hrastnik 73f4abbb37 N as extend with search (for now, N should be search_prev). 4 years ago
Blaž Hrastnik 12961d657f Implement P as paste_before. 4 years ago
Blaž Hrastnik dfc17becd5 Move pickers under my leader key mode (space). 4 years ago
Blaž Hrastnik 88bb7a1f38 Repeat insert command (.). 4 years ago
Blaž Hrastnik 742b3a709f Store intra-files jumps (goto) on the jumplist. 4 years ago
Blaž Hrastnik aefafc25cd Replace Mode::Goto with just using on_next_key. 4 years ago
Blaž Hrastnik 9a36d2c2a8 wip: Hooks & trigger characters for completion/signature_help. 4 years ago
Blaž Hrastnik 8657c57cf2 Trivial jumplist implementation. 4 years ago
Blaž Hrastnik 73c92a0bc1 Implement m / match_brackets (using tree sitter). 4 years ago
Blaž Hrastnik df306fe031 Implement open_above (O). 4 years ago
Blaž Hrastnik 42d07b0621 Implement replace command (r<key>). 4 years ago
Jan Hrastnik d3ddc8dea6 wip 4 years ago
Blaž Hrastnik 143cfe13e0 minor: TODO comment cleanup 4 years ago
Blaž Hrastnik eea339545c Add command for keeping only the primary selection. 4 years ago
Blaž Hrastnik dd91090a1a Implement keep_selections (filter selections on regex). 4 years ago
Blaž Hrastnik 4acf301022 Implement the f/t/F/T find/till family of commands. 4 years ago
Blaž Hrastnik 62c991230f find-till (f) prototype, on_next_key mode implementation. 4 years ago
Blaž Hrastnik 8b2cbb53fd minor: fix hover key 4 years ago
Blaž Hrastnik 2088c45075 commands: Implement X as extend line. 4 years ago
Blaž Hrastnik ec4dd0a176 Add a selection mode again. 4 years ago
Blaž Hrastnik 2c9b02039b commands: Implement join_selections. 4 years ago
Blaž Hrastnik 1ae7c43391 commands: = as range formatting (via lsp) 4 years ago
Blaž Hrastnik 7162632eb7 lsp: Hover documentation draft. 4 years ago
Blaž Hrastnik 6cfb1acb9d commands: Implement expand_selection. 4 years ago
Blaž Hrastnik 33c67f1388 commands: add * as selection search. 4 years ago
Blaž Hrastnik 7a1ff5e45f commands: Wire up toggle comments as ctrl-c 4 years ago
Blaž Hrastnik 83d48f10ea search: Barebones implementation. 4 years ago
Blaž Hrastnik 239db79834 Finally: Retain horizontal position when moving vertically. 4 years ago
Blaž Hrastnik 30d1b7098f commands: % as select_all. 4 years ago
Blaž Hrastnik 9c33b5340a A dumb "next view" implementation that works. 4 years ago
Blaž Hrastnik 2bea5db7bd commands: Implement select_on_matches. 4 years ago
Blaž Hrastnik a702af0aeb commands: add W and B (extend selection by word). 4 years ago
Blaž Hrastnik 56f2193811 Retrieve completion options on ctrl-x. 4 years ago
Blaž Hrastnik 3d3295bb75 ui: buffer picker on ctrl-b 4 years ago
Blaž Hrastnik 7c75ec04e8 File picker mockup, reuses the line editor work done on Prompt. 4 years ago
Blaž Hrastnik 2bfdcede32 split_selection 4 years ago
Blaž Hrastnik ed6a4c4bd2 wip: Use prompt for interactive commands. 4 years ago
Blaž Hrastnik 5103dc9617 move commands and keymap back to terminal.
Command needs to be able to deal with UI. We'll separate it again later
on.
4 years ago
Blaž Hrastnik 935cfeae57 Split parts of helix-term into helix-view.
It still largely depends on term for some types but I plan to change
that later.
4 years ago
Blaž Hrastnik 48330ddb5f Command needs access to view information for certain changes. 4 years ago
Blaž Hrastnik b08278807e Add 'A', 'I' commands. 4 years ago
Blaž Hrastnik fb0f56b747 Add 'o' command. 4 years ago
Blaž Hrastnik b647c7a773 tree-sitter based syntax highlighting draft 4 years ago
Blaž Hrastnik 67017e5336 append mode 4 years ago
Blaž Hrastnik 579b6899f1 Work on insert mode. 4 years ago
Jan Hrastnik 8681d47292 remove unused import 4 years ago
Jan Hrastnik 6ba082697d added cursor rendering 4 years ago
Blaž Hrastnik 8119f1ec3d Refactor editor module to use state + keymap. 4 years ago
Blaž Hrastnik f8fe273a2e Fix build. 4 years ago
Blaž Hrastnik 843c20a550 Add a keymap module. 4 years ago