vim-floaterm icon indicating copy to clipboard operation
vim-floaterm copied to clipboard

Startinsert only specific patterns

Open yutkat opened this issue 3 years ago • 2 comments

Before reporting

I want to do startinsert only for the following patterns. Because I'm using Floaterm to run tests, etc.

let g:floaterm_autoinsert = v:false
autocmd TermOpen,TermEnter term://*/zsh startinsert

But I can't do that because the following line will force the mode back to normal. https://github.com/voldikss/vim-floaterm/blob/b7747704c4df716efd21f331b4d94336c490a5ad/autoload/floaterm/util.vim#L60

I would like you to remove that line or add an option to skip it.

Describe your question, feature request, or bug.

Steps to reproduce

Using the minimal vimrc

set nocompatible
set hidden
set termguicolors
set runtimepath^=/path/to/vim-floaterm
filetype plugin indent on
syntax on
let g:floaterm_autoinsert = v:false
autocmd TermOpen,TermEnter term://*/zsh startinsert
" autocmd FloatermOpen term://*/zsh startinsert " -> overwritten

Steps to reproduce:

  1. :FloatermNew
  2. Check the mode

Actual behaviour

Return to normal mode when opening zsh on floaterm

Expected behaviour

I want to do startinsert only when the execution is zsh.

yutkat avatar Jun 14 '21 08:06 yutkat

I propose that this option should be removed completely. Startinsert can be controlled by the users with autocommands, there is no need for us to have this.

adigitoleo avatar Feb 05 '22 03:02 adigitoleo

I propose that this option should be removed completely. Startinsert can be controlled by the users with autocommands, there is no need for us to have this.

RIGHT!!! I feel that the plugin has exposed so much interfaces/options which users can implement via easy vimscript. These redunant options increases the complexity of the plugin and I'm considering to remove them.

voldikss avatar Feb 05 '22 14:02 voldikss