Commit Graph

431 Commits

Author SHA1 Message Date
Maxime Coste
81b5de6fd8 Add <a-c> and <a-d> for changing/deleting without yanking
As asked for in #1175
2017-07-11 22:25:15 +09:00
Maxime Coste
b575067317 Add <a-o> and <a-O> to add lines below/above selections
Fixes #1480
2017-07-11 09:03:45 +09:00
Delapouite
f917402f89 Docs: add missing <a-R> key and fix info message 2017-07-09 12:00:28 +02:00
Delapouite
b3f2a7e46e Refine info titles to distinguish f/t (select) and F/T (extend) 2017-07-05 20:23:02 +02:00
Maxime Coste
e95fab0e7a Code style tweak 2017-06-29 07:36:07 +01:00
Maxime Coste
14958a7c94 Validating an empty command in prompt reruns the last command
This is more consistent with other prompts like regexes or shells,
and has proven useful from time to time.
2017-06-29 07:33:16 +01:00
Maxime Coste
9bbab690ba Merge remote-tracking branch 'danr/Expose-last-entered-command-in-register' 2017-06-29 07:29:32 +01:00
Maxime Coste
dc378aed72 Pass a context instead of just the buffer to selector functions 2017-06-26 14:56:50 +01:00
Maxime Coste
42d7b66b92 Support hitting escape to cancel a selection combine operation
Fixes #1443
2017-06-16 10:23:03 +01:00
Delapouite
229848dece Change custom text object desc trigger from ':' to 'c' - Fix #1362 2017-06-14 19:41:30 +02:00
Maxime Coste
609b0bbbac Merge remote-tracking branch 'Delapouite/rotate-forward' 2017-06-08 07:14:20 +01:00
Delapouite
86cc66577b Clarify rotation direction between <'> and <a-'> in info help 2017-06-07 08:53:33 +02:00
Maxime Coste
fd00e1f9ae Merge remote-tracking branch 'Delapouite/underscore' 2017-06-07 07:48:57 +01:00
Delapouite
2f84051efb Add underscore char as a valid punctuation for text-object pairs 2017-06-06 12:04:53 +02:00
Delapouite
b4af4994fb Remember previous NormalParams::count in view-lock mode 2017-06-06 09:52:02 +02:00
Maxime Coste
c1e4b4ff79 Strip surrounding whitespaces in *
Fixes #1406
2017-06-03 18:16:40 +01:00
Maxime Coste
c440bbde81 Merge remote-tracking branch 'Delapouite/shift-modes' 2017-06-03 14:45:48 +01:00
Maxime Coste
0e88a9695a Add support for more selection combining operations
Change append to 'a', add select longest/shortest, union and
intersection.
2017-06-03 13:45:59 +01:00
Delapouite
e8707298c1 Refine info titles to distinguish G and V modes 2017-05-31 19:57:56 +02:00
Maxime Coste
e97f23f2be Use more precise wording for object selection info box 2017-05-27 09:29:51 +01:00
Dan Rosén
b1735ae76e Expose last entered command in register : 2017-05-25 21:48:41 +02:00
Maxime Coste
7ee3039a79 Do not avoid eol in insert mode vertical movement 2017-05-22 17:04:01 +01:00
Maxime Coste
b440d9f537 Change <a-z>/<a-Z> to combine selections instead of appending 2017-05-20 10:31:49 +01:00
Maxime Coste
973487abcd Small reorganization in the normal keymap 2017-05-18 06:05:45 +01:00
Maxime Coste
5ee21ec932 Respect tabstop in Buffer::offset_coord 2017-05-07 16:26:14 +01:00
Maxime Coste
93408e4b76 Do not use any display information to determine where the cursor moves 2017-05-07 16:26:14 +01:00
Maxime Coste
80f1056851 Support appending selections to empty register
Fixes #1332
2017-04-25 17:25:44 +01:00
Maxime Coste
8b1078e510 Use a HashMap to store the normal mode keymap 2017-03-16 23:40:38 +00:00
Maxime Coste
e44f95820e Fixes some clang-tidy warning and add a few missing meta.hh include 2017-03-16 23:34:02 +00:00
Maxime Coste
db9b863222 Migrate WithBitOps template specialization to with_bit_ops function
This way we dont depend on knowing the base template to enable bit ops
on an enum type.
2017-03-15 18:00:58 +00:00
Maxime Coste
f8a625bc2f Merge remote-tracking branch 'occivink/master' 2017-03-03 21:13:16 +00:00
Maxime Coste
ddc5e958e6 Return an optional selection in most selectors, fail rather than keep current
Instead of returning the current selection when a selector fails, return
an empty Optional<Selection>. That means object selections will now
remove the selections that dont match the object.
2017-03-03 20:17:11 +00:00
Maxime Coste
6759511b9e Ensure main selection index is correct directly in SelectionList::remove 2017-03-03 20:17:11 +00:00
Maxime Coste
8a1e5d12ac Make <a-space> throw on invalid index or last selection 2017-03-03 20:17:11 +00:00
Maxime Coste
e3cfde6d07 Add docstring support for mappings, and use them in autoinfo
Fixes #105
Fixes #1100
Closes #1165
2017-03-03 20:16:36 +00:00
Olivier Perret
033b259e5b <space>, <a-space>: throw on invalid preconditions 2017-03-03 13:50:00 +01:00
Maxime Coste
d470bd2cc9 Make numeric registers setable
Fixes #1214
2017-02-14 00:02:01 +00:00
Maxime Coste
bc0dfa9e8f Use <a-'> for backward rotate selection and move rotate content to <a-"> 2017-02-01 22:53:42 +00:00
Maxime Coste
65bbc19d6f Change n behaviour to only select next match for main selection
Select next match for all selections is still available as /<ret>
Fixes #1173
2017-02-01 20:00:05 +00:00
Maxime Coste
bbbb513990 Fix crash when clearing a regex prompt with multiple selections
Fixes #1124
2017-01-24 19:18:29 +00:00
Maxime Coste
7ba24c043a Add gi to go to first non-blank character on line
Fixes #407
2017-01-22 23:53:08 +00:00
Maxime Coste
7316afd17b Use ints instead of unsigned for capture count 2017-01-16 18:49:27 +00:00
Maxime Coste
c24a636cb9 Fix regex search/select not restoring initial selections on abort
And incrementally set the search register for select/split as well
2017-01-16 13:57:14 +00:00
Maxime Coste
8c55acb076 Detect empty selection lists when restoring selections from registers
Fixes #1123
2017-01-11 13:43:41 +00:00
Maxime Coste
dcd8f6ef01 Apply clang-tidy modernize to the codebase 2017-01-08 22:39:01 +00:00
Maxime Coste
4295736c97 Fix handling of main selection when copying selection to next/previous lines
Fixes #1095
2017-01-03 18:41:45 +00:00
Maxime Coste
ac1192f58a Ensure <esc> cancels in replace with char
After recent changes that associated <esc> with the 0x1b codepoint
r<esc> would replace each char with 0x1b instead of canceling the
replace command.
2017-01-02 04:03:02 +00:00
Maxime Coste
3c1f606a22 Move some template code out of selectors.hh into selectors.cc 2017-01-01 19:30:02 +00:00
Maxime Coste
cdb2c766a5 Refactor SelectionList::insert a bit 2017-01-01 17:31:47 +00:00
Maxime Coste
968e573d80 Slight code refactor for paste handling 2017-01-01 12:58:04 +00:00
Maxime Coste
25451ac112 Set the register incrementally as well during incremental search
Fixes #1054
2016-12-23 20:46:50 +00:00
Maxime Coste
d17bed9b80 Display the command prompt in error face when the command is not found
Fixes #1021
2016-12-23 16:23:31 +00:00
Maxime Coste
9ad1c19f69 Validate user text object desc more thorougly
Fixes #992
Fixes #993
Fixes #994
2016-12-15 09:29:38 +00:00
Maxime Coste
2fd1414b05 Clean up includes of user_interface.hh 2016-11-29 19:53:11 +00:00
Maxime Coste
da6d7f4530 Always consider end of selection is not and eol for keep
Fixes #921
2016-11-28 21:07:24 +00:00
Maxime Coste
b3ba769220 Propagate the hooks disabled state through prompt, menu, and command execution
Maintain it as well during buffer creation even if the hooks are not executed
in client context.

