Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: always be insert mode #33

Open
airtonix opened this issue Mar 24, 2023 · 1 comment
Open

docs: always be insert mode #33

airtonix opened this issue Mar 24, 2023 · 1 comment

Comments

@airtonix
Copy link

i was using toggle term previously where I had this in my lazy config :

local PluginSpec = {
    -- Terminal
    "akinsho/toggleterm.nvim",
    version = '*',
    config = function()
        
        require("toggleterm").setup({})

        vim.api.nvim_create_autocmd({
            "BufEnter"
        }, {
            pattern = { "term://*toggleterm#*" },
            callback = function()
                vim.cmd("startinsert!")
            end
        })
    end
}

return PluginSpec

this nvim_create_autocmd approach works for nvterm, except i feel like it needs a bit more, like:

  • remain in insert mode after middle click pasting
  • remain in insert mode after hightlighting text in the terminal

Basically I want to be an heretical vim user (may the emporer of man smile upon me) and never leave insert mode when in a terminal.

@airtonix
Copy link
Author

I saw this in the docs

behaviour = {
    auto_insert = true,
}

but it doesn't do what i expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant