Skip to main content
deleted 2 characters in body
Source Link

Depending on how I launch Vim, suspending with <C-z> or with :suspend causes Vim to drop into an empty terminal (no shell) and get stuck there. I know I can unmap <C-z> like so map <C-z> <Nop> but is there a way I can prevent :suspend from running? Or redefine it to be an empty function?

I don't want to run Vim in restricted mode vim -Z because this doesn't allow things like :sh which actually doesdo still work.

Depending on how I launch Vim, suspending with <C-z> or with :suspend causes Vim to drop into an empty terminal (no shell) and get stuck there. I know I can unmap <C-z> like so map <C-z> <Nop> but is there a way I can prevent :suspend from running? Or redefine it to be an empty function?

I don't want to run Vim in restricted mode vim -Z because this doesn't allow things like :sh which actually does still work.

Depending on how I launch Vim, suspending with <C-z> or with :suspend causes Vim to drop into an empty terminal (no shell) and get stuck there. I know I can unmap <C-z> like so map <C-z> <Nop> but is there a way I can prevent :suspend from running? Or redefine it to be an empty function?

I don't want to run Vim in restricted mode vim -Z because this doesn't allow things like :sh which actually do still work.

Source Link

Prevent vim from running a built-in function?

Depending on how I launch Vim, suspending with <C-z> or with :suspend causes Vim to drop into an empty terminal (no shell) and get stuck there. I know I can unmap <C-z> like so map <C-z> <Nop> but is there a way I can prevent :suspend from running? Or redefine it to be an empty function?

I don't want to run Vim in restricted mode vim -Z because this doesn't allow things like :sh which actually does still work.