Commit graph

44 commits

Author SHA1 Message Date
Omnikar
e47632114a
Fix swapped selection rotation docs in keymap.md (#792) 2021-09-29 21:07:16 +09:00
Blaž Hrastnik
75dba1f956 experiment: space+k for LSP doc, K for keep_selections 2021-09-24 10:30:23 +09:00
Blaž Hrastnik
9ea9e779b2 experiment: Move keep_primary_selection to , 2021-09-24 10:30:17 +09:00
Leoi Hung Kin
9456d5c1a2
Initial implementation of global search (#651)
* initial implementation of global search

* use tokio::sync::mpsc::unbounded_channel instead of Arc, Mutex, Waker poll_fn

* use tokio_stream::wrappers::UnboundedReceiverStream to collect all search matches

* regex_prompt: unified callback; refactor

* global search doc
2021-09-22 01:03:12 +09:00
kraem
4a003782a5
enable smart case regex search by default (#761) 2021-09-20 13:45:07 +09:00
Gokul Soumya
94abc52b3b
feat: Sticky view mode with Z (#719) 2021-09-10 23:14:23 +09:00
Blaž Hrastnik
4cc562318a Improve docs, fix up a few highlight scopes 2021-09-07 13:03:48 +09:00
oberblastmeister
825bceeab6
add_newline unimpaired mapping (#653)
* added some keymaps

* remove

* remove wrong mappings

* remove

* wrong import

* use enum

* correct line ending

* added to book

* column
2021-09-02 00:55:16 +09:00
Blaž Hrastnik
ce7ad2beb5 Reimplement keep-pipe, it needs to manipulate selections, not text 2021-09-01 11:09:50 +09:00
Omnikar
e772808a5b
Shell commands (#547)
* Implement shell interaction commands

* Use slice instead of iterator for shell invocation

* Default to `sh` instead of `$SHELL` for shell commands

* Enforce trailing comma in `commands` macro

* Use `|` register for shell commands

* Move shell config to `editor` and use in command

* Update shell command prompts

* Remove clone of shell config

* Change shell function names to match prompts

* Log stderr contents upon external command error

* Remove `unwrap` calls on potential common errors

`shell` will no longer panic if:
  * The user-configured shell cannot be found
  * The shell command does not output UTF-8

* Remove redundant `pipe` parameter

* Rename `ShellBehavior::None` to `Ignore`

* Display error when shell command is used and `shell = []`

* Document shell commands in `keymap.md`
2021-08-31 18:13:16 +09:00
Omnikar
46f537d4ce Fix missing backtick in keymap.md 2021-08-27 11:38:17 +05:30
Omnikar
048a390568
Add Command column to keymap documentation (#662) 2021-08-27 11:45:18 +09:00
Gokul Soumya
b59b248561
Add docs for registers, multi key remaps (#557) 2021-08-18 09:53:50 +09:00
Blaž Hrastnik
dbd853a082 Document new keys in book/ 2021-08-08 13:31:09 +09:00
Blaž Hrastnik
66a90130a5 Implement selection rotation with ( and ) 2021-08-06 11:22:01 +09:00
Blaž Hrastnik
5342f976d4 Document C/Alt-C in the keymap 2021-08-05 17:04:26 +09:00
Ryo Hirayama
ef6a2317b7 Update keymap.md 2021-08-01 09:47:24 -07:00
Gokul Soumya
6a8a01df6b Add missing keybinds to docs 2021-07-24 20:11:19 +09:00
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>
2021-07-17 01:12:59 +09:00
Blaž Hrastnik
a4e28c6927 Implement X as extend selection to line bounds 2021-07-05 10:12:34 +09:00
Gokul Soumya
c68fe1f2a3
Add object selection (textobjects) (#385)
* Add textobjects for word

* Add textobjects for surround characters

* Apply clippy lints

* Remove ThisWordPrevBound in favor of PrevWordEnd

It's the same as PrevWordEnd except for taking the current char
into account, so use a "flag" to capture that usecase

* Add tests for PrevWordEnd movement

* Remove ThisWord* movements

They did not preserve anchor positions and were only used
for textobject boundary search anyway so replace them with
simple position finding functions

* Rewrite tests of word textobject

* Add tests for surround textobject

* Add textobject docs

* Refactor textobject word position functions

* Apply clippy lints on textobject

* Fix overflow error with textobjects
2021-07-03 10:07:49 +09:00
PabloMansanet
c2a292ecf3 Update keymap.md 2021-06-30 00:56:19 +09:00
Gokul Soumya
753ed4cbc5 Add documentation for surround 2021-06-22 14:27:51 +09:00
Blaž Hrastnik
f41688d960 Merge x and X 2021-06-20 23:37:11 +09:00
Benoît CORTIER
ffb54b4eac book: document new system clipboard mappings 2021-06-20 23:25:53 +09:00
Gokul Soumya
29f77b9c5f Fix docx formatting and links 2021-06-20 13:04:30 +09:00
Gokul Soumya
eb77de6a51 Format docs for better readability
- Wrapped appropriate table elements in inline code blocks
- Added links to different modes
- Capitalised table elements
2021-06-15 00:20:22 -04:00
Ivan Tham
002f1ad397 Add filter ability to picker
Inspired by doom emacs. Able to filter picker options multiple times.
2021-06-15 12:00:31 +08:00
Robin
9baf1ecc90
add symbol picker (#230)
* add symbol picker

use the lsp document_symbol request

* fix errors from merging in master

* add docs for symbol picker
2021-06-12 21:45:21 +09:00
Robin
44cc0d8eb0
add alternate file (#223)
* add alternate file

inspired by vim ctrl-6/kak ga commands. the alternate file is kept per view

* apply feedback from #223

* rename to last_accessed

* add ga doc

* add fail message for ga
2021-06-12 21:21:06 +09:00
PabloMansanet
86af55c379
Movement fixes, refactor and unit test suite (#217)
* Add convenience/clarity wrapper for Range initialization

* Test horizontal moves

* Add column jumping tests

* Add failing movement conditions for multi-word moves

* Refactor skip_over_next

* Add complex forward movement unit tests

* Add strict whitespace checks and edge case tests

* Restore formatting

* Remove unused function

* Add empty test case for deletion and fix nth_prev_word_boundary

* Add tests for backward motion

* Refactor word movement

* Address review comments and finish refactoring backwards move

* Finish unit test suite

* Fmt pass

* Fix lint erors

* Clean up diff restoring bad 'cargo fmt' actions

* Simplify movement closures (thanks Pickfire)

* Fmt pass

* Replace index-based movement with iterator based movement, ensuring that each move incurs a single call to the RopeSlice API

* Break down tuple function

* Extract common logic to all movement functions

* Split iterator helpers away into their own module

* WIP reducing clones

* Operate on spans

* WIP simplifying iterators

* Simplify motion helpers

* Fix iterator

* Fix all unit tests

* Refactor and simplify

* Simplify fold
2021-06-11 21:57:07 +09:00
Wojciech Kępka
48df05b16d commands: Add goto first non-whitespace char of line 2021-06-08 17:22:37 +09:00
Wojciech Kępka
4bec87ad18 Update keymap 2021-06-08 09:50:14 +09:00
Blaž Hrastnik
ff8a031cb2 Add diagnostics keys to keymap.md 2021-06-07 09:24:23 +09:00
Ivan Tham
2066e866c7 Add spc w w for window mode 2021-06-07 09:08:08 +09:00
Ivan Tham
8c2fa12ffc Add window mode
Fix #93
2021-06-06 10:12:35 +09:00
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
2021-06-05 09:25:46 +09:00
notoria
adcfcf9044 Replace ^/$ with gh/gl 2021-06-04 17:26:16 +09:00
Blaž Hrastnik
4f0e3aa948 Implement gt/gm/gb, remap goto tYpe to gy 2021-06-04 15:47:29 +09:00
Antoni Stevent
3071339cbc update keymap.md to include arrow keys for movement 2021-06-03 23:24:24 +09:00
wullewutz
cfae07e7ba
Fixed c/p error in keymap doc
Go to definition mapping is "gd" not "ge"
2021-06-01 22:36:42 +02:00
Blaž Hrastnik
9c24f1ec0e Drop selection_lines completely, change move_line_start binding 2021-05-18 18:28:32 +09:00
Blaž Hrastnik
bc99b61be2 Update the book (keymaps). 2021-05-12 20:32:44 +09:00
Blaž Hrastnik
16350399ac Add book/ (mdbook based user guide) 2021-04-05 15:48:08 +09:00