mirror of
https://github.com/mawww/kakoune.git
synced 2024-09-11 13:00:41 +03:00
Add distinct w (curr buf) / W (all buf) word completion for <c-x>
This commit is contained in:
parent
30ce5a0055
commit
d5b6669a83
@ -1224,8 +1224,9 @@ reached (see `idle_timeout` option). Insert mode completion can be explicitly tr
|
||||
using `<c-x>`, followed, by:
|
||||
|
||||
* *f* : filename completion
|
||||
* *w* : buffer word completion
|
||||
* *l* : buffer line completion
|
||||
* *w* : word completion (current buffer)
|
||||
* *W* : word completion (all buffers)
|
||||
* *l* : line completion (current buffer)
|
||||
|
||||
Completion candidates can be selected using `<c-n>` and `<c-p>`.
|
||||
|
||||
|
@ -50,7 +50,10 @@ Insert mode
|
||||
explicit file completion
|
||||
|
||||
*w*:::
|
||||
explicit word completion
|
||||
explicit word completion (current buffer)
|
||||
|
||||
*W*:::
|
||||
explicit word completion (all buffers)
|
||||
|
||||
*l*:::
|
||||
explicit line completion
|
||||
|
@ -1208,12 +1208,15 @@ public:
|
||||
if (key.key == 'f')
|
||||
m_completer.explicit_file_complete();
|
||||
if (key.key == 'w')
|
||||
m_completer.explicit_word_complete();
|
||||
m_completer.explicit_word_buffer_complete();
|
||||
if (key.key == 'W')
|
||||
m_completer.explicit_word_all_complete();
|
||||
if (key.key == 'l')
|
||||
m_completer.explicit_line_complete();
|
||||
}, "enter completion type",
|
||||
"f: filename\n"
|
||||
"w: word\n"
|
||||
"w: word (current buffer)\n"
|
||||
"W: word (all buffers)\n"
|
||||
"l: line\n");
|
||||
update_completions = false;
|
||||
}
|
||||
|
@ -548,7 +548,13 @@ void InsertCompleter::explicit_file_complete()
|
||||
m_explicit_completer = complete_filename<false>;
|
||||
}
|
||||
|
||||
void InsertCompleter::explicit_word_complete()
|
||||
void InsertCompleter::explicit_word_buffer_complete()
|
||||
{
|
||||
try_complete(complete_word<false>);
|
||||
m_explicit_completer = complete_word<false>;
|
||||
}
|
||||
|
||||
void InsertCompleter::explicit_word_all_complete()
|
||||
{
|
||||
try_complete(complete_word<true>);
|
||||
m_explicit_completer = complete_word<true>;
|
||||
|
@ -86,7 +86,8 @@ public:
|
||||
void reset();
|
||||
|
||||
void explicit_file_complete();
|
||||
void explicit_word_complete();
|
||||
void explicit_word_buffer_complete();
|
||||
void explicit_word_all_complete();
|
||||
void explicit_line_complete();
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user