2011-09-21 16:37:09 +02:00
|
|
|
#ifndef selectors_hh_INCLUDED
|
|
|
|
#define selectors_hh_INCLUDED
|
|
|
|
|
2012-02-07 15:26:51 +01:00
|
|
|
#include "selection.hh"
|
2012-10-08 19:12:09 +02:00
|
|
|
#include "utf8.hh"
|
2011-09-21 16:37:09 +02:00
|
|
|
|
|
|
|
namespace Kakoune
|
|
|
|
{
|
|
|
|
|
2012-03-07 20:20:32 +01:00
|
|
|
template<bool punctuation_is_word>
|
2012-02-10 00:47:55 +01:00
|
|
|
SelectionAndCaptures select_to_next_word(const Selection& selection);
|
2012-03-07 20:20:32 +01:00
|
|
|
template<bool punctuation_is_word>
|
2012-02-10 00:47:55 +01:00
|
|
|
SelectionAndCaptures select_to_next_word_end(const Selection& selection);
|
2012-03-07 20:20:32 +01:00
|
|
|
template<bool punctuation_is_word>
|
2012-02-10 00:47:55 +01:00
|
|
|
SelectionAndCaptures select_to_previous_word(const Selection& selection);
|
2012-03-07 20:20:32 +01:00
|
|
|
|
2012-02-10 00:47:55 +01:00
|
|
|
SelectionAndCaptures select_line(const Selection& selection);
|
|
|
|
SelectionAndCaptures select_matching(const Selection& selection);
|
2012-10-08 19:12:09 +02:00
|
|
|
|
|
|
|
|
|
|
|
using CodepointPair = std::pair<utf8::Codepoint, utf8::Codepoint>;
|
2012-02-10 00:47:55 +01:00
|
|
|
SelectionAndCaptures select_surrounding(const Selection& selection,
|
2012-10-08 19:12:09 +02:00
|
|
|
const CodepointPair& matching,
|
2012-02-10 00:47:55 +01:00
|
|
|
bool inside);
|
|
|
|
|
|
|
|
SelectionAndCaptures select_to(const Selection& selection,
|
2012-10-08 19:12:09 +02:00
|
|
|
utf8::Codepoint c,
|
|
|
|
int count, bool inclusive);
|
2012-02-10 00:47:55 +01:00
|
|
|
SelectionAndCaptures select_to_reverse(const Selection& selection,
|
2012-10-08 19:12:09 +02:00
|
|
|
utf8::Codepoint c,
|
|
|
|
int count, bool inclusive);
|
2012-02-10 00:47:55 +01:00
|
|
|
|
|
|
|
SelectionAndCaptures select_to_eol(const Selection& selection);
|
|
|
|
SelectionAndCaptures select_to_eol_reverse(const Selection& selection);
|
|
|
|
|
2012-03-12 15:23:30 +01:00
|
|
|
template<bool punctuation_is_word>
|
|
|
|
SelectionAndCaptures select_whole_word(const Selection& selection, bool inner);
|
2012-02-10 00:47:55 +01:00
|
|
|
SelectionAndCaptures select_whole_lines(const Selection& selection);
|
|
|
|
SelectionAndCaptures select_whole_buffer(const Selection& selection);
|
|
|
|
|
|
|
|
SelectionAndCaptures select_next_match(const Selection& selection,
|
2012-04-14 03:17:09 +02:00
|
|
|
const String& regex);
|
2012-02-10 00:47:55 +01:00
|
|
|
|
|
|
|
SelectionAndCapturesList select_all_matches(const Selection& selection,
|
2012-04-14 03:17:09 +02:00
|
|
|
const String& regex);
|
2012-02-10 00:47:55 +01:00
|
|
|
|
|
|
|
SelectionAndCapturesList split_selection(const Selection& selection,
|
2012-04-14 03:17:09 +02:00
|
|
|
const String& separator_regex);
|
2011-11-21 20:30:44 +01:00
|
|
|
|
2011-09-21 16:37:09 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif // selectors_hh_INCLUDED
|