0

I am very often typing :Te and use tab to auto complete this value to :Texplore. However, when I misstype to :te, it will autocomplete to :terminal, which opens a terminal in the current buffer, so I am losing my currently opened file, which is really a pain.

Also, I am using nvim in tmux, so there is actually no need for me to use the terminal emulator included in nvim. So I was wondering if there is some option to disable or remove the :terminal command, but I couldn't find anything.

2
  • 1
    Why not make a mapping if you’re doing it so often? <Leader>T strikes me as one appropriate choice
    – D. Ben Knoble
    Commented Mar 20, 2020 at 14:39
  • Because it is hard to change habbits :-) And also because I really never want to open the terminal in vim, no matter in what circumstance. Commented Mar 22, 2020 at 9:14

1 Answer 1

1

There's no way to disable built-in commands but you can use :cabbr to map :te to :Texplore: cabbr te Texplore.

Also note that on normal mode on any buffer (including the terminal) you can press Ctrl-^ to go back to the previous one

1
  • That's not really satisfying :-/ But the Ctrl-^ workaround is awesome, might also be handy in other situations :-D Commented Mar 20, 2020 at 12:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.