Maxime Coste
67452c3441
Tweak prompt auto show completion
...
* Auto show completion even before the first key is pressed
* Auto show next completions when validating a single choice completion
2013-11-12 18:56:48 +00:00
Maxime Coste
03a6561f50
use abreviated form for keys in client.cc
2013-11-10 22:48:56 +00:00
Maxime Coste
68a27af56e
Use InsertChar hook for char insertion, and InsertKey for key press
2013-11-04 22:02:44 +00:00
Maxime Coste
9521413b62
Tweak insert completion behaviour
2013-11-04 22:02:44 +00:00
Maxime Coste
471aeaab9a
remove filters, use hooks instead
2013-11-04 22:02:44 +00:00
Maxime Coste
3e12507636
Remove IncrementalInserter and move it's code to InputModes::Insert
2013-11-04 22:02:43 +00:00
Maxime Coste
3e1bb777ce
Add automatic completion display in prompt mode
...
Controlled by the autoshowcompl option
Completers now take a CompletionFlag parameter, used to specify
we want fast completion (tag completion can be slow, we do not
want to run it if not explicitely wanted by the user).
2013-11-04 21:59:28 +00:00
Maxime Coste
cf6c07d37d
Specify key modifiers using constexpr functions for brevity
2013-10-26 18:42:36 +01:00
Maxime Coste
0746e7309e
InputMode::Prompt: use an enum for mode rather than bool m_insert_reg
2013-10-26 14:06:27 +01:00
Maxime Coste
ebd768e03d
remove unneeded code in client
2013-10-26 11:49:16 +01:00
Maxime Coste
2c09da50be
Add key mapping support
2013-10-25 00:30:46 +01:00
Maxime Coste
baa9f28714
Add an autoreload YesNoAsk option, for configuring buffer reloading behaviour.
2013-10-21 18:58:11 +01:00
Maxime Coste
03c74b7a88
Detect file external modification and ask the user whether to reload or not
...
* Buffer now store a m_fs_timestamp field.
* Client in Normal mode checks current buffer file every 500 ms, or
each time it goes back to Normal mode.
2013-10-15 18:51:31 +01:00
Maxime Coste
fe0a4f0d11
Reset normal mode when changing the current editor
2013-10-15 18:50:43 +01:00
Maxime Coste
ee0e6dcef9
Display session name in the status line
2013-10-11 18:43:39 +01:00
Maxime Coste
93f6a2ee43
Display target register name in status line when recording a macro
2013-10-11 00:17:22 +01:00
Maxime Coste
c478a97a2f
Let InputModes describe themselves for status line display
2013-10-11 00:17:21 +01:00
Maxime Coste
74fe8b5e8d
Remove Context::numeric_param, pass it directly to normal mode functions
2013-10-10 21:22:20 +01:00
Maxime Coste
307fc228d2
Add <c-u> in insert mode for forcing commiting the current undo group
2013-10-02 18:45:39 +01:00
Maxime Coste
5ae43acf94
Add prefix_match function and use it instead of adhoc code
2013-09-23 21:16:25 +02:00
Maxime Coste
7fef7ec063
Add a InputMode::on_replaced virtual method.
...
Destructors are not a good place to run mode exit hooks, as they
wont be called until the next mode trash clearing, so we now call
this virtual method on the previous mode just before it gets replaced.
2013-09-16 19:38:28 +01:00
Maxime Coste
168b4b775b
Do not clear Client::m_mode_trash in handle_key, but in handle_available_input
...
handle_key can be called from exec_keys while running a hook, and a previous
key in exec_keys could have changed the mode. This would make the mode that
runned the hook deleted when the controls returns to it.
handle_available_input should always be called at top level, so can safely
clear the mode trash.
2013-09-16 19:25:18 +01:00
Maxime Coste
06e06d6ea6
remove print_status from UserInterface, pass status line to draw
...
Client store the current status line. This way calls to print status
do not force the user interface to display directly.
2013-09-16 19:15:13 +01:00
Maxime Coste
49903523a7
Resurect Client::handle_available_input()
2013-09-16 18:48:41 +01:00
Maxime Coste
823812fd1a
rename InputHandler to Client
2013-09-12 23:47:23 +02:00
Maxime Coste
4aa3a36102
rename Client to InputHandler
2012-10-17 13:14:03 +02:00
Maxime Coste
4be6882bd5
Menu: support searching through choices with /
...
when hitting / while in a menu, a regex filter can be entered so that only
entries matching it are selectable, <esc> disable filtering while a second
<esc> close the menu as usual.
2012-10-15 12:49:46 +02:00
Maxime Coste
148466c659
Extract basic line editing functionality from PromptMode to LineEditor
2012-10-14 16:24:35 +02:00
Maxime Coste
4210a17753
Client: never call substr(CharCount, String::npos);
2012-10-11 14:22:08 +02:00
Maxime Coste
c92077762c
Makefile: add -Wall to CXXFLAGS
2012-10-11 01:17:29 +02:00
Maxime Coste
0ce6bd9bf5
use ByteCount instead of CharCount when we are really counting bytes
...
(that is most of the time when we are not concerned with displaying)
2012-10-11 00:41:48 +02:00
Maxime Coste
7a8366da2b
add a unicode.hh header for Codepoint related functions, s/utf8::Codepoint/Codepoint/
2012-10-09 19:15:05 +02:00
Maxime Coste
e1d4215159
InsertMode insert the whole utf8 representation of a codepoint
2012-10-09 14:31:00 +02:00
Maxime Coste
bff015d5b9
WordCompleter: avoid word currently being edited
2012-10-08 19:14:48 +02:00
Maxime Coste
bd0805cf3e
autoenable word completion while inserting
2012-10-01 14:23:04 +02:00
Maxime Coste
29b72b3e24
Add a word completing functionality to insert mode (wip)
2012-09-30 16:24:06 +02:00
Maxime Coste
5b6cb500fc
Menus can be placed anywhere on the screen, and takes a style parameter
...
This paves the way for insert mode completion menu using the current
prompt menu system.
2012-09-30 15:18:37 +02:00
Maxime Coste
a2fd1528e6
Move last insertion from Client to Context
2012-09-26 20:07:06 +02:00
Maxime Coste
efc069b531
Extract IncrementalInserter::Mode as InsertMode
...
move ClientMode classes in a namespace due to InsertMode name collisions
2012-09-26 14:22:24 +02:00
Maxime Coste
f76323f56e
Move UserInterface out of Client into Context
2012-09-26 14:13:04 +02:00
Maxime Coste
747c14c19f
Hide more Client Mode code in the cpp
2012-09-24 19:39:40 +02:00
Maxime Coste
a312ce6dc2
extract Client virtual methods to a UserInterface class
2012-09-24 19:24:27 +02:00
Maxime Coste
0380c999c3
move Client::Mode class definition in client.cc
2012-09-24 14:03:04 +02:00
Maxime Coste
00e357ed56
PromptMode: fix completion of non-last parameters
2012-09-17 13:37:08 +02:00
Maxime Coste
6f6f10c83d
simplify tab completion code in Client::InsertMode
2012-09-12 19:09:27 +02:00
Maxime Coste
cfbe32f6a2
support Tab/BackTab keys in MenuMode as well
2012-09-12 14:25:14 +02:00
Maxime Coste
9dfccddca8
Correctly handle arrow keys in insert mode
2012-09-11 19:09:14 +02:00
Maxime Coste
ee4c6b04a6
Support Shift-Tab in prompt mode to go back in completions
2012-09-11 14:27:21 +02:00
Maxime Coste
499bb77491
Cleanup Key handling, use symbolic names for function keys
2012-09-07 20:22:19 +02:00
Maxime Coste
1e18dcba0f
fix Client::repeat_last_insert when no last insert
2012-09-07 14:28:27 +02:00