Commit graph

141 commits

Author SHA1 Message Date
Blaž Hrastnik
40969ad452 Partly fix latex highlights and add markup scope docs 2021-12-15 17:46:40 +09:00
Blaž Hrastnik
9bfb701c94 Update lang-support.md 2021-12-15 17:38:03 +09:00
Omnikar
98ce2a301d Load alt default theme if true color is not supported
* Move `runtime/themes/base16_default_terminal.toml` to
  `base16_theme.toml` alongside `theme.toml`
* Use `terminfo` crate to detect whether the terminal supports true
  color and, if the user has no theme configured and their terminal does
  not support true color, load the alt default theme instead of the
  normal default.

Remove `terminfo` dependency, use `COLORTERM` env instead

Prevent user from switching to an unsupported theme

Add `true-color-override` option

If the terminal is wrongly detected to not support true color,
`true-color-override = true` will override the detection.

Rename `true-color-override` to `true-color`
2021-12-14 00:47:18 +09:00
Omnikar
e91d357fae
Macros (#1234)
* Macros WIP

`helix_term::compositor::Callback` changed to take a `&mut Context` as
a parameter for use by `play_macro`

* Default to `@` register for macros

* Import `KeyEvent`

* Special-case shift-tab -> backtab in `KeyEvent` conversion

* Move key recording to the compositor

* Add comment

* Add persistent display of macro recording status

When macro recording is active, the pending keys display will be shifted
3 characters left, and the register being recorded to will be displayed
between brackets — e.g., `[@]` — right of the pending keys display.

* Fix/add documentation
2021-12-12 21:16:48 +09:00
Omnikar
b66d3d3d9d
Add save_selection command (#1247) 2021-12-10 11:46:24 +09:00
Oskar Nehlin
a1e64815cb
Update book to include typable command remapping (#1240)
* Update book to include typable command remapping

* Add additional example
2021-12-09 00:26:33 +09:00
Gokul Soumya
d08bdfa838 Use same name used in config files for langs in docs 2021-12-08 10:23:50 +09:00
Gokul Soumya
a78b789406 Auto generate docs for language support 2021-12-08 10:23:50 +09:00
Gokul Soumya
71292f9f11 docs: Auto generate command list 2021-12-08 10:23:50 +09:00
Omnikar
178cd5ecfc
Add note to keymap.md regarding format_selections (#1230) 2021-12-07 01:44:50 +09:00
Blaž Hrastnik
cab09093dd fix: Normalize backtab into shift-tab
Fixes #1150
2021-12-06 12:25:19 +09:00
Ivan Tham
e2b428cc2d
Add last modified file (gm) (#1093) 2021-12-02 13:46:57 +09:00
George Rodrigues
3e15aead4a
Fix typo on docs (#1201) 2021-12-01 09:11:25 +09:00
Nicholas Boyd Isacsson
6204c38556
Remove defunct helix-bin AUR link 2021-11-29 13:07:32 +01:00
Bob
4f9390a435
gf as goto_file (#1102)
* goto_file

* support goto_file under current cursor

* add C-w f/F

* sync space w with window mode

* Update helix-term/src/commands.rs

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2021-11-29 10:53:29 +09:00
Kirawi
6f1a7b1220
Add llvm grammar (#1167) 2021-11-29 10:38:17 +09:00
ath3
1d773bcefb
Implement black hole register (#1165) 2021-11-28 10:21:40 +09:00
ath3
3b2b7341a5
Fix next char delete key documentation for prompt (#1180) 2021-11-28 10:18:25 +09:00
ath3
72f606ee19
Implement no-yank delete/change (#1099) 2021-11-24 16:46:40 +09:00
Bob
21143e8d22
Align selections via & (#1101)
* align lines

* remove log statement

* use selections to align

* fix a clippy issue

* only accept 1,2,3 as user count

* Update helix-term/src/commands.rs

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

* return if user count is not correct

* add doc

Co-authored-by: Ivan Tham <pickfire@riseup.net>
2021-11-23 23:08:05 +09:00
NexiNov
4238a843f7
Add link to Keymap page in book. (#1137) 2021-11-22 20:14:42 +05:30
Dan Nases Sha
6a4d9693ba
File picker config (#988)
* squashed WIP commits

* hide_gitignore working with config

* pass reference to new config parameter of file_picker()

* update config option name to match name on walk builder

* add comments to config and documentation of option to book

* add git_ignore option to WalkBuilder within prompt in commands.rs

* WIP: add FilePickerConfig struct

* WIP: cleanup

* WIP: add more options including max_depth

* WIP: changed defaults to match ignore crate defaults

* WIP: change WalkBuilder in global_search() to use config options

* WIP: removed follow_links, changed max_depth to follow config setting

* WIP: update book with file-picker inline table notation

* update documentation for file-picker config in book

* adjusted to [editor.file-picker] in book configuration.md

* adjust comments in editor.rs to be doc comments, cleanup

* adjust comments

* adjust book
2021-11-20 23:23:36 +09:00
Martin Junghanns
f2b4ff23ba
Document scrolling for hover command in keymap.md (#1117)
* Document scrolling for hover command in keymap.md

* Move popup keys to a dedicated section
2021-11-19 11:58:22 +09:00
NexiNov
c95cb2be28
Remove extra instance of delete_word_backword in book (#1103) 2021-11-16 01:46:27 +09:00
Jason Hansen
6cb35d28a8
Add command to inc/dec number under cursor (#1027)
* Add command to inc/dec number under cursor

With the cursor over a number in normal mode, Ctrl + A will increment the
number and Ctrl + X will decrement the number. It works with binary, octal,
decimal, and hexidecimal numbers. Here are some examples.

0b01110100
0o1734
-24234
0x1F245

If the number isn't over a number it will try to find a number after the
cursor on the same line.

* Move several functions to helix-core

* Change to work based on word under selection

* It no longer finds the next number if the cursor isn't already over
  a number.
* It only matches numbers that are part of words with other characters
  like "foo123bar".
* It now works with multiple selections.

* Add some unit tests

* Fix for clippy

* Simplify some things

* Keep previous selection after incrementing

* Use short word instead of long word

This change requires us to manually handle minus sign.

* Don't pad decimal numbers if no leading zeros

* Handle numbers with `_` separators

* Refactor and add tests

* Move most of the code into core
* Add tests for the incremented output

* Use correct range

* Formatting

* Rename increment functions

* Make docs more specific

* This is easier to read

* This is clearer

* Type can be inferred
2021-11-16 00:32:58 +09:00
Bob
46d9ae2b62
Readline style insert mode (#1039)
* readline style insert mode

* update keymap.md

* don't save change history in insert mode

* Revert "don't save change history in insert mode"

This reverts commit cb47f946d7fb62ceda68e7d1692a3914d0be7762.

* don't affect register and history in insert mode

* add insert_register

* don't call exit_select_mode in insert mode

* avoid set_selection

* avoid duplicated current!
2021-11-16 00:31:20 +09:00
Ivan Tham
b7c3877e94
Add movement shortcut for history (#1088)
alt-u and alt-U
2021-11-15 00:16:47 +09:00
ath3
6fa76d9fe7
Add trim_selections command (#1092) 2021-11-15 00:16:20 +09:00
Ebbe Steenhoudt
edc976b6bb
Added workspace_symbol_picker (#1041)
* Added workspace_symbol_picker

* Moved truncation of the symbol pickers to the end.

* Fixed typo
2021-11-15 00:12:56 +09:00
ath3
35c974c9c4
Implement "Goto last modification" command (#1067) 2021-11-15 00:11:53 +09:00
Gokul Soumya
fa0cb010e1
docs: Mark more keybinds that require LSP and treesitter (#1081) 2021-11-12 10:35:32 +09:00
NexiNov
187197afb1
Add arrow keys to view mode (#987)
* Add arrow keys to view mode

* Drop C-up and C-down

* Update docs for #987

* Format correctly

* Drop other keymaps

* Correct keymap.md

* Add arrow keys to view mode

Drop C-up and C-down

Update docs for #987

Format correctly

Drop other keymaps

Correct keymap.md

Rebase

Co-authored-by: Rust & Python <nexinov@localhost.gud-o15>
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2021-11-12 09:48:37 +09:00
Omnikar
bf95a9ed04
Add remove_selections command (#1065)
* Add `remove_selections` command

* Document `remove_selections`

* Update helix-term/src/keymap.rs

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2021-11-12 09:34:08 +09:00
Omnikar
d131a9dd0e
Allow keys to be mapped to sequences of commands (#589)
* Allow keys to be mapped to sequences of commands

* Handle `Sequence` at the start of `Keymap::get`

* Use `"[Multiple commands]"` as command sequence doc

* Add command sequence example to `remapping.md`
2021-11-11 13:44:50 +09:00
Bob
4d22454386
add wonly -- window only (#1057)
* add wonly

* Update book/src/keymap.md

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

* add `wonly` to space w mode too

* remove the TODO

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2021-11-11 11:32:23 +09:00
Gokul Soumya
92d23430c0
Cleanup keymap doc book page (#1042)
- Clearly mark keybinds that require LSP
- Fix incorrect rendering of Prompt section due to missing newline
2021-11-10 10:47:07 +09:00
Bob
7c9f620236
add <C-h>, <C-u>, <C-d>, Delete in prompt mode (#1034) 2021-11-09 14:43:50 +09:00
CossonLeo
490919df4f
Add rename_symbol to book/ (#1031)
* rename_symbol book

* Update book/src/keymap.md

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

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2021-11-09 11:12:11 +09:00
ath3
77dbbc73f9
Detect filetype from shebang line (#1001) 2021-11-09 00:19:44 +09:00
LollipopFt
bf4c70e027
added Down keymapping. (#1019) 2021-11-09 00:14:03 +09:00
Omnikar
a252ecd8c8
Add WORD textobject (#991)
* Add WORD textobject

* Document WORD textobject
2021-11-08 09:54:39 +09:00
Gokul Soumya
e0e227d172
Touch up docs for adding new language (#1002) 2021-11-08 09:52:51 +09:00
Blaž Hrastnik
29fe504398
book: Mention git submodule sync too 2021-11-07 10:33:05 +09:00
ammkrn
acced82be6
feat(book/src/languages.md) (#979)
* feat(book/src/languages.md)

Add a section in the book about language-specific settings and the languages.toml file.

* Update book/src/languages.md

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

* feat(book/src/guides/adding_languages.md)

Add book section on adding a new language to the compile-time/root languages.toml file.

* Update book/src/guides/adding_languages.md

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

* Update book/src/guides/adding_languages.md

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

* refactor(revise book/src/languages.md)

Change the book page on language settings to match suggestions by archseer and mention both toml files.

Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2021-11-07 10:31:12 +09:00
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
2021-11-06 17:33:30 +09:00
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
2021-11-05 11:25:08 +09:00
ath3
78c68fae91 Implement "Goto next buffer / Goto previous buffer" commands 2021-11-04 14:03:03 +09:00
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>
2021-11-04 12:26:01 +09:00
Gokul Soumya
253bd6b3a8
Add better description for copy_selection command (#969) 2021-11-03 22:22:41 +09:00
Kirawi
ee889aaa85
Updated tree-sitter query scopes (#896)
* updated theme scopes

variable.property -> variable.field
property -> variable.field

* updated theme scopes

* update book and themes

updated book and themes to reflect scope changes

* wip

* update more queries

* update dark_plus.toml
2021-11-03 12:00:52 +09:00