2013-04-12 14:28:13 +02:00
|
|
|
#ifndef normal_hh_INCLUDED
|
|
|
|
#define normal_hh_INCLUDED
|
|
|
|
|
2017-10-17 05:29:52 +02:00
|
|
|
#include "optional.hh"
|
2013-04-12 14:28:13 +02:00
|
|
|
#include "keys.hh"
|
2018-01-18 09:57:14 +01:00
|
|
|
#include "keymap_manager.hh"
|
2015-03-05 20:57:46 +01:00
|
|
|
#include "string.hh"
|
2019-05-13 09:33:18 +02:00
|
|
|
#include "exception.hh"
|
2013-04-12 14:28:13 +02:00
|
|
|
|
|
|
|
namespace Kakoune
|
|
|
|
{
|
|
|
|
|
|
|
|
class Context;
|
|
|
|
|
2019-05-13 09:33:18 +02:00
|
|
|
struct no_selections_remaining : runtime_error
|
|
|
|
{
|
|
|
|
no_selections_remaining() : runtime_error("no selections remaining") {}
|
|
|
|
};
|
|
|
|
|
2014-11-28 14:58:36 +01:00
|
|
|
struct NormalParams
|
|
|
|
{
|
|
|
|
int count;
|
|
|
|
char reg;
|
|
|
|
};
|
|
|
|
|
2017-03-17 00:40:38 +01:00
|
|
|
struct NormalCmd
|
2014-07-08 21:25:09 +02:00
|
|
|
{
|
2017-10-20 06:16:58 +02:00
|
|
|
StringView docstring = {};
|
|
|
|
void (*func)(Context& context, NormalParams params) = nullptr;
|
2014-07-08 21:25:09 +02:00
|
|
|
};
|
|
|
|
|
2017-10-17 05:29:52 +02:00
|
|
|
Optional<NormalCmd> get_normal_command(Key key);
|
2013-04-12 14:28:13 +02:00
|
|
|
|
2018-01-18 09:57:14 +01:00
|
|
|
struct KeyInfo
|
|
|
|
{
|
|
|
|
ConstArrayView<Key> keys;
|
|
|
|
StringView docstring;
|
|
|
|
};
|
|
|
|
|
2019-11-02 21:49:26 +01:00
|
|
|
String build_autoinfo_for_mapping(const Context& context, KeymapMode mode,
|
2018-01-18 09:57:14 +01:00
|
|
|
ConstArrayView<KeyInfo> built_ins);
|
|
|
|
|
2013-04-12 14:28:13 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif // normal_hh_INCLUDED
|