Fixes #818
2016-11-14 19:39:35 +00:00
Maxime Coste
9d9beb7e3a Pass regex flags on keep matching/not matching
Related to #921
2016-11-12 18:03:54 +00:00
Maxime Coste
8490caa0d7 Add support for <a-Z> appending current selections to the given register 2016-11-09 13:57:05 +00:00
Maxime Coste
6347787cf2 Propagate NormalParams to user mappings
Closes #896
2016-11-02 23:12:57 +00:00
Maxime Coste
965cd8e0c3 Fix align support with aligntab = true 2016-10-28 09:50:25 +01:00
Maxime Coste
dc18963875 Make o/O open multiple lines when a count is given
Fixes #873
2016-10-24 20:45:12 +01:00
Maxime Coste
2809ce00de Set main selection index to the current sel when piping different selections
Fixes #884
2016-10-23 19:54:40 +01:00
Maxime Coste
8b6eba8208 Add support for repeating the last object/char find command
This is a potential solution for #794.
2016-10-11 00:20:36 +01:00
Delapouite
acafe5f0b9 Fix typo horzontally → horizontally 2016-10-06 16:13:40 +02:00
Maxime Coste
8579e299da Fix custom text object 2016-10-05 09:36:39 +01:00
Maxime Coste
620fc28ea6 Add "(extend)" to search prompts when we are extending the selection
Fixes #832
2016-10-04 13:18:03 +01:00
Maxime Coste
35559b65dd Support codepoints of variable width
Add a ColumnCount type and use it in place of CharCount whenever
more appropriate, take column size of codepoints into account for
vertical movements and docstring wrapping.

