0

call feedkeys('gg', 'int') seems to work, but what would be the Vim configuration language equivalent?

3

Don't you mean ggA? Anyways, there's no separate language for Vim configuration. Everything is "Vim script":

Your first experience with Vim scripts is the vimrc file. Vim reads it when it starts up and executes the commands. You can set options to values you prefer. And you can use any colon command in it (commands that start with a ":"; these are sometimes referred to as Ex commands or command-line commands). Syntax files are also Vim scripts. As are files that set options for a specific file type.

(from :h vim-script-intro)

So the literal answer to your literal question is: call feedkeys('ggA', 'int'). A slightly more thoughtful answer would also mention that if you want to execute Normal mode commands from a script (or from the command line) then you typically would use :norm. E.g. norm! ggA. (The ! is used to prevent interference from existing mappings.)

Note: someone answered your question on the other site with an autocommand based solution and I think that's the right approach. Have you followed through on that?

| improve this answer | |
  • Thanks! Yes, the autocommand solution did work; I was just trying to split the problem into manageable pieces to work out a solution. – l0b0 Oct 23 '18 at 7:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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