Editing text in nvim (0.1.7) terminal emulator in normal mode.

25 views
Skip to first unread message

Calen Walshe

unread,
May 3, 2017, 10:14:19 AM5/3/17
to Nvim-R
What steps can I take to be able to work with text in the nvim terminal emulator while in normal mode?

Currently, I can navigate the current line of code in the emulator while in normal model. However, when I switch to insert mode it puts the cursor at the end of the line?

Some searching revealed that others had resorted to using VimShell, but I noticed that support for VimShell has been dropped from this project.

Thanks,
Calen

Jakson Alves de Aquino

unread,
May 3, 2017, 10:44:45 AM5/3/17
to Nvim-R
The output of another application in the terminal emulator is not supposed to be edited. You can use the Normal mode to navigate through the output, and copy parts of it into another buffer. The Insert mode was replaced by Terminal mode, and you can only edit the input line before entering it.

Depending on what you are trying to do, you may be better off using the command :Rinsert or switching from pure R to either RMarkdown or Rnoweb (R + LaTeX).

Jakson Alves de Aquino

unread,
May 3, 2017, 11:40:55 AM5/3/17
to Nvim-R
Once you are in Terminal mode, you might use readline commands. Please, see https://askubuntu.com/questions/45521/how-to-navigate-long-commands-faster

Calen Walshe

unread,
May 25, 2017, 12:00:52 PM5/25/17
to Nvim-R
The readline solution works quite well.

To try and take this one step further I attempted to replace the readline default commands with vi commands. Place the following in .inputrc

set -o vi


However, when I open R in terminal mode the vi commands do not work. The default readline commands do.

Any hints on where to get started to fix this?
 
Reply all
Reply to author
Forward
0 new messages