Fixes #811
2016-10-01 13:45:00 +01:00
Maxime Coste
fcb37cc754 Pass count to all object selectors 2016-09-26 23:32:07 +01:00
Maxime Coste
97e36233fb Remove the to_string(unsigned) (it conflicts with to_string(size_t) on x86)
Just cast to int when we pass an unsigned.
2016-08-31 09:07:33 +01:00
Maxime Coste
b934bcd4e1 Support merging consecutive selections with <a-m>
Fixes #773
2016-08-27 11:20:38 +01:00
Maxime Coste
093d3bd0df Map tab to jump forward until we can distinguish <c-i> from it
Fixes #769
2016-08-27 11:07:24 +01:00
Maxime Coste
85f54a77ac Display the capture used in select/split prompt
Fixes #770
2016-08-27 10:55:07 +01:00
Maxime Coste
911a32a992 Only drop blank prefixed history entries in command/shell prompts
For regex prompts we actually want to save them, as a leading space
is significant

Fixes #767
2016-08-22 20:37:14 +01:00
Maxime Coste
5b7b6eebaf Regenerate shell-candidates for each completion sessions
That should allow fixing the #665 issue while still avoiding to
run a potentially long shell command on each keystroke.
2016-08-05 13:53:19 +01:00
Maxime Coste
8cc27354e8 Support sorting and merging overlapping separately, fix bug in move
Fixes #754
2016-07-30 15:32:47 +01:00
Maxime Coste
d28e503150 Use the same logic for mouse wheel and (half) page up/down
Fixes #749
2016-07-28 09:51:49 +01:00
Maxime Coste
74c3f101cd Use -1 for invalid codepoint, not 0 2016-07-28 09:24:51 +01:00
Maxime Coste
623fcd88ea Do not avoid end of lines after selecting modified ranges in undo
Fixes #751
2016-07-27 23:53:16 +01:00
Maxime Coste
f30bd4c540 Fix use of dead string memory and quick cleanup 2016-07-27 00:25:05 +01:00
Frank LENORMAND
f04a7a0ed3 Allow selection primitives to use arbitrary punctuation signs 2016-07-26 10:39:18 +03:00
Maxime Coste
78fc88ae6d Display some information when moving in history 2016-07-24 22:55:37 +01:00
Maxime Coste
087a17eb24 Support for going backward/forward in buffer history with <a-u>/<a-U> 2016-07-24 21:25:05 +01:00
Maxime Coste
03a4b3c73f Support counts for undo/redo 2016-07-24 21:25:05 +01:00
Maxime Coste
6b1bd84e8e Allow access to end of line with horizontal moves (h and l)
Lets enable that for some time, get some feedback on that behaviour
change, and see if we keep it.
2016-05-11 00:03:45 +01:00
Maxime Coste
bff9d45bdb Make utf8_iterator codepoint type and difference type configurable 2016-05-09 21:56:08 +01:00
Maxime Coste
199ccb4021 Add a -password switch to :prompt to allow for more secure password entering
Fixes #660
2016-04-19 09:51:09 +01:00
Maxime Coste
5332378419 Fix spaces_to_tabs implementation accessing past end
Fixes #643
2016-03-30 19:27:36 +01:00
Maxime Coste
d3ef2d36ea Add a SplitView container view 2016-03-25 20:38:26 +00:00
Maxime Coste
5bf9243006 User mappings and :exec are always executed in normal mode
Fix #551
2016-03-22 22:54:29 +00:00
Maxime Coste
d277ef6d6c Slight code tweaks in normal mode pipe function 2016-03-17 12:08:11 +00:00
Maxime Coste
131b0a8298 Use ByteCoords directly for buffer insert/erase/replace 2016-03-16 13:59:30 +00:00
Maxime Coste
dca9bccc6a Disable key mapping handling when executing a user mapping
Fixes #629
2016-03-14 20:58:55 +00:00
Maxime Coste
92f96f9455 Change custom object syntax, use a single prompt
Take a description of the object, in <open>,<close> format
2016-03-11 00:14:42 +00:00
Maxime Coste
6c8f8fe691 Rework client redrawing, delay menu/info methods until next refresh
That avoid sending lots of spurious info_hide/menu_hide, just set
a flag and wait until the client is asked to redraw.
2016-03-07 23:11:59 +00:00
Maxime Coste
2626ce858f Move <c-l> handling to normal mode from client
Client handling prevents :exec from triggering a redraw
2016-03-07 22:14:03 +00:00
Maxime Coste
7906704e3b Remove code that should not have been commited 2016-02-29 22:16:59 +00:00
Maxime Coste
b0e12f2bcb Add <C-d> and <C-u> for scroll down/up half a page
Fixes #606
2016-02-29 14:00:09 +00:00
Maxime Coste
1138264a83 Notify when searching for next match wraps around buffer
Fixes #215
2016-02-29 13:50:18 +00:00
Maxime Coste
548e10597c Code cleanup 2016-02-28 18:30:35 +00:00
Maxime Coste
3987463e75 Remove direct access to ui, go through client
Client can now update menu/info positions when the window move
around.
2016-02-27 17:23:13 +00:00