vim

For discussion on all things (neo)vim.
martinklepsch 2020-07-16T13:13:45.397500Z

:term has these docs for switching into terminal mode automatically: autocmd TermOpen * startinsert — I’m wondering how I could package that up in a function or similar that would switch automatically for a specific command but not generally

2020-07-16T13:17:33.397600Z

not sure if that helps you but I have a shortcut setup that goes directly into insert mode like this:

nnoremap gtt :term<CR>i

2020-07-16T14:37:51.397800Z

I find that some modes which build on term are broken, where for example starting a terminal opens it in a split, then leaves me in my original file but now I am in insert mode

2020-07-16T14:38:40.398Z

this might be interaction with placement prefix commands like :vert and :abo - it's intermittent

martinklepsch 2020-07-16T16:00:15.398200Z

@hi895 I think that should work! I’ll add a command to execute but this seems like it should do the trick

2020-07-16T16:00:56.398400Z

nice 🙂

martinklepsch 2020-07-16T16:03:18.398600Z

yup, works perfectly, thank you!

2020-07-16T16:05:26.398800Z

👌