[lldb-dev] Unable to use Vi mode in LLDB console on Linux
Greg Clayton via lldb-dev
lldb-dev at lists.llvm.org
Sun May 17 22:44:05 PDT 2020
> On May 17, 2020, at 10:11 AM, Alvin Ye <alvin.ye.y at gmail.com> wrote:
>
> On Sat, May 16, 2020 at 3:44 PM Greg Clayton <clayborg at gmail.com <mailto:clayborg at gmail.com>> wrote:
>>
>> There are some posts about issues with using the "bind -v". It seems it will delete all other key bindings and LLDB does a bunch of bindings for custom things which you won't want to use.
>>
>>> On May 16, 2020, at 10:34 AM, Alvin Ye via lldb-dev <lldb-dev at lists.llvm.org> wrote:
>>>
>>> Hello,
>>>
>>> I'm using LLDB installed as Arch Linux package.
>>>
>>> % lldb -v
>>> lldb version 10.0.0
>>>
>>> % cat ~/.editrc
>>> bind -v
>>
>>>
>>> I'm not able to use vi keybindings like j, k cycle through commands in
>>> the lldb console.
>>
>>>
>>> It would be great if someone could help me with this issu
>>
>> If you end up building LLDB and the modify 'el_set(m_editline, EL_EDITOR, "emacs")' to be 'el_set(m_editline, EL_EDITOR, "vi")' and this really helps, let us know and we can file a task to add a setting to LLDB so we can allow this to be changed.
>>
>> Greg
>>
>
> Thank you for the tips. Building LLDB with 'el_set(m_editline,
> EL_EDITOR, "vi")' didn't exhibit vi mode behaviors and disabled all
> emacs keybindings like ESC-b to go to previous word (Without .editrc
> presence).
> Thank you for taking your time to answer my questions and I'll
> continue my LLDB journey without worrying about using vi mode.
You can enable as much vi mode as possible with your ~/.editrc file. Try doing:
$ man editor
There are many things you can add keyboard shortcuts for and this man page details them all. We seem to have a mixture of both emacs and a few vi keybindings by default. Everything is exposed and can be remapped in your ~/.editrc file. If you come up with a list of vi shortcuts you think others might want, send a reply email with what you found.
Greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20200517/02b01f37/attachment.html>
More information about the lldb-dev
mailing list